R0106-HP MSR Router Series Layer 3 - IP Services Command Reference(V7)

51
length length: Matches the specified length of the option, in the range of 1 to 128 bytes. The specified
length must be the same as the hex-string length.
Usage guidelines
You can configure multiple match rules for a DHCP user class. Each match rule is uniquely identified by
a rule ID. Different match rules can include the same option code, but they cannot have the same
matching criteria.
The DHCP server matches DHCP requests against the match rules. A DHCP client matches a DHCP user
class when its request matches one of the specified match rules.
The match operation follows these guidelines:
If only the option-code argument is specified in the rule, packets containing the option match the
rule.
If only the option-code and hex-string arguments are specified in the rule, packets that have the
specified hex string in the specified option match the rule.
If the option-code, hex-string, offset and length arguments are specified in the rule, packets match
the rule as long as their content from offset+1 bit to offset+length bit in the specified option is the
same as the specified hex string.
If the option-code, hex-string, and mask arguments are specified in the rule, the DHCP server ANDs
the content from the first bit to the mask-1 bit in the specified option with the mask. Then the server
compares the result with the result of the AND operation between hex-string and mask. If the two
results are the same, the received packet matches the rule.
Examples
# Configure match rule 1 to match DHCP requests that contain Option 82 for DHCP user class exam.
<Sysname> system-view
[Sysname] dhcp server class exam
[Sysname-dhcp-class-exam] if-match rule 1 option 82
# Configure match rule 2 to match DHCP requests that contain Option 82. Option 82's first three bytes
are 0x13ae92 for the DHCP user class exam.
<Sysname> system-view
[Sysname] dhcp server class exam
[Sysname-dhcp-class-exam] if-match rule 2 option 82 hex 13ae92 offset 0 length 3
# Configure match rule 3 to match DHCP requests that contain Option 82. Option 82's highest bit of the
fourth byte is 1 for the DHCP user class exam.
<Sysname> system-view
[Sysname] dhcp class exam
[Sysname-dhcp-class-exam] if-match rule 3 option 82 hex 00000080 mask 00000080
Related commands
dhcp class
nbns-list
Use nbns-list to specify WINS server addresses in a DHCP address pool.
Use undo nbns-list to remove the specified WINS server addresses.
Syntax
nbns-list ip-address&<1-8>