ipv6 prefix-list

Use ipv6 prefix-list to configure an IPv6 prefix list or an item for it.

Use undo ipv6 prefix-list to remove an IPv6 prefix list or an item.

Syntax

ipv6 prefix-list prefix-list-name [ index index-number ] { deny | permit } ipv6-address { prefix-length [ greater-equal min-prefix-length ] [ less-equal max-prefix-length ] | inverse inverse-prefix-length }

undo ipv6 prefix-list prefix-list-name [ index index-number ]

Default

No IPv6 prefix lists exist.

Views

System view

Predefined user roles

network-admin

Parameters

prefix-list-name: Specifies an IPv6 prefix list name, a case-sensitive string of 1 to 63 characters.

index index-number: Specifies an index number for an IPv6 prefix list item, in the range of 1 to 65535. An item with a smaller index number is matched first. If you do not specify this option, the index number starts from 10 and increments by 10 for each of the consecutive IPv6 prefix list items.

deny: Specifies the deny mode. If a route matches the item, the route is denied without being compared with the next item. If a route does not match the item, the route is compared with the next item.

permit: Specifies the permit mode. If a route matches the item, it passes the IPv6 prefix list. If a route does not match the item, the route is compared with the next item.

ipv6-address: Specifies an IPv6 address.

prefix-length: Specifies the IPv6 prefix length. The value range for the prefix-length argument is 0 to 128.

greater-equal min-mask-length, less-equal max-mask-length: Specifies a prefix length range. The greater-equal keyword means "greater than or equal to" and the less-equal keyword means "less than or equal to."

The prefix length range relation is mask-length <= min-mask-length <= max-mask-length <= 128.

inverse inverse-prefix-length: Matches IPv6 addresses from the least significant bit to the specified length. The value range for the inverse-prefix-length argument is 1 to 128.

Usage guidelines

An IPv6 prefix list is used to filter IPv6 addresses. An IPv6 prefix list can have multiple items, and each of them specifies a range of IPv6 prefixes. The relation between the items is logical OR. A route passing an item passes the IPv6 prefix list. A route passing no item does not pass the IPv6 prefix list.

If the ipv6-address prefix-length argument is specified as :: 0, only the default route matches.

To match all routes, configure :: 0 less-equal 128.

Examples

# Permit IPv6 addresses with a mask length between 32 bits and 64 bits.

<Sysname> system-view
[Sysname] ipv6 prefix-list abc permit :: 0 greater-equal 32 less-equal 64

# Deny IPv6 addresses with a prefix 3FFE:D00::/32 and a prefix length greater than or equal to 32 bits.

<Sysname> system-view
[Sysname] ipv6 prefix-list abc deny 3FFE:D00:: 32 less-equal 128

Related commands

display ipv6 prefix-list

reset ipv6 prefix-list