ip prefix-list


ip prefix-list <PREFIX-LIST-NAME> [seq <SEQ>] {ip | ipv6} <IP-PREFIX/MASK> [ge <0-128>] [le <0-128>]

no ip prefix-list <PREFIX-LIST-NAME> [seq <SEQ>] {ip | ipv6} <IP-PREFIX/MASK> [ge <0-128>] [le <0-128>]


Configures a prefix list to match a set of prefixes. Prefix lists are named lists of route prefixes. They are used to match routes for inclusion in or exclusion from route policies. The sequence number determines the order of matching. The matches are performed starting from the lowest sequence number to the highest sequence number until there is a match. The sequence number is however optional and is autogenerated whenever it is not explicitly mentioned. All prefixes with the same prefix list name are grouped.

The autogenerated sequence number is derived by adding 10 to the highest sequence number available. This technique makes it possible to insert new prefix list sequence number in between.

The ge and le parameters are used to combine prefixes with a range of network mask. For example, ge 16 le 24 will match all prefixes within the network that have a mask greater than or equal to 16 bits and less than or equal to 24 bits in length. For instance, would match, because its length is between 16 and 24 but or would not match.

The no form of this command removes the prefix list configuration.

Command context




Specifies the name of the prefix list.

seq <SEQ>

Specifies the order of reference of the prefix rules.

{permit | deny}

Specifies whether the route is available for further processing when there is a match.


Specifies the IP prefix or mask.

ge <0-32>

Specifies the minimum prefix length to be matched.

le <0-32>

Specifies the maximum prefix length to be matched.




Configuring a prefix list with sequence numbering:

switch(config)# ip prefix-list PFXLST seq 5 permit ge 9 le 12

Configuring a prefix list without sequence numbering:

switch(config)# ip prefix-list PSXLST permit