Table of Contents
A post over at the IEOC forums (here) got me thinking to something I picked up a long time ago but I can’t really remember where…
When a prefix arrives at a device from two different sources the AD is compared and the lower AD wins out, simple CCNA level stuff right? Well what if the AD is the same due to AD manipulation?
The setup we are using to test this out is:
The configuration on each of the routers is pretty simple:
Router 1 #
int Fa0/0 no shut ip add 10.1.2.1 255.255.255.0 ip ospf 1 area 0 int Lo0 ip add 10.10.10.10 255.255.255.255 ip ospf 1 area 0
Router 2 #
int Fa0/0 no shut ip add 10.1.2.2 255.255.255.0 ip ospf 1 area 0 int Fa0/1 no shut ip add 10.2.3.2 255.255.255.0 router eigrp 10 distance eigrp 110 110 network 10.2.3.2 0.0.0.0
Router 3 #
int Fa0/1 no shut ip add 10.2.3.2 255.255.255.0 int Lo0 shutdown ip add 10.10.10.10 255.255.255.255 router eigrp 10 network 10.2.3.2 0.0.0.0 network 10.10.10.10 0.0.0.0
At first the loopback interface on R3 was left shutdown so as to emulate the prefix being advertised at different times.
The poster over at the IEOC had read that when a prefix comes into a device with the same AD (for whatever reason) then the older route will win the RIB decision and be used.
When the routing had converged I saw the initial prefix be installed on R2:
*Mar 1 00:18:13.151: RT: network 10.0.0.0 is now variably masked *Mar 1 00:18:13.155: RT: add 10.10.10.10/32 via 10.1.2.1, ospf metric [110/11] *Mar 1 00:18:13.155: RT: NET-RED 10.10.10.10/32
I then brought up the loopback interface on R3, if the book was right then the OSPF advertised prefix would win out and the newer EIGRP route would be ignored but this is not the case:
*Mar 1 00:19:41.991: RT: closer admin distance for 10.10.10.10, flushing 1 routes *Mar 1 00:19:41.991: RT: NET-RED 10.10.10.10/32 *Mar 1 00:19:41.991: RT: add 10.10.10.10/32 via 10.2.3.3, eigrp metric [110/409600] *Mar 1 00:19:41.995: RT: NET-RED 10.10.10.10/32
There are a few other comparisons that are made when a prefix is compared on the RIB but when the prefixes come from different protocols and have the same AD then the original unaltered AD always wins out, in this case it was EIGRP which before I changed it to 110 it was 90 for an internal route.