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

王哥哥 网络学习 5,019 次浏览 没有评论

拓扑图

 

 

 

 

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

本章实验完成

发表回复

Go