多区域OSPF配置

配置命令步骤:

1.使用router ospf 进程ID编号启用OSPF路由

2.使用network 直连网络地址 反掩码 area 区域号将其归于对应区域

注意:

1.进程ID编号可任意(1-65535)

2.反掩码用4个255相减得到

3.area 0 为主干区域

4.连接不同区域之间的路由器是ABR(区域边界路由器)

5.OSPF区域与其他外部路由连接之间的路由器是ASBR(自治系统边界路由器)


如下图,根据给出要求配置OSPF多区域路由,使得PC1和PC2互通:

具体配置:

一、在B路由器上配置接口的IP地址

B(config)#interface f0/1

B(config-if)#ip address 192.168.30.1 255.255.255.0

B(config-if)#no shutdown

B(config)#interface f0/0

B(config-if)#ip address 192.168.10.1 255.255.255.0

B(config-if)#no shutdown

B(config)#interface loopback 0

B(config-if)#ip address 10.1.1.1 255.0.0.0

B(config-if)#no shutdown

二、在A路由器上配置接口的IP地址

A(config)#interface f0/1

A(config-if)#ip address 192.168.10.2 255.255.255.0

A(config-if)#no shutdown

A(config)#interface f0/0

A(config-if)#ip address 192.168.20.1 255.255.255.0

A(config-if)#no shutdown

A(config)#interface loopback 0

A(config-if)#ip address 20.1.1.1 255.0.0.0

A(config-if)#no shutdown

三、在C路由器上配置IP地址

C(config)#interface f0/0

C(config-if)#ip address 192.168.20.2 255.255.255.0

C(config-if)#no shutdown

C(config)#interface f0/1

C(config-if)#ip address 192.168.40.1 255.255.255.0

C(config-if)#no shutdown

C(config)#interface loopback 0

C(config-if)#ip address 30.1.1.1 255.0.0.0

C(config-if)#no shutdown

四、为PC1和PC2配置IP地址和默认网关

五、在路由器B上配置OSPF多区域路由

B(config)#router ospf 1

B(config-router)#network 192.168.30.0 0.0.0.255 area 0

B(config-router)#network 192.168.10.0 0.0.0.255 area 0

B(config-router)#network 10.0.0.0 0.255.255.255 area 0

六、在路由器A上配置OSPF多区域路路由

A(config)#router ospf 1

A(config-router)#network 192.168.10.0 0.0.0.255 area 0

A(config-router)#network 192.168.20.0 0.0.0.255 area 1

A(config-router)#network 20.0.0.0 0.255.255.255 area 0

七、在路由器C上配置OSPF多区域路由

C(config)#router ospf 1

C(config-router)#network 192.168.20.0 0.0.0.255 area 1

C(config-router)#network 192.168.40.0 0.0.0.255 area 1

C(config-router)#network 30.0.0.0 0.255.255.255 area 1

八、验证PC1和PC2的互通性

上图表示成功互通

相关推荐
DashVector5 小时前
DashVector专有网络
网络
vision_wei_6 小时前
Redis中间件(二):Redis协议与异步方式
网络·数据库·c++·redis·分布式·缓存·中间件
Fanmeang6 小时前
VGMP(VRRP Group Management Protocol)VRRP组管理协议
运维·网络·华为·防火墙·vrrp·双机热备·vgmp
Rverdoser8 小时前
网站、域名、IP在什么场景下需要备案
网络·网络协议·tcp/ip
卑微的小鬼8 小时前
TCP的三次握手和四次挥手实现过程。以及为什么需要三次握手?四次挥手?
网络·网络协议·tcp/ip
CHENKONG_CK8 小时前
晨控CK-GW08S与汇川AC系列PLC配置Ethernet/IP通讯连接手册
网络·网络协议·tcp/ip·射频工程·rfid
Johny_Zhao9 小时前
SeaTunnel的搭建部署以及测试
linux·网络·网络安全·信息安全·kubernetes·云计算·containerd·devops·seatunnel·系统运维
nVisual10 小时前
运维新纪元:告别Excel手工规划,实现“零误差”决策
运维·网络·设计模式·自动化
Codeking__10 小时前
应用层自定义协议与序列化
服务器·网络
维尔切10 小时前
Linux中systemd与systemctl管理指南
linux·服务器·网络