H3C S6812 Series Command Reference Manual page 942

Hide thumbs Also See for S6812 Series:
Table of Contents

Advertisement

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 the DHCPv6 user class exam to match DHCPv6 requests that contain
Option 16.
<Sysname> system-view
[Sysname] ipv6 dhcp class exam
[Sysname-dhcp6-class-exam] if-match rule 1 option 16
# Configure match rule 2 for the DHCPv6 user class exam. The rule matches DHCPv6 requests in
which the highest bit of the fourth byte in Option 16 is the hexadecimal number 1.
<Sysname> system-view
[Sysname] ipv6 dhcp class exam
[Sysname-dhcp6-class-exam] if-match rule 2 option 16 hex 00000080 mask 00000080
# Configure match rule 3 for the DHCPv6 user class exam. The rule matches DHCPv6 requests in
which the first three bytes of Option 16 are the hexadecimal number 13ae92.
<Sysname> system-view
[Sysname] ipv6 dhcp class exam
[Sysname-dhcp6-class-exam] if-match rule 3 option 16 hex 13ae92 offset 0 length 3
# Configure match rule 4 for the DHCPv6 user class exam. The rule matches DHCPv6 requests in
which the Option 16 contains the hexadecimal number 13ae.
<Sysname> system-view
[Sysname] ipv6 dhcp class exam
[Sysname-dhcp6-class-exam] if-match rule 5 option 16 hex 13ae partial
# Configure match rule 5 for the DHCPv6 user class exam to match DHCPv6 requests in which the
link-address field is 2001::1.
<Sysname> system-view
[Sysname] ipv6 dhcp class exam
[Sysname-dhcp6-class-exam] if-match rule 5 relay-agent 2001::1
Related commands
ipv6 dhcp class
ipv6 dhcp apply-policy
Use ipv6 dhcp apply-policy to apply a DHCPv6 policy to an interface.
Use undo ipv6 dhcp apply-policy to restore the default.
Syntax
ipv6 dhcp apply-policy policy-name
undo ipv6 dhcp apply-policy
24

Advertisement

Table of Contents
loading

This manual is also suitable for:

S6813 seriesS5150-ei

Table of Contents