Skip to content

IPv6 Prefix List

IPv6 prefix lists provide precise control over IPv6 route advertisements and acceptance by matching IPv6 prefixes based on network address and prefix length criteria. They support flexible matching conditions including exact prefix matches and prefix length ranges using greater-equal and less-equal operators, enabling complex routing policies for BGP, OSPFv3, and other IPv6 routing protocols. IPv6 prefix lists are essential for implementing routing security, controlling route propagation, and optimizing IPv6 routing table size.

Diagram
NameTypeConstraintMandatoryDefault Value
ipv6_prefix_listsList[ipv6_prefix_lists]No

ipv6_prefix_lists (iosxe.devices.configuration)

Section titled “ipv6_prefix_lists (iosxe.devices.configuration)”
NameTypeConstraintMandatoryDefault Value
nameStringRegex: ^[^\s]*$Yes
descriptionStringNo
seqsList[seqs]No

seqs (iosxe.devices.configuration.ipv6_prefix_lists)

Section titled “seqs (iosxe.devices.configuration.ipv6_prefix_lists)”
NameTypeConstraintMandatoryDefault Value
seqIntegermin: 1, max: 4294967294Yes
actionChoicedeny, permitNo
prefixStringNo
greater_equalIntegermin: 1, max: 128No
less_equalIntegermin: 1, max: 128No

By matching IPv6 prefixes and prefix lengths, IPv6 prefix lists enable granular route filtering for secure and optimized IPv6 routing policy enforcement.

The following configuration describes how to set up IPv6 prefix lists on a Cisco IOS-XE device, including entries for permitting specific IPv6 address ranges with prefix length criteria.

ipv6 prefix-list ALLOW-CORP-IPV6 description Allow corporate IPv6 prefixes
ipv6 prefix-list ALLOW-CORP-IPV6 seq 10 permit 2001:DB8::/32 ge 48 le 64
ipv6 prefix-list ALLOW-CORP-IPV6 seq 20 permit 2001:DB8:1::/48
!
ipv6 prefix-list DENY-DEFAULT-V6 description Deny IPv6 default route
ipv6 prefix-list DENY-DEFAULT-V6 seq 10 deny ::/0

The following YAML code defines multiple IPv6 prefix lists on an IOS-XE device, specifying their names, descriptions, and a series of sequences with actions, prefixes, and optional greater-equal/less-equal prefix length criteria.

iosxe:
devices:
- name: Device1
configuration:
ipv6_prefix_lists:
- name: ALLOW-CORP-IPV6
description: Allow corporate IPv6 prefixes
seqs:
- seq: 10
action: permit
prefix: "2001:DB8::/32"
greater_equal: 48
less_equal: 64
- seq: 20
action: permit
prefix: "2001:DB8:1::/48"
- name: DENY-DEFAULT-V6
description: Deny IPv6 default route
seqs:
- seq: 10
action: deny
prefix: "::/0"