beautypg.com

Dhcp snooping configuration examples, Basic dhcp snooping configuration example, Network requirements – H3C Technologies H3C S5560 Series Switches User Manual

Page 92: Configuration procedure

background image

77

Task Command Remarks

Display information about the file that
stores DHCP snooping entries.

display dhcp snooping binding database

Available in any
view.

Clear DHCP snooping entries.

reset dhcp snooping binding { all | ip
ip-address [ vlan vlan-id ] }

Available in user
view.

Clear DHCP packet statistics on the
DHCP snooping device.

reset dhcp snooping packet statistics [ slot
slot-number ]

Available in user
view.

DHCP snooping configuration examples

Basic DHCP snooping configuration example

Network requirements

As shown in

Figure 28

:

Configure the port GigabitEthernet1/0/1 connected to the DHCP server as a trusted port.

Configure other ports as untrusted ports.

Enable DHCP snooping to record clients' IP-MAC bindings by reading DHCP-ACK messages

received from the trusted port and DHCP-REQUEST messages.

Figure 28 Network diagram

Configuration procedure

# Enable DHCP snooping.

system-view

[SwitchB] dhcp snooping enable

# Configure GigabitEthernet 1/0/1 as a trusted port.

[SwitchB] interface GigabitEthernet 1/0/1

[SwitchB-GigabitEthernet1/0/1] dhcp snooping trust

[SwitchB-GigabitEthernet1/0/1] quit

# Enable DHCP snooping to record clients' IP-MAC bindings on GigabitEthernet 1/0/2.

[SwitchB] interface GigabitEthernet 1/0/2

[SwitchB-GigabitEthernet1/0/2] dhcp snooping binding record

This manual is related to the following products: