Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

loopback in BGP

Guys we have two redundant routers in WAN which is config with BGP with service provider....the LAN side wee have OSPF configured.

Now we are agreegating BGP as we are getting heaps of OSPF routes with /24 from core......

The situation is that we have to config loopack 0 (as it sstandard on WAN routers for remote management) The problem is that we are aggregating

just exaple 192.168.0.0/16 and the loopback is 192.168.2.2/32 we are redistributing ospf directly into bgp with redistribute command as we are not using any network statement under BGP. Now i have added 192.168.2.2 mask 255.255.255.255 in BGP with network command as OSPF is not config on loopack. The probelm is that when we did failover testing by shutting the lan down still its advertising 192.168.0.0/16 network the reason being is that there is one specific route (the loop) in the routing table and its up so even the lan is down but loopback is up........so the traffic never takes the redundant link what is a solution for this as we cant use other IP for loopbacks.

6 REPLIES
Hall of Fame Super Blue

Re: loopback in BGP

The_guroo wrote:

Guys we have two redundant routers in WAN which is config with BGP with service provider....the LAN side wee have OSPF configured.

Now we are agreegating BGP as we are getting heaps of OSPF routes with /24 from core......

The situation is that we have to config loopack 0 (as it sstandard on WAN routers for remote management) The problem is that we are aggregating

just exaple 192.168.0.0/16 and the loopback is 192.168.2.2/32 we are redistributing ospf directly into bgp with redistribute command as we are not using any network statement under BGP. Now i have added 192.168.2.2 mask 255.255.255.255 in BGP with network command as OSPF is not config on loopack. The probelm is that when we did failover testing by shutting the lan down still its advertising 192.168.0.0/16 network the reason being is that there is one specific route (the loop) in the routing table and its up so even the lan is down but loopback is up........so the traffic never takes the redundant link what is a solution for this as we cant use other IP for loopbacks.

For the aggregate address to be advertised at least one of the subnets making up the aggregate address must be in the BGP table. If you are redistributing OSPF into BGP then you will meet that condition and BGP will advertise out 192.168.0.0/16.

So remove the network statement for the loopback from your BGP config. The aggregate will still be advertised out so you can still get to the loopback from the WAN and if the LAN interface goes down then the OSPF routes will no longer be in the BGP table and so the aggregate address will no longer be advertised out.

You cannot put the loopback address into the BGP table for the very reason you have stated ie. it is always up and therefore unless the router dies the aggregate address will always be advertised out even if the LAN interface fails.

Jon

New Member

Re: loopback in BGP

Thanks for your reply now the problem is that if the aggregation is still advertising /16 as the loopback will be up even if ospf routes are down so it means that the it will not fail over to the redundant router this is the main issue........i want that if OSPF routes fails it shd take the redundant path but i want that i can still access the 1st router??? i did the failover by shutting down the lan interface of first router but the routes were still advertising from the first router......

Hall of Fame Super Blue

Re: loopback in BGP

The_guroo wrote:

Thanks for your reply now the problem is that if the aggregation is still advertising /16 as the loopback will be up even if ospf routes are down so it means that the it will not fail over to the redundant router this is the main issue........i want that if OSPF routes fails it shd take the redundant path but i want that i can still access the 1st router??? i did the failover by shutting down the lan interface of first router but the routes were still advertising from the first router......

You need to reread my reply. If you don't have the loopback in the BGP table then it doesn't affect whether the aggregate address is advertised or not. So don't run OSPF on the loopback interface and don't have a network statement under your BGP config for the loopback then it doesn't matter if it is up or not because it won't be in the BGP table.

If you want to access the first router on the loopback even if the LAN interface fails then you need another interface to get to it. You cannot advertise the loopback through BGP and expect the aggregate to be removed because it won't. So either use another interface on the router to still be able to get to the first router loopback or choose a loopback range that is not included in the 192.168.0.0/16 range which would be the easiest thing to do.

Jon

New Member

Re: loopback in BGP

One option I can think of is instead of using aggregate-address use static redistribution and track the static route with rtr for interface availability.

Within BGP there are options of exist-map and not-exist-map. These maps provide options for conditional advertising of routes. You can consider that too. If you want sample configuration, I will try and get the document for you.

However, static redistribution would be a simple and better option.

Regards,

bhavesh

New Member

Re: loopback in BGP

bhavesh

            can you please expalin a bit as i didnt get it.......Thanks...we are getting like 100 routes via OSPF and i dont want to use 100 network commands........that is my point so i used aggregation........

New Member

Re: loopback in BGP

If I have rightly understood, you are  redistributing OSPF in BGP and aggregatinge address entire OSPF domain with 192.168.0.0/16. If above understanding is right. You can do following

1.)stop  doing redistribution of OSPF and remove aggregate address

2.)add a static route of 192.168.0.0/16 pointing to Null0 with LAN interface tracking so that the route will be removed once the interface is down

3.) residtribute static route in BGP.

4.) Traffic will take specific route of OSPF when it reaches this router, till the time the LAN is up.

The second option if you still want to work with OSPF redistribution would be to use advertise-map with neighbor statement.Please find the link below for more details

http://www.cisco.com/en/US/docs/ios/12_2/iproute/command/reference/1rfbgp1.html#wp1166728

I hope I have been able to explain it properly.

Regards,

Bhavesh

3253
Views
0
Helpful
6
Replies