Title: OSPF single-area experiment
Experimental requirements: Deploy single-area ospf between routers to realize communication between PC1 and PC2. Experimental steps:
1. Configure the IP addresses of the router and PC
2. Configure ospf on the router
3. Capture packets to view the five message types of ospf (screenshot) and observe the I, M, and M/S bits of the DD message.
4. After ospf configuration is completed, view the routing tables of AR5 and AR1 (screenshot)
5. View the neighbor tables of AR1, AR4 and AR5 (screenshot)
Observe which routers are the DR and BDR in the broadcast network?
6. Test the connectivity of pc1 and pc2 (screenshot)
eNSP topology map
The router is AR2220
Select the serial interface (turn off the machine and drag it up)
Configure the IP and gateway of the PC
Configuring the router
AR1
[Huawei]sys AR1
[AR1]int g0/0/1
[AR1-GigabitEthernet0/0/1]ip add 10.7.0.254 24
[AR1-GigabitEthernet0/0/1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 10.8.0.1 24
[AR1-GigabitEthernet0/0/0]int loop 0
[AR1-LoopBack0]ip add 1.1.1.1 32
[AR1-LoopBack0]quit
[AR1]ospf 1 router-id 1.1.1.1
[AR1-ospf-1]area 0
[AR1-ospf-1-area-0.0.0.0]network 10.7.0.0 0.0.0.255
[AR1-ospf-1-area-0.0.0.0]network 10.8.0.0 0.0.0.255
[AR1-ospf-1-area-0.0.0.0]quit
AR2
[Huawei]sys AR2
[AR2]int g0/0/0
[AR2-GigabitEthernet0/0/0]ip add 10.8.0.2 24
[AR2-GigabitEthernet0/0/0]int loop 0
[AR2-LoopBack0]ip add 2.2.2.2 32
[AR2-LoopBack0]quit
[AR2]ospf 1 router-id 2.2.2.2
[AR2-ospf-1]area 0
[AR2-ospf-1-area-0.0.0.0]network 10.8.0.0 0.0.0.255
[AR2-ospf-1-area-0.0.0.0]quit
AR3
[Huawei]sys AR3
[AR3]int g0/0/0
[AR3-GigabitEthernet0/0/0]ip add 10.8.0.3 24
[AR3-GigabitEthernet0/0/0]int loop 0
[AR3-LoopBack0]ip add 3.3.3.3 32
[AR3-LoopBack0]quit
[AR3]ospf 1 router-id 3.3.3.3
[AR3-ospf-1]area 0
[AR3-ospf-1-area-0.0.0.0]network 10.8.0.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.0]quit
AR4
[Huawei]sys AR4
[AR4]int g0/0/0
[AR4-GigabitEthernet0/0/0]ip add 10.8.0.4 24
[AR4-GigabitEthernet0/0/0]int loop 0
[AR4-LoopBack0]ip add 4.4.4.4 32
[AR4-LoopBack0]int s2/0/0
[AR4-Serial2/0/0]ip add 192.168.45.1 30
[AR4-Serial2/0/0]quit
[AR4]ospf 1 router-id 4.4.4.4
[AR4-ospf-1]area 0
[AR4-ospf-1-area-0.0.0.0]network 10.8.0.0 0.0.0.255
[AR4-ospf-1-area-0.0.0.0]network 192.168.45.0 0.0.0.255
[AR4-ospf-1-area-0.0.0.0]quit
AR5
[Huawei]sys AR5
[AR5]int g0/0/0
[AR5-GigabitEthernet0/0/0]ip add 192.168.52.254 24
[AR5-GigabitEthernet0/0/0]int loop 0
[AR5-LoopBack0]ip add 5.5.5.5 32
[AR5-LoopBack0]int s2/0/0
[AR5-Serial2/0/0]ip add 192.168.45.2 30
[AR5-Serial2/0/0]quit
[AR5]ospf 1 router-id 5.5.5.5
[AR5-ospf-1]area 0
[AR5-ospf-1-area-0.0.0.0]network 192.168.52.0 0.0.0.255
[AR5-ospf-1-area-0.0.0.0]network 192.168.45.0 0.0.0.255
[AR5-ospf-1-area-0.0.0.0]quit
Verify configuration
Restart OSPF process AR1
<AR1>reset ospf 1 process
Warning: The OSPF process will be reset. Continue? [Y/N]:y
Apr 13 2023 10:48:38-08:00 AR1 % OSPF/4/NBR_CHANGE_E(l)[67]:Neighbor changes e
vent: neighbor status changed. (ProcessId=256, NeighborAddress=3.0.8.10, Neighbo
rEvent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=2Way)…………
View packet capture (BD Description)
View DR and BDR
<AR1>dis ospf peer
OSPF Process 1 with Router ID 1.1.1.1
Neighbors
Area 0.0.0.0 interface 10.8.0.1(GigabitEthernet0/0/0)'s neighbors
Router ID: 2.2.2.2 Address: 10.8.0.2
State: Full Mode:Nbr is Master Priority: 1
DR: 10.8.0.4 BDR: 10.8.0.2 MTU: 0
Dead time due in 38 sec
Retrans timer interval: 5
Neighbor is up for 00:00:12
Authentication Sequence: [ 0 ]
Router ID: 3.3.3.3 Address: 10.8.0.3
State: 2-Way Mode:Nbr is Master Priority: 1
DR: 10.8.0.4 BDR: 10.8.0.2 MTU: 0
Dead time due in 32 sec
Retrans timer interval: 5
Neighbor is up for 00:00:00
Authentication Sequence: [ 0 ]
Router ID: 4.4.4.4 Address: 10.8.0.4
State: Full Mode:Nbr is Master Priority: 1
DR: 10.8.0.4 BDR: 10.8.0.2 MTU: 0
Dead time due in 36 sec
Retrans timer interval: 0
Neighbor is up for 00:00:22
Authentication Sequence: [ 0 ]
View AR1’s routing table
[AR1]dis ip routing-table
Route Flags: R - relay, D - download to fib
-------------------------------------------------- ----------------------------
Routing Tables: Public
Destinations: 13 Routes: 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.7.0.0/24 Direct 0 0 D 10.7.0.254 GigabitEthernet0/0/1
10.7.0.254/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
10.7.0.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
10.8.0.0/24 Direct 0 0 D 10.8.0.1 GigabitEthernet0/0/0
10.8.0.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
10.8.0.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.45.0/30 OSPF 10 49 D 10.8.0.4 GigabitEthernet0/0/0
192.168.52.0/24 OSPF 10 50 D 10.8.0.4 GigabitEthernet0/0/0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
Verify Ping PC2
PC>ping 192.168.52.1
Ping 192.168.52.1: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.52.1: bytes=32 seq=2 ttl=125 time=47 ms
From 192.168.52.1: bytes=32 seq=3 ttl=125 time=47 ms
From 192.168.52.1: bytes=32 seq=4 ttl=125 time=47 ms
From 192.168.52.1: bytes=32 seq=5 ttl=125 time=47 ms
--- 192.168.52.1 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 0/47/47 ms
Let AR4 (10.8.0.4) take over
<AR1>reset ospf 1 process
Warning: The OSPF process will be reset. Continue? [Y/N]:y</code><code><AR2>reset ospf 1 process
Warning: The OSPF process will be reset. Continue? [Y/N]:y</code><code><AR3>reset ospf 1 process
Warning: The OSPF process will be reset. Continue? [Y/N]:y</code><code><AR5>reset ospf 1 process
Warning: The OSPF process will be reset. Continue? [Y/N]:y</code><code><AR6>reset ospf 1 process
Warning: The OSPF process will be reset. Continue? [Y/N]:y