Showing results for 
Search instead for 
Did you mean: 

BGP Issue ?

We have project going on. Please refer to the diagram (Dummy Topology) below. We have a customer to whom we are providing internet connection. Currently we are providing the internet through provider A (Primary Path) and through Provider B (Backup Path) as mentioned in the attached topology. Provider A is directly connected with customer router, however provider B is connected with our router (Router-X) and our router is further connected with CPE (Customer Premises Equipment). CPE has two default routes with preferences so its Ok for CPE to switchover easily.

Now Site # 2 is now going to be integrated. Customer asked us that traffic from Site # 2 should also pass from the primary link (As primary link is 1G capacity and the links to MPLS provider is also 1G each). Backup path is only 250 Mb.

For ALL the traffic to pass through the "Provider A" the "Provider B" has to add the default route in his MPLS network for site # 2 to send all the traffic to Our-Router (Router-X). On Router-X we need to send two default routes (Primary and Backup Path) while tracking the main interface with IP SLA ( with primary default routes and keeping the preference low for the backup default route.

But in this case the MPLS Provider (Provider B) would also have the default route towards us and there will be routing loop in the network in case if the primary path fails as the default route from "Provider B" will send the traffic to our Router-X due to default route for Site # 2 and our router will send the traffic back towards provider B.

Our MPLS Provider (Provider B) asked us to make the BGP connection with and ask us to send them the default route through BGP redistribution (Because they don't have any mean of tracking). On my side I need two default routes in any case because one default route is pointing towards the Provider A (Primary Path) and the other default route is pointing towards the provider B (Backup Path).

If I send the default route through BGP-redistribution and track that primary static route with IP-SLA to then it will still create the problem because the default route will still remain there in my router as if the primary link down (As secondary default route will take over the route will still remain in the routing table).

Now this is the problem we are currently facing. Can any one suggest something to help us. This is a kind of case study for us. But if any one can help us out in this case.

Everyone's tags (1)
VIP Mentor

Re: BGP Issue ?



looking at your topology: can you connect Site-2 directly to your Router-X (through BGP, as the MPLS provider suggested) and filter/block the default route from your MPLS provider ?

Re: BGP Issue ?

Hi Gorge,


No we cannot do that, because it will cost us additional money of Layer 2 circuit from MPLS provider. 

Re: BGP Issue ?

That is the reason to bring the MPLS provider in as both sites are different in Geographical area. 

VIP Advisor

Re: BGP Issue ?


Can you confirm the rtrs you mange in that topology?
I assume these rtr CE rtrs only.- Do these sites and rtrs run in the same BGP ASN

kind regards

Please rate and mark posts accordingly if you have found any of the information provided useful.
It will hopefully assist others with similar issues in the future
Hall of Fame Expert

Re: BGP Issue ?

Hello Muhammad,

looking at your topology your router RX has no direct eBGP session with the primary provider A.

You would like to inejct a default route in BGP on router X towards provider B but only if the primary default route is alive.

BGP allows to inject a default route in different manners including the command network

The interesting aspect of BGP network comand is that allows to add a route-map to the command

on RX:

router bgp (yourAS)

network route-map CHECK-NEXT-HOP


ip prefix-list ONLY-DEFAULT permit

access-list 11 permit host CPE1-IP-address


route-map CHECK-NEXT-HOP permit 10

match address prefix ONLY-DEFAULT

match next-hop 11


To be noted the match next-hop usually refers to the BGP next-hop so this match can work for you or not.

If your router RX is learning a static default route via CPE-1 and you are tracking reachability you can try to use a match interface <interface-to-CPE1>

Alternative formulation is the following:

route-map CHECK-NEXT-HOP permit 10

match address prefix ONLY-DEFAULT

match interface <interface-to-CPE1>


if even this does not work you should think of using BGP conditional advertising adding a BGP session between CPE-1 and RX to advertise network and network

Your RX should advertise network only if BGP prefix is present in the BGP table.

ip prefix-list NH-Prefix permit

route-map EXIST-NH permit 10

match address prefix NH-Prefix


route-map ADVERTISE permit 10

match address prefix ONLY-DEFAULT





I check the syntax for BGP conditional advertising.


under router RX BGP configuration

router bgp <your-AS>

neighbor  <providerB- IP-address> advertise-map ADVERTISE exist-map EXIST-NH


the BGP session with CPE1

note: BGP conditional advertisement cannot create the route, it has to be on the BGP Table so the on the new BGP session CPE-1 has to send to RX both the Next-hop subnet and the route.


Hope to help





CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards