双点重发布实验

在这里插入图片描述
配置IP地址

[R1]int g0/0/0

[R1-GigabitEthernet0/0/0]ip add 192.168.12.1 24
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.13.1 24

[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.12.2 24
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 192.168.24.2 24

[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.13.3 24
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 192.168.34.3 24

[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.24.4 24
[R4]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 192.168.34.4 24


r1进行ospf配置

[R1]ospf 1 router-id 1.1.1.1    
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.12.0 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 192.168.13.0 0.0.0.0

r1和r2进行配置

[R1]ip ip-prefix aa permit 1.1.1.0 24
[R1]route-policy aa permit node 10
Info: New Sequence of this List.
[R1-route-policy]if-match ip-prefix aa


[R1-ospf-1]import-route direct route-policy aa

[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0 
[R2-ospf-1-area-0.0.0.0]network 192.168.12.0 0.0.0.0 

[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 192.168.13.0 0.0.0.0

R2和R3进行双点重发布

[R2]ospf 1
[R2-ospf-1]import-route rip 1
[R2]rip 1
[R2-rip-1]import-route ospf 1
[R3]ospf 1  
[R3-ospf-1]import-route rip 1
[R3]rip 1
[R3-rip-1]import-route ospf 1

[R3]ip ip-prefix aa permit 1.1.1.0 24

[R3]route-policy aa permit node 10
Info: New Sequence of this List.   
[R3-route-policy]if-match ip-prefix aa
[R3-route-policy]apply preference 90

[R3]ospf 1   
[R3-ospf-1]preference ase route-policy aa

r1进行ospf和限制网段

[R1-ospf-1]import-route direct 
[R1]acl 2000
[R1-acl-basic-2000]rule permit source 192.168.12.1 0 
[R1-acl-basic-2000]rule permit source 192.168.13.1 0

对r2和r3进行路由策略配置

[R2]ip ip-prefix tb permit 0.0.0.0 0 less-equal 32
[R2]ospf 1 
[R2-ospf-1]filter-policy ip-prefix tb export

[R3]ip ip-prefix tb deny 192.168.24.0 24

[R3]ip ip-prefixt tb permit 0.0.0.0 0 less-equal 32

[R3-ospf-1]filter-policy ip-prefix tb export

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值