add this line to R2
router eigrp 1
passive-interface Serial0/0
network 10.1.1.0 0.0.0.255
network 172.16.2.0 0.0.0.3
no auto-summary
ip route 192.168.0.0 255.255.0.0 172.16.2.1
now R2 have two routes to reach 192.168.1.1
via EIGRP with AD = 90
via static route with AD = 1
R2#sh ip route
...
D 192.168.1.0/24 [90/2323456] via 10.1.1.1, 00:05:57, FastEthernet0/0
S 192.168.0.0/16 [1/0] via 172.16.2.1
guess.. which path will the router use to reach 192.168.1.1 ? some of you may though that it'll be static because it has AD = 1, let's test..
R2#traceroute 192.168.1.1
..
1 10.1.1.1 4 msec 4 msec 4 msec
2 172.16.1.1 12 msec 12 msec *
unfortunately it choose to use route learn via EIGRP.. thru R3. This is because it prefer longest prefix match compare to AD
destination : 192.168.1.1
EIGRP route = 192.168.1.0/24
Static route = 192.168.0.0/16
EIGRP has the longest match..
No comments:
Post a Comment