debugging dhcp snooping

Function

The debugging dhcp snooping command enables DHCP snooping debugging functions.

The undo debugging dhcp snooping command disables DHCP snooping debugging functions.

By default, the DHCP snooping debugging functions are disabled.

Format

debugging dhcp snooping packet [ mac-address macaddress | ip-address ipaddress | interface { interface-type interface-num | interface-name } ]

debugging dhcp snooping { all | error | event | packet } [ vlan vlan-id [ interface { interface-type interface-num | interface-name } ] | interface { interface-type interface-num | interface-name } ]

undo debugging dhcp snooping { all | error | event | packet }

Parameters

Parameter Description Value
mac-address macaddress

Specifies a MAC address. If this parameter is specified, the device displays the MAC address related debugging information.

The value is a 12-digit hexadecimal number, in the format of H-H-H. Each H is 4 digits.

If an H contains fewer than 4 digits, the left-most digits are padded with zeros.

For example, e0 is displayed as 00e0. The MAC address cannot be set to FFFF-FFFF-FFFF.

ip-address ipaddress

Specifies an IP address. If this parameter is specified, the device displays the IP address related debugging information.

The value is in dotted decimal notation.

interface interface-type interface-num

Specifies the type and number of an interface. If this parameter is specified, the device displays the interface related debugging information.

-

interface interface-name

Specifies the name of an interface. If this parameter is specified, the device displays the interface related debugging information.

-

all

Enables all DHCP snooping debugging functions, including the error debugging, event debugging, and packet debugging.

-

error

Enables the debugging of errors.

-

event

Enables the debugging of events.

-

packet

Enables the debugging of packets.

-

vlan vlan-id

Specifies a VLAN ID.

The value is an integer ranging from 1 to 4094.

Views

User view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
dhcp debug

Usage Guidelines

Usage Scenario

If you want to learn DHCP debugging information, run the debugging dhcp snooping command to enable the DHCP snooping debugging functions. All DHCP snooping debugging functions include the error debugging, event debugging, and packet debugging. You can enable specified debugging functions based on MAC addresses, IP addresses, and interfaces.

Example

# Enable all DHCP snooping debugging functions. The processing information about DHCP discover packets is shown as follows:
<HUAWEI> debugging dhcp snooping all
Dec  4 2012 17:01:58.326 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
DHCP Snooping process.
DHCP REQUEST, MSGTYPE: DISCOVER, Chaddr: 00e0-fc01-0101, on IfIndex 8
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Dec  4 2012 17:01:58.326 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
Receive packet before EUM process.
DHCP REQUEST, MSGTYPE: DISCOVER, Chaddr: 00e0-fc01-0101, on IfIndex 8
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Dec  4 2012 17:01:58.326 HUAWEI %%01DHCP/7/DHCPSNP_DBG_EVENT(d):CID=0x8053042e;
--- Process dhcp discover ---
DHCP REQUEST, MSGTYPE: DISCOVER, Chaddr: 00e0-fc01-0101, on IfIndex 8
Dec  4 2012 17:01:58.326 HUAWEI %%01DHCP/7/DHCPSNP_DBG_EVENT(d):CID=0x8053042e;
DHCP Snooping protocol process ends with pause.
Dec  4 2012 17:01:58.326 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
DHCP Snooping process.
DHCP REQUEST, MSGTYPE: DISCOVER, Chaddr: 00e0-fc01-0101, on IfIndex 8
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Dec  4 2012 17:01:58.326 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
Receive packet after EUM process.
DHCP REQUEST, MSGTYPE: DISCOVER, Chaddr: 00e0-fc01-0101, on IfIndex 8
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Dec  4 2012 17:01:58.326 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
Send packet by trust port.
DHCP REQUEST, MSGTYPE: DISCOVER, Chaddr: 00e0-fc01-0101, on IfIndex 8
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Dec  4 2012 17:01:58.326 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
DHCP Snooping process.
DHCP REPLY, MSGTYPE: OFFER, Chaddr: 00e0-fc01-0101, on IfIndex 17
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Dec  4 2012 17:01:58.326 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
Receive packet before EUM process.
DHCP REPLY, MSGTYPE: OFFER, Chaddr: 00e0-fc01-0101, on IfIndex 17
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Dec  4 2012 17:01:58.326 HUAWEI %%01DHCP/7/DHCPSNP_DBG_EVENT(d):CID=0x8053042e;
--- Process dhcp offer ---
DHCP REPLY, MSGTYPE: OFFER, Chaddr: 00e0-fc01-0101, on IfIndex 17
Dec  4 2012 17:01:58.326 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
Send packet by L2If port.
DHCP REPLY, MSGTYPE: OFFER, Chaddr: 00e0-fc01-0101, on IfIndex 17
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Dec  4 2012 17:01:58.326 HUAWEI %%01DHCP/7/DHCPSNP_DBG_EVENT(d):CID=0x8053042e;
DHCP Snooping protocol process ends with stop.
Dec  4 2012 17:01:58.336 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
DHCP Snooping process.
DHCP REQUEST, MSGTYPE: REQUEST, Chaddr: 00e0-fc01-0101, on IfIndex 8
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Dec  4 2012 17:01:58.336 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
Receive packet before EUM process.
DHCP REQUEST, MSGTYPE: REQUEST, Chaddr: 00e0-fc01-0101, on IfIndex 8
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Dec  4 2012 17:01:58.336 HUAWEI %%01DHCP/7/DHCPSNP_DBG_EVENT(d):CID=0x8053042e;
--- Process dhcp request ---
DHCP REQUEST, MSGTYPE: REQUEST, Chaddr: 00e0-fc01-0101, on IfIndex 8
Dec  4 2012 17:01:58.336 HUAWEI %%01DHCP/7/DHCPSNP_DBG_EVENT(d):CID=0x8053042e;
Request: Get tmp user info successfully.
DHCP REQUEST, MSGTYPE: REQUEST, Chaddr: 00e0-fc01-0101, on IfIndex 8
Dec  4 2012 17:01:58.336 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
Send packet by trust port.
DHCP REQUEST, MSGTYPE: REQUEST, Chaddr: 00e0-fc01-0101, on IfIndex 8
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Dec  4 2012 17:01:58.376 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
DHCP Snooping process.
DHCP REPLY, MSGTYPE: ACK, Chaddr: 00e0-fc01-0101, on IfIndex 17
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Dec  4 2012 17:01:58.376 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
Receive packet before EUM process.
DHCP REPLY, MSGTYPE: ACK, Chaddr: 00e0-fc01-0101, on IfIndex 17
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Dec  4 2012 17:01:58.376 HUAWEI %%01DHCP/7/DHCPSNP_DBG_EVENT(d):CID=0x8053042e;
--- Process dhcp ack ---
DHCP REPLY, MSGTYPE: ACK, Chaddr: 00e0-fc01-0101, on IfIndex 17
Dec  4 2012 17:01:58.376 HUAWEI %%01DHCP/7/DHCPSNP_DBG_EVENT(d):CID=0x8053042e;
Ack: Update local user info successfully.
DHCP REPLY, MSGTYPE: ACK, Chaddr: 00e0-fc01-0101, on IfIndex 17
Dec  4 2012 17:01:58.376 HUAWEI %%01DHCP/7/DHCPSNP_DBG_EVENT(d):CID=0x8053042e;
DHCP Snooping protocol process ends with pause.
Dec  4 2012 17:01:58.376 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
DHCP Snooping process.
DHCP REPLY, MSGTYPE: ACK, Chaddr: 00e0-fc01-0101, on IfIndex 17
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Dec  4 2012 17:01:58.376 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
Receive packet after EUM process.
DHCP REPLY, MSGTYPE: ACK, Chaddr: 00e0-fc01-0101, on IfIndex 17
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Dec  4 2012 17:01:58.376 HUAWEI %%01DHCP/7/DHCPSNP_DBG_PACKET(d):CID=0x8053042e;
Send packet by L2If port.
DHCP REPLY, MSGTYPE: ACK, Chaddr: 00e0-fc01-0101, on IfIndex 17
Ciaddr: 0.0.0.0, Yiaddr: 10.177.248.238, Giaddr: 0.0.0.0, Siaddr: 0.0.0.0
Htype: 1, Hlen: 6, Hops: 0, Xid: 0x0, Flag: 0x8000
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.