The ip ipv6-prefix command configures an IPv6 prefix list or one entry in the IPv6 prefix list.
The undo ip ipv6-prefix command deletes an IPv6 prefix list or one entry in the IPv6 prefix list.
By default, no IPv6 prefix list is configured.
ip ipv6-prefix ipv6-prefix-name [ index index-number ] matchMode ipv6-address masklen [ match-network ] [ greater-equal greater-equal-value ] [ less-equal less-equal-value ]
undo ip ipv6-prefix ipv6-prefix-name [ index index-number ]
undo ip ipv6-prefix ipv6-prefix-name ipv6-address masklen [ match-network ] [ greater-equal greater-equal-value ] [ less-equal less-equal-value ]
Parameter | Description | Value |
---|---|---|
ipv6-prefix-name |
Specifies the name of an IP prefix list. |
The name is a string of 1 to 169 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
index index-number |
Specifies the sequence number of the entry in the IPv6 prefix list. By default, the sequence number increases with a step of 10 according to the configuration order, and the first number is 10. |
The value is an integer ranging from 1 to 4294967295. |
matchMode |
Specifies the matching mode of the IP prefix list. |
The value is of the enumerated type.
|
ipv6-address |
Specifies the IPv6 prefix range in the form of an IPv6 address. If :: is specified, the address 0::0 is matched. |
The address is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
masklen |
Specifies the IPv6 prefix range using the mask length. If ::0 less-equal 128 is used, all the IPv6 addresses are matched. |
The value is an integer ranging from 0 to 128. |
match-network |
Matches network addresses. match-network is used to match routes to a specified network address and can be configured only when ipv6-address is set to::. For example, ip ipv6-prefix prefix1 permit :: 96 matches all the routes with the prefix length of 96, and ip ipv6-prefix prefix1 permit :: 96 match-network matches all the routes in the range from ::1 to ::FFFF:FFFF. |
- |
greater-equal greater-equal-value |
A mask length range can be set to match the routes with the same prefix but different masks. That is, the mask length range specified in [ greater-equal greater-equal-value ] [ less-equal less-equal-value ] can be used to match such routes. greater-equal means "greater than or equal to", and less-equal means "less than or equal to". |
The mask length range needs to be specified as maskLen <= greater-equal-value <= less-equal-value <= 128.
|
less-equal less-equal-value |
A mask length range can be set to match the routes with the same prefix but different masks. That is, the mask length range specified in [ greater-equal greater-equal-value ] [ less-equal less-equal-value ] can be used to match such routes. greater-equal means "greater than or equal to", and less-equal means "less than or equal to". |
The mask length range needs to be specified as maskLen <= greater-equal-value <= less-equal-value <= 128.
|
Usage Scenario
The ip ipv6-prefix command is used to configure an IPv6 prefix list. An IPv6 prefix can be used as a filter by various protocols or used with a route-policy.
Precautions
The IPv6 prefix lists in use cannot be deleted.
After a configuration is delivered, the device checks the validity of the parameters in the configuration and processes these parameters. After the processing, the generated configuration is the result of the AND calculation between the specified ipv6-address and prefix-length. For example, if the specified ipv6-address and prefix-length are 2001:db8::1 and 64, respectively, the generated configuration is 2001:db8:: 64. If the ipv6-address in the generated configuration is ::, the configuration matches all IPv6 addresses.<HUAWEI> system-view [~HUAWEI] ip ipv6-prefix abc deny 2001:db8:D00:: 32 less-equal 128
<HUAWEI> system-view [~HUAWEI] ip ipv6-prefix abc permit :: 0 greater-equal 32 less-equal 64