ip prefix-list

Configures an IP prefix list instance.

Syntax

ip prefix-list name seq sequence-number { deny ip-prefix/prefix-length | permit ip-prefix/prefix-length } [ ge ge-value ] [ le le-value ]
no ip prefix-list name

Parameters

name
Permitted values are between 1 and 32 characters. Although the first character must be alphabetic, the others can be alphanumeric, underscores (_) or minus signs (-).
deny ip-prefix/prefix-length
Denies a route specified in the prefix list. The prefix list matches only on the specified prefix and prefix length, unless you use the ge ge-value or le le-value parameters.
permit ip-prefix/prefix-length
Permits a route specified in the prefix list. The prefix list matches only on the specified prefix and prefix length, unless you use the ge ge-value or le le-value parameters.
ge ge-value
Specifies the minimum prefix length to be match. The range is from ge-value to 32.
le le-value
Specifies the maximum prefix length to be matched. The range is from the le-value to the prefix-length parameter.
seq sequence-number
Specifies an IPv4 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

Enter no ip prefix-list name to disable this feature.

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

If you do not specify le-value ge ge-value or le le-value , the prefix list matches only on the exact prefix you specify with the ip-prefix/prefix-length parameter.

Examples

This example denies routes on 1.2.0.0/8, where the subnet mask length must be greater than or equal to 20 and less than or equal to 28, and permits routes on 10.1.0.0/16. A name is also assigned to this configuration.

device# config
device(config)#
device(config)# ip prefix-list test deny 10.2.0.0/8 ge 20 le 28 description deny-internal-ip-range
device(config)# ip prefix-list test permit 10.1.0.0/16 description allow-internal-ip-range