H3C 网络设备OSPF配置

一、组网拓扑图

本实验采用H3C官方模拟器HCL进行。采用四台路由器:RTA-RTB-RTC-RTD。

RTA-RTB属于area1;RTB-RTC属于area0,RTC-RTD属于area2,路由器Loopback地址作为自身的Router-ID。

H3C 网络设备OSPF配置

OSPF组网拓扑

二、地址规划及配置地址

2.1地址规划

设备名称 接口名称 IP地址 子网掩码


RTA Loopback0 1.1.1.1 255.255.255.255

RTA G0/1 10.10.10.1 255.255.255.0

RTB Loopback0 2.2.2.2 255.255.255.255

RTB G0/1 10.10.10.2 255.255.255.0

RTB G0/0 20.20.20.1 255.255.255.0

RTC Loopback0 3.3.3.3 255.255.255.255

RTC G0/0 20.20.20.2 255.255.255.0

RTC G0/2 30.30.30.1 255.255.255.0

RTD Loopback0 4.4.4.4 255.255.255.255

RTD G0/2 30.30.30.2 255.255.255.0

2.2接口地址

RTA接口地址配置

[RTA]interface GigabitEthernet0/1
[RTA-GigabitEthernet0/1] ip address 10.10.10.1 255.255.255.0
[RTA]interface LoopBack0
[RTA-LoopBack0] ip address 1.1.1.1 255.255.255.255

RTB接口地址配置

[RTB]interface GigabitEthernet0/1
[RTB-GigabitEthernet0/1] ip address 10.10.10.2 255.255.255.0
[RTB]interface GigabitEthernet0/0
[RTB-GigabitEthernet0/0] ip address 20.20.20.1 255.255.255.0
[RTB]interface LoopBack0
[RTB-LoopBack0] ip address 2.2.2.2 255.255.255.255

RTC接口地址配置

[RTC]interface GigabitEthernet0/2
[RTC-GigabitEthernet0/2] ip address 30.30.30.1 255.255.255.0
[RTC]interface GigabitEthernet0/0
[RTC-GigabitEthernet0/0] ip address 20.20.20.2 255.255.255.0
[RTC]interface LoopBack0
[RTC-LoopBack0] ip address 3.3.3.3 255.255.255.255

RTD接口地址配置

[RTD]interface GigabitEthernet0/2
[RTD-GigabitEthernet0/2] ip address 30.30.30.2 255.255.255.0
[RTD]interface LoopBack0
[RTD-LoopBack0] ip address 4.4.4.4 255.255.255.255

三、配置OSPF

3.1 配置流程

H3C 网络设备OSPF配置

OSPF配置流程


3.2配置步骤

RTAOSPF配置

[RTA]ospf 1 router-id 1.1.1.1
[RTA-ospf-1]area 1
[RTA-ospf-1-area-0.0.0.1]net
[RTA-ospf-1-area-0.0.0.1]network 10.10.10.1 0.0.0.0
[RTA-ospf-1-area-0.0.0.1]network 1.1.1.1 0.0.0.0

RTB-OSPF配置

[RTB]ospf 1 router-id 2.2.2.2
[RTB-ospf-1]area 0
[RTB-ospf-1-area-0.0.0.0]network 20.20.20.1 0.0.0.0
[RTB-ospf-1]area 1
[RTB-ospf-1-area-0.0.0.1]netwok 10.10.10.2 0.0.0.0
[RTB-ospf-1-area-0.0.0.1] network 2.2.2.2 0.0.0.0

RTC-OSPF配置

[RTC]ospf 1 router-id 3.3.3.3
[RTC-ospf-1]area 0
[RTC-ospf-1-area-0.0.0.0]net 20.20.20.2 0.0.0.0
[RTC-ospf-1]area 2
[RTC-ospf-1-area-0.0.0.2]network 30.30.30.1 0.0.0.0
[RTC-ospf-1-area-0.0.0.2]network 3.3.3.3 0.0.0.0

RTD-OSPF配置

[RTD]ospf 1 router-id 4.4.4.4
[RTD-ospf-1]area 2
[RTD-ospf-1-area-0.0.0.2]network 30.30.30.2 0.0.0.0

四、验证测试

4.1网络连通性测试

H3C 网络设备OSPF配置

ping测试结果

4.2RTA-RTB-RTC-RTD设备路由表

H3C 网络设备OSPF配置

RTA路由表

H3C 网络设备OSPF配置

RTB路由表

H3C 网络设备OSPF配置

RTC路由表

H3C 网络设备OSPF配置

RTD路由表

4.3查看ospf链接状态数据库(display ospf lsdb)

H3C 网络设备OSPF配置

RTA-lsdb

H3C 网络设备OSPF配置

RTB-lsdb

H3C 网络设备OSPF配置

RTC-lsdb

H3C 网络设备OSPF配置

RTD-lsdb




分享到:


相關文章: