用Dynagen模拟器做的实验
基本的配置R1 R2 R3 就不写了!
 
当R1将S1/2口shutdown之后,可以知道到达100.1.1.0/24的路由快速切换到通过S1/0口送出。此时如果再将S1/2口no shutdown,可以得到下面debug信息:
此时打开
debug ip routing,
debug ip eigrp notifications
R1(config-if)#no shut
R1(config-if)#^Z
R1#
*Mar 1 21:43:52.194: is_up: 0 state: 4 sub state: 1 line: 0 has_route: False
*Mar 1 21:43:52.458: %SYS-5-CONFIG_I: Configured from console by console
*Mar 1 21:43:54.166: %LINK-3-UPDOWN: Interface Serial1, changed state to up
//端口打开
*Mar 1 21:43:54.174: is_up: 1 state: 4 sub state: 1 line: 0 has_route: False
*Mar 1 21:43:54.178: RT: add 1.1.1.0/30 via 0.0.0.0, connected metric [0/0]
*Mar 1 21:43:54.182: RT: NET-RED 1.1.1.0/30
//端口对应的直连路由进入到路由表
*Mar 1 21:43:54.186: IP-EIGRP(Default-IP-Routing-Table:0): Callback: redist con
nected (config change) Serial1
*Mar 1 21:43:54.186: RT: interface Serial1 added to routing table
//端口对应的直连路由进入到路由表
*Mar 1 21:43:54.190: IP-EIGRP(Default-IP-Routing-Table:64): Callback: route_adj
ust Serial1
//EIGRP发现应该开始对S1/2对应的路由做些事情了……
*Mar 1 21:43:54.194: is_up: 1 state: 4 sub state: 1 line: 0 has_route: True
*Mar 1 21:43:54.202: DUAL: dest(1.1.1.0/30) not active
*Mar 1 21:43:54.206: DUAL: rcvupdate: 1.1.1.0/30 via Connected metric 2169856/0
*Mar 1 21:43:54.210: DUAL: Find FS for dest 1.1.1.0/30. FD is 4294967295, RD is
4294967295 found
*Mar 1 21:43:54.214: DUAL: RT installed 1.1.1.0/30 via 0.0.0.0
//1.1.1.0/30通过本机可以到达
*Mar 1 21:43:54.218: DUAL: Send update about 1.1.1.0/30. Reason: metric chg
*Mar 1 21:43:54.222: DUAL: Send update about 1.1.1.0/30. Reason: new if
//准备发送关于1.1.1.0/30的路由更新
*Mar 1 21:43:55.170: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, c
hanged state to up
*Mar 1 21:43:55.174: is_up: 1 state: 4 sub state: 1 line: 0 has_route: True
*Mar 1 21:43:55.770: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 64: Neighbor 1.1.1.2 (Seria
l1) is up: new adjacency
//与对端的R3建立起来了邻接关系(adjacency)
*Mar 1 21:43:58.562: DUAL: dest(4.4.4.0/30) not active
*Mar 1 21:43:58.566: DUAL: rcvupdate: 4.4.4.0/30 via 1.1.1.2 metric 2681856/2169856
*Mar 1 21:43:58.570: DUAL: Find FS for dest 4.4.4.0/30. FD is 2195456, RD is 2195456
*Mar 1 21:43:58.570: DUAL: 14.1.1.2 metric 2195456/2169856
*Mar 1 21:43:58.574: DUAL: 1.1.1.2 metric 2681856/2169856 found Dmin is 2195456
*Mar 1 21:43:58.578: DUAL: RT installed 4.4.4.0/30 via 14.1.1.2
//通过R3也收到了关于4.4.4.0/30的路由更新,这是由于R3上的S1/2口也在这个网段,并且在R3上作了通告
*Mar 1 21:43:58.586: DUAL: dest(100.1.1.0/24) not active
*Mar 1 21:43:58.586: DUAL: rcvupdate: 100.1.1.0/24 via 1.1.1.2 metric 2297856/128256
//通过R3收到了100.1.1.0/24的路由更新
*Mar 1 21:43:58.590: DUAL: Find FS for dest 100.1.1.0/24. FD is 2323456, RD is 2323456
*Mar 1 21:43:58.594: DUAL: 14.1.1.2 metric 2323456/2297856
*Mar 1 21:43:58.598: DUAL: 1.1.1.2 metric 2297856/128256 found Dmin is 2297856
//开始比较通过R2到100.1.1.0/24好,还是通过R3好。这里可以看到比较的过程Dmin is 2297856,那么显然通过1.1.1.2送数据更为合适
*Mar 1 21:43:58.602: DUAL: RT installed 100.1.1.0/24 via 14.1.1.2
//DUAL曰,该装100.1.1.0/24 via 14.1.1.2
*Mar 1 21:43:58.606: RT: del 100.1.1.0/24 via 14.1.1.2, eigrp metric [90/2323456]
//删除旧的路由
*Mar 1 21:43:58.610: RT: add 100.1.1.0/24 via 1.1.1.2, eigrp metric [90/2297856]
//添加新的路由
*Mar 1 21:43:58.614: RT: NET-RED 100.1.1.0/24
*Mar 1 21:43:58.618: DUAL: RT installed 100.1.1.0/24 via 1.1.1.2
//EIGRP得知路由已经成功装载
*Mar 1 21:43:58.622: DUAL: Send update about 100.1.1.0/24. Reason: metric chg
*Mar 1 21:43:58.626: DUAL: Send update about 100.1.1.0/24. Reason: new if
//R1自己也开始发送关于100.1.1.0/24的路由更新
*Mar 1 21:43:58.630: DUAL: dest(14.1.1.0/24) not active
*Mar 1 21:43:58.634: DUAL: rcvupdate: 14.1.1.0/24 via 1.1.1.2 metric 2707456/2195456
//从R3收到了关于14.1.1.0/24的路由更新
*Mar 1 21:43:58.638: DUAL: Find FS for dest 14.1.1.0/24. FD is 281600, RD is 281600
//目前到达14.1.1.0/24的FD是281600
*Mar 1 21:43:58.642: DUAL: 0.0.0.0 metric 281600/0
//现在是直连方式到达(即通过本机即可到达)
*Mar 1 21:43:58.642: DUAL: 1.1.1.2 metric 2707456/2195456 found Dmin is 281600
//通过另外一个路由器到达显然metric要大,比不了本机connected的
*Mar 1 21:44:00.842: DUAL: rcvupdate: 14.1.1.0/24 via 1.1.1.2 metric 4294967295/4294967295
//毒化路由的结果
*Mar 1 21:44:00.846: DUAL: Find FS for dest 14.1.1.0/24. FD is 281600, RD is 281600
*Mar 1 21:44:00.850: DUAL: 0.0.0.0 metric 281600/0
*Mar 1 21:44:00.854: DUAL: 1.1.1.2 metric 4294967295/4294967295 found Dmin is 281600
*Mar 1 21:44:00.858: DUAL: Removing dest 14.1.1.0/24, nexthop 1.1.1.2
//显然通过1.1.1.2(R3)到达是不现实的,直接remove掉

1. EIGRP更新路由需要先建立邻接关系(adjacency),如果不建立邻接关系,则无法更新路由,shown ip eigrp neighbors也看不到,show ip route更看不到从passive-interface更新过来的路由信息。
2. EIGRP和RIP不一样,RIP在指了passive-interface之后仍然可以通过手动指neighbor的方法发送单播(unicast)更新,EIGRP无法通过指定了的passive-interface发送单播更新,即下列的配置仍然无法使R1和R3建立邻接:
R1#sh run | b r e
router eigrp 64
passive-interface Serial1
network 1.1.1.0 0.0.0.3
network 14.1.1.0 0.0.0.255
neighbor 1.1.1.2 Serial1
no auto-summary
!
R1(config-router)#neighbor 1.1.1.2 S1/0
IP-EIGRP(Default-IP-Routing-Table:64): Not add: 1.1.1.2 is on different network from S1/0
这说明EIGRP和BGP也是有很大的区别的,EIGRP的邻居必须和自己在同一个网段里!