EIGRP and OSPF advertised routes

Today I was examining what happens if a router learned a route via EIGRP which is also known via static route entry.
In this case the learned route (via EIGRP) is neither put into routing table nor it is advertised via EIGRP anymore.

Let’s take look on the following example. I have two directly connected routers: R2 and R3.
R3 learns about 192.168.240.0/24 from R2.

R2:

R2#show ip route
Gateway of last resort is not set

D    192.168.240.0/24 [90/30720] via 172.16.16.1, 00:19:02, FastEthernet1/0
(...)

R2#show ip eigrp topology
IP-EIGRP Topology Table for AS(1)/ID(172.16.16.6)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

(...)
P 192.168.240.0/24, 1 successors, FD is 30720
        via 172.16.16.1 (30720/28160), FastEthernet1/0

R3:

R3#show ip route
Gateway of last resort is not set

D    192.168.240.0/24 [90/33280] via 172.16.16.6, 00:05:42, FastEthernet1/0
(...)

R3#show ip eigrp topology
IP-EIGRP Topology Table for AS(1)/ID(172.16.30.194)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

(...)
P 192.168.240.0/24, 1 successors, FD is 33280
        via 172.16.16.6 (33280/30720), FastEthernet1/0
R3#

Let’s now change configuration on R2 – I will add static route to the 192.168.240.0/24 (note that static route has better administrative distance that EIGRP).

R2#conf t

R2(config)#ip route 192.168.240.0 255.255.255.0 fastEthernet 0/0

Let’s take now look on the routing table and EIGRP topology table on both routers.

R2:

R2#show ip route
Gateway of last resort is not set

S    192.168.240.0/24 is directly connected, FastEthernet0/0
     172.16.0.0/30 is subnetted, 3 subnets
D       172.16.30.192 [90/30720] via 172.16.16.1, 00:13:14, FastEthernet1/0
(...)
R2#show ip eigrp topology
IP-EIGRP Topology Table for AS(1)/ID(172.16.16.6)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

P 192.168.240.0/24, 0 successors, FD is Inaccessible
        via 172.16.16.1 (30720/28160), FastEthernet1/0

As you can see there is now no successors (0) – compare it with the previous result.

R3:

R3#show ip route
Gateway of last resort is not set
(..) // there is no entry for 192.168.240.0/24 anymore
R3#show ip eigrp topology
IP-EIGRP Topology Table for AS(1)/ID(172.16.30.194)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

(..) // there is no entry for 192.168.240.0/24 anymore

R2 does not advertise the route 192.168.240.0/24 to the R3 anymore – that is why R3 doesn’t have entry for the route into its routing table and EIGRP topology table.

OSPF

I did the same test with OSPF – it behaves differently from EIGRP. Even if the Router2 doesn’t put OSPF route into routing table (because it has the same static route) the R3 router will still learn the route to the 192.168.240.0/24 network (via OSPF) and put it into its routing table.

Leave a Reply

Your email address will not be published. Required fields are marked *