EIGRP Query Range查询过程详细分析

拓扑:


 
配置:
所有路由器全使用EIGRP路由协议,AS 90.
SHOW相关信息:
R4#show ip eigrp topology all-links 
IP-EIGRP Topology Table for AS(90)/ID(10.1.1.1)
Codes: P – Passive, A – Active, U – Update, Q – Query, R – Reply,
       r – reply Status, s – sia Status
P 10.1.1.0/24, 1 successors, FD is 128256, serno 55
        via Connected, Loopback0
        via 24.0.0.1 (2349056/435200), Serial1/1
P 24.0.0.0/24, 1 successors, FD is 2169856, serno 2
        via Connected, Serial1/1
P 34.0.0.0/24, 1 successors, FD is 281600, serno 1
        via Connected, FastEthernet0/1
        via 24.0.0.1 (2221056/307200), Serial1/1
P 192.168.1.0/24, 1 successors, FD is 307200, serno 30
        via 34.0.0.1 (307200/281600), FastEthernet0/1
        via 24.0.0.1 (2195456/281600), Serial1/1
R4直连10.1.1.0网段。
R3#show ip eigrp topology all-links 
IP-EIGRP Topology Table for AS(90)/ID(34.0.0.1)
Codes: P – Passive, A – Active, U – Update, Q – Query, R – Reply,
       r – reply Status, s – sia Status
P 10.1.1.0/24, 1 successors, FD is 409600, serno 64
        via 34.0.0.2 (409600/128256), FastEthernet0/1
P 24.0.0.0/24, 2 successors, FD is 2195456, serno 34
        via 34.0.0.2 (2195456/2169856), FastEthernet0/1
        via 192.168.1.2 (2195456/2169856), FastEthernet0/0
P 34.0.0.0/24, 1 successors, FD is 281600, serno 2
        via Connected, FastEthernet0/1
P 192.168.1.0/24, 1 successors, FD is 281600, serno 33
        via Connected, FastEthernet0/0
由于EIGRP水平分割影响,R3只能通过R4到达10.1.1.1
R2#show ip eigrp topology all-links 
IP-EIGRP Topology Table for AS(90)/ID(24.0.0.1)
Codes: P – Passive, A – Active, U – Update, Q – Query, R – Reply,
       r – reply Status, s – sia Status
P 10.1.1.0/24, 1 successors, FD is 435200, serno 90
        via 192.168.1.3 (435200/409600), FastEthernet0/0
        via 24.0.0.2 (2297856/128256), Serial1/1
P 24.0.0.0/24, 1 successors, FD is 2169856, serno 8
        via Connected, Serial1/1
P 34.0.0.0/24, 1 successors, FD is 307200, serno 47
        via 192.168.1.3 (307200/281600), FastEthernet0/0
        via 24.0.0.2 (2195456/281600), Serial1/1
P 192.168.1.0/24, 1 successors, FD is 281600, serno 39
        via Connected, FastEthernet0/0
        via 24.0.0.2 (2221056/307200), Serial1/1
R2有两条链路可以通向10.1.1.0:
1、    通过R3,R3被选为Successor
2、    通过R4,R4被选为Feasible Successor
R1#show ip eigrp topology all-links 
IP-EIGRP Topology Table for AS(90)/ID(13.0.0.1)
Codes: P – Passive, A – Active, U – Update, Q – Query, R – Reply,
       r – reply Status, s – sia Status
P 10.1.1.0/24, 1 successors, FD is 435200, serno 69
        via 192.168.1.3 (435200/409600), FastEthernet0/0
P 24.0.0.0/24, 1 successors, FD is 2195456, serno 39
        via 192.168.1.2 (2195456/2169856), FastEthernet0/0
P 34.0.0.0/24, 1 successors, FD is 307200, serno 46
        via 192.168.1.3 (307200/281600), FastEthernet0/0
P 192.168.1.0/24, 1 successors, FD is 281600, serno 31
        via Connected, FastEthernet0/0
注意:由于水平分割,R1只有1条链路通向10.1.1.0。
通过各路由器的路由表可以得到以下示意图:


 
在所有路由器上通过命令debug eigrp packet query repay只观察我们需要的query和reply包。
在R4上通过接口命令:shutdown命令关闭lo 0来模拟该网络发生故障。下面通过各路由器的debug信息来观察他们的query 查询信息情况。
==R4 Debug ==
在F0/1口上发送关于10.1.1.0网络的查询包①(一下简称查询包),序列号是72。
*Mar  1 03:08:50.415: EIGRP: Sending QUERY on FastEthernet0/1
*Mar  1 03:08:50.415:   AS 90, Flags 0×0, Seq 72/0 idbQ 0/0 iidbQ un/rely 0/0 serno 47-47
在S1/1口上发送查询包⑨,序列号是73。
*Mar  1 03:08:50.423: EIGRP: Sending QUERY on Serial1/1 nbr 24.0.0.1
*Mar  1 03:08:50.423:   AS 90, Flags 0×0, Seq 73/104 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/1 serno 47-47
在S1/1口上收到查询应答包⑩,Seq=105/73,序列号是105,73表示是对序列号为73的应答。
*Mar  1 03:08:50.923: EIGRP: Received REPLY on Serial1/1 nbr 24.0.0.1
*Mar  1 03:08:50.927:   AS 90, Flags 0×0, Seq 105/73 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
在S1/1口上收到来自R2的查询应答包④
*Mar  1 03:08:51.175: EIGRP: Received QUERY on Serial1/1 nbr 24.0.0.1
*Mar  1 03:08:51.179:   AS 90, Flags 0×0, Seq 107/73 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
10.1.1.0处于unreachable状态,所以向R2发出一个10.1.1.0不可达的查询应答⑤
*Mar  1 03:08:51.199: EIGRP: Sending REPLY on Serial1/1 nbr 24.0.0.1
*Mar  1 03:08:51.199:   AS 90, Flags 0×0, Seq 74/107 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/1 serno 48-48
在F0/1口上收到来自R2的查询应答包⑧,确认号是72,表示是对序列号为72的应答。
*Mar  1 03:08:52.223: EIGRP: Received REPLY on FastEthernet0/1 nbr 34.0.0.1
*Mar  1 03:08:52.227:   AS 90, Flags 0×0, Seq 96/72 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
====R3 Debug ====
在F0/1口上收到来自R4的查询包①,序列号是72 
*Mar  1 03:10:21.655: EIGRP: Received QUERY on FastEthernet0/1 nbr 34.0.0.2
*Mar  1 03:10:21.659:   AS 90, Flags 0×0, Seq 72/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
②③在F0/0口上发送查询包,序列号是94
*Mar  1 03:10:21.679: EIGRP: Sending QUERY on FastEthernet0/0
*Mar  1 03:10:21.679:   AS 90, Flags 0×0, Seq 94/0 idbQ 0/0 iidbQ un/rely 0/0 serno 56-56
在F0/0口上收到来自R1的查询应答包⑦,确认号是94,表示是对序列号为94的应答 
*Mar  1 03:10:21.999: EIGRP: Received REPLY on FastEthernet0/0 nbr 192.168.1.1
*Mar  1 03:10:22.003:   AS 90, Flags 0×0, Seq 77/94 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
在F0/0口上收到来自R2的查询应答包⑥,确认号是94,表示是对序列号为94的应答。
*Mar  1 03:10:22.871: EIGRP: Received REPLY on FastEthernet0/0 nbr 192.168.1.2
*Mar  1 03:10:22.875:   AS 90, Flags 0×0, Seq 108/94 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
在F0/1口上向R4发出查询应答⑧,确认好是72,表示是对序列号为72的应答。
*Mar  1 03:10:23.243: EIGRP: Sending REPLY on FastEthernet0/1 nbr 34.0.0.2
*Mar  1 03:10:23.243:   AS 90, Flags 0×0, Seq 96/72 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/1 serno 57-57
====R1 Debug ====
在F0/0口上收到来自R3,序列号号是94的查询包②  
*Mar  1 03:14:03.443: EIGRP: Received QUERY on FastEthernet0/0 nbr 192.168.1.3
*Mar  1 03:14:03.443:   AS 90, Flags 0×0, Seq 94/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
在F0/0口上向R3发送查询应答⑦。
*Mar  1 03:14:03.467: EIGRP: Sending REPLY on FastEthernet0/0 nbr 192.168.1.3
*Mar  1 03:14:03.467:   AS 90, Flags 0×0, Seq 77/94 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/1 serno 63-63
====R2 Debug====
在S1/1口上收到来自R4,序列号是73的查询包⑨ 
*Mar  1 03:12:03.767: EIGRP: Received QUERY on Serial1/1 nbr 24.0.0.2
*Mar  1 03:12:03.767:   AS 90, Flags 0×0, Seq 73/104 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
在F0/0口上收到来自R3,序列号是94的查询包③ 
*Mar  1 03:12:03.775: EIGRP: Received QUERY on FastEthernet0/0 nbr 192.168.1.3
*Mar  1 03:12:03.775:   AS 90, Flags 0×0, Seq 94/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
在S1/1口上向R4发送查询应答,确认号是73,表示是对序列号为73的查询应答⑩
*Mar  1 03:12:03.803: EIGRP: Sending REPLY on Serial1/1 nbr 24.0.0.2
*Mar  1 03:12:03.803:   AS 90, Flags 0×0, Seq 105/73 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/1 serno 76-76
在S1/1口上向R4发送查询包,序列号是107 ④
*Mar  1 03:12:04.047: EIGRP: Sending QUERY on Serial1/1 nbr 24.0.0.2
*Mar  1 03:12:04.047:   AS 90, Flags 0×0, Seq 107/73 idbQ 0/0 iidbQ un/rely 0/0
peerQ un/rely 0/1 serno 77-77
在S1/1口上收到来自R4的查询应答包,确认号是107,表示是对序列号为107的查询应答⑤
*Mar  1 03:12:04.419: EIGRP: Received REPLY on Serial1/1 nbr 24.0.0.2
*Mar  1 03:12:04.419:   AS 90, Flags 0×0, Seq 74/107 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
在F0/0口上向R3发送查询应答包,确认号是94,表示是对序列号是94的查询应答⑥
*Mar  1 03:12:04.875: EIGRP: Sending REPLY on FastEthernet0/0 nbr 192.168.1.3
*Mar  1 03:12:04.875:   AS 90, Flags 0×0, Seq 108/94 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/1 serno 78-78
以上是我们得到的各路由器的调试信息,只看调试信息可能会感觉比较混乱,请看下面的图示:


 
红色:query  蓝色:reply
1.当R4的lo0被手动DOWN掉后,R4将将该网段标注为unreachable,并向所有邻居发送查询包 (①和⑨)
2.R3收到来自successor R4的查询包①,将该10.1.1.0网段标注为unreachable,并从F0/0接口向组播地址224.0.0.10发送一个查询包(②和③是一个组播包)
3.当R1收到来自successor R3的查询包②,将10.1.1.0网段标注为unreachable。之后,本该向邻居R2发送查询包,但是通过R2到达10.1.1.0该目标网络的链路并没有被加进拓扑表,换句话说,R1认为,没有必要查询R2。R1向R3返回一个应答包⑦,表示通过R1不能到达目的网络。(关于R1为什么不向R2发送查询的解释被R4给否定,R4拓扑表中同样没有通过R3到达目标地址,但R4仍然向R3发出了查询。)???——这个问题希望同仁能帮我解答。
4.第一步的时候,R4向R2发出查询包⑨,当R2收到来自邻居R4的查询包后,紧接着收到来自successr R3的查询包,由于是来自successor,所以,R4将目标地址标注为unreachable,,之后,R2向R4返回目标地址不可达应答包⑩
5.当R2收到来自successor R3的查询包③,将该10.1.1.0网段标注为unreachable,并向邻居R4发送查询④。R4理所当然返回一个应答包⑤,表示通过R4不能到达目的网络。
6.R2收到来自邻居R4的不可达应答包⑤,表明R2已经没有能力到达指定目标网络,所以R2向R3返回目标地址不可达应答包⑥。
7.R3都收到来自邻居R1和R2关于目标地址不可达之后,表示通过R3也没有能力到达指定目标网络,所以,R3向R4返回目标地址不可达应答包⑧
8.当R4都收到来自邻居R2、R3的不可达应答包⑧⑩之后,最终确定10.1.1.0不可达,于是,R4将该路由条目从自己路由表中删除。
下面是cisco官方文档中关于EIGRP QUERY的查询解释:

原文地址:https://www.cnblogs.com/cyrusxx/p/12615702.html