eigrp的配置(2)

来源:互联网 发布:淘宝详情卖家推荐 编辑:程序博客网 时间:2024/05/17 03:21

下面我们在eigrp的配置(1)的基础上进行eigrp路由过滤的配置,拓扑图与IP地址的分配依然不变

r3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r3(config)#access-list 10 deny 1.1.1.0   //访问控制列表,表号为10,过滤掉网段1.1.1.0,使r3无法接收到网段10.1.1.0的更新信息

r3(config)#access-list 10 permit any

r3(config)#router eigrp 100                   //进入eigrp配置模式

r3(config-router)#distribute-list 10 in s1/0   //把访问列表10应用到此协议当中
r3(config-router)#end

 

r3#sh ip route  //从中我们可以看到没有了网段1.1.1.0的路由信息了
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       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

C    192.1.1.0/24 is directly connected, Serial1/0
D    148.1.0.0/16 [90/2681856] via 192.1.1.2, 00:00:11, Serial1/0
r3#ping 1.1.1.1                    //不通

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
r3#ping 148.1.1.1             //通

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 148.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/23/44 ms