如图:R1-R4运行EIGRP,R1上有172.16.0.1/24、172.16.1.1/24,172.16.2.1/24和172.16.3.1/24;R1发布4条路由。
默认关闭自动汇总,R2-R3-R4上都可以学习到这4条路由,且R3是从F0/0学到。
要求:R4学习到172.16.0.0/24和172.16.1.0/24走R2;学习172.16.2.0/24和172.16.3.0/24走R3
配置:
R1#routereig 100
no auto
network 10.1.12.0 0.0.0.255
network172.16.0.1 0.0.0.255
network172.16.1.1 0.0.0.255
network172.16.2.1 0.0.0.255
network172.16.3.1 0.0.0.255
第一步:配置列表匹配路由
access-list101 permit ip 172.16.0.0 0.0.1.255 any-----匹配172.16.0.0/24和172.16.1.0/24
access-list110 permit ip 172.16.2.0 0.0.1.255 any-----匹配172.16.2.0/24和172.16.3.0/24
第二步:配置route-map
route-map A permit 10
match ip address 101
route-map Bpermit 10
match ip address 110
第三步:手工汇总、配置LEAK-MAP
interface Serial1/1
ip summary-address eigrp 100 172.16.0.0255.255.252.0 5 leak-map A
interfaceFastEthernet0/0
ip summary-address eigrp 100 172.16.0.0255.255.252.0 5 leak-map B
查看结果:R4上show eigrp路由
R4#sh ip route eigrp
1.0.0.0/32 is subnetted, 1 subnets
D1.1.1.1 [90/435200] via 10.1.34.3, 03:30:09, FastEthernet0/1
2.0.0.0/32 is subnetted, 1 subnets
D2.2.2.2 [90/409600] via 10.1.24.2, 03:39:59, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
D3.3.3.3 [90/409600] via 10.1.34.3, 03:40:03, FastEthernet0/1
172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
D172.16.0.0/24 [90/2323456] via10.1.24.2, 03:30:00, FastEthernet0/0
D172.16.0.0/22 [90/435200] via 10.1.34.3, 03:30:00, FastEthernet0/1
D172.16.1.0/24 [90/2323456] via10.1.24.2, 03:30:00, FastEthernet0/0
D172.16.2.0/24 [90/435200]via 10.1.34.3, 03:30:10, FastEthernet0/1
D172.16.3.0/24 [90/435200]via 10.1.34.3, 03:30:10, FastEthernet0/1
10.0.0.0/24 is subnetted, 4 subnets
D10.1.13.0 [90/307200] via 10.1.34.3, 03:40:02, FastEthernet0/1
D10.1.12.0 [90/2195456] via 10.1.24.2, 03:30:10, FastEthernet0/0