Related Commands; If-Match; Syntax; Default - H3C S6812 Series Command Reference Manual

Hide thumbs Also See for S6812 Series:
Table of Contents

Advertisement

[Sysname-dhcp-pool-0] gateway-list 10.1.1.1

Related commands

display dhcp server pool

if-match

Use if-match to configure a match rule for a DHCP user class.
Use undo if-match to delete a match rule for a DHCP user class.

Syntax

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 }
undo if-match rule rule-number

Default

No match rules are configured for the DHCP user class.

Views

DHCP user class view

Predefined user roles

network-admin

Parameters

rule rule-number: Assigns the match rule an ID in the range of 1 to 16. A smaller ID represents a
higher match priority.
hardware-address hardware-address: Specifies a hardware address, a string of 4 to 39 characters.
The string contains 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-ccdd-ee is valid, and aabb-c-dddd or aabb-cc-dddd is invalid.
mask hardware-address-mask: Specifies the mask to be ANDed with the specified hardware
address for the match operation. The length of the mask must be the same as that of the hardware
address.
option option-code: Specifies a DHCP option by its number in the range of 1 to 254.
ascii ascii-string: Specifies an ASCII string of 1 to 128 characters.
offset offset: Specifies the offset in bytes after which the match operation starts. The value range is
0 to 254. If you specify an ASCII string, a packet matches the rule if the option content after the offset
is the same as the ASCII string. If you specify a hexadecimal number, a packet matches the rule if
the option content of the specified length after the offset is the same as the hexadecimal number.
partial: Enables partial match. A packet matches a rule if the specified option in the packet contains
the ASCII string or hexadecimal number specified in the rule. For example, if you specify abc in the
rule, option content xabc, xyzabca, xabcyz, and abcxyz all match the rule.
hex hex-string: Specifies a hexadecimal number. The length of the hexadecimal number must be an
even number in the range of 2 to 256.
mask mask: Specifies a hexadecimal mask for the match operation. The mask length must be an
even number in the range of 2 to 256 and be the same as the hex-string length. The DHCP server
selects option content of the mask length from the start and ANDs the selected option content and
the specified hexadecimal number with the mask. The packet matches the rule if the two AND
operation results are the same.
35

Advertisement

Table of Contents
loading

This manual is also suitable for:

S6813 seriesS5150-ei

Table of Contents