Huawei ospf, static routing comprehensive network experimental configuration

Requirements: The yellow area is ospf area 0, the green area is static routing, and default routing is not allowed to be written.

The configuration is as follows:

<AR1>dis cu 
#
 sysname AR1
#
interface GigabitEthernet0/0/0
 ip address 10.0.12.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 192.168.41.254 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 10.0.13.1 255.255.255.0 
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255 
#
ospf 1 router-id 1.1.1.1 
 area 0.0.0.0 
  network 1.1.1.1 0.0.0.0 
  network 10.0.12.0 0.0.0.255 
  network 10.0.13.0 0.0.0.255 
  network 192.168.41.0 0.0.0.255 

<AR2>dis cu 
#
 sysname AR2
#
interface GigabitEthernet0/0/0
 ip address 10.0.12.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 10.0.23.2 255.255.255.0 
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.255 
#
ospf 1 router-id 2.2.2.2 
 area 0.0.0.0 
  network 2.2.2.2 0.0.0.0 
  network 10.0.12.0 0.0.0.255 
  network 10.0.23.0 0.0.0.255 

<AR3>dis cu 
#
 sysname AR3
#
interface GigabitEthernet0/0/0
 ip address 10.0.34.3 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 10.0.23.3 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 10.0.13.3 255.255.255.0 
#
interface LoopBack0
 ip address 3.3.3.3 255.255.255.255 
#
ospf 1 router-id 3.3.3.3 
 import-route static
 area 0.0.0.0 
  network 3.3.3.3 0.0.0.0 
  network 10.0.13.0 0.0.0.255 
  network 10.0.23.0 0.0.0.255 
  network 10.0.34.0 0.0.0.255 
#
ip route-static 10.0.45.0 255.255.255.0 10.0.34.4
ip route-static 10.0.56.0 255.255.255.0 10.0.34.4
ip route-static 192.168.42.0 255.255.255.0 10.0.34.4

<AR4>dis cu 
#
 sysname AR4
#
interface GigabitEthernet0/0/0
 ip address 10.0.34.4 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 10.0.45.4 255.255.255.0 
#
ip route-static 10.0.12.0 255.255.255.0 10.0.34.3
ip route-static 10.0.13.0 255.255.255.0 10.0.34.3
ip route-static 10.0.23.0 255.255.255.0 10.0.34.3
ip route-static 10.0.56.0 255.255.255.0 10.0.45.5
ip route-static 192.168.41.0 255.255.255.0 10.0.34.3
ip route-static 192.168.42.0 255.255.255.0 10.0.45.5

<AR5>dis cu 
#
 sysname AR5
#
interface GigabitEthernet0/0/0
 ip address 10.0.56.5 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 10.0.45.5 255.255.255.0 
#
ip route-static 10.0.12.0 255.255.255.0 10.0.45.4
ip route-static 10.0.13.0 255.255.255.0 10.0.45.4
ip route-static 10.0.23.0 255.255.255.0 10.0.45.4
ip route-static 10.0.34.0 255.255.255.0 10.0.45.4
ip route-static 192.168.41.0 255.255.255.0 10.0.45.4
ip route-static 192.168.42.0 255.255.255.0 10.0.56.6

<AR6>dis cu 
#
 sysname AR6
#
interface GigabitEthernet0/0/0
 ip address 10.0.56.6 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 192.168.42.254 255.255.255.0 
#
ip route-static 10.0.12.0 255.255.255.0 10.0.56.5
ip route-static 10.0.13.0 255.255.255.0 10.0.56.5
ip route-static 10.0.23.0 255.255.255.0 10.0.56.5
ip route-static 10.0.34.0 255.255.255.0 10.0.56.5
ip route-static 10.0.45.0 255.255.255.0 10.0.56.5
ip route-static 192.168.41.0 255.255.255.0 10.0.56.5

Guess you like

Origin blog.csdn.net/weixin_45650628/article/details/134277726