Debug IP Packet Command on CISCO Router/Switch

Command

Debug IP Packet

Use

This command enables IP packet debugging messages. The debugging shows all IP information being processed by the router. You can also use an access-list to limit the debug output.

Syntax

Router#debug ip packet
OR
Router#debug ip packet <access-list>

Example

In the below example, we enable IP packet debugging on R2.

R2#debug ip packet
IP packet debugging is on
R2#
*Mar 1 01:06:02.083: IP: s=10.1.1.2 (local), d=224.0.0.10 (FastEthernet0/0), len 60, sending broad/multicast
*Mar 1 01:06:02.963: IP: s=10.1.1.1 (FastEthernet0/0), d=224.0.0.10, len 60, rcvd 2
R2#
*Mar 1 01:06:04.279: IP: s=10.1.1.1 (FastEthernet0/0), d=224.0.0.9, len 92, rcvd 2
R2#
*Mar 1 01:06:06.643: IP: s=10.1.1.2 (local), d=224.0.0.10 (FastEthernet0/0), len 60, sending broad/multicast
*Mar 1 01:06:07.055: IP: s=10.2.2.2 (local), d=224.0.0.5 (FastEthernet1/0), len 80, sending broad/multicast
R2#
*Mar 1 01:06:07.747: IP: s=10.1.1.1 (FastEthernet0/0), d=224.0.0.10, len 60, rcvd 2
*Mar 1 01:06:08.147: IP: s=10.2.2.3 (FastEthernet1/0), d=224.0.0.5, len 80, rcvd 0
R2#
*Mar 1 01:06:11.503: IP: s=10.1.1.2 (local), d=224.0.0.10 (FastEthernet0/0), len 60, sending broad/multicast
*Mar 1 01:06:12.043: IP: s=10.2.2.2 (local), d=224.0.0.9 (FastEthernet1/0), len 132, sending broad/multicast
*Mar 1 01:06:12.131: IP: s=10.1.1.1 (FastEthernet0/0), d=224.0.0.10, len 60, rcvd 2
R2#
*Mar 1 01:06:16.415: IP: s=10.1.1.2 (local), d=224.0.0.10 (FastEthernet0/0), len 60, sending broad/multicast
*Mar 1 01:06:16.951: IP: s=10.1.1.1 (FastEthernet0/0), d=224.0.0.10, len 60, rcvd 2
*Mar 1 01:06:17.059: IP: s=10.2.2.2 (local), d=224.0.0.5 (FastEthernet1/0), len 80, sending broad/multicast
R2#
*Mar 1 01:06:17.607: IP: s=2.2.2.2 (local), d=224.0.0.9 (Loopback0), len 132, sending broad/multicast
*Mar 1 01:06:17.615: IP: s=2.2.2.2 (Loopback0), d=224.0.0.9, len 132, rcvd 2
*Mar 1 01:06:18.147: IP: s=10.2.2.3 (FastEthernet1/0), d=224.0.0.5, len 80, rcvd 0
R2#
*Mar 1 01:06:21.199: IP: s=10.1.1.2 (local), d=224.0.0.10 (FastEthernet0/0), len 60, sending broad/multicast
*Mar 1 01:06:21.907: IP: s=10.1.1.1 (FastEthernet0/0), d=224.0.0.10, len 60, rcvd 2
R2#
*Mar 1 01:06:24.975: IP: tableid=0, s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2 (Loopback0), routed via RIB
*Mar 1 01:06:24.979: IP: s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2, len 100, rcvd 4
*Mar 1 01:06:24.983: IP: tableid=0, s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), routed via FIB
*Mar 1 01:06:24.987: IP: s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), len 100, sending
*Mar 1 01:06:25.031: IP: tableid=0, s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2 (Loopback0), routed via RIB
*Mar 1 01:06:25.035: IP: s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2, len 100, rcvd 4
*Mar 1 01:06:25.039: IP: tableid=0, s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), routed via FIB
*Mar 1 01:06:25.039: IP: s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), len 100, sending
*Mar 1 01:06:25.051: IP: tableid=0, s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2 (Loopback0), routed via RIB
*Mar 1 01:06:25.051: IP: s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2, len 100, rcvd 4
*Mar 1 01:06:25.051: IP: tableid=0,
R2#s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), routed via FIB
*Mar 1 01:06:25.051: IP: s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), len 100, sending
*Mar 1 01:06:25.079: IP: tableid=0, s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2 (Loopback0), routed via RIB
*Mar 1 01:06:25.079: IP: s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2, len 100, rcvd 4
*Mar 1 01:06:25.079: IP: tableid=0, s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), routed via FIB
*Mar 1 01:06:25.079: IP: s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), len 100, sending
*Mar 1 01:06:25.079: IP: tableid=0, s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2 (Loopback0), routed via RIB
*Mar 1 01:06:25.079: IP: s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2, len 100, rcvd 4
*Mar 1 01:06:25.079: IP: tableid=0, s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), routed via FIB
*Mar 1 01:06:25.079: IP: s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), len 100, sending
*Mar 1 01:06:25.983: IP: s=10.1.1.2 (local), d=224.0.0.9 (FastEthernet
R2#0/0), len 72, sending broad/multicast
*Mar 1 01:06:26.163: IP: s=10.1.1.2 (local), d=224.0.0.10 (FastEthernet0/0), len 60, sending broad/multicast
*Mar 1 01:06:26.455: IP: s=10.1.1.1 (FastEthernet0/0), d=224.0.0.10, len 60, rcvd 2
*Mar 1 01:06:27.059: IP: s=10.2.2.2 (local), d=224.0.0.5 (FastEthernet1/0), len 80, sending broad/multicast
R2#un all
All possible debugging has been turned off

Here we use an access-list to filter the debug output.

R2(config)#access-list 155 permit icmp any any
R2(config)#do debug ip packet 155
IP packet debugging is on for access list 155
R2(config)#
*Mar 1 01:11:26.339: IP: tableid=0, s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2 (Loopback0), routed via RIB
*Mar 1 01:11:26.343: IP: s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2, len 100, rcvd 4
*Mar 1 01:11:26.347: IP: tableid=0, s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), routed via FIB
*Mar 1 01:11:26.351: IP: s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), len 100, sending
*Mar 1 01:11:26.415: IP: tableid=0, s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2 (Loopback0), routed via RIB
*Mar 1 01:11:26.419: IP: s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2, len 100, rcvd 4
*Mar 1 01:11:26.419: IP: tableid=0, s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), routed via FIB
*Mar 1 01:11:26.419: IP: s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), len 100, sending
*Mar 1 01:11:26.447: IP: tableid=0, s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2 (Loopback0), routed via RIB
*Mar 1 01:11:26.447: IP: s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2, len 100, rcvd 4
*Mar 1 01:11:26.447: IP: tableid=0,
R2(config)#s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), routed via FIB
*Mar 1 01:11:26.447: IP: s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), len 100, sending
*Mar 1 01:11:26.447: IP: tableid=0, s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2 (Loopback0), routed via RIB
*Mar 1 01:11:26.447: IP: s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2, len 100, rcvd 4
*Mar 1 01:11:26.447: IP: tableid=0, s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), routed via FIB
*Mar 1 01:11:26.447: IP: s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), len 100, sending
*Mar 1 01:11:26.447: IP: tableid=0, s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2 (Loopback0), routed via RIB
*Mar 1 01:11:26.447: IP: s=10.1.1.1 (FastEthernet0/0), d=2.2.2.2, len 100, rcvd 4
*Mar 1 01:11:26.447: IP: tableid=0, s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), routed via FIB
*Mar 1 01:11:26.447: IP: s=2.2.2.2 (local), d=10.1.1.1 (FastEthernet0/0), len 100, sending
R2(config)#

Related Articles

Leave a Reply

avatar