文章介绍:使用eNSP部署四台AR路由器,演练OSPF基础通信实验。

一、eNSP下载

HUAWEI eNSP

二、实验拓扑

yydy_2024-09-07_17-01-19

三、基本配置

3.1、AR1

#
 sysname AR1
#
interface GigabitEthernet0/0/0
 description to-AR4
 ip address 1.4.0.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
 description to-AR2
 ip address 1.2.0.1 255.255.255.0 
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255 
#
ip route-static 0.0.0.0 0.0.0.0 1.2.0.2
#

3.1、AR2

#
 sysname AR2
#
interface GigabitEthernet0/0/0
 description to-AR1
 ip address 1.2.0.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 description to-AR3
 ip address 2.3.0.2 255.255.255.0 
#
interface GigabitEthernet0/0/2
 description to-AR4
 ip address 2.4.0.2 255.255.255.0 
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.255 
#

3.1、AR3

#
 sysname AR3
#
interface GigabitEthernet0/0/0
 description to-PC2
 ip address 10.10.20.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
 description to-AR2
 ip address 2.3.0.3 255.255.255.0 
#
interface LoopBack0
 ip address 3.3.3.3 255.255.255.255 
#
ip route-static 0.0.0.0 0.0.0.0 2.3.0.2
#

3.1、AR4

#
 sysname AR4
#
interface GigabitEthernet0/0/0
 description to-AR2
 ip address 2.4.0.4 255.255.255.0 
#
interface GigabitEthernet0/0/1
 description to-AR1
 ip address 1.4.0.4 255.255.255.0 
#
interface LoopBack0
 ip address 4.4.4.4 255.255.255.255 
#
ip route-static 0.0.0.0 0.0.0.0 2.4.0.2
#

四、OSPF配置

4.1、AR1

#
ospf 1 router-id 1.1.1.1 
 area 0.0.0.0 
  network 1.1.1.1 0.0.0.0 
  network 1.2.0.0 0.0.0.255 
  network 1.4.0.0 0.0.0.255 
#

4.1、AR2

#
ospf 1 router-id 2.2.2.2 
 area 0.0.0.0 
  network 1.2.0.0 0.0.0.255 
  network 2.2.2.2 0.0.0.0 
  network 2.3.0.0 0.0.0.255 
  network 2.4.0.0 0.0.0.255 
#

4.1、AR3

#
ospf 1 router-id 3.3.3.3 
 area 0.0.0.0 
  network 2.3.0.0 0.0.0.255 
  network 3.3.3.3 0.0.0.0 
#

4.1、AR4

#
ospf 1 router-id 4.4.4.4 
 area 0.0.0.0 
  network 1.4.0.0 0.0.0.255 
  network 2.4.0.0 0.0.0.255 
  network 4.4.4.4 0.0.0.0 
#

五、查看路由

5.1、查看命令

display ip routing-table

5.2、AR1

yydy_2024-09-07_17-15-02

5.3、AR2

yydy_2024-09-07_17-16-02

5.4、AR3

yydy_2024-09-07_17-16-31

5.5、AR4

yydy_2024-09-07_17-17-07

六、路由优先级

yydy_2024-09-06_16-06-20