OSPF实验

实验拓扑图

OSPF实验_第1张图片

实验要求OSPF实验_第2张图片

R1的环回1代表生产区的主服务器,环回2代表办公区的主服务器
R2的环回1代表生产区的备份服务器,环回2代表办公区的备份服务器
R5的环回1代表生产区的电脑,环回2代表办公区的电脑
R3为生产区的路由器,R4为办公区的路由器
1、办公区的电脑直接到办公服务器,不通过生产区服务器;生产区的电脑相同
2、办公挂了,不切生产,直接走R6
3、生产挂了,走办公,如果办公也挂了,再走R6
方法
开辟子接口,R1与R2的e0/0,R1与R4的e0/2,R2与R3的e0/2,R3与R5的s1/0,R4与R5的s1/1之间开辟子接口,将一条链路虚拟成两条,一条属于生产区域,一条属于办公区域,并修改链路cost值,控制选路
结果
OSPF实验_第3张图片
OSPF实验_第4张图片

OSPF实验_第5张图片
链路故障
办公断掉,直接走R6
OSPF实验_第6张图片
OSPF实验_第7张图片
生产断掉,走办公
在这里插入图片描述

OSPF实验_第8张图片

生产断掉,办公也断掉,走R6
OSPF实验_第9张图片
OSPF实验_第10张图片
配置
R1
interface Loopback0
ip address 10.1.1.1 255.255.255.255
interface Loopback1
ip address 10.88.1.1 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 1
interface Loopback2
ip address 10.99.1.1 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 2
interface Ethernet0/0
no ip address
interface Ethernet0/0.1
encapsulation dot1Q 1 native
ip address 10.1.12.1 255.255.255.0
interface Ethernet0/0.2
encapsulation dot1Q 2
ip address 10.2.12.1 255.255.255.0
interface Ethernet0/1
ip address 10.1.13.1 255.255.255.0
interface Ethernet0/2.1
encapsulation dot1Q 1 native
ip address 10.1.14.1 255.255.255.0
ip ospf cost 18
interface Ethernet0/2.2
encapsulation dot1Q 2
ip address 10.2.14.1 255.255.255.0
ip ospf cost 18
router ospf 1
router-id 10.1.1.1
network 10.1.1.1 0.0.0.0 area 1
network 10.1.12.0 0.0.0.255 area 1
network 10.1.13.0 0.0.0.255 area 1
network 10.1.14.0 0.0.0.255 area 1
network 10.2.12.0 0.0.0.255 area 2
network 10.2.14.0 0.0.0.255 area 2
network 10.99.2.2 0.0.0.0 area 2

R2:
interface Loopback0
ip address 10.2.2.2 255.255.255.255
interface Loopback1
ip address 10.88.2.2 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 1
interface Loopback2
ip address 10.99.2.2 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 2
interface Ethernet0/0.1
encapsulation dot1Q 1 native
ip address 10.1.12.2 255.255.255.0
interface Ethernet0/0.2
encapsulation dot1Q 2
ip address 10.2.12.2 255.255.255.0
interface Ethernet0/1
ip address 10.1.24.2 255.255.255.0
interface Ethernet0/2.1
encapsulation dot1Q 1 native
ip address 10.1.23.2 255.255.255.0
ip ospf cost 18
interface Ethernet0/2.2
encapsulation dot1Q 2
ip address 10.2.23.2 255.255.255.0
ip ospf cost 18
router ospf 1
router-id 10.2.2.2
network 10.1.12.0 0.0.0.255 area 1
network 10.1.23.0 0.0.0.255 area 1
network 10.1.24.0 0.0.0.255 area 2
network 10.2.2.2 0.0.0.0 area 2
network 10.2.12.0 0.0.0.255 area 2
network 10.2.23.0 0.0.0.255 area 2

R3
interface Loopback0
ip address 10.3.3.3 255.255.255.255
interface Ethernet0/0.1
encapsulation dot1Q 1 native
ip address 10.1.34.3 255.255.255.0
interface Ethernet0/0.2
encapsulation dot1Q 2
ip address 10.2.34.3 255.255.255.0
interface Ethernet0/1
ip address 10.1.13.3 255.255.255.0
interface Ethernet0/2.1
encapsulation dot1Q 1 native
ip address 10.1.23.3 255.255.255.0
ip ospf cost 18
interface Ethernet0/2.2
encapsulation dot1Q 2
ip address 10.2.23.3 255.255.255.0
ip ospf cost 18
interface Ethernet0/3
ip address 10.1.36.3 255.255.255.0
ip ospf cost 25
interface Serial1/0
no ip address
encapsulation frame-relay
shutdown
no keepalive
serial restart-delay 0
interface Serial1/0.1 point-to-point
ip address 10.1.35.3 255.255.255.0
no keepalive
frame-relay interface-dlci 100
interface Serial1/0.2 point-to-point
ip address 10.2.35.3 255.255.255.0
ip ospf cost 90
no keepalive
frame-relay interface-dlci 200
router ospf 1
router-id 10.3.3.3
network 10.1.13.0 0.0.0.255 area 1
network 10.1.23.0 0.0.0.255 area 1
network 10.1.34.0 0.0.0.255 area 0
network 10.1.35.0 0.0.0.255 area 3
network 10.1.36.0 0.0.0.255 area 5
network 10.2.23.0 0.0.0.255 area 2
network 10.2.34.0 0.0.0.255 area 0
network 10.2.35.0 0.0.0.255 area 4
network 10.3.3.3 0.0.0.0 area 0

R4:
interface Loopback0
ip address 10.4.4.4 255.255.255.255
interface Ethernet0/0.1
encapsulation dot1Q 1 native
ip address 10.1.34.4 255.255.255.0
interface Ethernet0/0.2
encapsulation dot1Q 2
ip address 10.2.34.4 255.255.255.0
interface Ethernet0/1
ip address 10.1.24.4 255.255.255.0
interface Ethernet0/2.1
encapsulation dot1Q 1 native
ip address 10.1.14.4 255.255.255.0
ip ospf cost 18
interface Ethernet0/2.2
encapsulation dot1Q 2
ip address 10.2.14.4 255.255.255.0
ip ospf cost 18
interface Ethernet0/3
ip address 10.1.46.4 255.255.255.0
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
interface Serial1/0.1
ip ospf cost 80
interface Serial1/0.2
interface Serial1/1
no ip address
encapsulation frame-relay
no keepalive
serial restart-delay 0
interface Serial1/1.1 point-to-point
ip address 10.1.45.4 255.255.255.0
ip ospf cost 80
no keepalive
frame-relay interface-dlci 100
interface Serial1/1.2 point-to-point
ip address 10.2.45.4 255.255.255.0
no keepalive
frame-relay interface-dlci 200
router ospf 1
router-id 10.4.4.4
network 10.1.14.0 0.0.0.255 area 1
network 10.1.24.0 0.0.0.255 area 2
network 10.1.34.0 0.0.0.255 area 0
network 10.1.45.0 0.0.0.255 area 3
network 10.1.46.0 0.0.0.255 area 5
network 10.2.14.0 0.0.0.255 area 2
network 10.2.34.0 0.0.0.255 area 0
network 10.2.45.0 0.0.0.255 area 4
network 10.4.4.4 0.0.0.0 area 0

R5:
interface Loopback0
ip address 10.5.5.5 255.255.255.255
interface Loopback1
ip address 10.88.5.5 255.255.255.0
ip ospf network point-to-point
interface Loopback2
ip address 10.99.5.5 255.255.255.0
ip ospf network point-to-point
interface Ethernet0/0
ip address 10.1.56.5 255.255.255.0
ip ospf cost 60
interface Serial1/0
no ip address
encapsulation frame-relay
no keepalive
serial restart-delay 0
interface Serial1/0.1 point-to-point
ip address 10.1.35.5 255.255.255.0
no keepalive
frame-relay interface-dlci 100
interface Serial1/0.2 point-to-point
ip address 10.2.35.5 255.255.255.0
ip ospf cost 90
no keepalive
frame-relay interface-dlci 200
interface Serial1/1
no ip address
encapsulation frame-relay
shutdown
no keepalive
serial restart-delay 0
interface Serial1/1.1 point-to-point
ip address 10.1.45.5 255.255.255.0
ip ospf cost 80
no keepalive
frame-relay interface-dlci 100
interface Serial1/1.2 point-to-point
ip address 10.2.45.5 255.255.255.0
no keepalive
frame-relay interface-dlci 200
router ospf 1
router-id 10.5.5.5
network 10.1.35.0 0.0.0.255 area 3
network 10.1.45.0 0.0.0.255 area 3
network 10.1.56.0 0.0.0.255 area 5
network 10.2.35.0 0.0.0.255 area 4
network 10.2.45.0 0.0.0.255 area 4
network 10.5.5.5 0.0.0.0 area 3
network 10.88.5.0 0.0.0.255 area 5
network 10.99.5.0 0.0.0.255 area 5

R6
interface Loopback0
ip address 10.6.6.6 255.255.255.255
interface Ethernet0/0
ip address 10.1.56.6 255.255.255.0
ip ospf cost 60interface Ethernet0/1
ip address 10.1.36.6 255.255.255.0
ip ospf cost 25interface Ethernet0/2
ip address 10.1.46.6 255.255.255.0
router ospf 1
router-id 10.6.6.6
network 10.1.36.0 0.0.0.255 area 5
network 10.1.46.0 0.0.0.255 area 5
network 10.1.56.0 0.0.0.255 area 5
network 10.6.6.6 0.0.0.0 area 5

你可能感兴趣的:(OSPF实验)