OSPF多域配置

学向勤中得,萤窗万卷书。这篇文章主要讲述OSPF多域配置相关的知识,希望能为你提供帮助。
实验要求:
使用OSPF实现各路由器互通,并且避免由于网段变更导致的重复步骤。


实验规划:
实验拓扑:




地址规划:

IOU1
e0/0:10.0.0.1/30
loopback 0:1.1.1.1/32
e0/1:10.0.0.5/30
loopback 1:192.168.1.1/24
e0/2:10.0.0.9/30


IOU2
e0/0:10.0.0.2/30
loopback 0:2.2.2.2/32


loopback 1:192.168.2.1/24
IOU3
e0/0:10.0.0.6/30
loopback 0:3.3.3.3/32


loopback 1:192.168.3.1/24
IOU4
e0/0:10.0.0.10/30
loopback 0:4.4.4.4/43


loopback 1:192.168.4.1/24


实验步骤:
  1. 配置路由器接口地址,Loopback接口。
  2. 配置OSPF协议,实现内部网络互通。
  3. 验证网络访问是否正常。


实验配置:
(部分注释可参见上篇博客)
IOU1:
config terminal
interface e0/0
ip address 10.0.0.1 255.255.255.252
no shutdown
interface e0/1
ip address 10.0.0.5 255.255.255.252
no shutdown
interface e0/2
ip address 10.0.0.9 255.255.255.252
no shutdown
interface loopback 0
ip address 1.1.1.1 255.255.255.255
no shutdown
interface loopback 1
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
router ospf 1//启动OSPF路由进程
router-id 1.1.1.1//配置Router ID
network 10.0.0.0 0.0.0.3 area 1//指定协议运行接口和区域
network 10.0.0.4 0.0.0.3 area 0
network 10.0.0.8 0.0.0.3 area 2
network 1.1.1.1 0.0.0.0 area 0
network 192.168.1.0 0.0.0.255 area 0
exit

IOU2:
config terminal
interface e0/0
ip address 10.0.0.2 255.255.255.252
no shutdown
interface loopback 0
ip address 2.2.2.2 255.255.255.255
no shutdown
interface loopback 1
ip address 192.168.2.1 255.255.255.0
no shutdown
exit
router ospf 1
router-id 2.2.2.2
network 10.0.0.0 0.0.0.3 area 1
network 2.2.2.2 0.0.0.0 area 1
network 192.168.2.0 0.0.0.255 area 1
exit

IOU3:
config terminal
interface e0/0
ip address 10.0.0.6 255.255.255.252
no shutdown
interface loopback 0
ip address 3.3.3.3 255.255.255.255
no shutdown
interface loopback 1
ip address 192.168.3.1 255.255.255.0
no shutdown
exit
router ospf 1
router-id 3.3.3.3
network 10.0.0.6 0.0.0.3 area 0
network 3.3.3.3 0.0.0.0 area 0
network 192.168.3.0 0.0.0.255 area 0
exit

IOU4:
config terminal
interface e0/0
ip address 10.0.0.10 255.255.255.252
no shutdown
interface loopback 0
ip address 4.4.4.4 255.255.255.255
no shutdown
interface loopback 1
ip address 192.168.4.1 255.255.255.0
no shutdown
exit
router ospf 1
router-id 4.4.4.4
network 10.0.0.8 0.0.0.3 area 2
network 4.4.4.4 0.0.0.0 area 2
network 192.168.4.0 0.0.0.255 area 2
exit



查看路由表:
exit
show ip route




验证互通性(IOU1):
ping 2.2.2.2
ping 3.3.3.3
ping 4.4.4.4



【OSPF多域配置】(如有疏漏,还望读者指出)


    推荐阅读