Network Topology
Device Configuration
[Router-A] ospf 1 router-id 10.0.0.1
[Router-A-ospf-1] area 0
[Router-A-ospf-1-area-0.0.0.0] network 10.0.0.1 0.0.0.0
[Router-A-ospf-1-area-0.0.0.0] network 192.168.10.1 0.0.0.0
[Router-A] interface LoopBack 0
[Router-A-LoopBack0] ip address 10.0.0.1 255.255.255.255
[Router-A-LoopBack0] interface GigabitEthernet 0/0/0
[Router-A-GigabitEthernet0/0/0] ip address 192.168.10.1 255.255.255.0
[Router-B] ospf 1 router-id 10.0.0.2
[Router-B-ospf-1] area 0
[Router-B-ospf-1-area-0.0.0.0] network 10.0.0.2 0.0.0.0
[Router-B-ospf-1-area-0.0.0.0] network 192.168.10.2 0.0.0.0
[Router-B-ospf-1-area-0.0.0.0] network 192.168.20.1 0.0.0.0
[Router-B] interface LoopBack 0
[Router-B-LoopBack0] ip address 10.0.0.2 255.255.255.255
[Router-B-LoopBack0] interface GigabitEthernet 0/0/0
[Router-B-GigabitEthernet0/0/0] ip address 192.168.10.2 255.255.255.0
[Router-B-GigabitEthernet0/0/0] interface GigabitEthernet 0/0/1
[Router-B-GigabitEthernet0/0/1] ip address 192.168.20.1 255.255.255.0
[Router-C] ospf 1 router-id 10.0.0.3
[Router-C-ospf-1] area 0
[Router-C-ospf-1-area-0.0.0.0] network 10.0.0.3 0.0.0.0
[Router-C-ospf-1-area-0.0.0.0] network 192.168.20.2 0.0.0.0
[Router-C] interface LoopBack 0
[Router-C-LoopBack0] ip address 10.0.0.3 255.255.255.255
[Router-C] interface GigabitEthernet 0/0/2
[Router-C-GigabitEthernet0/0/2] ip address 192.168.20.2 255.255.255.0
Adjacency Formation Analysis (Router-A & Router-B)
[Router-A] display ospf peer
OSPF Process 1 with Router ID 10.0.0.1
Neighbors
Area 0.0.0.0 interface 192.168.10.1(GigabitEthernet0/0/0)'s neighbors
Router ID: 10.0.0.2 Address: 192.168.10.2
State: Full Mode:Nbr is Master Priority: 1
DR: 192.168.10.1 BDR: 192.168.10.2 MTU: 0
Dead timer due in 38 sec
Retrans timer interval: 5
Neighbor is up for 27:09:11
Authentication Sequence: [ 0 ]
OSPF Neighbor States:
- Down: Initial state. No Hello packets received. In NBMA networks, Hellos can still be sent at the Poll Interval.
- Attempt: Exists only in NBMA networks. Indicates active attempts to form an adjacency.
- Init: A Hello packet has been received from the neighbor.
- 2-Way: The received Hello packet contains the local Router ID. Communication is bidirectional.
- ExStart: First step of adjacency. Masterslave relationship and DD sequence numbers are negotiated.
- Exchange: LSDB synchronization begins. DD, LSR, and LSU packets are exchanged.
- Loading: LSDB synchronization is in progress. LSR and LSU packets are exchanged.
- Full: LSDBs are fully synchronized. Full adjacency is established.
[Router-A] display ospf lsdb
OSPF Process 1 with Router ID 10.0.0.1
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 10.0.0.2 10.0.0.2 336 60 8000003F 1
Router 10.0.0.1 10.0.0.1 565 48 8000003C 0
Router 10.0.0.3 10.0.0.3 344 48 8000003A 1
Network 192.168.20.1 10.0.0.2 336 32 80000038 0
Network 192.168.10.1 10.0.0.1 565 32 80000038 0
[Router-A] display ospf routing
OSPF Process 1 with Router ID 10.0.0.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
10.0.0.1/32 0 Stub 10.0.0.1 10.0.0.1 0.0.0.0
192.168.10.0/24 1 Transit 192.168.10.1 10.0.0.1 0.0.0.0
10.0.0.2/32 1 Stub 192.168.10.2 10.0.0.2 0.0.0.0
10.0.0.3/32 2 Stub 192.168.10.2 10.0.0.3 0.0.0.0
192.168.20.0/24 2 Transit 192.168.10.2 10.0.0.2 0.0.0.0
Total Nets: 5
Intra Area: 5 Inter Area: 0 ASE: 0 NSSA: 0
Packet Analysis
- Hello Packet: Used for neighbor discovery and keepalive.
- DD (Database Description) Packet: Contains summaries of LSAs in the LSDB.
- LSR (Link State Request) Packet: Requests specific LSAs from a neighbor.
Adjacency Handshake Sequence
Capturing traffic on Router-A's GE0/0/0 interface reveals the following exchange:
- Discovery: Router-A sends a Hello packet. The neighbor table is currently empty.
- Init State: Router-A receives a Hello from Router-B. Router-B is added to the neighbor table with state
Init. Router-B simultaneously adds Router-A to its table asInit. - 2-Way Transition: Router-A sends a Hello packet listing Router-B (10.0.0.2) in its neighbor list. Upon receipt, Router-B transitions Router-A's state to
2-Way. - Mutual 2-Way: Router-B sends a Hello packet listing Router-A (10.0.0.1). Router-A transitions Router-B's state to
2-Way. - ExStart Negotiation: Both routers transition to
ExStart. Router-A sends an empty DD packet (no LSA headers) with sequence number 63959 to negotiate master/slave. - Slave Response: Router-B sends an empty DD packet with sequence number 63962.
- Master Election: Since 10.0.0.2 > 10.0.0.1, Router-B becomes the Master. Router-A transitions Router-B to
Exchangeand sends a DD packet containing its LSA headers, using the Master's sequence number (63962). - Exchange: Router-B acknowledges by moving Router-A to
Exchangeand sends its own DD packet with LSA headers, incrementing the sequence number to 63963. - Acknowledgment: Router-A sends a DD packet acknowledging the sequence number 63963.
- Loading: After DD exchanges, both transition to
Loading. Router-A identifies missing LSAs and sends LSR packets to Router-B. - Udpate: Router-B replies with an LSU packet containing the requested LSAs.
- Acknowledgment: Router-A sends an LSAck packet. Similar LSR/LSU/LSAck exchanges occur until databases match, transitioning both nieghbors to
Full.