ipv6 address-policy
Function
The ipv6 address-policy command configures address selection policies.
The undo ipv6 address-policy command deletes address selection policies.
By default, the system has only default address selection policy entries. These entries are prefixed with ::1, ::, 2002::, FC00::, and ::FFFF:0.0.0.0.
Format
ipv6 address-policy ipv6-address prefix-length precedence label
undo ipv6 address-policy ipv6-address prefix-length
Parameters
Parameter | Description | Value |
---|---|---|
ipv6-address | Specifies an IPv6 address. | The value consists of 128 octets, which are classified into 8 groups. Each group contains 4 hexadecimal numbers in the format X:X:X:X:X:X:X:X. |
prefix-length | Specifies the prefix length of an IPv6 address. | The value is an integer that ranges from 0 to 128. |
precedence | Specifies the priority of an IPv6 address when the address is used as a destination address. | The value is an integer that ranges from 0 to 4294967295. |
label | Specifies the priority of an IPv6 address when the address is used as a source address. | The value is an integer that ranges from 0 to 4294967295. |
Usage Guidelines
Usage Scenario
When source and destination addresses need to be specified and planned, you can use this command to define a group of policies for selecting addresses. These address selection policies form a policy table. This table is similar to a routing table, allowing you to perform a longest match lookup on address selection policy. An address is selected based on the source and destination addresses.
- A source address is selected based on the label parameter. The address whose label value is the same as the label value of the destination address is preferred as the source address.
- A destination address is selected based on the label and precedence parameters. If label values of the candidate addresses are the same, the address with the largest precedence value is preferred as the destination address.
Precautions
The system supports a maximum of 50 address selection policy entries.
The default policy entries are those prefixed with ::1, ::, 2002::, FC00::, and ::FFFF:0.0.0.0.
Default policy entries cannot be created using a command.