02-19-2015 06:57 PM - edited 03-07-2019 10:45 PM
I'm trying to figure out what I'm doing wrong or it is the way it suppose to work. I have two AS 65221 and 64512. AS65221 is using OSPF all in area 0 and AS64512 is using EIGRP. Now on AS65221 R7, R1 and R8 have IBGP peers with the loopback update-source. On AS64512 I have R9 and R10 with an IBGP Peer. For EBGP R7 has a neighbor relation with R9 and R8 to R10. The problem that I have is when I redistribute ospf 1 on R7, R9 will not put the route from 10.1.81.0(The segment between R8 and R10) I still see the route but as an EIGRP one not BGP. I just do redistribution on R1 everything is fine, but not when I do it on R7 or R8. can somebody explain me why?
R7
router ospf 1
log-adjacency-changes
passive-interface FastEthernet1/0
network 10.0.0.0 0.255.255.255 area 0
!
router bgp 65221
no synchronization
bgp log-neighbor-changes
redistribute ospf 1
neighbor 1.1.1.1 remote-as 65221
neighbor 1.1.1.1 update-source Loopback1
neighbor 8.8.8.8 remote-as 65221
neighbor 8.8.8.8 update-source Loopback1
neighbor 10.1.79.9 remote-as 64512
no auto-summary
R9
router eigrp 1
network 0.0.0.0
no auto-summary
!
router bgp 64512
no synchronization
bgp log-neighbor-changes
neighbor internal peer-group
neighbor internal remote-as 64512
neighbor internal update-source Loopback1
neighbor ext65221 peer-group
neighbor ext65221 remote-as 65221
neighbor 10.1.79.7 peer-group ext65221
neighbor 10.10.10.10 peer-group internal
neighbor 15.15.15.15 peer-group internal
neighbor 16.16.16.16 peer-group internal
no auto-summary
!
R8
router ospf 1
log-adjacency-changes
passive-interface FastEthernet1/0
network 10.0.0.0 0.255.255.255 area 0
!
router bgp 65221
no synchronization
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 65221
neighbor 1.1.1.1 update-source Loopback1
neighbor 7.7.7.7 remote-as 65221
neighbor 7.7.7.7 update-source Loopback1
neighbor 10.1.81.10 remote-as 64512
no auto-summary
!
R10
router eigrp 1
network 0.0.0.0
no auto-summary
!
router bgp 64512
no synchronization
bgp log-neighbor-changes
neighbor internal peer-group
neighbor internal remote-as 64512
neighbor internal update-source Loopback1
neighbor ext65221 peer-group
neighbor ext65221 remote-as 65221
neighbor 9.9.9.9 peer-group internal
neighbor 10.1.81.8 peer-group ext65221
neighbor 15.15.15.15 peer-group internal
neighbor 16.16.16.16 peer-group internal
no auto-summary
!
R9 Debug:
*Mar 1 00:37:43.611: RT: 10.1.81.0/24 gateway changed from 10.1.79.7 to 10.1.81.8
*Mar 1 00:37:43.611: RT: NET-RED 10.1.81.0/24
*Mar 1 00:37:43.611: RT: recursion error routing 10.1.81.8 - probable routing loop
*Mar 1 00:37:43.611: RT: recursion error routing 10.1.81.8 - probable routing loop
*Mar 1 00:37:43.611: RT: recursion error routing 10.1.81.8 - probable routing loop
*Mar 1 00:37:43.611: RT: recursion error routing 10.1.81.8 - probable routing loop
*Mar 1 00:37:43.611: RT: recursion error routing 10.1.81.8 - probable routing loop
*Mar 1 00:37:43.611: RT: recursion error routing 10.1.81.8 - probable routing loop
*Mar 1 00:37:43.611: RT: recursion error routing 10.1.81.8 - probable routing loop
*Mar 1 00:37:43.611: RT: recursion error routing 10.1.81.8 - probable routing loop
*Mar 1 00:37:43.611: RT: recursion error routing 10.1.81.8 - probable routing loop
*Mar 1 00:37:43.611: RT: recursion error routing 10.1.81.8 - probable routing loop
*Mar 1 00:37:43.615: RT: recursion error routing 10.1.81.8 - probable routing loop
*Mar 1 00:37:43.615: RT: recursion error routing 10.1.81.8 - probable routing loop
*Mar 1 00:37:43.615: RT: closer admin distance for 10.1.81.0, flushing 1 routes
*Mar 1 00:37:43.615: RT: NET-RED 10.1.81.0/24
*Mar 1 00:37:43.615: RT: add 10.1.81.0/24 via 10.1.91.11, eigrp metric [90/309760]
*Mar 1 00:37:43.615: RT: NET-RED 10.1.81.0/24
*Mar 1 00:37:43.615: RT: add 10.1.81.0/24 via 10.1.92.12, eigrp metric [90/309760]
*Mar 1 00:37:43.615: RT: NET-RED 10.1.81.0/24
*Mar 1 00:37:43.615: RT: Try lookup less specific 10.1.81.0/24, default 1
*Mar 1 00:37:43.615: RT: Found subnet on less specific 10.1.81.0/24
I know that it say probable loop, but I trying to understand why. Thanks in advance
Solved! Go to Solution.
02-20-2015 08:37 AM
I couldn't create a routing recursion loop like you managed but I can explain what is happening.
When you redistribute from an IGP into BGP the MED value in BGP is derived from the IGP metric.
If MED is used by the BGP router to choose between multiple routes for the same network the lower the MED value the better.
There are two rules with MED and how it works between BGP peers -
1) If a BGP router learns of a route from a BGP peer it can pass the MED value to any other IBGP peer but not to EBGP peers.
2) if the route was injected locally into BGP and this router has an EBGP peering with another AS it can pass on the MED value
In your scenario when you redistribute OSPF on R1 both R7 and R8 receive the route with the MED value but they cannot advertise that to R9 or R10.
R9 and R10 receive the advertisements without the MED value and advertise them to each other because they are IBGP peers.
So R9 has two BGP routes for the same network, one is AD 20 and one is AD 200.They both have the same metric because the MED value is not passed on.
It also has an EIGRP route which is AD 90.
R9 will pick the EBGP route as the best BGP path and because it has an AD of 20 it is also preferred to the EIGRP route and so is installed in the IP routing table.
When you redistribute on R7 though things change. The MED value is derived from the IGP metric and because R7 is an EBGP peer it can advertise the MED value to R9.
Now R9 has again three routes for the same network. It has an EBGP route with a MED value from R7, an IBGP route without the MED value from R10 and an EIGRP route.
If you do a "sh ip bgp <network>" on R9 you will see the two routes. One will have a metric > 0 which is the route received from R7 with the MED value. The route received from R10 will have the default metric of 0 because the MED value couldn't be passed on because R8 received that IBGP route from R7 and so cannot advertise the MED to R10.
In the BGP best path selection MED has a higher preference than EBGP vs IBGP routes so R9 chooses the IBGP route this time as the BGP best path because it has a better metric. But this route has an AD of 200 and the EIGRP route has an AD of 90 and that is why the EIGRP route is installed into the routing table.
Hope that makes sense.
Jon
02-20-2015 08:37 AM
I couldn't create a routing recursion loop like you managed but I can explain what is happening.
When you redistribute from an IGP into BGP the MED value in BGP is derived from the IGP metric.
If MED is used by the BGP router to choose between multiple routes for the same network the lower the MED value the better.
There are two rules with MED and how it works between BGP peers -
1) If a BGP router learns of a route from a BGP peer it can pass the MED value to any other IBGP peer but not to EBGP peers.
2) if the route was injected locally into BGP and this router has an EBGP peering with another AS it can pass on the MED value
In your scenario when you redistribute OSPF on R1 both R7 and R8 receive the route with the MED value but they cannot advertise that to R9 or R10.
R9 and R10 receive the advertisements without the MED value and advertise them to each other because they are IBGP peers.
So R9 has two BGP routes for the same network, one is AD 20 and one is AD 200.They both have the same metric because the MED value is not passed on.
It also has an EIGRP route which is AD 90.
R9 will pick the EBGP route as the best BGP path and because it has an AD of 20 it is also preferred to the EIGRP route and so is installed in the IP routing table.
When you redistribute on R7 though things change. The MED value is derived from the IGP metric and because R7 is an EBGP peer it can advertise the MED value to R9.
Now R9 has again three routes for the same network. It has an EBGP route with a MED value from R7, an IBGP route without the MED value from R10 and an EIGRP route.
If you do a "sh ip bgp <network>" on R9 you will see the two routes. One will have a metric > 0 which is the route received from R7 with the MED value. The route received from R10 will have the default metric of 0 because the MED value couldn't be passed on because R8 received that IBGP route from R7 and so cannot advertise the MED to R10.
In the BGP best path selection MED has a higher preference than EBGP vs IBGP routes so R9 chooses the IBGP route this time as the BGP best path because it has a better metric. But this route has an AD of 200 and the EIGRP route has an AD of 90 and that is why the EIGRP route is installed into the routing table.
Hope that makes sense.
Jon
02-20-2015 08:37 AM
Great answer. Thanks
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide