实验拓扑
实验要求:路由选路最佳
1.如图配置IP地点
R1:
interface GigabitEthernet0/0/0
ip address 12.1.1.1 255.255.255.0
interface GigabitEthernet0/0/1
ip address 15.1.1.2 255.255.255.0
interface LoopBack0
ip address 1.1.1.1 255.255.255.0
R2:
interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 13.1.1.1 255.255.255.0
interface LoopBack0
ip address 2.2.2.2 255.255.255.0
R3:
interface GigabitEthernet0/0/0
ip address 14.1.1.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 15.1.1.1 255.255.255.0
interface LoopBack0
ip address 3.3.3.3 255.255.255.0
R4:
interface GigabitEthernet0/0/0
ip address 13.1.1.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 14.1.1.1 255.255.255.0
interface LoopBack0
ip address 4.4.4.4 255.255.255.0
2、抓取定向流量并在接口下执行计谋
R1:
ip ip-prefix gl2 index 10 permit 3.3.3.0 24
ip ip-prefix gl2 index 30 permit 14.1.1.0 24
ip ip-prefix gl2 index 40 permit 4.4.4.4 32
ip ip-prefix gl3 index 10 permit 2.2.2.0 24
ip ip-prefix gl3 index 20 permit 13.1.1.0 24
interface GigabitEthernet0/0/0
rip metricin ip-prefix gl2 10 ——————执行名为gl2的计谋,并把开销值改为10
interface GigabitEthernet0/0/1
rip metricin ip-prefix gl3 10 ——————执行名为gl3的计谋,并把开销值改为10
R2:
ip ip-prefix gl index 20 deny 3.3.3.0 24
ip ip-prefix gl index 30 deny 15.1.1.0 24
ip ip-prefix gl index 40 permit 0.0.0.0 0 less-equal 32 ————前缀列表末尾隐含一条拒绝全部,在匹配前要放通全部
rip 1
filter-policy ip-prefix gl import GigabitEthernet0/0/0 —————在协议中调用,注意方向
R3:
ip ip-prefix gl index 20 deny 2.2.2.0 24
ip ip-prefix gl index 30 deny 12.1.1.0 24
ip ip-prefix gl index 40 deny 1.1.1.0 24
ip ip-prefix gl index 50 permit 0.0.0.0 0 less-equal 32 ————前缀列表末尾隐含一条拒绝全部,在匹配前要放通全部
rip 1
filter-policy ip-prefix gl import GigabitEthernet0/0/1 —————在协议中调用,注意方向
4、观察R1,R4的路由表
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |