博客统计信息

51cto推荐博客
用户名:范琳琳
文章数:49
评论数:212
访问量:75707
无忧币:207
博客积分:1414
博客等级:5
注册日期:2008-11-15

浅谈cisco私有 EIGRP
2009-03-24 11:08:48
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://fanlinlin.blog.51cto.com/535085/141742
前面在CCNA配置试验里曾经写过EIGRP的基本配置。现在我们来稍微深入一点,学点有关EIGRP的高级一点的知识!
此次试验的目的:
1.       复习EIGRP的基本配置;
2.       验证EIGRP的自动汇总功能;
3.       验证EIGRP支持不连续子网;
4.       使用EIGRP验证,使路由环境更安全;
5.       EIGRP的手动汇总功能;
6.       使用抑制传播的方法,减少网络带宽的使用率;
试验拓扑介绍:R1F1/0 ip地址为172.16.1.1/24,  S0/0ip地址为    192.168.1.1/24
                           R2F1/0 ip地址为192.168.3.1/24,  S0/0ip地址为192.168.1.2/24, S0/1ip地址为192.168.2.1/24
                           R3F1/0 ip地址为172.16.100.1/24,  S0/0ip地址为 192.168.1.1/24
R1F1/0端口ipR3F1/0端口ip这样设置是为了验证EIGRP协议支持不连续子网。
Ok,试验开始:
一.首先在路由器间配置EIGRP协议。
相信这个基本的步骤大家都熟记于心了。如有不会者请参看:CCNA配置试验之三 EIGRP协议的配置
二.验证EIGRP的自动汇总功能;
在路由器间配置完EIGRP协议后,理应是全网全通的,可是如下所示:在R2上能ping172.16.1.1ping不通172.16.100.1
r2#ping 172.16.1.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/40/76 ms
r2#ping 172.16.100.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.100.1, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)e
这是怎么回事呢?查看一下路由表,仔细一看,R2的路由表中没有172.16.100.0的信息。原因是EIGRP协议默认开启了自动汇总功能。172.16.1.1172.16.100.1都汇总为172.16.0.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
 
D    172.16.0.0/16 [90/2172416] via 192.168.2.2, 00:01:55, Serial0/1
                   [90/2172416] via 192.168.1.1, 00:01:55, 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/0ercent (0/5)
在所有路由器上关闭自动汇总功能,命令如下
r1(config-router)#no auto-summary
r2(config-router)#no auto-summary
r3(config-router)#no auto-summary
 
自动汇总关闭后让我们查看一下路由表,这次172.16.100.0的信息在路由表中显示出来了。
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, 2 subnets
D       172.16.1.0 [90/2172416] via 192.168.1.1, 00:00:59, Serial0/0
D       172.16.100.0 [90/2172416] via 192.168.2.2, 00:00:27, Serial0/1
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
 
试着看能ping172.16.1.1172.16.100.1吗?哈哈,成功通讯……
r2#ping 172.16.1.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/48/116 ms
r2#ping 172.16.100.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.100.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/35/96 ms
 
 
路由协议配置完成了,相互之间也能正常通讯了,是不是已经万事大吉了呢?NO,如果有人在这个网络内新加进一台AS号相同的路由器就能和网络内的其他路由器相互交换信息,从而窃取一些重要信息,进而攻击我们的网络。
那我们能做些什么呢?答案是:在路由器间配置EIGRP认证。
使用EIGRP认证,使路由环境更安全;
首先我们在路由器R1S0/0、路由器R2S0/0S0/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认证的配置后,查看路由器的路由表。
R1R2的路由表中没有了172.16.100.0网段的信息。R3的路由表中也没有了R1R2的信息。
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
 
这表明我们的试验已经快要成功了。因为我们只在R1R2上配置了EIGRP认证。如果别的路由器想加入通信,必须也配置EIGRP认证,而且密码必须相同。
好了,我们让R3加入通信吧!在R3的出口配置EIGRP认证。方法如上。在次不再复述。
配置完EIGRP认证后,查看路由表。如下所示,在R3的路由表中出现了R1R2的信息。
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

分享至
更多
一键收藏,随时查看,分享好友!
0人
了这篇文章
类别:CISCO技术圈()┆阅读()┆评论() ┆ 推送到技术圈返回首页

文章评论

 <<   1   2   >>   页数 ( 1/2 )  
2009-03-24 12:59:35
EIGRP是啥子啊?

2009-03-24 12:59:59
Cisco的私有路由协议,动态路由协议中的一种,路由器等设备通过各种不同的协议来实现路由的寻址功能。在一个网络中并不是一定要使用EIGRP,也可以选择其他的协议。
博主回复:
2009-03-25 10:26:35
谢谢一休帮我回答哦!( ^_^ )

2009-03-24 13:50:27
很好的文章,支持一下!
博主回复:
2009-03-24 16:42:30
谢谢支持,欢迎常来做客啊O(∩_∩)O

2009-03-24 14:00:44
很好,很强大,相互学习。
博主回复:
2009-03-24 16:43:10
相互学习......

2009-03-24 15:49:57
楼主让我想起了学生时代,当年过CCNA是我的梦想!
博主回复:
2009-03-24 16:44:06
呵呵   看来是前辈啊!

2009-03-24 23:32:08
呵呵 范兄加油吧!离推荐博客应该很近了
博主回复:
2009-03-25 10:22:00
加油!加油!一定得追上你......来个平起平坐,O(∩_∩)O哈哈~

2009-03-25 10:28:47
汗。。。。。。
我博客得文章清了一次你知道不?要是不清估计70-80篇之间了。。。。。   呵呵
博主回复:
2009-03-25 16:48:33
所以说我要加油缩短和你之间的差距了!

2009-03-25 19:12:56
无语 。。。。呵呵   一起加油!

2009-03-27 20:38:04
真是不错的文章,条理很清晰,我是个网络初学者,继续加油啊~~以后常来看看~~
博主回复:
2009-03-27 21:31:46
呵呵   欢迎常来啊! O(∩_∩)O

2010-02-04 17:16:15
博主,您好!
您的这篇博文已被推送到“手把手教你配置EIGRP协议”专题 (http://g.51cto.com/EIGRP),成为专题精品文章。
如果您发现有相关主题的文章,欢迎您推送到该专题下的“博友推送区”。

 <<   1   2   >>   页数 ( 1/2 )  

发表评论            

【技术门诊】专家解析:软考重点难点及应试技巧
昵  称:
登录  快速注册
验证码:

请点击后输入验证码博客过2级,无需填写验证码

内  容: