EIGRP路由协议综述( 五 )


来看一个EIGRP配置的实例,如下图:
[img:73681a758d]http://www.show-tym.com/image/note/20045815552948262.jpg[/img:73681a758d]
如图,所有的路由器都在AS 109里,路由器A没有使用wildcard mask.假如A使用了以下的配置:
RouterA(config)#router eigrp 109
RouterA(config-router)#netw 10.1.0.0
RouterA(config-router)#netw 10.4.0.0
RouterA(config-router)#netw 172.16.1.0
RouterA(config-router)#netw 172.16.2.0
路由器A将对网络进行自动汇总,使得配置看上去像是这样的,如下:
RouterA(config)#router eigrp 109
RouterA(config-router)#netw 10.0.0.0
RouterA(config-router)#netw 172.16.0.0
假如路由器A的配置命令是如下这样的:
RouterA(config)#router eigrp 109
RouterA(config-router)#netw 10.1.0.0 0.0.255.255
RouterA(config-router)#netw 10.4.0.0 0.0.255.255
RouterA(config-router)#netw 172.16.1.0 0.0.0.255
RouterA(config-router)#netw 172.16.2.0 0.0.0.255
使用wildcard mask来定义参与AS 109的EIGRP进程的直接相连的路由器接口.在上面这个例子里,定义的就是处于10.1.0.0/16,10.4.0.0/16,172.16.1.0/24和172.16.2.0/24里的所有接口都会参与AS 109里的EIGRP进程看看在EIGRP中使用wildcard mask的例子,如下图:
[img:73681a758d]http://www.show-tym.com/image/note/20045815554267795.jpg[/img:73681a758d]
如图,路由器C并没有使用network 172.16.0.0 0.0.0.255,而使用的是network 172.16.3.0 0.0.0.255和network 172.16.4.0 0.0.0.255,因为C的S0口连接的是外部网络,即S0口没有运行EIGRP.假如在S0口运行了EIGRP的话,将会给外部发送不必要的信息造成带宽的浪费和CPU的负担
Configuring Default Route Using the default-network Command
当配置EIGRP的时候,可以使用ip default-network [network-number]命令创建默认路由,如下图:
[img:73681a758d]http://www.show-tym.com/image/note/20045815555582744.jpg[/img:73681a758d]
路由器A连接外部网络172.31.0.0/16,A使用了ip default-network 172.31.0.0命令配置了一条默认路由;然后A把它宣告给B,B把也它标记成默认路由.注重[network-number]参数是基于类的网络号
Verifying EIGRP Using show Commands
使用show ip route命令查看路由表的内容,如下:
RouterA#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, D - EIGRP, EX - EIGRP external, O - OSPF,;
(略)
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
D;;;;172.16.1.0 [90/10639872] via 10.1.2.2, 06:04:01, Serial0/0 10.0.0.0/24 is subnetted, 4 subnets
D;;;;10.1.3.0 [90/10514432] via 10.1.2.2, 05:54:47, Serial0/0
D;;;;10.3.1.0 [90/10639872] via 10.1.2.2, 06:19:41, Serial0/0
C;;;;10.1.2.0 is directly connected, Serial0/0
C;;;;10.1.1.0 is directly connected, Ethernet0/0

注重D代表是从EIGRP学来的,*代表默认路由
使用show ip protocols命令可以检查默认的EIGRP设置,如下:
RouterA# show ip protocols
Routing Protocol is "eigrp 100"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
EIGRP maximum hopcount 100
EIGRP maximum metric variance 1
Redistributing: eigrp 100
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
10.1.0.0/16
10.0.0.0
Routing Information Sources:
Gateway Distance;;;Last Update
10.1.2.2;;;90;;;05:50:13
Distance: internal 90 external 170
(略)
使用show up eigrp topology命令来验证EIGRP操作,如下:
RouterA# show ip eigrp topology
IP-EIGRP Topology Table for AS(100)/ID(10.1.2.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply, r - reply Status, s - sia Status
P 10.1.3.0/24, 1 successors, FD is 10514432
via 10.1.2.2 (10514432/28160), Serial0/0
P 10.3.1.0/24, 1 successors, FD is 10639872

推荐阅读