display dhcp-snooping

Syntax

display dhcp-snooping [ ip ip-address ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

ip ip-address: Displays the DHCP snooping entries corresponding to the specified IP address.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display dhcp-snooping to display DHCP snooping entries.

Only the DHCP snooping entries containing IP-to-MAC bindings that are present both in the DHCP-ACK and DHCP-REQUEST messages are displayed by using the display dhcp-snooping command.

Related commands: dhcp-snooping and reset dhcp-snooping.

Examples

# Display all DHCP snooping entries.

<Sysname> display dhcp-snooping
 DHCP Snooping is enabled.
 The client binding table for all untrusted ports.
 Type : D--Dynamic , S--Static , R--Recovering
 Type IP Address      MAC Address    Lease        VLAN SVLAN Interface
 ==== =============== ============== ============ ==== ===== =================
 D    10.1.1.1        00e0-fc00-0006 286          1    2     Ethernet1/0/1
---   1 dhcp-snooping item(s) found   ---

Table 16: Command output

Field

Description

Type

Entry type:

  • D—Dynamic.

  • S—Static. Static DHCP snooping entries are not supported.

  • R—The DHCP snooping entry is being restored through the DHCP snooping entry file, and the interface in the entry is invalid.

IP Address

IP address assigned to the DHCP client.

MAC Address

MAC address of the DHCP client.

Lease

Lease period left in seconds.

VLAN

Outer VLAN tag when DHCP snooping and QinQ are both enabled or the DHCP snooping device receives a packet with two VLAN tags, or VLAN where the port connecting the DHCP client resides.

SVLAN

Inner VLAN tag when DHCP snooping and QinQ are both enabled or the DHCP snooping device receives a packet with two VLAN tags, or N/A.

Interface

Port to which the DHCP client is connected.