This command enables tracing of OSPF packets received and transmitted by the switch or, optionally, a virtual router can be specified.
| Default | Disabled |
| Format | debug ospf packet [vrf vrf-name] |
| Mode | Privileged EXEC |
Sample outputs of the trace messages are shown below.
<15> JAN 02 11:03:31 10.50.50.1-2 OSPF[46300472]: ospf_debug.c(297) 25430 % Pkt RX - Intf:2/0/48 Src Ip:192.168.50.2 DestIp:224.0.0.5 AreaId:0.0.0.0 Type:HELLO NetMask:255.255.255.0 DesigRouter:0.0.0.0 Backup:0.0.0.0 <15> JAN 02 11:03:35 10.50.50.1-2 OSPF[46300472]: ospf_debug.c(293) 25431 % Pkt TX - Intf:2/0/48 Src Ip:10.50.50.1 DestIp:192.168.50.2 AreaId:0.0.0.0 Type:DB_DSCR Mtu:1500 Options:E Flags: I/M/MS Seq:126166 <15> JAN 02 11:03:36 10.50.50.1-2 OSPF[46300472]: ospf_debug.c(297) 25434 % Pkt RX - Intf:2/0/48 Src Ip:192.168.50.2 DestIp:192.168.50.1 AreaId:0.0.0.0 Type:LS_REQ Length: 1500 <15> JAN 02 11:03:36 10.50.50.1-2 OSPF[46300472]: ospf_debug.c(293) 25435 % Pkt TX - Intf:2/0/48 Src Ip:10.50.50.1 DestIp:192.168.50.2 AreaId:0.0.0.0 Type:LS_UPD Length: 1500 <15> JAN 02 11:03:37 10.50.50.1-2 OSPF[46300472]: ospf_debug.c(293) 25441 % Pkt TX - Intf:2/0/48 Src Ip:10.50.50.1 DestIp:224.0.0.6 AreaId:0.0.0.0 Type:LS_ACK Length: 1500
The following parameters are displayed in the trace message:
| Parameter | Definition |
|---|---|
| TX/RX | TX refers to a packet transmitted by the device. RX refers to packets received by the device. |
| Intf | The interface that the packet came in or went out on. Format used is unit/slot/port (internal interface number). |
| SrcIp | The source IP address in the IP header of the packet. |
| DestIp | The destination IP address in the IP header of the packet. |
| AreaId | The area ID in the OSPF header of the packet. |
| Type | Could be one of the following:
|
The remaining fields in the trace are specific to the type of OSPF Packet. HELLO packet field definitions:
| Parameter | Definition |
|---|---|
| Netmask | The netmask in the hello packet. |
| DesignRouter | Designated Router IP address. |
| Backup | Backup router IP address. |
DB_DSCR packet field definitions:
| Field | Definition |
|---|---|
| MTU | MTU |
| Options | Options in the OSPF packet. |
| Flags | Could be one or more of the following:
|
| Seq | Sequence Number of the DD packet. |
LS_REQ packet field definitions.
| Field | Definition |
|---|---|
| Length | Length of packet |
LS_UPD packet field definitions.
| Field | Definition |
|---|---|
| Length | Length of packet |
LS_ACK packet field definitions.
| Field | Definition |
|---|---|
| Length | Length of packet |