OSPF is too difficult, please check this OSPF comprehensive experiment, every network engineer will overtake on weekends!

What I bring to you today is the OSPF comprehensive experiment. Once the theory of OSPF is mastered, the experiment is actually very simple. Then let’s open the Ensp simulator to start the experimental journey!

experimental topology

Experimental requirements

  1. Configure the IP address according to the figure, and the PC1 gateway points to R8
  2. OSPF is divided into 4 areas, of which 192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24 belong to AREA 0, 192.168.10.0/24 belong to AREA1, 192.168.4.0/24, 100.0.0.0/24 belong to AREA2 , 192.168.5.0, 100.1.1.0/24 belongs to AREA3
  3. To prevent backbone area isolation caused by link interruption, configure virtual links on R3 and R4
  4. Configure static routes to the network segments 172.16.0.0/24 and 172.16.1.0/24 on R5, and import them into OSPF
  5. Configure default routes on R7 and R8, with the next hop pointing to R5 and R6
  6. Perform accurate route aggregation on the 172.16.0.0/24 and 172.16.1.0/24 network segments on the ASBR
  7. Perform route aggregation on the network segment of AREA 0 on R3 and R4 respectively
  8. Configure AREA3 as an NSSA area
  9. Configure a static route to the 100.2.2.0/24 network segment on R6 and import it to AREA3
  10. Configure area authentication in AREA0, the password is 123456

Experimental procedure

1. Configure the corresponding interface IP address and loopback address

2. Configure OSPF by area as shown in the figure

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 virtual connections on 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 imported into 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 
Check the OSPF routing table on 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 default routes on R7 and R8, with the next hop pointing to R5 and R6

AR7
[Huawei]ip route-static 192.168.4.0 24 100.0.0.2 
AR8
[Huawei]ip route-static 192.168.5.0 24 100.1.1.1 
6. Perform accurate route aggregation on the 172.16.0.0/24 and 172.16.1.0/24 network segments on the ASBR
[Huawei-ospf-1]asbr-summary 172.16.0.0 255.255.254.0
PING on AR7 to test connectivity
[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. Perform route aggregation on the network segment of AREA 0 on R3 and R4 respectively

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 and find that it has been aggregated
[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. Configure AREA3 as an NSSA area

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. Configure a static route to the 100.2.2.0/24 network segment on R6 and import it to AREA3

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

10. Configure area authentication in AREA0, the password is 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 blog.csdn.net/weixin_43025343/article/details/132236146