【实验拓扑】

 

EIGRP中路由重定向与过滤路由_第1张图片 

【实验要求】
1、按照上图配置好接口地址与EIGRP
2、在R5上创建 loopback1:150.1.55.55/24,创建loopback2:150.1.155.155/24
3、在R5上使用route-map重定向Loopback1与Loopback2到EIGRP中,并且分配Loopback1的tag值为100
4、在R4上使用route-map只允许tag值为100的路由进来,需要应用在s0/0与s0/1接口上

 
【实验配置】
第一步配置:
R4配置:
interface Loopback0
 ip address 150.1.4.4 255.255.255.0
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/0
 bandwidth 256
 ip address 155.1.0.4 255.255.255.0
 encapsulation frame-relay
 clock rate 2000000
 frame-relay map ip 155.1.0.5 405 broadcast
 no frame-relay inverse-arp
!
interface Serial0/1
 bandwidth 64
 ip address 155.1.45.4 255.255.255.0
 clock rate 2000000
!
router eigrp 100
 network 150.1.4.4 0.0.0.0
 network 155.1.0.4 0.0.0.0
 network 155.1.45.4 0.0.0.0
 no auto-summary

 
R5配置:
interface Loopback0
 ip address 150.1.5.5 255.255.255.0
!
interface Serial0/0
 bandwidth 256
 ip address 155.1.0.5 255.255.255.0
 encapsulation frame-relay
 clock rate 2000000
 frame-relay map ip 155.1.0.4 504 broadcast
 no frame-relay inverse-arp
!
interface Serial0/1
 bandwidth 64
 ip address 155.1.45.5 255.255.255.0
 clock rate 9600
!
router eigrp 100
 network 150.1.5.5 0.0.0.0
 network 155.1.0.5 0.0.0.0
 network 155.1.45.5 0.0.0.0
 no auto-summary
配置完成之后R4与R5能够互相学习到对方的loopback0地址,
R4#show ip eigrp neighbors
IP-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
1   155.1.0.5               Se0/0            165 00:39:59  196  1176  0  27
0   155.1.45.5              Se0/1             14 00:42:27   67  2280  0  28

 
第二步: 接下来的配置
R5:
interface Loopback1
ip address 150.1.55.55 255.255.255.0
!
interface Loopback2
ip address 150.1.155.155 255.255.255.0
!
router eigrp 100
redistribute connected route-map CONNECTED_TO_EIGRP
route-map CONNECTED_TO_EIGRP permit 10
match interface Loopback1
set tag 100
route-map CONNECTED_TO_EIGRP permit 20
match interface Loopback2

 
R4:
route-map FILTER_EIGRP 10
match tag 100
!
router eigrp 100
distribute-list route-map FILTER_EIGRP in serial 0/1
distribute-list route-map FILTER_EIGRP in serial 0/0

 
【验证配置】
配置过滤之前
R4#show ip route eigrp
150.1.0.0/24 is subnetted, 4 subnets
D EX 150.1.155.0 [170/10639872] via 155.1.0.5, 00:00:05, Serial0/0
D 150.1.5.0 [90/10639872] via 155.1.0.5, 01:18:07, Serial0/0
D EX 150.1.55.0 [170/10639872] via 155.1.0.5, 00:00:56, Serial0/0
配置过滤之后:
R4#show ip route eigrp
150.1.0.0/24 is subnetted, 2 subnets
D EX 150.1.55.0 [170/10639872] via 155.1.0.5, 00:02:59, Serial0/0