#

Sunday, July 28, 2019

Using debug ip ospf packet we can look at the parameters in OSPF packets which is receiving from a neighbor..

Reading it's output by using the codes it uses may be helpful in deep troubleshooting.

Let's see a sample debug of a one packet..







Date and time is the time which the packet is received.
OSPF-100 PAK meaning a packet which belongs to OSPF process id 100
rcv means received packet
v:2 means OSPF version is 2
t:1 means the OSPF packet type is 1
     Following are the packet types by it's number..
     1. Hello
     2. DBD (Database Discription)
     3. LSR (Link State Request)
     4. LSU (Link State Update)
     5. LSAck (Link State Ack)
l:48 means the packet length in bytes (this packet is 48 bytes)
rid:2.2.2.2 means the router-id of the packet sender
aid:0.0.0.0 means the area-id is 0
chk:4D40 is the checksum which is used to validate the packet
aut:0 means the authentication is none
         if aut:1 it means the authentication is plain text
         if aut:2 it means the authentication is MD5 digest
auk: will show some more details like the key-id and sequence if authentication is enabled
from Ethernet0/0 is the interface which the packet is received

debug ip ospf adj is used to troubleshoot neighbor adjacency issues of OSPF. It lists all the state changes a router go through when forming a neighbor relationship.

As a summary it should go through the following states.

1. Down: no OSPF neighbors detected at this moment.
2. Init: Hello packet received.
3. Two-way: own router ID found in received hello packet.
4. ExStart: master and slave roles determined.
5. Exchange: database description packets (DBD) are sent.
6. Loading: exchange of LSRs (Link state request) and LSUs (Link state update) packets.
7. Full: OSPF routers now have an adjacency.

Let's see how it is displayed on a router. Only two routers are connected for this lab with a direct cable and following configuration is applied to both routers. Note that the link is a multi access segment with a /24 subnet.

Router(config)#router ospf 100
Router(config-router)#network 192.168.12.0 0.0.0.255 area 0

R1's interface is 192.168.12.1/24 and R2's interface is 192.168.12.2/24
R1's loopback is 1.1.1.1/32 and R2's loopback is 2.2.2.2/32







(click on the images to view in full size)