HPE FlexFabric 5950 Series Command Reference Manual page 75

Hide thumbs Also See for FlexFabric 5950 Series:
Table of Contents

Advertisement

Usage guidelines
If a DHCP request sent by a DHCP client matches a rule in a DHCP user class, the DHCP client
matches the user class.
You can configure multiple match rules for a DHCP user class. Each match rule is uniquely identified
by a rule ID within its type (hardware address, option, or relay agent address).
If the rule that you are configuring has the same ID and type as an existing rule, 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 type, the
new rule takes effect and coexists with the existing rule. As a best practice, do not assign the
same ID to rules of different types.
Rules of different IDs cannot have the same rule content.
When you configure an if-match hardware-address rule, follow these guidelines:
The hardware address type supports only the MAC address. A rule does not match clients with
hardware addresses of other types.
The specified hardware address must be of the same length as the client hardware addresses
to be matched. To match MAC addresses, 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-1100 mask ffff-0000-ff00
matches hardware addresses in which the first two bytes are 0094 and the fifth byte is 11.
When you configure an if-match option rule, follow these guidelines:
To match packets that contain an option, specify only the option-code argument.
To match a hexadecimal number by AND operations, specify the option option-code hex
hex-string mask mask options.
To match a hexadecimal number directly, specify the option option-code hex hex-string [ offset
offset length length | partial ] options. If you do not specify the offset, length, or partial
parameter, a packet matches a rule if the option content starts with the hexadecimal number.
To match an ASCII string, specify the option option-code ascii ascii-string [ offset offset |
partial ] options. If you do not specify the offset or partial parameter, a packet matches a rule
if the option content starts with the ASCII string.
Examples
# Configure match rule 1 for DHCP user class exam to match DHCP requests in which the hardware
address is six bytes long and begins with 0094.
<Sysname> system-view
[Sysname] dhcp class exam
[Sysname-dhcp-class-exam] if-match rule 1 hardware-address 0094-0000-0101 mask
ffff-0000-0000
# Configure match rule 2 for DHCP user class exam to match DHCP requests that contain Option 82.
<Sysname> system-view
[Sysname] dhcp class exam
[Sysname-dhcp-class-exam] if-match rule 2 option 82
# Configure match rule 3 for DHCP user class exam. The rule matches DHCP requests in which the
highest bit of the fourth byte in Option 82 is the hexadecimal number 1.
<Sysname> system-view
[Sysname] dhcp class exam
[Sysname-dhcp-class-exam] if-match rule 3 option 82 hex 00000080 mask 00000080
# Configure match rule 4 for DHCP user class exam. The rule matches DHCP requests in which the
first three bytes of Option 82 are the hexadecimal number 13ae92.
65

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents