hcip分流实验

实验拓扑图
请添加图片描述
一、为所有路由器配置ip
R1:
interface GigabitEthernet0/0/0
ip address 14.1.12.1 255.255.255.0
interface GigabitEthernet0/0/1
ip address 14.1.13.1 255.255.255.0
interface LoopBack1
ip address 10.1.1.1 255.255.255.0
interface LoopBack2
ip address 10.2.1.1 255.255.255.0

R2:
interface GigabitEthernet0/0/0
ip address 14.1.12.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 14.1.24.2 255.255.255.0
interface LoopBack1
ip address 10.1.2.1 255.255.255.0
interface LoopBack2
ip address 10.2.2.1 255.255.255.0

R3:
interface GigabitEthernet0/0/0
ip address 14.1.34.3 255.255.255.0
interface GigabitEthernet0/0/1
ip address 14.1.13.3 255.255.255.0
interface GigabitEthernet0/0/2
ip address 14.0.35.3 255.255.255.0
interface GigabitEthernet3/0/0
ip address 14.0.36.3 255.255.255.0

R4:
interface GigabitEthernet0/0/0
ip address 14.1.34.4 255.255.255.0
interface GigabitEthernet0/0/1
ip address 14.1.24.4 255.255.255.0
interface GigabitEthernet0/0/2
ip address 14.0.46.4 255.255.255.0
interface GigabitEthernet3/0/0
ip address 14.0.45.4 255.255.255.0

R5:
interface GigabitEthernet0/0/0
ip address 14.0.45.5 255.255.255.0
interface GigabitEthernet0/0/2
ip address 14.0.35.5 255.255.255.0
interface LoopBack1
ip address 10.1.5.1 255.255.255.0
interface LoopBack2
ip address 10.2.5.1 255.255.255.0

R6:
interface GigabitEthernet0/0/0
ip address 14.0.36.6 255.255.255.0
interface GigabitEthernet0/0/0
ip address 14.0.36.6 255.255.255.0
interface LoopBack1
ip address 10.1.6.1 255.255.255.0
interface LoopBack2
ip address 10.2.6.6 255.255.255.0
配置ospf
R1:
ospf 1 router-id 1.1.1.1
area 0.0.0.1
network 10.1.1.0 0.0.0.255
network 10.2.1.0 0.0.0.255
network 14.1.0.0 0.0.255.255

R2:
ospf 1 router-id 2.2.2.2
area 0.0.0.1
network 10.1.2.0 0.0.0.255
network 10.2.2.0 0.0.0.255
network 14.1.0.0 0.0.255.255

R3:
ospf 1 router-id 3.3.3.3
area 0.0.0.1
network 14.1.0.0 0.0.255.255
ospf 2 router-id 3.3.3.3
area 0.0.0.0
network 14.0.0.0 0.0.255.255

R4:
ospf 1 router-id 4.4.4.4
area 0.0.0.1
network 14.1.0.0 0.0.255.255
ospf 2 router-id 4.4.4.4
area 0.0.0.0
network 14.0.0.0 0.0.255.255

R5:
ospf 1 router-id 5.5.5.5
area 0.0.0.0
network 10.1.5.0 0.0.0.255
network 10.2.5.0 0.0.0.255
network 14.0.0.0 0.0.255.255

R6:
ospf 1 router-id 6.6.6.6
area 0.0.0.0
network 10.1.6.0 0.0.0.255
network 10.2.6.0 0.0.0.255
network 14.0.0.0 0.0.255.255
抓取路由r3抓的路由应为10.2网段的路由
[r3]ip ip-prefix a1 permit 10.2.1.0 24
[r3]ip ip-prefix a2 permit 10.2.2.0 24
[r3]ip ip-prefix a3 permit 10.2.5.0 24
[r3]ip ip-prefix a4 permit 10.2.6.0 24
r4配置相同
对需要备份的路由将cost值增大,即进行备份
[r3]route-policy 1 permit node 10
[r3-route-policy]if-match ip-prefix a1
[r3-route-policy]apply cost 10
[r3-route-policy]q
在进行重发布
r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]import-route ospf 2 route-policy 3
[r3-ospf-1]import-route ospf 2 route-policy 4

[r3]ospf 2 router-id 3.3.3.3
[r3-ospf-1]import-route ospf 1 route-policy 1
[r3-ospf-1]import-route ospf 1 route-policy 2

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不正经的网安学习者

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值