华三交换机H3C单区域OSPF典型配置案例

转载来源 : 单区域OSPF典型配置案例 :
https://mp.weixin.qq.com/s/Gxnb2q0DeWgZd9lLMGXKjg

组网及说明

在实际组网中,经常会遇到OSPF组网的案例,比如单区域OSPF、多区域OSPF、OSPF虚链路、OSPF NSSA、OSPF STUB等需求,以下是多区域OSPF典型组网的配置案例。

网络拓扑图:

华三交换机H3C单区域OSPF典型配置案例_第1张图片
互联地址、业务地址、looback0地址如上图所示,全网均采用OSPF进程1、其中R1与R2路由器属于OSPF的区域0,R2与R3路由器属于OSPF区域1,实现全网互联互通。

配置步骤

1、配置loopback0地址

2、配置各互联地址

3、创建OSPF进程1,并将各地址在区域0中发布

4、查看OSPF邻居的状态

5、测试PC之间能互联互通

配置关键点

R1:

system-view

[H3C]sysname R1

[R1]int LoopBack 0

[R1-LoopBack0]ip add

[R1-LoopBack0]ip address 1.1.1.1 32

[R1-LoopBack0]quit

[R1]int gi 0/0

[R1-GigabitEthernet0/0]ip address 192.168.1.1 24

[R1-GigabitEthernet0/0]description 

[R1-GigabitEthernet0/0]quit

[R1]int gi 0/1

[R1-GigabitEthernet0/1]ip address 10.0.0.1 30

[R1-GigabitEthernet0/1]description 

[R1-GigabitEthernet0/1]quit

[R1]ospf 1 router-id 1.1.1.1

[R1-ospf-1]area 0.0.0.0

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

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

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

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

[R1-ospf-1]quit

R2:

system-view

[H3C]sysname R2

[R2]int LoopBack 0

[R2-LoopBack0]ip address 2.2.2.2 32

[R2-LoopBack0]quit

[R2]int gi 0/0

[R2-GigabitEthernet0/0]ip address 10.0.0.2 30

[R2-GigabitEthernet0/0]description 

[R2-GigabitEthernet0/0]quit

[R2]int gi 0/1

[R2-GigabitEthernet0/1]description 

[R2-GigabitEthernet0/1]ip address 10.0.0.5 30

[R2-GigabitEthernet0/1]quit

[R2]ospf 1 router-id 2.2.2.2

[R2-ospf-1]area 0.0.0.0

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

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

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

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

[R2-ospf-1]quit

R3:

system-view

[H3C]sysname R3

[R3]int LoopBack 0

[R3-LoopBack0]ip address 3.3.3.3 32

[R3-LoopBack0]quit

[R3]int gi 0/0

[R3-GigabitEthernet0/0]description 

[R3-GigabitEthernet0/0]ip address 172.16.1.1 24

[R3-GigabitEthernet0/0]quit

[R3]int gi 0/1

[R3-GigabitEthernet0/1]description 

[R3-GigabitEthernet0/1]ip address 10.0.0.6 30

[R3-GigabitEthernet0/1]quit

[R3]ospf 1 router-id 3.3.3.3

[R3-ospf-1]area 0.0.0.0

[R3-ospf-1-area-0.0.0.0]network 10.0.0.6 0.0.0.0

[R3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0

[R3-ospf-1-area-0.0.0.0]network 172.16.1.0 0.0.0.255

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

[R3-ospf-1]quit

测试各路由器的OSPF邻居建立情况:

R1>dis ospf peer



         OSPF Process 1 with Router ID 1.1.1.1

               Neighbor Brief Information



 Area: 0.0.0.0

 Router ID       Address         Pri Dead-Time  State             Interface

 2.2.2.2         10.0.0.2        1   37         Full/BDR          GE0/1





dis ospf peer



         OSPF Process 1 with Router ID 2.2.2.2

               Neighbor Brief Information



 Area: 0.0.0.0

 Router ID       Address         Pri Dead-Time  State             Interface

 1.1.1.1         10.0.0.1        1   39         Full/DR           GE0/0

 3.3.3.3         10.0.0.6        1   34         Full/BDR          GE0/1





[R3]dis ospf peer



         OSPF Process 1 with Router ID 3.3.3.3

               Neighbor Brief Information



 Area: 0.0.0.0

 Router ID       Address         Pri Dead-Time  State             Interface

 2.2.2.2         10.0.0.5        1   37         Full/DR           GE0/1

[R3]

PC之间能PING通:
华三交换机H3C单区域OSPF典型配置案例_第2张图片
华三交换机H3C单区域OSPF典型配置案例_第3张图片
华三交换机H3C单区域OSPF典型配置案例_第4张图片
华三交换机H3C单区域OSPF典型配置案例_第5张图片
至此单区域OSPF配置已完成!

你可能感兴趣的:(交换机,网络)