Command:

ip prefix-list


Mode:

Router(config)#


Syntax:

 

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

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


Syntax Description:

 

list-name

The name of the prefix list.

seq

(Optional) Applies the sequence number to the prefix list entry being created or deleted.

seq-value

(Optional) Specifies the sequence number for the prefix list entry.

deny

Denies access for a matching condition.

permit

Allows access for a matching condition.

network/length

(Mandatory) The network parameter specifies the network number. The / is typed followed by the number of set bits in the network mask. An example is 192.168.10.0/24.

 ge 

(Optional) Applies the value specified in the ge-value to the prefix list as the minimum prefix length to be matched. For example, the command ip prefix-list Test deny 192.0.0.0/8 ge 25 denies routes that have 192 in the first octet of the network number and a mask greater than or equal to 25 bits.

ge-value

(Optional) Specifies the minimum number of mask bits that must be matched. 

 le

(Optional) Applies the value specified in the le-value to the prefix list. For example, the command ip prefix-list Test permit 192.0.0.0/8 le 24 accepts routes that have 192 in the first octet of the network number and a mask length up to 24 bits. Note that the ge ge-value and le le-value parameters can be combined. For example, ip prefix-list ABC permit 0.0.0.0/0 ge 8 le 24 permits mask lengths from eight to 24 bits in all address space.

le-value

(Optional) Specifies the maximum number of mask bits that must be matched. 


Command Description:

 

A prefix list is used to filter routing updates. Prefix lists are more efficient and easier to manage than distribution lists because lines can be added or deleted to form a prefix list without having to recreate the list. An implicit deny all is at the end of every prefix list. The first match in the prefix list is used and the rest of the prefix list is ignored. An empty prefix list permits all prefixes. The router always begins the filtering starting at the top of the prefix list with the lower sequence number. Sequence numbers are automatically generated by default. Prefix lists are applied to specific BGP neighbors using the neighbor prefix-list command.

Example:

Router(config)#ip prefix-list abc permit 192.0.0.0/8 le 24


Misconceptions:

 

Some people believe that distribution lists are easier than prefix lists. Advantages include (1) improved performance when loading and route lookup large lists and (2) support for incremental updates and greater flexibility. A prefix list can be changed by adding or deleting specific portions without having to recreate the entire list. The IOS tracks how many times a specific prefix list entry is considered a match. To clear the hit count table of prefix list entries, use the clear ip prefix-list EXEC command.


Related Commands:

 

neighbor prefix-list

 

show ip prefix-list

 

distribute-list

 


� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)