Chapter 38 Configuring IP Unicast Routing

Configuring BGP

Configuring Prefix Lists for BGP Filtering

You can use prefix lists as an alternative to access lists in many BGP route filtering commands, including the neighbor distribute-listrouter configuration command. The advantages of using prefix lists include performance improvements in loading and lookup of large lists, incremental update support, easier CLI configuration, and greater flexibility.

Filtering by a prefix list involves matching the prefixes of routes with those listed in the prefix list, as when matching access lists. When there is a match, the route is used. Whether a prefix is permitted or denied is based upon these rules:

An empty prefix list permits all prefixes.

An implicit deny is assumed if a given prefix does not match any entries in a prefix list.

When multiple entries of a prefix list match a given prefix, the sequence number of a prefix list entry identifies the entry with the lowest sequence number.

By default, sequence numbers are generated automatically and incremented in units of five. If you disable the automatic generation of sequence numbers, you must specify the sequence number for each entry. You can specify sequence values in any increment. If you specify increments of one, you cannot insert additional entries into the list; if you choose very large increments, you might run out of values.

You do not need to specify a sequence number when removing a configuration entry. Show commands include the sequence numbers in their output.

Before using a prefix list in a command, you must set up the prefix list. Beginning in privileged EXEC mode, follow these steps to create a prefix list or to add an entry to a prefix list:

 

Command

Purpose

Step 1

 

 

configure terminal

Enter global configuration mode.

 

 

 

Step 2 ip prefix-list list-name[seq seq-value]deny

Create a prefix list with an optional sequence number to deny or

 

permit network/len [ge ge-value] [le le-value]

permit access for matching conditions. You must enter at least one

 

 

permit or deny clause.

 

 

network/len is the network number and length (in bits) of the

 

 

network mask.

 

 

(Optional) ge and le values specify the range of the prefix length

 

 

to be matched.The specified ge-valueand le-valuemust satisfy

 

 

this condition: len < ge-value< le-value< 32

 

 

 

Step 3 ip prefix-list list-nameseq seq-valuedeny

(Optional) Add an entry to a prefix list, and assign a sequence

 

permit network/len [ge ge-value] [le le-value]

number to the entry.

Step 4

 

 

end

Return to privileged EXEC mode.

Step 5

 

 

show ip prefix list [detail summary] name

Verify the configuration by displaying information about a prefix list

 

[network/len] [seq seq-num] [longer]

or prefix list entries.

 

[first-match]

 

Step 6

 

 

copy running-config startup-config

(Optional) Save your entries in the configuration file.

 

 

 

To delete a prefix list and all of its entries, use the no ip prefix-listlist-nameglobal configuration command. To delete an entry from a prefix list, use the no ip prefix-list seq seq-valueglobal configuration command. To disable automatic generation of sequence numbers, use the no ip prefix-list

 

Catalyst 3750-E and 3560-E Switch Software Configuration Guide

38-56

OL-9775-02

Page 916
Image 916
Cisco Systems 3750E manual Configuring Prefix Lists for BGP Filtering, 38-56