1、分发列表distribute-list解析

wKioL1ZhL_rAlZEhAAH9FgHVC5s708.png

wKioL1ZhL__DUDF0AAIMXal1KiI405.png


2、实验拓扑

wKioL1ZhMEfRZOOAAABKhJ9TWLA136.png

3、实验配置

R1配置

interface Serial0/0

 ip address 12.1.1.1 255.255.255.0

interface Serial0/1

 ip address 13.1.1.1 255.255.255.0

interface Serial0/2

 ip address 14.1.1.1 255.255.255.0

router eigrp 90

 redistribute ospf 110 metric 1500 100 255 1 1500

 network 14.1.1.0 0.0.0.255

 no auto-summary

router ospf 110

 router-id 1.1.1.1

 log-adjacency-changes

 redistribute rip subnets

 network 13.1.1.0 0.0.0.255 area 0

router rip

 version 2

 network 12.0.0.0

 no auto-summary


R2配置

interface Loopback0

 ip address 2.2.2.2 255.255.255.0

interface Serial0/0

 ip address 12.1.1.2 255.255.255.0

router rip

 version 2

 network 2.0.0.0

 network 12.0.0.0

 no auto-summary


R3配置

interface Loopback0

 ip address 3.3.3.3 255.255.255.0

interface Serial0/0

 ip address 13.1.1.3 255.255.255.0

router ospf 110

 router-id 3.3.3.3

 log-adjacency-changes

 network 3.3.3.0 0.0.0.255 area 0

 network 13.1.1.0 0.0.0.255 area 0


R4配置

interface Loopback0

 ip address 4.4.4.4 255.255.255.0

interface Serial0/0

 ip address 14.1.1.4 255.255.255.0

router eigrp 90

 network 4.4.4.0 0.0.0.255

 network 14.1.1.0 0.0.0.255

 no auto-summary


4、分发列表应用

wKioL1ZhMRywaE-wAABFm7Ku_0s541.png此时我们可以看到R4可以学到3.3.3.3/32和13.1.1.0/24这两条路由,这里我们希望通过分发列表让R4只学到13.1.1.0/24这条路由。

R1配置

access-list 3 permit 3.3.3.3

router eigrp 90

 distribute-list 3 out ospf 110

wKiom1ZhMhDxhbjbAAA-9QeGMLc522.png此时R4只学到13.1.1.0/24这条路由。