05-16-2012 12:52 PM - edited 03-04-2019 04:22 PM
I have an iBGP session between two routers and and at the same time I am running EIGRP between these two and two other routers.
R1 (.173)-->iBGP-->R2 (.174)
R1(.237)-->EIGRP-->R2 (.238)
R1(.233)-->EIGRP-->R3(.234)
R1(.241)-->EIGRP-->R4 (.242)
R2(.245)-->EIGRP-->R3(.246)
R2(.249)-->EIGRP-->R4(.250)
Both R3 and R4 have routes to 192.168.76.0/22 and 192.168.76.0/23. Only R3 has route to 192.168.76.0/24 and only R4 has route to 192.168.77.0/24.
Routes from EIGRP are automatically redistributed into iBGP.
Router1# show ip bgp
Network | Next Hop | Metric | LocPrf | Weight | Path |
* i192.168.76.0 | 10.0.0.174 | 5632 | 100 | 0 | i |
*> | 10.0.0.242 | 5632 | 32768 | i | |
* i192.168.76.0/23 | 10.0.0.174 | 5632 | 100 | 0 | i |
*> | 10.0.0.234 | 5632 | 32768 | i | |
* i192.168.76.0/22 | 10.0.0.174 | 5632 | 100 | 0 | i |
*> | 10.0.0.234 | 5632 | 32768 | i | |
* i192.168.77.0 | 10.0.0.174 | 5632 | 100 | 0 | i |
*> | 10.0.0.234 | 5632 | 32768 | i |
Router2# show ip bgp
Network | Next Hop | Metric | LocPrf | Weight | Path |
* i192.168.76.0 | 10.0.0.173 | 5632 | 100 | 0 | i |
*> | 10.0.0.250 | 5632 | 32768 | i | |
* i192.168.76.0/23 | 10.0.0.173 | 5632 | 100 | 0 | i |
*> | 10.0.0.246 | 5632 | 32768 | i | |
* i192.168.76.0/22 | 10.0.0.173 | 5632 | 100 | 0 | i |
*> | 10.0.0.246 | 5632 | 32768 | i | |
* i192.168.77.0 | 10.0.0.173 | 5632 | 100 | 0 | i |
*> | 10.0.0.246 | 5632 | 32768 | i |
Router1# show ip route
D EX 192.168.76.0/23 [170/5632] via 10.0.0.242, 01:07:22, GigabitEthernet0/9
[170/5632] via 10.0.0.234, 01:07:22, GigabitEthernet0/5
D EX 192.168.76.0/22 [170/5632] via 10.0.0.242, 01:07:22, GigabitEthernet0/9
[170/5632] via 10.0.0.234, 01:07:22, GigabitEthernet0/5
Router2# show ip route
D EX 192.168.76.0/23 [170/5632] via 10.0.0.250, 01:07:22, GigabitEthernet0/9
[170/5632] via 10.0.0.246, 01:07:22, GigabitEthernet0/5
D EX 192.168.76.0/22 [170/5632] via 10.0.0.250, 01:07:22, GigabitEthernet0/9
[170/5632] via 10.0.0.246, 01:07:22, GigabitEthernet0/5
Both above routes have the same metrics but I wonder why iBGP and EIGRP always prefer R3 over R4? or how it is possible to change that?
Thank you,
Ray
05-16-2012 05:02 PM
I changed the IP address of Router1(.233) to .253 and Router3(.234) to .254 and now iBGP and EIGRP prefer R4 over R3. It seems when the routes have the same metrics, the router with the lower IP address will be selected as the best path.
Router1# show ip bgp
Network | Next Hop | Metric | LocPrf | Weight | Path |
*> 192.168.76.0 | 10.0.0.242 | 5632 | 32768 | i | |
* i | 10.0.0.174 | 5632 | 100 | 0 | i |
*> 192.168.76.0/23 | 10.0.0.242 | 5632 | 32768 | i | |
* i | 10.0.0.174 | 5632 | 100 | 0 | i |
*> 192.168.76.0/22 | 10.0.0.242 | 5632 | 32768 | i | |
* i | 10.0.0.174 | 5632 | 100 | 0 | i |
*> 192.168.77.0 | 10.0.0.254 | 5632 | 32768 | i | |
* i | 10.0.0.174 | 5632 | 100 | 0 | i |
Network | Next Hop | Metric | LocPrf | Weight | Path |
*> 192.168.76.0 | 10.0.0.242 | 5632 | 32768 | i | |
* i | 10.0.0.174 | 5632 | 100 | 0 | i |
*> 192.168.76.0/23 | 10.0.0.242 | 5632 | 32768 | i | |
* i | 10.0.0.174 | 5632 | 100 | 0 | i |
*> 192.168.76.0/22 | 10.0.0.242 | 5632 | 32768 | i | |
* i | 10.0.0.174 | 5632 | 100 | 0 | i |
*> 192.168.77.0 | 10.0.0.254 | 5632 | 32768 | i | |
* i | 10.0.0.174 | 5632 | 100 | 0 | i |
05-16-2012 07:24 PM
It looks to me from an IGP (EIGRP) perspective, equal cost load balancing is preferred. As far as BGP...there is a list of different reasons one path is selected over another. However, if you intend on making preference for R4, try configurations regarding local preference.
Sent from Cisco Technical Support iPad App
05-16-2012 11:22 PM
Thank you Anthony for your response. I was expecting BGP shows both R3 and R4 as the best paths to 192.168.76.0/22 and 192.168.76.0/23 since EIGRP considers paths with the same metrics as equal paths but as you said BGP selects the best route for different reasons. I think when all parameters (weight, local pref, MED, ...) are same, BGP prefers the lowest IP address (next hop) as the best path.
05-17-2012 05:01 AM
Hello Ray,
from the point of view of redistribution of EIGRP into BGP what really counts is:
a)if the IP prefix is in the IP routing table
B) and if it is present in the EIGRP topology database.
BGP will advertise the IP prefix in BGP only once, regardless of the number of parallel equal cost paths that are present in EIGRP.
If both EIGRP routes disappear the BGP route is removed too.
Hope to help
Giuseppe
05-17-2012 11:12 AM
Hello Giuseppe,
Thank you for your response. Since BGP cannot do equal load balancing and has to choose a route as the best path from the its routing table, it seems IP address plays an important role in decision-making process. Below shows the eigrp topology before I change the IP address of R1(.233) and R3 (.234)
Router1# show ip eigrp topology
P 192.168.76.0/22, 2 successors, FD is 5632, tag is 65077
via 10.0.0.234 (5632/5376), GigabitEthernet0/5
via 10.0.0.242 (5632/5376), GigabitEthernet0/9
P 192.168.76.0/23, 2 successors, FD is 5632, tag is 65077
via 10.0.0.234 (5632/5376), GigabitEthernet0/5
via 10.0.0.242 (5632/5376), GigabitEthernet0/9
and here you see the eigrp topology after I changed the IP address of R1 and R3 to .253 and .254. Now the best path is via R4(.242) instead of R3(.254)
Router1# show ip eigrp topology
P 192.168.76.0/22, 2 successors, FD is 5632, tag is 65076
via 10.0.0.242 (5632/5376), GigabitEthernet0/9
via 10.0.0.254 (5632/5376), GigabitEthernet0/5
P 192.168.76.0/23, 2 successors, FD is 5632, tag is 65076
via 10.0.0.242 (5632/5376), GigabitEthernet0/9
via 10.0.0.254 (5632/5376), GigabitEthernet0/5
The "show ip bgp" in my last post shows that when I change the IP address, BGP prefers (redistributed) routes from the router with the lowest IP address ( when everything is equal).
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