HP MSR Series Command Reference Manual page 82

Layer 3 ip services command reference (v7)
Hide thumbs Also See for MSR Series:
Table of Contents

Advertisement

mask mask: Specifies the mask for the match operation, in the hex format. The mask length must be the
same as the hex-string length. The mask is used for ANDing the selected string in the option and the
specified hexadecimal string. The packet matches the rule if the two AND operation results are the same.
offset offset: Specifies the offset in bytes after which the match operation starts. The value range is 0 to
254. If you do not specify an offset, the operation starts from the first byte in the option.
length length: Specifies the length of the option content to be matched, in the range of 1 to 128 bytes.
The length must be the same as the hex-string length.
hardware-address hardware-address: Specifies a hardware address, a string of 4 to 39 characters. The
string is represented by hyphen-separated hexadecimal numbers. The last hexadecimal number can be
a two-digit or four-digit number, and the other hexadecimal numbers must be four-digit numbers. For
example, aabb-cccc-dd is correct, and aabb-c-dddd is not correct.
mask hardware-address-mask: Specifies the mask for the match operation. The length of the mask must
be the same as that of the hardware address.
Usage guidelines
You can configure multiple match rules for a DHCP user class. Each match rule is uniquely identified by
a rule ID. The DHCP server compares DHCP requests against the match rules. If a match is found, the
DHCP client matches the DHCP user class.
If the rule that you are configuring has the same ID and match type (option or hardware address) as an
existing rule, your configuration takes effect. The new rule overwrites the existing rule.
If the rule that you are configuring has the same ID as an existing rule but a different match type, your
configuration does not take effect.
When you configure an if-match option rule, follow these guidelines:
To match packets that contain an option, specify only the option code.
To match a hexadecimal string by AND operations, specify the option option-code hex hex-string
mask mask options. The match operation selects the content of the mask length from the start of the
option, and performs AND operations.
To match a hexadecimal string directly in an option, specify the option option-code hex hex-string
[ offset offset length length ] options.
When you configure an if-match hardware-address rule, follow these guidelines:
A rule applies only to clients with MAC addresses. It does not match clients with hardware
addresses of other types.
The specified hardware address must be of the same length as the client hardware address to be
matched. To match a MAC address, the specified hardware address must be six bytes long.
The fs and 0s in the mask for the hardware match operation can be noncontiguous. For example,
the rule if-match rule 1 hardware-address 0094-0000- 1 100 mask ffff-0000-ff00 matches
hardware addresses in which the first two bytes are 0094 and the fifth byte is 1 1.
Examples
# Configure match rule 1 to match DHCP requests that contain Option 82 for DHCP user class exam.
<Sysname> system-view
[Sysname] dhcp 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
68

Advertisement

Table of Contents
loading

Table of Contents