IE備考之EIGRP基本實驗及被動接口測試

 
用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的鄰居必須和自己在同一個網段裏!
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章