Protocols/BGP_OSPF_MPLS_VPN

OSPF Link-state/Adjacency changes

양된백성 2021. 2. 16. 16:46

 

 

<OSPF Neighbor State Changes>

OSPF has a link-state with neighbors. each state from Down to Full is changed with packets establishing a neighbor.

if your OSPF neighbor does not come up to FULL state, you can make the troubleshooting closer by looking for the stuck state.

 

Figure 3-17 Link-state Database Synchronization of 'OSPF Network Design Solutions' by Cisco Press

 

 

 

<Understanding OSPF adjacency in Broadcast network>

1. Shutdown each interface on R1, R2, R3

R1(config)#int e 0/0.123
R1(config-subif)#sh
R2(config)#int e 0/0.123
R2(config-subif)#sh
R3(config)#int e 0/0.123
R3(config-subif)#shutdown

 

2. Turn on Debug on R1

R1#debug ip ospf adj
OSPF adjacency debugging is on

 

3. No shutdown each interface on R1, R2, R3

R1(config)#int e 0/0.123
R1(config-subif)#no sh
R2(config)#int e 0/0.123
R2(config-subif)#no sh
R3(config)#int e 0/0.123
R3(config-subif)#no sh

 

4. Debug messages for link-state changes

R1(config-subif)#
*Feb 16 07:23:06.424: OSPF-1 ADJ   Et0/0.123: Route adjust notification: UP/UP
*Feb 16 07:23:06.425: OSPF-1 ADJ   Et0/0.123: Interface going Up
*Feb 16 07:23:06.425: OSPF-1 ADJ   Et0/0.123: Interface state change to UP, new ospf state WAIT
*Feb 16 07:23:16.099: OSPF-1 ADJ   Et0/0.123: 2 Way Communication to 1.1.3.3, state 2WAY
*Feb 16 07:23:16.099: OSPF-1 ADJ   Et0/0.123: 2 Way Communication to 1.1.2.2, state 2WAY
R1(config-subif)#
R1(config-subif)#do show ip ospf neigh

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.2.2           1   2WAY/DROTHER    00:00:34    1.1.123.2       Ethernet0/0.123  // R1 is 2WAY state with both R2 and R3.
1.1.3.3           1   2WAY/DROTHER    00:00:35    1.1.123.3       Ethernet0/0.123  // not DR and BDR election yet
R1(config-subif)#
*Feb 16 07:23:46.430: OSPF-1 ADJ   Et0/0.123: end of Wait on interface      // Wait time for 40sec before electing DR/BDR
*Feb 16 07:23:46.430: OSPF-1 ADJ   Et0/0.123: DR/BDR election
*Feb 16 07:23:46.430: OSPF-1 ADJ   Et0/0.123: Elect BDR 1.1.3.3
*Feb 16 07:23:46.430: OSPF-1 ADJ   Et0/0.123: Elect DR 1.1.3.3
*Feb 16 07:23:46.430: OSPF-1 ADJ   Et0/0.123: DR: 1.1.3.3 (Id)
*Feb 16 07:23:46.430: OSPF-1 ADJ   Et0/0.123:    BDR: 1.1.3.3 (Id)
*Feb 16 07:23:46.430: OSPF-1 ADJ   Et0/0.123: Nbr 1.1.3.3: Prepare dbase exchange
*Feb 16 07:23:46.430: OSPF-1 ADJ   Et0/0.123: Send DBD to 1.1.3.3 seq 0x1D48 opt 0x52 flag 0x7 len 32
*Feb 16 07:23:47.778: OSPF-1 ADJ   Et0/0.123: Rcv DBD from 1.1.3.3 seq 0x1704 opt 0x52 flag 0x7 len 32  mtu 1500 state EXSTART
*Feb 16 07:23:47.778: OSPF-1 ADJ   Et0/0.123: NBR Negotiation Done. We are the SLAVE
*Feb 16 07:23:47.778: OSPF-1 ADJ   Et0/0.123: Nbr 1.1.3.3: Summary list built, size 18
*Feb 16 07:23:47.778: OSPF-1 ADJ   Et0/0.123: Send DBD to 1.1.3.3 seq 0x1704 opt 0x52 flag 0x2 len 392
*Feb 16 07:23:47.779: OSPF-1 ADJ   Et0/0.123: Rcv DBD from 1.1.3.3 seq 0x1705 opt 0x52 flag 0x1 len 72  mtu 1500 state EXCHANGE
*Feb 16 07:23:47.779: OSPF-1 ADJ   Et0/0.123: Exchange Done with 1.1.3.3
*Feb 16 07:23:47.779: OSPF-1 ADJ   Et0/0.123: Send LS REQ to 1.1.3.3 length 36
*Feb 16 07:23:47.779: OSPF-1 ADJ   Et0/0.123: Send DBD to 1.1.3.3 seq 0x1705 opt 0x52 flag 0x0 len 32
*Feb 16 07:23:47.780: OSPF-1 ADJ   Et0/0.123: Rcv LS UPD from Nbr ID 1.1.3.3 length 64 LSA count 1
*Feb 16 07:23:47.780: OSPF-1 ADJ   Et0/0.123: Synchronized with 1.1.3.3, state FULL
*Feb 16 07:23:47.780: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.3.3 on Ethernet0/0.123 from LOADING to FULL, Loading Done

*Feb 16 07:23:47.780: OSPF-1 ADJ   Et0/0.123: Rcv LS REQ from 1.1.3.3 length 132 LSA count 9
*Feb 16 07:23:54.579: OSPF-1 ADJ   Et0/0.123: Neighbor change event
*Feb 16 07:23:54.579: OSPF-1 ADJ   Et0/0.123: DR/BDR election
*Feb 16 07:23:54.579: OSPF-1 ADJ   Et0/0.123: Elect BDR 1.1.3.3
*Feb 16 07:23:54.579: OSPF-1 ADJ   Et0/0.123: Elect DR 1.1.3.3
*Feb 16 07:23:54.579: OSPF-1 ADJ   Et0/0.123: DR: 1.1.3.3 (Id)
*Feb 16 07:23:54.579: OSPF-1 ADJ   Et0/0.123:    BDR: 1.1.3.3 (Id)
*Feb 16 07:23:54.579: OSPF-1 ADJ   Et0/0.123: Neighbor change event
*Feb 16 07:23:54.579: OSPF-1 ADJ   Et0/0.123: DR/BDR election
*Feb 16 07:23:54.579: OSPF-1 ADJ   Et0/0.123: Elect BDR 1.1.3.3
*Feb 16 07:23:54.579: OSPF-1 ADJ   Et0/0.123: Elect DR 1.1.3.3o
*Feb 16 07:23:54.579: OSPF-1 ADJ   Et0/0.123: DR: 1.1.3.3 (Id)
*Feb 16 07:23:54.579: OSPF-1 ADJ   Et0/0.123:    BDR: 1.1.3.3 (Id)
*Feb 16 07:23:55.728: OSPF-1 ADJ   Et0/0.123: Neighbor change event
*Feb 16 07:23:55.728: OSPF-1 ADJ   Et0/0.123: DR/BDR election
*Feb 16 07:23:55.728: OSPF-1 ADJ   Et0/0.123: Elect BDR 1.1.2.2
*Feb 16 07:23:55.728: OSPF-1 ADJ   Et0/0.123: Elect DR 1.1.3.3
*Feb 16 07:23:55.728: OSPF-1 ADJ   Et0/0.123: DR: 1.1.3.3 (Id)
*Feb 16 07:23:55.728: OSPF-1 ADJ   Et0/0.123:    BDR: 1.1.2.2 (Id)
*Feb 16 07:23:55.728: OSPF-1 ADJ   Et0/0.123: Nbr 1.1.2.2: Prepare dbase exchange
*Feb 16 07:23:55.728: OSPF-1 ADJ   Et0/0.123: Send DBD to 1.1.2.2 seq 0x1EB opt 0x52 flag 0x7 len 32
*Feb 16 07:23:55.728: OSPF-1 ADJ   Et0/0.123: Neighbor change event
*Feb 16 07:23:55.728: OSPF-1 ADJ   Et0/0.123: DR/BDR election
*Feb 16 07:23:55.728: OSPF-1 ADJ   Et0/0.123: Elect BDR 1.1.2.2
*Feb 16 07:23:55.728: OSPF-1 ADJ   Et0/0.123: Elect DR 1.1.3.3
*Feb 16 07:23:55.728: OSPF-1 ADJ   Et0/0.123: DR: 1.1.3.3 (Id)
*Feb 16 07:23:55.728: OSPF-1 ADJ   Et0/0.123:    BDR: 1.1.2.2 (Id)
*Feb 16 07:23:55.729: OSPF-1 ADJ   Et0/0.123: Rcv DBD from 1.1.2.2 seq 0x18DE opt 0x52 flag 0x7 len 32  mtu 1500 state EXSTART
*Feb 16 07:23:55.729: OSPF-1 ADJ   Et0/0.123: NBR Negotiation Done. We are the SLAVE
*Feb 16 07:23:55.729: OSPF-1 ADJ   Et0/0.123: Nbr 1.1.2.2: Summary list built, size 18
*Feb 16 07:23:55.729: OSPF-1 ADJ   Et0/0.123: Send DBD to 1.1.2.2 seq 0x18DE opt 0x52 flag 0x2 len 392
*Feb 16 07:23:55.729: OSPF-1 ADJ   Et0/0.123: Rcv DBD from 1.1.2.2 seq 0x18DF opt 0x52 flag 0x1 len 52  mtu 1500 state EXCHANGE
*Feb 16 07:23:55.729: OSPF-1 ADJ   Et0/0.123: Exchange Done with 1.1.2.2
*Feb 16 07:23:55.729: OSPF-1 ADJ   Et0/0.123: Synchronized with 1.1.2.2, state FULL
*Feb 16 07:23:55.729: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.2.2 on Ethernet0/0.123 from LOADING to FULL, Loading Done
*Feb 16 07:23:55.729: OSPF-1 ADJ   Et0/0.123: Send DBD to 1.1.2.2 seq 0x18DF opt 0x52 flag 0x0 len 32

R1(config-subif)#do show ip ospf neigh

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.2.2           1   FULL/BDR        00:00:35    1.1.123.2       Ethernet0/0.123
1.1.3.3           1   FULL/DR         00:00:35    1.1.123.3       Ethernet0/0.123
R1(config-subif)#
R1#show ip ospf int e 0/0.123
Ethernet0/0.123 is up, line protocol is up
  Internet Address 1.1.123.1/24, Area 1, Attached via Network Statement
  Process ID 1Router ID 1.1.1.1Network Type BROADCAST, Cost: 10
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           10        no          no            Base
  Transmit Delay is 1 sec, State DROTHERPriority 1
  Designated Router (ID) 1.1.3.3, Interface address 1.1.123.3
  Backup Designated router (ID) 1.1.2.2, Interface address 1.1.123.2
  Timer intervals configured, Hello 10, Dead 40Wait 40, Retransmit 5   //"Wait" indicates how long to wait if the DR fails until the election process begins in order to replace the DR.
    oob-resync timeout 40
    Hello due in 00:00:07
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/2/2, flood queue length 0
  Next 0x0(0)/0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 5
  Last flood scan time is 0 msec, maximum is 1 msec
  Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 1.1.2.2  (Backup Designated Router)
    Adjacent with neighbor 1.1.3.3  (Designated Router)
  Suppress hello for 0 neighbor(s)

 

 

<Understanding OSPF adjacency in Point-To-Point network>

 

1. Shutdown each interface on R4

R4(config)#int s 1/2
R4(config-if)#sh

 

2. Turn on Debug on R4 for OSPF Adjacency

R4(config-if)#no debug ip ospf adj
OSPF adjacency debugging is on

 

3. No shutdown each interface on R4

R4(config)#int s 1/2
R4(config-if)#no sh

 

4. Debug messages for link-state changes

R4(config-if)#
*Feb 16 07:39:44.442: %LINK-3-UPDOWN: Interface Serial1/2, changed state to up
*Feb 16 07:39:45.442: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/2, changed state to up
*Feb 16 07:39:45.442: OSPF-1 ADJ   Se1/2: Route adjust notification: UP/UP
*Feb 16 07:39:45.442: OSPF-1 ADJ   Se1/2: Interface going Up
*Feb 16 07:39:45.442: OSPF-1 ADJ   Se1/2: Interface state change to UP, new ospf state P2P
*Feb 16 07:39:45.455: OSPF-1 ADJ   Se1/2: 2 Way Communication to 1.1.3.3, state 2WAY
*Feb 16 07:39:45.455: OSPF-1 ADJ   Se1/2: Nbr 1.1.3.3: Prepare dbase exchange
*Feb 16 07:39:45.455: OSPF-1 ADJ   Se1/2: Send DBD to 1.1.3.3 seq 0xE53 opt 0x52 flag 0x7 len 32
*Feb 16 07:39:45.465: OSPF-1 ADJ   Se1/2: Rcv DBD from 1.1.3.3 seq 0x3BC opt 0x52 flag 0x7 len 32  mtu 1500 state EXSTART
*Feb 16 07:39:45.465: OSPF-1 ADJ   Se1/2: First DBD and we are not SLAVE
*Feb 16 07:39:45.465: OSPF-1 ADJ   Se1/2: Rcv DBD from 1.1.3.3 seq 0xE53 opt 0x52 flag 0x2 len 232  mtu 1500
state EXSTART
*Feb 16 07:39:45.465: OSPF-1 ADJ   Se1/2: NBR Negotiation Done. We are the MASTER
*Feb 16 07:39:45.465: OSPF-1 ADJ   Se1/2: Nbr 1.1.3.3: Summary list built, size 10
*Feb 16 07:39:45.466: OSPF-1 ADJ   Se1/2: Send DBD to 1.1.3.3 seq 0xE54 opt 0x52 flag 0x1 len 72
*Feb 16 07:39:45.476: OSPF-1 ADJ   Se1/2: Rcv LS REQ from 1.1.3.3 length 36 LSA count 1
*Feb 16 07:39:45.476: OSPF-1 ADJ   Se1/2: Send LS UPD to 1.1.34.3 length 76 LSA count 1
*Feb 16 07:39:45.476: OSPF-1 ADJ   Se1/2: Rcv DBD from 1.1.3.3 seq 0xE54 opt 0x52 flag 0x0 len 32  mtu 1500 
state EXCHANGE
*Feb 16 07:39:45.476: OSPF-1 ADJ   Se1/2: Exchange Done with 1.1.3.3
*Feb 16 07:39:45.476: OSPF-1 ADJ   Se1/2: Synchronized with 1.1.3.3, state FULL
*Feb 16 07:39:45.476: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.3.3 on Serial1/2 from LOADING to FULL, Loading Done
R4(config-if)#
R4(config-if)#do show ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.3.3           0   FULL/  -        00:00:30    1.1.34.3        Serial1/2           // No DR, BDR election.
1.1.2.2           1   FULL/BDR        00:00:39    1.1.24.2        Ethernet0/0.24
1.1.5.5           1   FULL/DR         00:00:35    1.1.45.5        Ethernet0/0.45