OSPF comprehensive experiment

Lab topology

Experimental demand

1, illustrating the configuration in accordance with an IP address, the gateway point PC1 is R8
2, the OSPF is divided into four regions, wherein 192.168.0.0/24,192.168.1.0/24,192.168.2.0/24 belonging AREA 0,192.168.10.0 / 24 belongs AREA1,192.168.4.0 / 24,100.0.0.0 / 24 belonging AREA2,192.168.5.0,100.1.1.0 / 24 belongs to AREA3
. 3, in order to prevent link break due to the backbone spacer, disposed in the virtual connection R3 and R4
4, arranged on the static route R5 and 172.16.0.0/24 172.16.1.0/24 segment, and introduced into the interior of OSPF
5, configure a default route on R7 and R8, R5 and next hop point R6
. 6, in on the ASBR of 172.16.1.0/24 172.16.0.0/24 and accurate route aggregation network
7, respectively aREA segment is 0 and R3 and R4 on the polymerization route
8, will be configured as an NSSA area AREA3
9, the R6 static route configuration 100.2.2.0/24 segment, and introduced into AREA3
10, in the authentication area AREA0 configuration, the password is 123456

Experimental Procedure

1. configure the IP addresses and port addresses run loopback

OSPF configuration according to figure 2. subregional

AR1

[Huawei]ospf 
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]network 192.168.0.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255

AR2

[Huawei]ospf 
[Huawei-ospf-1]area 
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]net 
[Huawei-ospf-1-area-0.0.0.0]network 192.168.0.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]ar  
[Huawei-ospf-1-area-0.0.0.0]arp-ping 
[Huawei-ospf-1-area-0.0.0.0]area    
[Huawei-ospf-1-area-0.0.0.0]area    
[Huawei-ospf-1-area-0.0.0.0]area 3
[Huawei-ospf-1-area-0.0.0.3]net 
[Huawei-ospf-1-area-0.0.0.3]network 192.168.5.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.3]area 1
[Huawei-ospf-1-area-0.0.0.1]net 
[Huawei-ospf-1-area-0.0.0.1]network 192.168.10.0 0.0.0.255

AR3

[Huawei]ospf 
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]net 
[Huawei-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]area 1
[Huawei-ospf-1-area-0.0.0.1]network 192.168.10.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.1]area 2
[Huawei-ospf-1-area-0.0.0.2]net 
[Huawei-ospf-1-area-0.0.0.2]network 192.168.4.0 0.0.0.255

AR4

[Huawei]ospf 
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]net 
[Huawei-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255

AR5

[Huawei]ospf 
[Huawei-ospf-1]ar   
[Huawei-ospf-1]area 2
[Huawei-ospf-1-area-0.0.0.2]net 
[Huawei-ospf-1-area-0.0.0.2]network 192.168.4.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.2]network 100.0.0.0 0.0.0.255

AR6

[Huawei]ospf 
[Huawei-ospf-1]ar   
[Huawei-ospf-1]area 3
[Huawei-ospf-1-area-0.0.0.3]net 
[Huawei-ospf-1-area-0.0.0.3]network 192.168.5.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.3]net 
[Huawei-ospf-1-area-0.0.0.3]network 100.1.1.0 0.0.0.255

3. Configure a virtual link in R3 and R4

AR3

[Huawei-ospf-1-area-0.0.0.1]vlink-peer 192.168.10.2 

AR4

[Huawei-ospf-1-area-0.0.0.1]vlink-peer 192.168.1.1

4. Static routing, and into the interior of OSPF

AR5

[Huawei]IP route-static 172.16.0.1 24 100.0.0.1
[Huawei]IP route-static 172.16.1.1 24 100.0.0.1
[Huawei-ospf-1]import-route static 

View the OSPF routing table on the AR3

Huawei]dis ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 7        Routes : 7        

OSPF routing table status : <Active>
         Destinations : 7        Routes : 7

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

      100.0.0.0/24  OSPF    10   2           D   192.168.4.1     GigabitEthernet
0/0/2
      100.1.1.0/24  OSPF    10   3           D   192.168.10.2    GigabitEthernet
0/0/1
     172.16.0.0/24  O_ASE   150  1           D   192.168.4.1     GigabitEthernet
0/0/2
     172.16.1.0/24  O_ASE   150  1           D   192.168.4.1     GigabitEthernet
0/0/2
    192.168.0.0/24  OSPF    10   2           D   192.168.1.2     GigabitEthernet
0/0/0
    192.168.2.0/24  OSPF    10   2           D   192.168.10.2    GigabitEthernet
0/0/1
    192.168.5.0/24  OSPF    10   2           D   192.168.10.2    GigabitEthernet
0/0/1

5. configure a default route on R7 and R8, R5 and R6 next hop point

In AR7

[Huawei]ip route-static 192.168.4.0 24 100.0.0.2 

In AR8

[Huawei]ip route-static 192.168.5.0 24 100.1.1.1 

6. 172.16.0.0/24 172.16.1.0/24 network and accurate route summarization ASBR

[Huawei-ospf-1]asbr-summary 172.16.0.0 255.255.254.0

PING test connectivity in AR7

[Huawei]ping 192.168.4.1
  PING 192.168.4.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.4.1: bytes=56 Sequence=1 ttl=255 time=30 ms
    Reply from 192.168.4.1: bytes=56 Sequence=2 ttl=255 time=40 ms
    Reply from 192.168.4.1: bytes=56 Sequence=3 ttl=255 time=10 ms
    Reply from 192.168.4.1: bytes=56 Sequence=4 ttl=255 time=40 ms
    Reply from 192.168.4.1: bytes=56 Sequence=5 ttl=255 time=10 ms

  --- 192.168.4.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/26/40 ms

Test connectivity on AR8

[Huawei]ping 192.168.5.1
  PING 192.168.5.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.5.1: bytes=56 Sequence=1 ttl=254 time=30 ms
    Reply from 192.168.5.1: bytes=56 Sequence=2 ttl=254 time=30 ms
    Reply from 192.168.5.1: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 192.168.5.1: bytes=56 Sequence=4 ttl=254 time=20 ms
    Reply from 192.168.5.1: bytes=56 Sequence=5 ttl=254 time=30 ms

  --- 192.168.5.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/28/30 ms

7. AREA route segment 0 are polymerized in R3 and R4

AR3

abr-summary 192.168.0.0 255.255.252.0

AR4

abr-summary 192.168.0.0 255.255.252.0

Check the OSPF routing table has been found that polymerization

[Huawei]DIS IP routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 5        Routes : 5        

OSPF routing table status : <Active>
         Destinations : 5        Routes : 5

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

      100.0.0.0/24  OSPF    10   4           D   192.168.5.1     GigabitEthernet
0/0/1
     172.16.0.0/23  O_ASE   150  2           D   192.168.5.1     GigabitEthernet
0/0/1
    192.168.0.0/22  OSPF    10   3           D   192.168.5.1     GigabitEthernet
0/0/1
    192.168.4.0/24  OSPF    10   3           D   192.168.5.1     GigabitEthernet
0/0/1
   192.168.10.0/24  OSPF    10   2           D   192.168.5.1     GigabitEthernet
0/0/1

8. 将AREA3配置为NSSA区域

AR4

[Huawei]ospf
[Huawei-ospf-1]area 3
[Huawei-ospf-1-area-0.0.0.3]nssa 

AR6

[Huawei]ospf
[Huawei-ospf-1]area 3
[Huawei-ospf-1-area-0.0.0.3]nssa 

9. 在R6上配置到达100.2.2.0/24网段的静态路由,并引入到AREA3

AR6

[Huawei]ip route-static 100.2.2.0 24 100.1.1.2  
[Huawei-ospf-1]import-route static 

10. 在AREA0配置区域认证,密码为123456

AR1

[Huawei-ospf-1-area-0.0.0.0]authentication-mode simple cipher 123456

AR2

[Huawei-ospf-1-area-0.0.0.0]authentication-mode simple cipher 123456

AR3

[Huawei-ospf-1-area-0.0.0.0]authentication-mode simple cipher 123456

AR4

[Huawei-ospf-1-area-0.0.0.0]authentication-mode simple cipher 123456

Guess you like

Origin www.cnblogs.com/yu15/p/11290294.html