# 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
Use
undo ipv6 dhcp apply-policy
Syntax
ipv6 dhcp apply-policy policy-name
undo ipv6 dhcp apply-policy
Default
No DHCPv6 policy is applied to an interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
policy-name
characters.
Usage guidelines
You can apply only one DHCPv6 policy to an interface. If you execute this command multiple times,
the most recent configuration takes effect.
Examples
# Apply the DHCPv6 policy test to VLAN-interface 2.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] ipv6 dhcp apply-policy test
Related commands
ipv6 dhcp class
ipv6 dhcp class
Use
ipv6 dhcp class
existing DHCPv6 user class.
Use
undo ipv6 dhcp class
Syntax
ipv6 dhcp class class-name
to apply a DHCPv6 policy to an interface.
: Specifies a DHCPv6 policy by its name, a case-insensitive string of 1 to 63
to create a DHCPv6 user class and enter its view, or enter the view of an
to delete the specified DHCPv6 user class.
to restore the default.
26