ipv6 prefix-list

Configures IPv6 prefix lists for use in basic traffic filtering.
Syntax
ipv6 prefix-list {name|sequence-number }denyipv6-prefix/prefix-length[ gege-value ] [ lele-value ]
ipv6 prefix-list {name|sequence-number }descriptionstring
ipv6 prefix-list {name|sequence-number }permitipv6-prefix/prefix-length[ gege-value ] [ lele-value ]
ipv6 prefix-list {name|sequence-number }seqsequence-numberpermitipv6-prefix/prefix-length[ gege-value ] [ lele-value ]
ipv6 prefix-list {name|sequence-number }seqsequence-numberdenyipv6-prefix/prefix-length[ gege-value ] [ lele-value ]
no ipv6 prefix-listname
Command Default

A prefix-list is not created.

Parameters
name
Specifies the prefix list name.
sequence-number
Specifies an IPv6 prefix list sequence number.
denyip-prefix/prefix-length
Denies a packet that contains a route specified in the prefix list. The prefix list matches only on the specified prefix/prefix length, unless you use the gege-value or lele-value parameters.
gege-value
Specifies a minimum range of prefix lengths, from ge-value to 128.
lele-value
Specifies a maximum range of prefix lengths, up to 128, from the le-value to the prefix-length parameter.
descriptionstring
Specifies a text string describing the prefix list.
permitip-prefix/prefix-length
Permits a packet that contains a route specified in the prefix list. The prefix list matches only on the specified prefix/prefix length, unless you use the gege-value or lele-value parameters.
seqsequence-number
Specifies an IPv6 prefix list sequence number. If you do not specify a sequence number, the software numbers them in increments of 5, beginning with prefix list entry 5. The device interprets the prefix list entries in numerical order, beginning with the lowest sequence number.
Modes

Global configuration mode

Usage Guidelines

An IPv6 prefix list is composed of one or more conditional statements that execute a permit or deny action if a packet matches a specified prefix. In prefix lists with multiple statements, you can specify a sequence number for each statement. The specified sequence number determines the order in which the statement appears in the prefix.

You can configure an IPv6 prefix list on a global basis, then use it as input to other commands or processes, such as route aggregation, route redistribution, route distribution, route maps, and so on. When a device interface sends or receives an IPv6 packet, it applies the statements within the IPv6 prefix list in their order of appearance to the packet. As soon as a match occurs, the device takes the specified action (permit or deny the packet) and stops further comparison for that packet.

You can use permit statements in the prefix list to specify the traffic that you want to send to the other feature. If you use deny statements, the traffic specified by the deny statements is not supplied to the other feature. You can configure up to one hundred IPv6 prefix lists.

You must specify the ipv6-prefix parameter in hexadecimal using 16-bit values between colons as documented in RFC 4291. You must specify the prefix-length parameter as a decimal value. A slash mark (/) must follow the ipv6-prefix parameter and precede the prefix-length parameter.

The ge-value or le-value you specify must meet the following condition for prefix-length:

ge-value <= le-value <= 128

If you do not specify gege-value or lele-value, the prefix list matches only on the exact prefix you specify with the ipv6-prefix/prefix-length parameter.

Prefix lists can be applied to RIPng globally using the separate prefix-list command) or at the interface level using the separate ipv6 rip prefix-list command. If both global IPv6 RIP prefix list and interface IPv6 rip prefix list are enabled, routes are filtered based on the interface prefix list.

The no form of the command deletes a prefix list.

Examples

The following example creates a prefix-list that allows routes with the prefix 2001:db8::/32 to be included in RIPng routing updates sent from Ethernet interface 3/1/1.

device# configure terminal
device(config)# ipv6 prefix-list routesfor2001 permit 2001:db8::/32
device(config) # interface ethernet 3/1/1
device(config-if-e1000-3/1/1)# ipv6 rip prefix-list routesfor2001 out

The following example creates a prefix-list that allows routes with the prefix 2001:db8::/32 to be included in RIPng routing updates sent from all the IPv6 RIP interfaces on the device.

device# configure terminal
device(config)# ipv6 prefix-list routesfor2001 permit 2001:db8::/32
device(config)# ipv6 router rip
device(config-ripng-router)# distribute-list prefix-list routesfor2001 out