Categories: 网络学习

华为HCIA实验-多区域OSPF的实现

拓扑图

 

 

 

 

4台路由器基本配置

R1

<Huawei>system-view

Enter system view, return user view with Ctrl+Z.

[Huawei]sysname R1

[R1]int g0/0/0

[R1-GigabitEthernet0/0/0]ip add 10.1.1.1 24

[R1-GigabitEthernet0/0/0]int lo0

[R1-LoopBack0]ip add 11.1.1.1 32

[R1]int g0/0/1

[R1-GigabitEthernet0/0/1]ip add 10.1.2.1 24

 

R2

<Huawei>system-view

Enter system view, return user view with Ctrl+Z.

[Huawei]sysname R2

[R2]int g0/0/0

[R2-GigabitEthernet0/0/0]ip add 10.1.1.2 24

[R2-GigabitEthernet0/0/0]int lo0

[R2-LoopBack0]ip add 22.1.1.1 32

[R2]int g0/0/1

[R2-GigabitEthernet0/0/1]ip add 10.1.3.1 24

 

R3

<Huawei>system-view

Enter system view, return user view with Ctrl+Z.

[Huawei]sysname R3

[R3]int g0/0/1

[R3-GigabitEthernet0/0/1]ip add 10.1.2.2 24

[R3-GigabitEthernet0/0/1]int lo0

[R3-LoopBack0]ip add 33.1.1.1 32

 

R4

<Huawei>system-view

Enter system view, return user view with Ctrl+Z.

[Huawei]sysname R4

[R4]int g0/0/1

[R4-GigabitEthernet0/0/1]ip add 10.1.3.2 24

[R4-GigabitEthernet0/0/1]int lo0

[R4-LoopBack0]ip add 44.1.1.1 32

 

OSPF多区域配置

R1是ABR,10.1.1.0/24属于区域0,10.1.2.0/24属于区域1。

[R1]router id 11.1.1.1

Info: Router ID has been modified, please reset the relative protocols manually

to update the Router ID.

[R1]ospf

[R1-ospf-1]area 0

[R1-ospf-1-area-0.0.0.0]network 11.1.1.1 0.0.0.0

[R1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255

[R1-ospf-1-area-0.0.0.0]quit

[R1-ospf-1]area 1

[R1-ospf-1-area-0.0.0.1]network 10.1.2.0 0.0.0.255

 

R2是ABR,10.1.1.0/24属于区域0,10.1.3.0/24属于区域2.

[R2]router id 22.1.1.1

Info: Router ID has been modified, please reset the relative protocols manually

to update the Router ID.

[R2]ospf

[R2-ospf-1]area 0

[R2-ospf-1-area-0.0.0.0]netwo    

[R2-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255

[R2-ospf-1-area-0.0.0.0]network 22.1.1.1 0.0.0.0

[R2-ospf-1-area-0.0.0.0]quit

[R2-ospf-1]area 2

[R2-ospf-1-area-0.0.0.2]network 10.1.3.0 0.0.0.255

 

R3的10.1.2.0/24和Lo0属于区域1.

[R3]router id 33.1.1.1

Info: Router ID has been modified, please reset the relative protocols manually

to update the Router ID.

[R3]ospf

[R3-ospf-1]area 1

[R3-ospf-1-area-0.0.0.1]network 10.1.2.0 0.0.0.255

[R3-ospf-1-area-0.0.0.1]network 33.1.1.1 0.0.0.0

 

R4的10.1.3.0/24和Lo0属于区域2.

[R4]router id 44.1.1.1

Info: Router ID has been modified, please reset the relative protocols manually

to update the Router ID.

[R4]ospf

[R4-ospf-1]area 2

[R4-ospf-1-area-0.0.0.2]network 10.1.3.0 0.0.0.255

[R4-ospf-1-area-0.0.0.2]network 44.1.1.1 0.0.0.0

 

OSPF验证

查看R1和R2的ospf邻居关系

[R1]dis ospf peer brief

[R2]dis ospf peer brief

查看R3和R4的ospf路由表

[R3]dis ip routing-table protocol ospf

[R4]dis ip routing-table protocol ospf

R3 ping R4

本章实验完成

王哥哥

Share
Published by
王哥哥

Recent Posts

VC 6.0 挂服务 提示503

我们有一台VC 6.0的服务挂…

2 周 ago

零成本grass挖矿教程

最近发现个新币,还没上交易所,…

3 周 ago

Windows Server 2025 的AD架构版本

   Windows 2025…

3 周 ago

【项目】跨数据中心(跨站点)Exchange Server 2013恢复/高可用

今年换到一家乙方公司了,主要工…

3 周 ago

主域挂了怎么办?

假设在极端情况下,没有备份的前…

1 月 ago

为什么在AD管理中只能看到3个操作主机?

我们在日常的Windows域管…

1 月 ago