华为路由器OSPF多区域配置实验

 

拓扑:

image

配置思路:

1、配置接口地址:

R1:G0/0/0:192.168.12.1/24             lo0:110.40.6.1/24

R2:G0/0/0:192.168.12.2/24            G0/0/1:192.168.24.2/24                 G0/0/2:192.168.23.2/24

R3:G0/0/3:192.168.23.3/24            lo0:10.157.120.1/24

R4:G0/0/0:192.168.45.4/24            G0/0/1:192.168.24.4/24

R5:G0/0/0:192.168.45.5/24             lo0:172.40.1.1/24

2、配置ospf协议

R1:

#
ospf 200 router-id 1.1.1.1               
area 0.0.0.1
  network 192.168.12.0 0.0.0.255
  network 110.40.6.0 0.0.0.255
#

R2:

#                                        
ospf 200 router-id 2.2.2.2
area 0.0.0.0
  network 192.168.24.0 0.0.0.255
area 0.0.0.1
  network 192.168.12.0 0.0.0.255
area 0.0.0.2
  network 192.168.23.0 0.0.0.255
#

R3:

#
ospf 200 router-id 3.3.3.3               
area 0.0.0.2
  network 192.168.23.0 0.0.0.255
  network 10.157.120.0 0.0.0.255
#

R4:

#
ospf 200 router-id 4.4.4.4
area 0.0.0.0                            
  network 192.168.24.0 0.0.0.255
area 0.0.0.3
  network 192.168.45.0 0.0.0.255
#

R5:

#
ospf 200 router-id 5.5.5.5               
area 0.0.0.3
  network 192.168.45.0 0.0.0.255
  network 172.40.1.0 0.0.0.255
#

3、测试网络

1)在R1上测试R5的回环口

<EK-chuanshu-WH9312>ping 172.40.1.1
  PING 172.40.1.1: 56  data bytes, press CTRL_C to break
    Reply from 172.40.1.1: bytes=56 Sequence=1 ttl=253 time=400 ms
    Reply from 172.40.1.1: bytes=56 Sequence=2 ttl=253 time=70 ms
    Reply from 172.40.1.1: bytes=56 Sequence=3 ttl=253 time=110 ms
    Reply from 172.40.1.1: bytes=56 Sequence=4 ttl=253 time=80 ms
    Reply from 172.40.1.1: bytes=56 Sequence=5 ttl=253 time=80 ms

  --- 172.40.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 70/148/400 ms

<EK-chuanshu-WH9312>

2)在R1上测试R3的回环口

<EK-chuanshu-WH9312>ping 10.157.120.1
  PING 10.157.120.1: 56  data bytes, press CTRL_C to break
    Reply from 10.157.120.1: bytes=56 Sequence=1 ttl=254 time=40 ms
    Reply from 10.157.120.1: bytes=56 Sequence=2 ttl=254 time=40 ms
    Reply from 10.157.120.1: bytes=56 Sequence=3 ttl=254 time=40 ms
    Reply from 10.157.120.1: bytes=56 Sequence=4 ttl=254 time=40 ms
    Reply from 10.157.120.1: bytes=56 Sequence=5 ttl=254 time=80 ms

  --- 10.157.120.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 40/48/80 ms

<EK-chuanshu-WH9312>

3)在R3上测试R1的回环口

<EK-chuanshu-GZ9312>ping 110.40.6.1
  PING 110.40.6.1: 56  data bytes, press CTRL_C to break
    Reply from 110.40.6.1: bytes=56 Sequence=1 ttl=254 time=160 ms
    Reply from 110.40.6.1: bytes=56 Sequence=2 ttl=254 time=60 ms
    Reply from 110.40.6.1: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 110.40.6.1: bytes=56 Sequence=4 ttl=254 time=70 ms
    Reply from 110.40.6.1: bytes=56 Sequence=5 ttl=254 time=60 ms

  --- 110.40.6.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/76/160 ms

<EK-chuanshu-GZ9312>

3)在R3上测试R5的回环口

<EK-chuanshu-GZ9312>ping 172.40.1.1
  PING 172.40.1.1: 56  data bytes, press CTRL_C to break
    Reply from 172.40.1.1: bytes=56 Sequence=1 ttl=253 time=80 ms
    Reply from 172.40.1.1: bytes=56 Sequence=2 ttl=253 time=100 ms
    Reply from 172.40.1.1: bytes=56 Sequence=3 ttl=253 time=70 ms
    Reply from 172.40.1.1: bytes=56 Sequence=4 ttl=253 time=60 ms
    Reply from 172.40.1.1: bytes=56 Sequence=5 ttl=253 time=90 ms

  --- 172.40.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 60/80/100 ms

<EK-chuanshu-GZ9312>

 

本网络配置、测试成功,实验完毕。

 

下面是配置文件:

R1:

[EK-chuanshu-WH9312]dis cu
#
sysname EK-chuanshu-WH9312
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
local-user admin service-type http
#
firewall zone Local
priority 16
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Serial0/0/0
link-protocol ppp
#
interface Serial0/0/1
link-protocol ppp
#                                        
interface Serial0/0/2                    
link-protocol ppp
#
interface Serial0/0/3
link-protocol ppp
#
interface GigabitEthernet0/0/0
description --wuhan-to-changsha-DWDM-CH33
ip address 192.168.12.1 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
interface LoopBack0
ip address 110.40.6.1 255.255.255.0
#
ospf 200 router-id 1.1.1.1
area 0.0.0.1                             
  network 192.168.12.0 0.0.0.255
  network 110.40.6.0 0.0.0.255
#
snmp-agent
snmp-agent local-engineid 800007DB0354899816153A
snmp-agent community read  Q!W@E#-WUHAN9312
snmp-agent sys-info version all
#
header shell information "welcome to wuhan9312"
header login information "welcome to wuhan9312"
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
return
[EK-chuanshu-WH9312]

 

R2:

[EK-chuanshu-CS9312]dis cu
#
sysname EK-chuanshu-CS9312
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
local-user admin service-type http
#
firewall zone Local
priority 16
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Serial0/0/0
link-protocol ppp
#
interface Serial0/0/1
link-protocol ppp
#                                        
interface Serial0/0/2
link-protocol ppp
#
interface Serial0/0/3
link-protocol ppp
#
interface GigabitEthernet0/0/0
description --changsha-to-wuhan-DWDM-CH33
ip address 192.168.12.2 255.255.255.0
#
interface GigabitEthernet0/0/1
description --changsha-to-yueyang-DWDM-CH33
ip address 192.168.24.2 255.255.255.0
#
interface GigabitEthernet0/0/2
description -changsha-to-guangzhou-DWDM-CH33
ip address 192.168.23.2 255.255.255.0
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#                                        

ospf 200 router-id 2.2.2.2
area 0.0.0.0
  network 192.168.24.0 0.0.0.255
area 0.0.0.1
  network 192.168.12.0 0.0.0.255
area 0.0.0.2
  network 192.168.23.0 0.0.0.255

#
snmp-agent
snmp-agent local-engineid 800007DB03548998A9745A
snmp-agent community read  Q!W@E#-CHANGSHA9312
snmp-agent sys-info version all
#
header shell information "welcome to changsha9312"
header login information "welcome to changsha9312"
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
return
[EK-chuanshu-CS9312]

 

R3:

[EK-chuanshu-GZ9312]dis cu
#
sysname EK-chuanshu-GZ9312
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
local-user admin service-type http
#
firewall zone Local
priority 16
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Serial0/0/0
link-protocol ppp
#
interface Serial0/0/1
link-protocol ppp
#                                        
interface Serial0/0/2
link-protocol ppp
#
interface Serial0/0/3
link-protocol ppp
#
interface GigabitEthernet0/0/0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
description -guangzhou-to-changsha-DWDM-CH33
ip address 192.168.23.3 255.255.255.0
#
wlan
#
interface NULL0
#
interface LoopBack0
ip address 10.157.120.1 255.255.255.0
#
ospf 200 router-id 3.3.3.3               
area 0.0.0.2
  network 192.168.23.0 0.0.0.255
  network 10.157.120.0 0.0.0.255
#
snmp-agent
snmp-agent local-engineid 800007DB035489980F5DB2
snmp-agent community read  Q!W@E#-GUANGZHOU9312
snmp-agent sys-info version all
#
header shell information "welcome to guangzhou9312"
header login information "welcome to guangzhou9312"
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
return
[EK-chuanshu-GZ9312]

 

R4:

[EK-chuanshu-YY9312]dis cu
#
sysname EK-chuanshu-YY9312
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
local-user admin service-type http
#
firewall zone Local
priority 16
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Serial0/0/0
link-protocol ppp
#
interface Serial0/0/1
link-protocol ppp
#                                        
interface Serial0/0/2
link-protocol ppp
#
interface Serial0/0/3
link-protocol ppp
#
interface GigabitEthernet0/0/0
description -yueyang-to-nanchang-DWDM-CH33
ip address 192.168.45.4 255.255.255.0
#
interface GigabitEthernet0/0/1
description -yueyang-to-changsha-DWDM-CH33
ip address 192.168.24.4 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
ospf 200 router-id 4.4.4.4
area 0.0.0.0                            
  network 192.168.24.0 0.0.0.255
area 0.0.0.3
  network 192.168.45.0 0.0.0.255
#

snmp-agent
snmp-agent local-engineid 800007DB03548998A427D8
snmp-agent community read  Q!W@E#-YUEYANG9312
snmp-agent sys-info version all
#
header shell information "welcome to yueyang9312"
header login information "welcome to yueyang9312"
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
return
[EK-chuanshu-YY9312]

 

R5:

<EK-chuanshu-NC9312>dis cu
#
sysname EK-chuanshu-NC9312
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
local-user admin service-type http
#
firewall zone Local
priority 16
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Serial0/0/0
link-protocol ppp
#
interface Serial0/0/1
link-protocol ppp
#                                        
interface Serial0/0/2
link-protocol ppp
#
interface Serial0/0/3
link-protocol ppp
#
interface GigabitEthernet0/0/0
description -nanchang-to-yueyang-DWDM-CH33
ip address 192.168.45.5 255.255.255.0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
interface LoopBack0
ip address 172.40.1.1 255.255.255.0     
#
ospf 200 router-id 5.5.5.5
area 0.0.0.3
  network 192.168.45.0 0.0.0.255
  network 172.40.1.0 0.0.0.255
#
snmp-agent
snmp-agent local-engineid 800007DB03548998531632
snmp-agent community read  Q!W@E#-NANCHANG-9312
snmp-agent sys-info version all
#
header shell information "welcome to nanchang9312"
header login information "welcome to nanchang9312"
#
user-interface maximum-vty 15
user-interface con 0
user-interface vty 0 14
user-interface vty 16 20
#
return
<EK-chuanshu-NC9312>

你可能感兴趣的:(display,border,target,blank,华为路由器)