OSPF多区域组网实验(华为)

思科设备参考:OSPF多区域组网实验(思科)

技术简介

OSPF多区域功能通过划分网络为多个逻辑区域来提高网络的可扩展性和管理性能。每个区域内部运行独立的SPF计算,而区域之间通过区域边界路由器进行路由信息交换。这种划分策略适用于分布在不同地理位置的大型网络。

        

实验目的

利用OSPF技术实现全网互通

        

基础配置

Router1

[Huawei]undo info-center enable 

[Huawei]int LoopBack 1
[Huawei-LoopBack1]ip address 1.1.1.1 32
[Huawei-LoopBack1]quit

[Huawei]int e0/0/0
[Huawei-Ethernet0/0/0]ip address 192.168.10.1 24
[Huawei-Ethernet0/0/0]undo shutdown
[Huawei-Ethernet0/0/0]quit

Router2

[Huawei]undo info-center enable

[Huawei]int LoopBack 1
[Huawei-LoopBack1]ip address 2.2.2.2 32
[Huawei-LoopBack1]quit

[Huawei]int e0/0/0
[Huawei-Ethernet0/0/0]ip address 192.168.10.2 24
[Huawei-Ethernet0/0/0]undo shutdown
[Huawei-Ethernet0/0/0]quit

[Huawei]int e0/0/1 
[Huawei-Ethernet0/0/1]ip address 192.168.20.1 24
[Huawei-Ethernet0/0/1]undo shutdown
[Huawei-Ethernet0/0/1]quit



Router3

[Huawei]undo info-center enable 

[Huawei]int LoopBack 1
[Huawei-LoopBack1]ip address 3.3.3.3 32
[Huawei-LoopBack1]quit

[Huawei]int e0/0/0
[Huawei-Ethernet0/0/0]ip address 192.168.20.2 24
[Huawei-Ethernet0/0/0]undo shutdown
[Huawei-Ethernet0/0/0]quit

[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]ip address 192.168.30.1 24
[Huawei-Ethernet0/0/1]undo shutdown
[Huawei-Ethernet0/0/1]quit

Router4

[Huawei]undo info-center enable 

[Huawei]int LoopBack 1
[Huawei-LoopBack1]ip address 4.4.4.4 32
[Huawei-LoopBack1]quit

[Huawei]int e0/0/0
[Huawei-Ethernet0/0/0]ip address 192.168.30.2 24
[Huawei-Ethernet0/0/0]undo shutdown
[Huawei-Ethernet0/0/0]quit

[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]ip address 192.168.40.1 24
[Huawei-Ethernet0/0/1]undo shutdown
[Huawei-Ethernet0/0/1]quit

Router5

[Huawei]undo info-center enable 

[Huawei]int LoopBack 1 
[Huawei-LoopBack1]ip address 5.5.5.5 32
[Huawei-LoopBack1]quit

[Huawei]int e0/0/0
[Huawei-Ethernet0/0/0]ip address 192.168.40.2 24
[Huawei-Ethernet0/0/0]undo shutdown
[Huawei-Ethernet0/0/0]quit

测试

各个区域之间无法通信

        

配置OSPF

 Router1

[Huawei]ospf 10 router-id 1.1.1.1

[Huawei-ospf-10]area 1
[Huawei-ospf-10-area-0.0.0.1]network 1.1.1.1 0.0.0.0
[Huawei-ospf-10-area-0.0.0.1]network 192.168.10.0 0.0.0.255

Router2

[Huawei]ospf 10 router-id 2.2.2.2

[Huawei-ospf-10]area 0
[Huawei-ospf-10-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[Huawei-ospf-10-area-0.0.0.0]network 192.168.20.0 0.0.0.255
[Huawei-ospf-10-area-0.0.0.0]quit

[Huawei-ospf-10]area 1
[Huawei-ospf-10-area-0.0.0.1]network 192.168.10.0 0.0.0.255

Router3

[Huawei]ospf 10 router-id 3.3.3.3

[Huawei-ospf-10]area 0
[Huawei-ospf-10-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[Huawei-ospf-10-area-0.0.0.0]network 192.168.20.0 0.0.0.255
[Huawei-ospf-10-area-0.0.0.0]network 192.168.30.0 0.0.0.255

Router4

[Huawei]ospf 10 router-id 4.4.4.4

[Huawei-ospf-10]area 0
[Huawei-ospf-10-area-0.0.0.0]network 4.4.4.4 0.0.0.0
[Huawei-ospf-10-area-0.0.0.0]network 192.168.30.0 0.0.0.255
[Huawei-ospf-10-area-0.0.0.0]quit

[Huawei-ospf-10]area 2
[Huawei-ospf-10-area-0.0.0.2]network 192.168.40.0 0.0.0.255

Router5

[Huawei]ospf 10 router-id 5.5.5.5

[Huawei-ospf-10]area 2
[Huawei-ospf-10-area-0.0.0.2]network 5.5.5.5 0.0.0.0
[Huawei-ospf-10-area-0.0.0.2]network 192.168.40.0 0.0.0.255

测试

各个区域之间可以相互通信

        

查看OSPF

四张表

查看OSPF邻居表

display ospf peer

display ospf peer {neighbor-id}

display ospf peer brief

查看LSDB(链路状态数据库)

display ospf lsdb

查看OSPF路由表

display ospf routing-table

查看全局路由表

display ip routing-table

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值