第十三期 华为拓扑-OSPF多区域配置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了第十三期 华为拓扑-OSPF多区域配置相关的知识,希望对你有一定的参考价值。

实验目的:实现OSPF多区域配置及互连
实验步骤:

  1. 配置各个路由器:【一下命令同R7解释】
    R7:
    <Huawei>SYS//进入系统视图
    Enter system view, return user view with Ctrl+Z.
    [Huawei]interface GigabitEthernet 0/0/0 //进入端口
    [Huawei-GigabitEthernet0/0/0]ip address 192.168.1.1 24//配置IP
    [Huawei-GigabitEthernet0/0/0]q
    [Huawei]interface LoopBack 0//创建测试端口
    [Huawei-LoopBack0]ip address 172.168.4.1 24//配置IP
    [Huawei-LoopBack0]q
    [Huawei]ospf router-id 1.1.1.1//配置OSPF并配置ID号
    [Huawei-ospf-1]area 0
    [Huawei-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.0//配置network
    [Huawei-ospf-1-area-0.0.0.0]network 172.168.4.1 0.0.0.0-->通配符
    [Huawei-ospf-1-area-0.0.0.0]q
    [Huawei-ospf-1]
    [Huawei]interface GigabitEthernet 0/0/1
    [Huawei-GigabitEthernet0/0/1]ip address 192.168.4.1 24.
    [Huawei-GigabitEthernet0/0/1]q
    [Huawei]ospf
    [Huawei-ospf-1]area 66
    [Huawei-ospf-1-area-0.0.0.66]network 192.168.4.1 0.0.0.0
    [Huawei-ospf-1-area-0.0.0.66]
    R8:
    <Huawei>sys
    Enter system view, return user view with Ctrl+Z.
    [Huawei]interface GigabitEthernet 0/0/0
    [Huawei-GigabitEthernet0/0/0]ip address 192.168.1.2 24
    [Huawei-GigabitEthernet0/0/0]q
    [Huawei]interface GigabitEthernet 0/0/1
    [Huawei-GigabitEthernet0/0/1]ip address 192.168.2.1 24
    [Huawei-GigabitEthernet0/0/1]q
    [Huawei]interface LoopBack 0
    [Huawei-LoopBack0]ip address 172.168.1.1 24
    [Huawei-LoopBack0]q
    [Huawei]ospf router-id 2.2.2.2
    [Huawei-ospf-1]area 0
    [Huawei-ospf-1-area-0.0.0.0]network 192.168.1.2 0.0.0.0
    [Huawei-ospf-1-area-0.0.0.0]network 172.168.1.1 0.0.0.0
    [Huawei-ospf-1-area-0.0.0.0]q
    [Huawei-ospf-1]q
    [Huawei]ospf
    [Huawei-ospf-1]area 34
    [Huawei-ospf-1-area-0.0.0.34]network 192.168.2.1 0.0.0.0
    [Huawei-ospf-1-area-0.0.0.34]
    R9:
    <Huawei>sys
    Enter system view, return user view with Ctrl+Z.
    [Huawei]interface GigabitEthernet 0/0/1
    [Huawei-GigabitEthernet0/0/1]ip address 192.168.2.2 24
    [Huawei-GigabitEthernet0/0/1]q
    [Huawei]interface GigabitEthernet 0/0/0
    [Huawei-GigabitEthernet0/0/0]ip address 192.168.3.1 24
    [Huawei-GigabitEthernet0/0/0]q
    [Huawei]interface LoopBack 0
    [Huawei-LoopBack0]ip address 172.168.2.1 24
    [Huawei-LoopBack0]q
    [Huawei]ospf router-id 3.3.3.3
    [Huawei-ospf-1]area 34
    [Huawei-ospf-1-area-0.0.0.34]network 192.168.2.2 0.0.0.0
    [Huawei-ospf-1-area-0.0.0.34]net
    [Huawei-ospf-1-area-0.0.0.34]network 192.
    [Huawei-ospf-1-area-0.0.0.34]network 192.168.3.1 0.0.0.0
    [Huawei-ospf-1-area-0.0.0.34]network 172.168.2.1 0.0.0.0
    [Huawei-ospf-1-area-0.0.0.34]
    [Huawei-ospf-1-area-0.0.0.34]
    R10:
    <Huawei>sys
    Enter system view, return user view with Ctrl+Z.
    [Huawei]interface GigabitEthernet 0/0/0
    [Huawei-GigabitEthernet0/0/0]ip address 192.168.3.2 24
    [Huawei-GigabitEthernet0/0/0]q
    [Huawei]interface LoopBack 0
    [Huawei-LoopBack0]ip address 172.168.3.1 24
    [Huawei-LoopBack0]q
    [Huawei]ospf router-id 4.4.4.4
    [Huawei-ospf-1]area 34
    [Huawei-ospf-1-area-0.0.0.34]network 192.168.3.2 0.0.0.0
    [Huawei-ospf-1-area-0.0.0.34]network
    [Huawei-ospf-1-area-0.0.0.34]network 172.168.3.1 0.0.0.0
    [Huawei-ospf-1-area-0.0.0.34]q
    [Huawei-ospf-1]q
    [Huawei]ping 192.168.1.1
    PING 192.168.1.1: 56 data bytes, press CTRL_C to break
    Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=253 time=60 ms
    Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=253 time=40 ms
    Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=253 time=40 ms
    Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=253 time=40 ms
    Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=253 time=20 ms

    --- 192.168.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/40/60 ms

[Huawei]ping 172.168.4.1
PING 172.168.4.1: 56 data bytes, press CTRL_C to break
Reply from 172.168.4.1: bytes=56 Sequence=1 ttl=253 time=30 ms
Reply from 172.168.4.1: bytes=56 Sequence=2 ttl=253 time=50 ms
Reply from 172.168.4.1: bytes=56 Sequence=3 ttl=253 time=30 ms
Reply from 172.168.4.1: bytes=56 Sequence=4 ttl=253 time=30 ms
Reply from 172.168.4.1: bytes=56 Sequence=5 ttl=253 time=40 ms

--- 172.168.4.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/36/50 ms
R11:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.4.2 24
[Huawei-GigabitEthernet0/0/1]q
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.5.1 24
[Huawei-GigabitEthernet0/0/0]q
[Huawei]interface LoopBack 0
[Huawei-LoopBack0]ip address 172.168.5.1 24
[Huawei-LoopBack0]q
[Huawei]ospf router-id 6.6.6.6
[Huawei-ospf-1]area 66
[Huawei-ospf-1-area-0.0.0.66]network 192.168.5.1 0.0.0.0
[Huawei-ospf-1-area-0.0.0.66]network 192.168.
[Huawei-ospf-1-area-0.0.0.66]network 192.168.4.2 0.0.0.0
[Huawei-ospf-1-area-0.0.0.66]network 172.168.5.1 0.0.0.0
[Huawei-ospf-1-area-0.0.0.66]
[Huawei-ospf-1-area-0.0.0.66]
R12:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.5.2 24
[Huawei-GigabitEthernet0/0/0]q
[Huawei]interface LoopBack 0
[Huawei-LoopBack0]ip address 172.168.6.1 24
[Huawei-LoopBack0]q
[Huawei]ospf router-id 7.7.7.7
[Huawei-ospf-1]area 66
[Huawei-ospf-1-area-0.0.0.66]network 192.168.5.2 0.0.0.0
[Huawei-ospf-1-area-0.0.0.66]network 172.168.6.1 0.0.0.0
[Huawei-ospf-1-area-0.0.0.66]
[Huawei-ospf-1-area-0.0.0.66]q
[Huawei-ospf-1]q
[Huawei]ping 192.168.3.1
PING 192.168.3.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.3.1: bytes=56 Sequence=1 ttl=252 time=80 ms
Reply from 192.168.3.1: bytes=56 Sequence=2 ttl=252 time=40 ms
Reply from 192.168.3.1: bytes=56 Sequence=3 ttl=252 time=50 ms
Reply from 192.168.3.1: bytes=56 Sequence=4 ttl=252 time=50 ms
Reply from 192.168.3.1: bytes=56 Sequence=5 ttl=252 time=70 ms

--- 192.168.3.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 40/58/80 ms

  1. 配置完成,验证、测试、保存
    实验拓扑图:
    技术分享图片

以上是关于第十三期 华为拓扑-OSPF多区域配置的主要内容,如果未能解决你的问题,请参考以下文章

第十期 华为拓扑-OSPF配置

华为路由器OSPF多区域配置

[实验]OSPF多区域互通---华为

华为OSPF 多区域配置

华为路由器OSPF特殊区域配置

多区域OSPF动态路由配置(拓扑图)