Thursday, March 31, 2011

The 'debug ip ospf packet' Privileged Command

The debug ip ospf packet privileged command displays information about every OSPF packet that is received by the router, eg: OSPF version, OSPF packet type, packet length, router ID, area ID, authentication type, and authentication key.

The output of the command varies slightly depending upon the configured authentication method.

Field Description
v OSPF version
t OSPF packet type
1 – Hello
2 – Database Description
3 – Link State Request
4 – Link State Update
5 – Link State Acknowledge
l OSPF packet length in bytes
rid OSPF router ID
aid OSPF area ID
chk OSPF checksum
aut OSPF authentication type
0 – No authentication
1 – Simple password
2 – MD5
auk OSPF authentication key
keyid MD5 key ID
seq Sequence number

When null authentication is used:
Router#debug ip ospf packet
OSPF packet debugging is on
Router#
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#router ospf 100
Router(config-router)#network 0.0.0.0 255.255.255.255 area 0
Router(config-router)#end
Router#
00:01:40: OSPF: rcv. v:2 t:1 l:48 rid:10.10.10.2
      aid:0.0.0.0 chk:2D9 aut:0 auk: from FastEthernet0/0
00:01:40: OSPF: rcv. v:2 t:2 l:32 rid:10.10.10.2
      aid:0.0.0.0 chk:6FFC aut:0 auk: from FastEthernet0/0
00:01:40: OSPF: rcv. v:2 t:2 l:52 rid:10.10.10.2
      aid:0.0.0.0 chk:A64 aut:0 auk: from FastEthernet0/0
00:01:40: OSPF: rcv. v:2 t:2 l:32 rid:10.10.10.2
      aid:0.0.0.0 chk:7000 aut:0 auk: from FastEthernet0/0
00:01:40: OSPF: rcv. v:2 t:3 l:36 rid:10.10.10.2
      aid:0.0.0.0 chk:C1B5 aut:0 auk: from FastEthernet0/0
00:01:40: OSPF: rcv. v:2 t:4 l:88 rid:10.10.10.2
      aid:0.0.0.0 chk:F940 aut:0 auk: from FastEthernet0/0
00:01:40: %OSPF-5-ADJCHG: Process 100, Nbr 10.10.10.2 on FastEthernet0/0 from LOADING to FULL, Loading Done
00:01:41: OSPF: rcv. v:2 t:4 l:88 rid:10.10.10.2
      aid:0.0.0.0 chk:98E6 aut:0 auk: from FastEthernet0/0
00:01:41: OSPF: rcv. v:2 t:4 l:60 rid:10.10.10.2
      aid:0.0.0.0 chk:FC9E aut:0 auk: from FastEthernet0/0
00:01:43: OSPF: rcv. v:2 t:5 l:44 rid:10.10.10.2
      aid:0.0.0.0 chk:936A aut:0 auk: from FastEthernet0/0
00:01:46: OSPF: rcv. v:2 t:4 l:88 rid:10.10.10.2
      aid:0.0.0.0 chk:98E2 aut:0 auk: from FastEthernet0/0
00:01:48: OSPF: rcv. v:2 t:5 l:44 rid:10.10.10.2
      aid:0.0.0.0 chk:1B4F aut:0 auk: from FastEthernet0/0
00:01:50: OSPF: rcv. v:2 t:1 l:48 rid:10.10.10.2
      aid:0.0.0.0 chk:412F aut:0 auk: from FastEthernet0/0
00:02:00: OSPF: rcv. v:2 t:1 l:48 rid:10.10.10.2
      aid:0.0.0.0 chk:412F aut:0 auk: from FastEthernet0/0
00:02:10: OSPF: rcv. v:2 t:1 l:48 rid:10.10.10.2
      aid:0.0.0.0 chk:412F aut:0 auk: from FastEthernet0/0
Router#

When simple authentication is used:
RT1#debug ip ospf packet
OSPF packet debugging is on
RT1#
RT1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RT1(config)#int fa0/0
RT1(config-if)#ip ospf authentication
RT1(config-if)#ip ospf authentication-key cisco123
RT1(config-if)#
RT1(config-if)#router ospf 100
RT1(config-router)#network 0.0.0.0 255.255.255.255 area 0
RT1(config-router)#end
RT1#
00:02:59: OSPF: rcv. v:2 t:1 l:48 rid:10.10.10.2
      aid:0.0.0.0 chk:2D8 aut:1 auk: from FastEthernet0/0
00:02:59: OSPF: rcv. v:2 t:2 l:32 rid:10.10.10.2
      aid:0.0.0.0 chk:7999 aut:1 auk: from FastEthernet0/0
00:02:59: OSPF: rcv. v:2 t:2 l:52 rid:10.10.10.2
      aid:0.0.0.0 chk:13A7 aut:1 auk: from FastEthernet0/0
00:02:59: OSPF: rcv. v:2 t:2 l:32 rid:10.10.10.2
      aid:0.0.0.0 chk:799D aut:1 auk: from FastEthernet0/0
00:02:59: OSPF: rcv. v:2 t:3 l:36 rid:10.10.10.2
      aid:0.0.0.0 chk:C1B4 aut:1 auk: from FastEthernet0/0
00:02:59: OSPF: rcv. v:2 t:4 l:88 rid:10.10.10.2
      aid:0.0.0.0 chk:F8E5 aut:1 auk: from FastEthernet0/0
00:02:59: %OSPF-5-ADJCHG: Process 100, Nbr 10.10.10.2 on FastEthernet0/0 from LOADING to FULL, Loading Done
00:03:00: OSPF: rcv. v:2 t:4 l:88 rid:10.10.10.2
      aid:0.0.0.0 chk:98E5 aut:1 auk: from FastEthernet0/0
00:03:00: OSPF: rcv. v:2 t:4 l:60 rid:10.10.10.2
      aid:0.0.0.0 chk:FC9D aut:1 auk: from FastEthernet0/0
00:03:02: OSPF: rcv. v:2 t:5 l:44 rid:10.10.10.2
      aid:0.0.0.0 chk:9366 aut:1 auk: from FastEthernet0/0
00:03:05: OSPF: rcv. v:2 t:4 l:88 rid:10.10.10.2
      aid:0.0.0.0 chk:98E1 aut:1 auk: from FastEthernet0/0
00:03:07: OSPF: rcv. v:2 t:5 l:44 rid:10.10.10.2
      aid:0.0.0.0 chk:1B4E aut:1 auk: from FastEthernet0/0
00:03:09: OSPF: rcv. v:2 t:1 l:48 rid:10.10.10.2
      aid:0.0.0.0 chk:412E aut:1 auk: from FastEthernet0/0
00:03:19: OSPF: rcv. v:2 t:1 l:48 rid:10.10.10.2
      aid:0.0.0.0 chk:412E aut:1 auk: from FastEthernet0/0
00:03:29: OSPF: rcv. v:2 t:1 l:48 rid:10.10.10.2
      aid:0.0.0.0 chk:412E aut:1 auk: from FastEthernet0/0
RT1#

When MD5 authentication is used:
RT1#debug ip ospf packet
OSPF packet debugging is on
RT1#
RT1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RT1(config)#int fa0/0
RT1(config-if)#ip ospf authentication message-digest
RT1(config-if)#ip ospf message-digest-key 1 md5 cisco123
RT1(config-if)#
RT1(config-if)#router ospf 100
RT1(config-router)#network 0.0.0.0 255.255.255.255 area 0
RT1(config-router)#end
RT1#
00:01:26: OSPF: rcv. v:2 t:1 l:48 rid:10.10.10.2
      aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x2B915254 from FastEthernet0/0
00:01:26: OSPF: rcv. v:2 t:2 l:32 rid:10.10.10.2
      aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x2B915254 from FastEthernet0/0
00:01:26: OSPF: rcv. v:2 t:2 l:52 rid:10.10.10.2
      aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x2B915254 from FastEthernet0/0
00:01:26: OSPF: rcv. v:2 t:2 l:32 rid:10.10.10.2
      aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x2B915254 from FastEthernet0/0
00:01:26: OSPF: rcv. v:2 t:3 l:36 rid:10.10.10.2
      aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x2B915254 from FastEthernet0/0
00:01:27: OSPF: rcv. v:2 t:4 l:88 rid:10.10.10.2
      aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x2B915254 from FastEthernet0/0
00:01:27: %OSPF-5-ADJCHG: Process 100, Nbr 10.10.10.2 on FastEthernet0/0 from LOADING to FULL, Loading Done
00:01:27: OSPF: rcv. v:2 t:4 l:88 rid:10.10.10.2
      aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x2B915255 from FastEthernet0/0
00:01:27: OSPF: rcv. v:2 t:4 l:60 rid:10.10.10.2
      aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x2B915255 from FastEthernet0/0
00:01:29: OSPF: rcv. v:2 t:5 l:44 rid:10.10.10.2
      aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x2B915257 from FastEthernet0/0
00:01:32: OSPF: rcv. v:2 t:4 l:88 rid:10.10.10.2
      aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x2B915259 from FastEthernet0/0
00:01:34: OSPF: rcv. v:2 t:5 l:44 rid:10.10.10.2
      aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x2B91525C from FastEthernet0/0
00:01:36: OSPF: rcv. v:2 t:1 l:48 rid:10.10.10.2
      aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x2B91525E from FastEthernet0/0
00:01:46: OSPF: rcv. v:2 t:1 l:48 rid:10.10.10.2
      aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x2B915268 from FastEthernet0/0
00:01:56: OSPF: rcv. v:2 t:1 l:48 rid:10.10.10.2
      aid:0.0.0.0 chk:0 aut:2 keyid:1 seq:0x2B915271 from FastEthernet0/0
RT1#

3 comments:

  1. Thanks! I'm sure this is available elsewhere, but you presented the information here in a very clear and helpful way! Now I am in search of a command that does the same (or something similar) for OSPF packets being SENT ......

    ReplyDelete
  2. Another command: debug ip ospf adj (:

    ReplyDelete
  3. In this post you added the data how to compose a resume. This redirection is so troublesome and such sort of the diversions I to an incredible degree like. I check http://www.ukraineoutsourcingrates.com/top-outsourcing-software-development-companies-in-mykolaiv/ site to finish the majority of the stages in any case because of the tactlessness,

    ReplyDelete