引用:http://www.qqread.com/network/tech/r323690.html
更多内容请看EIGRP协议专题,或进入讨论组讨论。
R1:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#line con 0
Router(config-line)#logg sy
Router(config-line)#exec-t 0 0
Router(config-line)#exi
Router(config)#no ip domain-lo
Router(config)#host R1
R1(config)#int s 1
R1(config-if)#ip add 10.10.10.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#clo ra 64000
R1(config-if)#exi
R1(config)#
*Mar 1 00:23:29.347: %LINK-3-UPDOWN: Interface Serial1, changed state to up
R1(config)#
*Mar 1 00:23:30.351: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to up
R1(config)#
R2:
R2#en
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int s 1
R2(config-if)#ip add 10.10.10.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#int s 0
R2(config-if)#ip add 20.20.20.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#clo ra 64000
R2(config-if)#exi
R2(config)#
R3:
R3>en
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int s 1
R3(config-if)#ip add 20.20.20.2 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exi
R3(config)#
以上的配置已经可以完成由R2分别与R1和R3的通信,测试结果如下:
R2#ping 10.10.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/34/36 ms
R2#ping 20.20.20.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/34/36 ms
R2#
回R1启动EIGRP协议。
R1(config)#router eigrp ?
<1-65535> Autonomous system number ←实则为EIGRP的进程号,也可被用来用自治系统号进行分配。
R1(config)#router eigrp 1
R1(config-router)#net 10.10.10.0 ? ←宣告网络
A.B.C.D EIGRP wild card bits ←EIGRP支持VLSM,可以在这里输入通配符掩码进行精确匹配。
<cr> ←直接确定
R2、R3同时都需要运行EIGRP使R1可以与R3相互交换信息,R2、R3的配置如下:
R2:
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router eigrp 1
R2(config-router)#net 10.10.10.0
*Mar 1 01:10:21.591: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 10.10.10.1 (Serial1) is up: new adjacency ←与邻居10.10.10.1建立邻接关系成功,如何建立的细节请参阅IT傻博士课程。
R2(config-router)#net 20.20.20.0
R2(config-router)#exi
R2(config)#
*Mar 1 01:10:37.699: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 20.20.20.2 (Serial0) is up: new adjacency ←与邻居20.20.20.2建立邻接关系。
R2(config)#
R3:
R3(config)#
R3(config)#router eigrp 1
R3(config-router)#net 20.20.20.0
R3(config-router)#exi
R3(config)#
*Mar 1 01:09:13.887: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 20.20.20.1 (Serial1) is up: new adjacency ←与邻居20.20.20.1建立邻接关系。
R3(config)#
我们接着在R3上查看路由表可以看见到达R1的路由已经出现,如下。
R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
20.0.0.0/24 is subnetted, 1 subnets
C 20.20.20.0 is directly connected, Serial1
D 10.0.0.0/8 [90/2681856] via 20.20.20.1, 00:39:05, Serial1
R3#
首先我们来分解看一下本条通过EIGRP学习到的路由条目。
D 10.0.0.0/8 [90/2681856] via 20.20.20.1, 00:39:05, Serial1
D: 代表EIGRP。
0.0.0.0/8: 为我们宣告的网络,在此的形式为主类,因为EIGRP在通过边界路由的时候将进行自动汇总。
[90/2681856]: 括号内的90表明EIGRP的管理距离为90,2681856为到达10.0.0.0/8这条链路的开销值。
via 20.20.20.1: 下一跳邻居接口。
01:07:51: 时间标记。
Serial1: 本地接口。
在[90/2681856]一项内管理距离的值各协议不同,并且随厂家的不同也有不同,定义管理距离值除了各企业以外IETF工程小组也有相关定义。
2681856为到达目的地的Metric值(度量)其计算公式如下:
BW igrp metric = 10000000/带宽(kbit/s)
DLY igrp metric = 延迟总和(微秒microseconds)/10
BW eigrp metric = 10000000/带宽(kbit/s)* 256
DLY eigrp metric = 延迟总和(微秒microseconds)/10 * 256
通过show ip route 10.10.10.0 可查看相关路由的详细参数。
R3#show ip route 10.10.10.0
Routing entry for 10.0.0.0/8
Known via "eigrp 1", distance 90, metric 2681856, type internal
Redistributing via eigrp 1
Last update from 20.20.20.1 on Serial1, 01:17:54 ago
Routing Descriptor Blocks:
* 20.20.20.1, from 20.20.20.1, 01:17:54 ago, via Serial1
Route metric is 2681856, traffic share count is 1
Total delay is 40000 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 1
R3#
从以上R3#show ip route 10.10.10.0命令输入的相关信息可以看到到达目的地10.10.10.0的延迟总和为4000微秒,而Eigrp的带宽用整个链路的最小带宽为1544Kbit/s,经过计算,算出来的metric的值为2681856,而直接套用如上公式进行计算,计算的结果有一定的偏差,实际的链路带宽应为1544.163063619518221124Kb通过此值进行运算即可得到metric为2681856。图示如下:

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#line con 0
Router(config-line)#logg sy
Router(config-line)#exec-t 0 0
Router(config-line)#exi
Router(config)#no ip domain-lo
Router(config)#host R1
R1(config)#int s 1
R1(config-if)#ip add 10.10.10.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#clo ra 64000
R1(config-if)#exi
R1(config)#
*Mar 1 00:23:29.347: %LINK-3-UPDOWN: Interface Serial1, changed state to up
R1(config)#
*Mar 1 00:23:30.351: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to up
R1(config)#
R2:
R2#en
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int s 1
R2(config-if)#ip add 10.10.10.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#int s 0
R2(config-if)#ip add 20.20.20.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#clo ra 64000
R2(config-if)#exi
R2(config)#
R3:
R3>en
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int s 1
R3(config-if)#ip add 20.20.20.2 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exi
R3(config)#
以上的配置已经可以完成由R2分别与R1和R3的通信,测试结果如下:
R2#ping 10.10.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/34/36 ms
R2#ping 20.20.20.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/34/36 ms
R2#
回R1启动EIGRP协议。
R1(config)#router eigrp ?
<1-65535> Autonomous system number ←实则为EIGRP的进程号,也可被用来用自治系统号进行分配。
R1(config)#router eigrp 1
R1(config-router)#net 10.10.10.0 ? ←宣告网络
A.B.C.D EIGRP wild card bits ←EIGRP支持VLSM,可以在这里输入通配符掩码进行精确匹配。
<cr> ←直接确定
R2、R3同时都需要运行EIGRP使R1可以与R3相互交换信息,R2、R3的配置如下:
R2:
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router eigrp 1
R2(config-router)#net 10.10.10.0
*Mar 1 01:10:21.591: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 10.10.10.1 (Serial1) is up: new adjacency ←与邻居10.10.10.1建立邻接关系成功,如何建立的细节请参阅IT傻博士课程。
R2(config-router)#net 20.20.20.0
R2(config-router)#exi
R2(config)#
*Mar 1 01:10:37.699: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 20.20.20.2 (Serial0) is up: new adjacency ←与邻居20.20.20.2建立邻接关系。
R2(config)#
R3:
R3(config)#
R3(config)#router eigrp 1
R3(config-router)#net 20.20.20.0
R3(config-router)#exi
R3(config)#
*Mar 1 01:09:13.887: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 20.20.20.1 (Serial1) is up: new adjacency ←与邻居20.20.20.1建立邻接关系。
R3(config)#
我们接着在R3上查看路由表可以看见到达R1的路由已经出现,如下。
R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
20.0.0.0/24 is subnetted, 1 subnets
C 20.20.20.0 is directly connected, Serial1
D 10.0.0.0/8 [90/2681856] via 20.20.20.1, 00:39:05, Serial1
R3#
首先我们来分解看一下本条通过EIGRP学习到的路由条目。
D 10.0.0.0/8 [90/2681856] via 20.20.20.1, 00:39:05, Serial1
D: 代表EIGRP。
0.0.0.0/8: 为我们宣告的网络,在此的形式为主类,因为EIGRP在通过边界路由的时候将进行自动汇总。
[90/2681856]: 括号内的90表明EIGRP的管理距离为90,2681856为到达10.0.0.0/8这条链路的开销值。
via 20.20.20.1: 下一跳邻居接口。
01:07:51: 时间标记。
Serial1: 本地接口。
在[90/2681856]一项内管理距离的值各协议不同,并且随厂家的不同也有不同,定义管理距离值除了各企业以外IETF工程小组也有相关定义。
2681856为到达目的地的Metric值(度量)其计算公式如下:
BW igrp metric = 10000000/带宽(kbit/s)
DLY igrp metric = 延迟总和(微秒microseconds)/10
BW eigrp metric = 10000000/带宽(kbit/s)* 256
DLY eigrp metric = 延迟总和(微秒microseconds)/10 * 256
通过show ip route 10.10.10.0 可查看相关路由的详细参数。
R3#show ip route 10.10.10.0
Routing entry for 10.0.0.0/8
Known via "eigrp 1", distance 90, metric 2681856, type internal
Redistributing via eigrp 1
Last update from 20.20.20.1 on Serial1, 01:17:54 ago
Routing Descriptor Blocks:
* 20.20.20.1, from 20.20.20.1, 01:17:54 ago, via Serial1
Route metric is 2681856, traffic share count is 1
Total delay is 40000 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 1
R3#
从以上R3#show ip route 10.10.10.0命令输入的相关信息可以看到到达目的地10.10.10.0的延迟总和为4000微秒,而Eigrp的带宽用整个链路的最小带宽为1544Kbit/s,经过计算,算出来的metric的值为2681856,而直接套用如上公式进行计算,计算的结果有一定的偏差,实际的链路带宽应为1544.163063619518221124Kb通过此值进行运算即可得到metric为2681856。图示如下:

接下来我们看一下Eigrp的Topology Table(称数据库表或拓扑表)
R3#show ip eigrp topo
IP-EIGRP Topology Table for AS(1)/ID(20.20.20.2)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 10.0.0.0/8, 1 successors, FD is 2681856
via 20.20.20.1 (2681856/2169856), Serial1
P 20.20.20.0/24, 1 successors, FD is 2169856
via Connected, Serial1
R3#
从上面摘取的条目可以看出P 10.0.0.0/8, 1 successors, FD is 2681856 其FD(可行距离)的值为2681856,可行距离即为从源到达目的的最小Metirc值,通过Metric的公式即可计算出,但是第二条P 20.20.20.0/24, 1 successors, FD is 2169856本条的FD为2169856,差别即在于20.20.20.0的网段与R3直接相连到达本路径的最小带宽为1544Kb,延迟总和为20000微秒,通过计算即可得。
带宽和延迟是Eigrp进行度量运算的默认参数,除此以外负载和可靠性也可以与带宽和延迟共同参与度量的运算,但是需要人为手动开启此选项,另外MTU(最大传输单元)并不参与Metric的运算,但是Eigrp和Igrp也会跟踪每条路由上最小MTU的大小。
通过以下方式可以查看每接口的相关参数
R3#show interface s 1
Serial1 is up, line protocol is up
Hardware is HD64570
Internet address is 20.20.20.2/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, ←用于Metric运算的相关参数。
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, loopback not set
Keepalive set (10 sec)
Last input 00:00:02, output 00:00:02, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/1/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 1158 kilobits/sec
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
916 packets input, 59374 bytes, 0 no buffer
Received 319 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
922 packets output, 60362 bytes, 0 underruns
0 output errors, 0 collisions, 4 interface resets
0 output buffer failures, 0 output buffers swapped out
1 carrier transitions
DCD=up DSR=up DTR=up RTS=up CTS=up
R3#
R3#show ip eigrp topo
IP-EIGRP Topology Table for AS(1)/ID(20.20.20.2)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 10.0.0.0/8, 1 successors, FD is 2681856
via 20.20.20.1 (2681856/2169856), Serial1
P 20.20.20.0/24, 1 successors, FD is 2169856
via Connected, Serial1
R3#
从上面摘取的条目可以看出P 10.0.0.0/8, 1 successors, FD is 2681856 其FD(可行距离)的值为2681856,可行距离即为从源到达目的的最小Metirc值,通过Metric的公式即可计算出,但是第二条P 20.20.20.0/24, 1 successors, FD is 2169856本条的FD为2169856,差别即在于20.20.20.0的网段与R3直接相连到达本路径的最小带宽为1544Kb,延迟总和为20000微秒,通过计算即可得。
带宽和延迟是Eigrp进行度量运算的默认参数,除此以外负载和可靠性也可以与带宽和延迟共同参与度量的运算,但是需要人为手动开启此选项,另外MTU(最大传输单元)并不参与Metric的运算,但是Eigrp和Igrp也会跟踪每条路由上最小MTU的大小。
通过以下方式可以查看每接口的相关参数
R3#show interface s 1
Serial1 is up, line protocol is up
Hardware is HD64570
Internet address is 20.20.20.2/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, ←用于Metric运算的相关参数。
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, loopback not set
Keepalive set (10 sec)
Last input 00:00:02, output 00:00:02, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/1/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 1158 kilobits/sec
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
916 packets input, 59374 bytes, 0 no buffer
Received 319 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
922 packets output, 60362 bytes, 0 underruns
0 output errors, 0 collisions, 4 interface resets
0 output buffer failures, 0 output buffers swapped out
1 carrier transitions
DCD=up DSR=up DTR=up RTS=up CTS=up
R3#
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
相关专题
- EIGRP协议 (64篇文章)
- 关于RHCE考试的30个主要方向 (0次浏览)




