三 使用EIGRP认证,使路由环境更安全;
首先我们在路由器R1的S0/0、路由器R2的S0/0和S0/1端口上配置EIGRP认证。密码都为cisco
注意,EIGRP认证要配置在路由器的出口上。而且所有的密码必须相同!
R1
r1(config)#key chain 11 定义密钥名称
r1(config-keychain)#key 1 定义密钥个数,此例我们使用一个密码
r1(config-keychain-key)#key-string cisco 定义密码为cisco
r1(config-keychain-key)#exit
r1(config-keychain)#exit
r1(config)#int s0/0 在接口下启用认证,并定义要使用的钥匙链
r1(config-if)#ip authentication key-chain eigrp 100 11
r1(config-if)#ip authentication mode eigrp 100 md5 使用MD5加密
R2
r2(config)#key chain 22
r2(config-keychain)#key 1
r2(config-keychain-key)#key-string cisco
r2(config-keychain-key)#exi
r2(config-keychain)#exi
r2(config)#int s0/0
r2(config-if)#ip authentication key-chain eigrp 100 22
r2(config-if)#ip authentication mode eigrp 100 md5
r2(config)#key chain 33
r2(config-keychain)#key 1
r2(config-keychain-key)#key-string cisco
r2(config-keychain-key)#exit
r2(config-keychain)#exit
r2(config)#int s0/1
r2(config-if)#ip authentication key-chain eigrp 100 33
r2(config-if)#ip authentication mode eigrp 100 md5
完成EIGRP认证的配置后,查看路由器的路由表。
R1和R2的路由表中没有了172.16.100.0网段的信息。R3的路由表中也没有了R1和R2的信息。
R1
r1#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
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, FastEthernet1/0
C 192.168.1.0/24 is directly connected, Serial0/0
D 192.168.2.0/24 [90/2681856] via 192.168.1.2, 00:02:33, Serial0/0
D 192.168.3.0/24 [90/2172416] via 192.168.1.2, 00:02:33, Serial0/0
R2
r2#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
172.16.0.0/24 is subnetted, 1 subnets
D 172.16.1.0 [90/2172416] via 192.168.1.1, 00:07:42, Serial0/0
C 192.168.1.0/24 is directly connected, Serial0/0
C 192.168.2.0/24 is directly connected, Serial0/1
C 192.168.3.0/24 is directly connected, FastEthernet1/0
R3
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
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.100.0 is directly connected, FastEthernet1/0
C 192.168.2.0/24 is directly connected, Serial0/1
这表明我们的试验已经快要成功了。因为我们只在R1和R2上配置了EIGRP认证。如果别的路由器想加入通信,必须也配置EIGRP认证,而且密码必须相同。
好了,我们让R3加入通信吧!在R3的出口配置EIGRP认证。方法如上。在次不再复述。
配置完EIGRP认证后,查看路由表。如下所示,在R3的路由表中出现了R1和R2的信息。
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
172.16.0.0/24 is subnetted, 2 subnets
D 172.16.1.0 [90/2684416] via 192.168.2.1, 00:00:15, Serial0/1
C 172.16.100.0 is directly connected, FastEthernet1/0
D 192.168.1.0/24 [90/2681856] via 192.168.2.1, 00:00:15, Serial0/1
C 192.168.2.0/24 is directly connected, Serial0/1
D 192.168.3.0/24 [90/2172416] via 192.168.2.1, 00:00:15, Serial0/1
怎么样这个方法很实用很安全吧!
四.EIGRP的手动汇总功能:
EIGRP还支持手动汇总,汇总命令如下:(同样是在出口上配置)
(config-if)#ip summary-address eigrp AS号 汇总后的ip 汇总后的网络掩码
使用手动汇总可以自己配置汇总地址,这样一来,我们就能很轻松的记住汇总前的地址。很方便吧!
五.使用抑制传播的方法,减少网络带宽的使用率;
怎样能减少网络带宽使用率,提高使用效率呢?
抑制传播。路由器的内部一般接交换机、PC机,交换机和PC机没有必要接收接收路由宣告。因此我们抑制路由宣告向内网传播就能减少网络带宽的使用率!
具体配置如下:(在路由器的内网接口上配置)
(config-router)#passive-interface f1/0
怎么样,这样一来有没有对EIGRP有更深入的了解呢!
本文出自 “范琳琳学习笔记” 博客,请务必保留此出处http://fanlinlin.blog.51cto.com/535085/141742