OSFP互备分流实验

1.实验拓扑

在这里插入图片描述

2.实验要求

R1的环回1代表生产区的主服务器,环回2代表办公区的备份服务器
R2的环回1代表生产区的备份服务器,环回2代表办公区的主服务器
R5的环回1代表生产区的电脑,环回2代表办公区的电脑
R3为生产区的路由器,R4为办公区的路由器
要求:
1、办公区的电脑直接到办公服务器,不通过生产区服务器;生产区的电脑相同
2、办公挂了,不切生产,直接走R6
3、生产挂了,走办公,如果办公也挂了,再走R6

3.设计思想—利用修改cost值来干涉选路

在这里插入图片描述

4.测试

1.初始状态
在这里插入图片描述在这里插入图片描述
在这里插入图片描述
办公断掉,直接走R6
r4(config)#inter s3/1
r4(config-subif)#shutdown

在这里插入图片描述
在这里插入图片描述
生产断掉,走办公
r3(config)#inter s3/1
r3(config-subif)#shutdown
在这里插入图片描述
在这里插入图片描述

生产断掉,办公也断掉,走R6
r4(config)#inter s3/1
r4(config-subif)#shutdown
在这里插入图片描述
在这里插入图片描述
断掉R1与R3之间

5.注意

1.串线要使用子接口时:先进接口改封装,然后no keepalive ,接口打开接口;
然后进子接口配置。实例如下:
interface Serial3/1
encapsulation frame-relay
no keepalive
interface Serial3/1.1 point-to-point
ip address 10.35.1.1 255.255.255.0
no keepalive
frame-relay interface-dlci 100
no shutdown

2.区域5要和R5的两个环回做重发布,因为生产和办公断掉,R6就学习不到他们的环回

6.配置

R1
interface Loopback0
ip address 10.88.1.1 255.255.255.0
interface Loopback1
ip address 10.99.1.1 255.255.255.0
interface Ethernet0/0
ip address 10.13.1.1 255.255.255.0
interface Ethernet0/0.1
ip ospf cost 25
interface Ethernet0/0.2
ip ospf cost 25
interface Ethernet0/1
no ip address
ip ospf cost 25
interface Ethernet0/1.1
encapsulation dot1Q 1 native
ip address 10.12.1.1 255.255.255.0
ip ospf cost 25
interface Ethernet0/1.2
encapsulation dot1Q 2
ip address 10.12.2.1 255.255.255.0
ip ospf cost 25
interface Ethernet0/2.1
encapsulation dot1Q 1 native
ip address 10.14.1.1 255.255.255.0
ip ospf cost 25
interface Ethernet0/2.2
encapsulation dot1Q 2
ip address 10.14.2.1 255.255.255.0
ip ospf cost 25
router ospf 1
router-id 10.1.1.1
network 10.12.1.0 0.0.0.255 area 1
network 10.12.2.0 0.0.0.255 area 2
network 10.13.1.0 0.0.0.255 area 1
network 10.13.2.0 0.0.0.255 area 2
network 10.14.1.0 0.0.0.255 area 1
network 10.14.2.0 0.0.0.255 area 2
network 10.88.1.0 0.0.0.255 area 1
network 10.99.1.0 0.0.0.255 area 2
R2
interface Loopback0
ip address 10.88.2.2 255.255.255.0
interface Loopback1
ip address 10.99.2.2 255.255.255.0
interface Ethernet0/0
ip address 10.12.1.2 255.255.255.0
ip ospf cost 25
interface Ethernet0/0.1
ip ospf cost 25
interface Ethernet0/0.2
ip ospf cost 25
interface Ethernet0/1
no ip address
interface Ethernet0/1.1
encapsulation dot1Q 1 native
ip address 10.23.1.1 255.255.255.0
ip ospf cost 25
interface Ethernet0/1.2
encapsulation dot1Q 2
ip address 10.23.2.1 255.255.255.0
ip ospf cost 25
interface Ethernet0/2
ip address 10.24.1.1 255.255.255.0
router ospf 1
router-id 10.2.2.2
network 10.12.1.0 0.0.0.255 area 1
network 10.12.2.0 0.0.0.255 area 2
network 10.23.1.0 0.0.0.255 area 1
network 10.23.2.0 0.0.0.255 area 2
network 10.24.1.0 0.0.0.255 area 2
network 10.88.2.0 0.0.0.255 area 1
network 10.99.2.0 0.0.0.255 area 2
R3
interface Ethernet0/0.1
encapsulation dot1Q 1 native
ip address 10.23.1.2 255.255.255.0
ip ospf cost 25
interface Ethernet0/0.2
encapsulation dot1Q 2
ip address 10.23.2.2 255.255.255.0
ip ospf cost 25
interface Ethernet0/1.1
encapsulation dot1Q 1 native
ip address 10.34.1.1 255.255.255.0
ip ospf cost 25
interface Ethernet0/1.2
encapsulation dot1Q 2
ip address 10.34.2.1 255.255.255.0
ip ospf cost 25
interface Ethernet0/2
ip address 10.13.1.2 255.255.255.0
interface Ethernet1/1
ip address 10.36.1.1 255.255.255.0
ip ospf cost 30
interface Serial3/1
no ip address
encapsulation frame-relay
no keepalive
serial restart-delay 0
interface Serial3/1.1 point-to-point
ip address 10.35.1.1 255.255.255.0
no keepalive
frame-relay interface-dlci 100
interface Serial3/1.2 point-to-point
ip address 10.35.2.1 255.255.255.0
ip ospf cost 120
no keepalive
frame-relay interface-dlci 200
router ospf 1
router-id 10.3.3.3
network 10.13.1.0 0.0.0.255 area 1
network 10.23.1.0 0.0.0.255 area 1
network 10.23.2.0 0.0.0.255 area 2
network 10.34.1.0 0.0.0.255 area 0
network 10.34.2.0 0.0.0.255 area 0
network 10.35.1.0 0.0.0.255 area 3
network 10.35.2.0 0.0.0.255 area 4
network 10.36.1.0 0.0.0.255 area 5
R4
interface Ethernet0/0.1
encapsulation dot1Q 1 native
ip address 10.34.1.2 255.255.255.0
ip ospf cost 25
interface Ethernet0/0.2
encapsulation dot1Q 2
ip address 10.34.2.2 255.255.255.0
ip ospf cost 25
interface Ethernet0/1
ip address 10.46.1.1 255.255.255.0
interface Ethernet0/2
no ip address
interface Ethernet0/2.1
encapsulation dot1Q 1 native
ip address 10.14.1.2 255.255.255.0
ip ospf cost 25
interface Ethernet0/2.2
encapsulation dot1Q 2
ip address 10.14.2.2 255.255.255.0
ip ospf cost 25
interface Ethernet1/1
ip address 10.24.1.2 255.255.255.0
interface Serial3/1.1 point-to-point
ip address 10.45.1.1 255.255.255.0
ip ospf cost 80
no keepalive
frame-relay interface-dlci 100
interface Serial3/1.2 point-to-point
ip address 10.45.2.1 255.255.255.0
ip ospf cost 64
no keepalive
frame-relay interface-dlci 200
router ospf 1
router-id 4.4.4.4
network 10.14.1.0 0.0.0.255 area 1
network 10.14.2.0 0.0.0.255 area 2
network 10.24.1.0 0.0.0.255 area 2
network 10.34.1.0 0.0.0.255 area 0
network 10.34.2.0 0.0.0.255 area 0
network 10.45.1.0 0.0.0.255 area 3
network 10.45.2.0 0.0.0.255 area 4
network 10.46.1.0 0.0.0.255 area 5
R5
interface Loopback0
ip address 10.88.5.5 255.255.255.0
interface Loopback1
ip address 10.99.5.5 255.255.255.0
interface Ethernet0/0
ip address 10.56.1.1 255.255.255.0
ip ospf cost 60
interface Serial3/0.1 point-to-point
ip address 10.35.1.2 255.255.255.0
no keepalive
frame-relay interface-dlci 100
interface Serial3/0.2 point-to-point
ip address 10.35.2.2 255.255.255.0
ip ospf cost 120
no keepalive
frame-relay interface-dlci 200
interface Serial3/1
no ip address
encapsulation frame-relay
no keepalive
serial restart-delay 0
interface Serial3/1.1 point-to-point
ip address 10.45.1.2 255.255.255.0
ip ospf cost 80
no keepalive
frame-relay interface-dlci 100
interface Serial3/1.2 point-to-point
ip address 10.45.2.2 255.255.255.0
ip ospf cost 64
no keepalive
frame-relay interface-dlci 200
router ospf 1
router-id 10.5.5.5
network 10.35.1.0 0.0.0.255 area 3
network 10.35.2.0 0.0.0.255 area 4
network 10.45.1.0 0.0.0.255 area 3
network 10.45.2.0 0.0.0.255 area 4
network 10.88.5.5 0.0.0.0 area 3
network 10.88.5.0 0.0.0.255 area 3
network 10.99.5.5 0.0.0.0 area 4
network 10.99.5.0 0.0.0.255 area 4
redistribute ospf 2 subnets
router ospf 2
redistribute ospf 1 subnets
network 10.56.1.0 0.0.0.255 area 5
R6
interface Ethernet0/0
ip address 10.46.1.2 255.255.255.0
interface Ethernet0/1
ip address 10.56.1.2 255.255.255.0
ip ospf cost 60
interface Ethernet0/2
ip address 10.36.1.2 255.255.255.0
ip ospf cost 30
router ospf 2
network 10.36.1.0 0.0.0.255 area 5
network 10.46.1.0 0.0.0.255 area 5
network 10.56.1.0 0.0.0.255 area 5

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

LYDlsj

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

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

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

打赏作者

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

抵扣说明:

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

余额充值