Community discussions

MikroTik App
 
zakai
newbie
Topic Author
Posts: 26
Joined: Thu Apr 18, 2013 4:04 pm

BGP route not advertised to ISP

Wed Apr 24, 2013 12:05 pm

Hi,

First of all I'm new to MT and RouterOS coming from IOS.

I have 2 established BGP sessions to 2 ISPs. I receive full updates from both of them. The problem is the network we are using (e.g. 1.2.3.0/24) is not advertised to them, no updates are sent from the edge router to the ISPs.

The network is added with "network" command. From what I've been told here on forum, (unlike cisco) there's no need for this network to be in the routing table in order to be advertised to the ISPs.
I use in filter to assign the local preference to the routes I receive and out filter to make sure nothing except the desired network is advertised and to prepend the ASN for the advertisments to the backup ISP. There's no redistribution involved.

Below is the actual BGP config (real IPs are not shown):
/routing bgp instance
add as=12345 client-to-client-reflection=no disabled=no ignore-as-path-len=no name=BGP out-filter=\
    "" redistribute-connected=no redistribute-ospf=no redistribute-other-bgp=no redistribute-rip=no \
    redistribute-static=no router-id=1.2.3.1 routing-table=""

/routing bgp network
add disabled=no network=1.2.3.0/24 synchronize=no

/routing bgp peer
add address-families=ip as-override=no default-originate=never disabled=no hold-time=3m in-filter=\
    isp1-in instance=BGP multihop=no name=isp1 nexthop-choice=default out-filter=isp1-out \
    passive=no remote-address=1.1.1.1 remote-as=1111 remove-private-as=no route-reflect=no \
    tcp-md5-key="" ttl=default use-bfd=no
add address-families=ip as-override=no default-originate=never disabled=no hold-time=3m in-filter=\
    isp2-in instance=BGP multihop=no name=isp2 nexthop-choice=default out-filter=isp2-out \
    passive=no remote-address=2.2.2.2 remote-as=2222 remove-private-as=no route-reflect=no \
    tcp-md5-key="" ttl=default use-bfd=no

/routing filter
add action=accept bgp-origin=egp chain=isp1-out disabled=no invert-match=no prefix=1.2.3.0/24 \
    set-bgp-prepend-path=""
add action=discard chain=isp1-out disabled=no invert-match=no set-bgp-prepend-path=""

add action=accept bgp-local-pref=500 chain=isp1-in disabled=no invert-match=no \
    set-bgp-prepend-path=""

add action=accept bgp-origin=egp chain=isp2-out disabled=no invert-match=no prefix=1.2.3.0/24 \
    set-bgp-prepend=3 set-bgp-prepend-path=""
add action=discard chain=isp2-out disabled=no invert-match=no set-bgp-prepend-path=""

add action=accept bgp-local-pref=100 chain=isp2-in disabled=no invert-match=no \
    set-bgp-prepend-path=""
Any help would be much appreciated.
 
zakai
newbie
Topic Author
Posts: 26
Joined: Thu Apr 18, 2013 4:04 pm

Re: BGP route not advertised to ISP

Wed Apr 24, 2013 1:12 pm

It all works well if I take out the
bgp-origin=egp
and leave the
bgp-origin=igp
.

However my goal is to advertise the route to the ISPs as egp and not igp. Is there any way I can achieve that with the current configuration or do I have to rely on redistribution. I did not mentioned that the /24 is splitted inside the organization.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7041
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: BGP route not advertised to ISP

Wed Apr 24, 2013 1:46 pm

bgp-origin=egp in filter does not set anything it matches against origin attribute of the prefix.

You cannot change origin of the prefix with routing filters.
 
zakai
newbie
Topic Author
Posts: 26
Joined: Thu Apr 18, 2013 4:04 pm

Re: BGP route not advertised to ISP

Wed Apr 24, 2013 1:56 pm

Thanks mrx!

Is there any way I can advertise the route as egp?
 
cupis
Frequent Visitor
Frequent Visitor
Posts: 74
Joined: Sun Apr 10, 2011 1:25 am

Re: BGP route not advertised to ISP

Wed Apr 24, 2013 5:29 pm

Is there any way I can advertise the route as egp?
The routes will automatically be eBGP, because your ASN is different to the peers ASN.
 
zakai
newbie
Topic Author
Posts: 26
Joined: Thu Apr 18, 2013 4:04 pm

Re: BGP route not advertised to ISP

Thu Apr 25, 2013 12:26 pm

The routes will automatically be eBGP, because your ASN is different to the peers ASN.
Actually this is not true.

eBGP/iBGP refers to the fact that the BGP is runing external (different ASs) or internal (inside the same AS).

I'm refering here to the way the route is marked in the BGP table and consequently how it will influence the route selection (of course there are other mechanisms for that too).

Depending on how the route was initialy advertised it will be marked accordingly:
  • a. using a network command or redistribution from an igp protocol -> marked as I (igp)
  • b. learned from an egp -> marked as E (egp)
  • c. unknown origin: neither igp nor egp. E.g. redistribution of static/connected -> marked as ? (incomplete)
My question was if there is a way we can change the route origin attribute in RouterOS. With IOS/JUNOS one can use route maps to alter the origin of the route.

Who is online

Users browsing this forum: No registered users and 13 guests