1、本次讲解路由器 eigrp 协议的配置:1EIGRP与 IGRP在 network命令的区别在于多了 wildcard-mask参数,这是通配符掩码。如果网络定义使用的是默认掩码,则 wildcard-mask参数可以省略:如果网络定义使用的不是默认掩码,则 wildcard-mask参数必须标明。2EIGRP在处理有类别(A、B、C 类)网络地址时,会自动地汇总路由。这意味着即使规定 RTC 连接的是 10030/24 这个网络,但 EIGRP仍然会发布其连接整个 A类网络 10000。在 EIGRP中,路由自动汇总功能默认是有效的。存在不连续子网的网络中,通常需要用 no auto-sum
2、mary命令来关闭该功能。本例配置模型图命令行:RA配置命令:RouterRouterenableRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#router eigrp 100 /使用 eigrp协议。使用系统自制号 100Router(config-router)#network 202.1.1.5 0.0.0.3 /指定与该路由器直接相连的网络Router(config-router)#network 192.1.1.0 0.0.0.255 /指定与该路由器直接
3、相连的网络Router(config-router)#no auto-summary /关闭自动汇总功能Router(config-router)#exitRouter(config)#int s1/0Router(config-if)#ip address 202.1.1.5 255.255.255.252 /依照图配置 IPRouter(config-if)#clock rate 64000 /使用时钟频率Router(config-if)#bandwidth 64Router(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial1
4、/0, changed state to downRouter(config-if)#exitRouter(config)#int f0/0 /依照图配置 IPRouter(config-if)#ip address 192.1.1.1 255.255.255.0Router(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed sta
5、te to upRouter(config-if)#exitRouter(config)#exitRouter#%SYS-5-CONFIG_I: Configured from console by consoleRouter#wrBuilding configuration.OKRouter#RB配置命令:RouterenableRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#router eigrp 100 /使用 eigrp协议。使用系统自制号 100Route
6、r(config-router)#network 202.1.1.6 0.0.0.3 /指定与该路由器直接相连的网络Router(config-router)#network 192.168.2.0 0.0.0.255 /指定与该路由器直接相连的网络Router(config-router)#no auto-summary /关闭自动汇总功能Router(config-router)#exitRouter(config)#int s1/0Router(config-if)#ip address 202.1.1.6 255.255.255.252 /依照图配置 IPRouter(config-i
7、f)#bandwidth 64Router(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial1/0, changed state to upRouter(config-if)#exitRouter(config)#int f0/0%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up%DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 202.1.1.5 (Serial1/0) is up: new a
8、djacencyRouter(config-if)#ip address 192.168.2.1 255.255.255.0Router(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upRouter(config-if)#exitRouter(config)#exitRouter#%SYS-5-CONFIG_
9、I: Configured from console by consoleRouter#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external t
10、ype 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setD 192.1.1.0/24 90/20514560 via 202.1.1.5, 00:00:36, Serial1/0 /这是已配置的 eigrp协议C 192.168.2
11、.0/24 is directly connected, FastEthernet0/0202.1.1.0/30 is subnetted, 1 subnetsC 202.1.1.4 is directly connected, Serial1/0Router#wrBuilding configuration.OK配置已完成!以下是测试:RouterenableRouter#tracerRouter#traceroute 192.168.2.3Type escape sequence to abort.Tracing the route to 192.168.2.3 1 * 47 msec 6
12、2 msec Router#traceroute 192.1.1.2Type escape sequence to abort.Tracing the route to 192.1.1.21 202.1.1.5 32 msec 31 msec 15 msec 2 * 78 msec 94 msec Router#ping 192.168.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:.Success rate is 0 percent (5/5)Router#Router#route eigrp Router#说明:上述两路由器配置结束以后,可以互相把四台 PC机相互 Ping通测试。你会很神奇地发现它们均能够通信!附图:Ps:记得配置 PC机网关哟讲解结束!