54
• If no match is found, the server assigns an IP address and other parameters from the default
DHCP address pool. If no default address pool is specified or the default address pool does not
have assignable IP addresses, the address assignment fails.
For successful address assignment, make sure the applied DHCP policy and the bound address
pools exist.
To configure a DHCP policy for dynamic address assignment:
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Create a DHCP user class and
enter DHCP user class view.
dhcp class
class-name
By default, no DHCP user
class exists.
3. Configure a match rule for the
DHCP user class.
if-match rule
rule-number
{
hardware-address
hardware-address
mask
hardware-address-mask |
option
option-code [
ascii
ascii-string
[
offset
offset |
partial
] |
hex
hex-string [
mask
mask |
offset
offset
length
length |
partial
] ] |
relay-agent
gateway-address }
By default, no match rule is
configured for a DHCP user
class.
4. Return to system view.
quit
N/A
5. Create a DHCP policy and
enter DHCP policy view.
dhcp policy
policy-name
By default, no DHCP policy
exists.
6. Specify a DHCP address pool
for a DHCP user class.
class
class-name
ip-pool
pool-name
By default, no address pool is
specified for a user class.
7. Specify the default DHCP
address pool.
default ip-pool
pool-name
By default, no default address
pool is specified.
8. Return to system view.
quit
N/A
9. Enter interface view.
interface
interface-type
interface-number
N/A
10. Apply the DHCP policy to the
interface.
dhcp apply-policy
policy-name
By default, no DHCP policy is
applied to an interface.
Configuring IP address conflict detection
Before assigning an IP address, the DHCP server pings that IP address.
• If the server receives a response within the specified period, it selects and pings another IP
address.
• If it receives no response, the server continues to ping the IP address until a specific number of
ping packets are sent. If still no response is received, the server assigns the IP address to the
requesting client. The DHCP client uses gratuitous ARP to perform IP address conflict
detection.
To configure IP address conflict detection:
Step Command Remarks
1. Enter system view.
system-view
N/A
2. (Optional.) Set the maximum
number of ping packets to be
sent for conflict detection.
dhcp server ping packets
number
The default setting is one.
The value
0
disables IP address