配置EIGRP:
配置EIGRP基本步骤:
1. Router(config)# router eigrp autonomous-system-number 启动EIGRP 2. Router(config-router)# network network-number [wildcard-mask] 标识参与EIGRP路由的网络 3. Router(config-router)# auto-summary /no auto-summary 启用和关门自动汇总(默认自动汇总为打开) 4. (config-if)# ip summary-address eigrp [as-number] [address] [mask] 在接口模式下手工汇总
http://cisco.xmut.edu.cn
配置R1:
router eigrp 100 (注:R1 R2 R3必须要运行在同一个AS,才可以建立邻居和学习路由) network 11.1.1.0 0.0.0.255 network 12.1.1.0 0.0.0.255 network 13.1.1.0 0.0.0.255 no auto-summary 关门自动汇总
配置R2:
router eigrp 100
network 12.1.1.0 0.0.0.255 network 22.1.1.0 0.0.0.255 network 23.1.1.0 0.0.0.255 no auto-summary关门自动汇总
配置R3:
router eigrp 100
network 13.1.1.0 0.0.0.255 network 23.1.1.0 0.0.0.255 network 33.1.1.0 0.0.0.255 no auto-summary关门自动汇总
常用调试命令:
Show ip interface brie 查看接口基本参数 Show int e0 查看E0查相关参数 Sho int s0 查看S0查相关参数 Sho int s1 查看S1查相关参数
http://cisco.xmut.edu.cn
Show run 查看当前运行配置 Show cdp neighbor 看CDP邻居 Show ip route 查看路由表的内容
Show ip protocol 查看当前运行的协议 Show ip eigrp neighbor 查看EIGRP邻居 Show ip eigrp top 查看EIGRP的拓扑信息
Debug eigrp packet查看EIGRP的DEBUG信息
用命令show ip route检查IP路由表的内容:
r2#show ip route 33.0.0.0/24 is subnetted, 1 subnets D 33.1.1.0 [90/2195456] via 23.1.1.3, 00:07:03, Serial1 11.0.0.0/24 is subnetted, 1 subnets D 11.1.1.0 [90/2195456] via 12.1.1.1, 00:07:01, Serial0 13.0.0.0/24 is subnetted, 1 subnets D 13.1.1.0 [90/2681856] via 12.1.1.1, 00:07:04, Serial0 [90/2681856] via 23.1.1.3, 00:07:04, Serial1
在EIGRP中如果到达目标网络有多条路径且FD相等,会自己做负载均衡.EIGRP也可实现到达目标网络的不等代价的负载均衡.必须设置variance值.
例如在本例中:要实现R2到达11.1.1.0/24的负载均衡: r2#show ip eigrp topology
IP-EIGRP Topology Table for AS(100)/ID(23.1.1.2)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply, r - reply Status, s - sia Status
P 11.1.1.0/24, 1 successors, FD is 2195456
via 12.1.1.1 (2195456/281600), Serial0 到达11.1.1.0/24没有FS P 12.1.1.0/24, 1 successors, FD is 2169856 via Connected, Serial0
P 13.1.1.0/24, 2 successors, FD is 2681856
via 23.1.1.3 (2681856/2169856), Serial1 via 12.1.1.1 (2681856/2169856), Serial0 P 22.1.1.0/24, 1 successors, FD is 281600 via Connected, Ethernet0
P 23.1.1.0/24, 1 successors, FD is 2169856 via Connected, Serial1
P 33.1.1.0/24, 1 successors, FD is 2195456
via 23.1.1.3 (2195456/281600), Serial1
http://cisco.xmut.edu.cn
在R3 S0上修改delay值使得R3宣告给R2的AD小于R2到达11.1.1.0/24的FD,这样R3就成为R2到达11.1.1.0/24的FS. r3(config)#interface serial 0 r3(config-if)#delay 20
r2#sho ip eigrp topology
IP-EIGRP Topology Table for AS(100)/ID(23.1.1.2)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply, r - reply Status, s - sia Status
P 11.1.1.0/24, 1 successors, FD is 2195456
via 12.1.1.1 (2195456/281600), Serial0
via 23.1.1.3 (2200576/1688576), Serial1 R3成为R2到达11.1.1.0/24的FS P 12.1.1.0/24, 1 successors, FD is 2169856 via Connected, Serial0
P 13.1.1.0/24, 1 successors, FD is 2174976
via 23.1.1.3 (2174976/1662976), Serial1 via 12.1.1.1 (2681856/2169856), Serial0 P 22.1.1.0/24, 1 successors, FD is 281600 via Connected, Ethernet0
P 23.1.1.0/24, 1 successors, FD is 2169856 via Connected, Serial1
P 33.1.1.0/24, 1 successors, FD is 2195456
via 23.1.1.3 (2195456/281600), Serial1
通过在R2上设置variance值实现R2到达11.1.1.0/24的不等代价负载均衡. r2(config)#router eigrp 100 r2(config-router)#va
r2(config-router)#variance 2
r2#show ip route
D 11.1.1.0 [90/2200576] via 23.1.1.3, 00:00:00, Serial1 [90/2195456] via 12.1.1.1, 00:00:00, Serial0 R2到达目标网络11.1.1.0/24实现了不等代价的负载均衡.
r2#ping 33.1.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 33.1.1.3, timeout is 2 seconds: !!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/12 ms
http://cisco.xmut.edu.cn
r2#ping 11.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 11.1.1.1, timeout is 2 seconds: !!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/8 ms r2#
常用调试命令:
Show ip interface brie 查看接口基本参数 Show int e0 查看E0查相关参数 Sho int s0 查看S0查相关参数 Sho int s1 查看S1查相关参数 Show run 查看当前运行配置 Show cdp neighbor 看CDP邻居 Show ip route 查看路由表的内容
Show ip protocol 查看当前运行的协议 Show ip eigrp neighbor 查看EIGRP邻居 Show ip eigrp top 查看EIGRP的拓扑信息
Debug eigrp packet查看EIGRP的DEBUG信息
实例10:配置EIGRP的手工汇总 如下图:在R3的S0的手工汇总
配置R1:
router eigrp 100 network 11.1.1.0 0.0.0.255 network 12.1.1.0 0.0.0.255
http://cisco.xmut.edu.cn
network 13.1.1.0 0.0.0.255 no auto-summary
配置R2:
router eigrp 100 network 12.1.1.0 0.0.0.255 network 22.1.1.0 0.0.0.255 no auto-summary
配置R3: r3(config)#int ethernet 0 为了实现汇总目的,要在E0口上增加几个辅助地址 r3(config-if)#ip address 33.1.2.3 255.255.255.0 secondary r3(config-if)#ip address 33.1.3.3 255.255.255.0 secondary r3(config-if)#ip address 33.1.4.3 255.255.255.0 secondary r3(config-if)#ip address 33.1.3.3 255.255.255.0 secondary
router eigrp 100 network 13.1.1.0 0.0.0.255 network 33.1.1.0 0.0.0.255 network 33.1.2.0 0.0.0.255 network 33.1.3.0 0.0.0.255 network 33.1.4.0 0.0.0.255 network 33.1.5.0 0.0.0.255 no auto-summary
没有配置手工汇总用在R2的可以看到5条明细路由 r2#sho ip route
D 33.1.1.0 [90/2707456] via 12.1.1.1, 00:06:40, Serial0 D 33.1.2.0 [90/2707456] via 12.1.1.1, 00:03:41, Serial0 D 33.1.3.0 [90/2707456] via 12.1.1.1, 00:03:45, Serial0 D 33.1.4.0 [90/2707456] via 12.1.1.1, 00:00:09, Serial0 D 33.1.5.0 [90/2707456] via 12.1.1.1, 00:03:33, Serial0
在R3的S0上手工配置汇总:
r3(config-if)#ip summary-address eigrp 100 33.1.0.0 255.255.248.0
在R3的S0上手工配置汇总后,在R2上只看到汇总路由,达到了汇总目的: r2#show ip route
33.0.0.0/21 is subnetted, 1 subnets
D 33.1.0.0 [90/2707456] via 12.1.1.1, 00:01:42, Serial0
问:在R3上手工汇总后自动产生Null0的路由,是什么意思? 答:NULL0路由避免路由环路.
http://cisco.xmut.edu.cn
R3#show ip route
D 33.1.0.0/21 is a summary, 00:03:34, Null0
常用调试命令:
Show ip interface brie 查看接口基本参数 Show int e0 查看E0查相关参数 Sho int s0 查看S0查相关参数 Sho int s1 查看S1查相关参数 Show run 查看当前运行配置 Show cdp neighbor 看CDP邻居 Show ip route 查看路由表的内容
Show ip protocol 查看当前运行的协议 Show ip eigrp neighbor 查看EIGRP邻居 Show ip eigrp top 查看EIGRP的拓扑信息
Debug eigrp packet查看EIGRP的DEBUG信息
http://cisco.xmut.edu.cn
因篇幅问题不能全部显示,请点此查看更多更全内容