r4(config-router)#distribute-list 100 in FastEthernet 0/0
И получаем нужный нам результат.
r4#show ip route eigrp
10.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
D 10.0.10.1/32 [90/435200] via 10.0.24.2, 00:01:17, FastEthernet0/1
D 10.0.12.0/24 [90/307200] via 10.0.24.2, 00:01:17, FastEthernet0/1
D 10.0.13.0/24 [90/332800] via 10.0.24.2, 00:01:17, FastEthernet0/1
D 10.2.2.2/32 [90/409600] via 10.0.24.2, 00:04:09, FastEthernet0/1
D 10.3.3.3/32 [90/460800] via 10.0.24.2, 00:01:17, FastEthernet0/1
D 10.1.1.1/32 [90/435200] via 10.0.24.2, 00:01:17, FastEthernet0/1
D 10.0.100.1/32 [90/435200] via 10.0.24.2, 00:01:17, FastEthernet0/1
EIGRP
фильтрация
с
префикс
листом
(Filtering with Prefix-List)
В данном примере, мы запрещаем распространение адреса 10.4.4.4 и не пускаем на маршрутизатор r4 адрес 10.1.1.1.
r4(config)#ip prefix-list r4_out seq 5 deny 10.4.4.4/32
r4(config)#ip prefix-list r4_out seq 10 permit 0.0.0.0/0 le 32
r4(config)# ip prefix-list r4_in seq 5 deny 10.1.1.1/32
r4(config)# ip prefix-list r4_in seq 10 permit 0.0.0.0/0 le 32
r4(config)#router eigrp 1
r4(config-router)#distribute-list prefix r4_out out
r4(config-router)#distribute-list prefix r4_in in
В результате проверки, мы видим, что на маршрутизаторах r1 и r2 нет адреса 10.4.4.4, а адрес 10.1.1.1 присутствует на маршрутизаторе r2, а на r4 его нет.
r1#show ip route eigrp
10.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
D 10.2.2.2/32 [90/409600] via 10.0.12.2, 01:16:56, FastEthernet0/0
D 10.3.3.3/32 [90/409600] via 10.0.13.3, 01:15:17, FastEthernet0/1
D 10.0.24.0/24 [90/307200] via 10.0.12.2, 00:43:44, FastEthernet0/0
D 10.0.34.0/24 [90/307200] via 10.0.13.3, 00:43:44, FastEthernet0/1
r2#show ip route eigrp
10.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
D 10.0.10.1/32 [90/409600] via 10.0.12.1, 00:46:20, FastEthernet0/0
D 10.0.13.0/24 [90/307200] via 10.0.12.1, 00:26:53, FastEthernet0/0
D 10.3.3.3/32 [90/435200] via 10.0.24.4, 00:26:53, FastEthernet0/1
[90/435200] via 10.0.12.1, 00:26:53, FastEthernet0/0
D 10.1.1.1/32 [90/409600] via 10.0.12.1, 01:18:16, FastEthernet0/0
D 10.0.34.0/24 [90/307200] via 10.0.24.4, 00:48:05, FastEthernet0/1
D 10.0.100.1/32 [90/409600] via 10.0.12.1, 00:46:14, FastEthernet0/0
r4#show ip route eigrp
10.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
D 10.0.10.1/32 [90/435200] via 10.0.34.3, 00:30:33, FastEthernet0/0
[90/435200] via 10.0.24.2, 00:30:33, FastEthernet0/1
D 10.0.12.0/24 [90/307200] via 10.0.24.2, 00:30:33, FastEthernet0/1
D 10.0.13.0/24 [90/307200] via 10.0.34.3, 00:30:33, FastEthernet0/0
D 10.2.2.2/32 [90/409600] via 10.0.24.2, 00:51:45, FastEthernet0/1
D 10.3.3.3/32 [90/409600] via 10.0.34.3, 00:30:33, FastEthernet0/0
D 10.0.100.1/32 [90/435200] via 10.0.34.3, 00:30:33, FastEthernet0/0
[90/435200] via 10.0.24.2, 00:30:33, FastEthernet0/1
EIGRP
фильтрация
с
картой
маршрутов
(Filtering with Route-Map)
В данном примере мы перераспределяем в EIGRP два адреса, которым присваиваем им соответствующие метки, в дальнейшем по меткам их можно будет перераспределять.
r1(config)#route-map conn_eigrp permit 10
r1(config-route-map)#match interface loopback10
r1(config-route-map)#set tag 10
r1(config-route-map)#route-map conn_eigrp permit 20
r1(config-route-map)#match interface loopback100
r1(config-route-map)#set tag 100
r1(config-route-map)#exit
r1(config)#router eigrp 1
r1(config-router)#redistribute connected route-map conn_eigrp
Первая команда показывает, что данные маршруты пришли как внешние, две другие присвоенные метки. Проверка осуществляется командами:
r4#show ip route eigrp
10.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
D EX 10.0.10.1/32 [170/435200] via 10.0.34.3, 00:00:30,FastEthernet0/0
[170/435200] via 10.0.24.2, 00:00:30, FastEthernet0/1
D 10.0.12.0/24 [90/307200] via 10.0.24.2, 01:11:03, FastEthernet0/1
D 10.0.13.0/24 [90/307200] via 10.0.34.3, 01:11:03, FastEthernet0/0
D 10.2.2.2/32 [90/409600] via 10.0.24.2, 01:32:15, FastEthernet0/1
D 10.3.3.3/32 [90/409600] via 10.0.34.3, 01:11:03, FastEthernet0/0
D 10.1.1.1/32 [90/435200] via 10.0.34.3, 00:19:50, FastEthernet0/0
[90/435200] via 10.0.24.2, 00:19:50, FastEthernet0/1
D EX 10.0.100.1/32 [170/435200] via 10.0.34.3,00:00:30,FastEthernet0/0
[170/435200] via 10.0.24.2, 00:00:30, FastEthernet0/1
r4#show ip route 10.0.10.1
Routing entry for 10.0.10.1/32
Known via "eigrp 1", distance 170, metric 435200
Tag 10, type external
Redistributing via eigrp 1
Last update from 10.0.24.2 on FastEthernet0/1, 00:02:09 ago
Routing Descriptor Blocks:
* 10.0.34.3, from 10.0.34.3, 00:02:09 ago, via FastEthernet0/0
Route metric is 435200, traffic share count is 1
Total delay is 7000 microseconds, minimum bandwidth is 10000 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 2
Route tag 10
10.0.24.2, from 10.0.24.2, 00:02:09 ago, via FastEthernet0/1
Route metric is 435200, traffic share count is 1
Total