Configuring BGP

Configuring Basic BGP Features

Configuring BGP Route Filtering by Neighbor

You can filter BGP advertisements in two ways:

Use autonomous system path filters, as with the ip as-pathaccess-listglobal configuration command and the neighbor filter-listrouter configuration command

Use access or prefix lists, as with the neighbor distribute-listrouter configuration command. Filtering using prefix lists is described in the “Configuring BGP Filtering Using Prefix Lists” section.

If you want to restrict the routing information that the Cisco IOS software learns or advertises, you can filter BGP routing updates to and from particular neighbors. You can either define an access list or a prefix list and apply it to the updates.

Note Distribute-list filters are applied to network numbers and not autonomous system paths.

To filter BGP routing updates, use the following command in router configuration mode:

Command

Purpose

 

 

 

 

 

 

Router(config-router)# neighbor {ip-address

Filters BGP routing updates to and from neighbors as

peer-group-name}distribute-list{access-list-number

specified in an access list.

access-list-name} {in out}

Note The neighbor prefix-listrouter configuration

 

 

 

 

 

 

 

 

command can be used as an alternative to the

 

 

 

 

neighbor distribute-list router configuration

 

 

 

 

command, but you cannot use both commands to

 

 

 

 

configure the same BGP peer in any specific

 

 

 

 

direction. These two commands are mutually

 

 

 

 

exclusive, and only one command (neighbor

 

 

 

 

prefix-list or neighbor distribute-list) an be applied

 

 

 

 

for each inbound or outbound direction.

 

 

 

 

 

 

 

 

 

 

 

 

Note Although the neighbor prefix-listrouter configuration command can be used as an alternative to the neighbor distribute-listcommand, do not use attempt to apply both the neighbor prefix-listand neighbor distribute-listcommand filtering to the same neighbor in any given direction. These two commands are mutually exclusive, and only one command (neighbor prefix-listor neighbor distribute-list) can be applied for each inbound or outbound direction.

Configuring BGP Filtering Using Prefix Lists

Prefix lists can be used as an alternative to access lists in many BGP route filtering commands. The section “How the System Filters Traffic by Prefix List” describes the way prefix list filtering works. The advantages of using prefix lists are as follows:

Significant performance improvement in loading and route lookup of large lists.

Support for incremental updates. Filtering using extended access lists does not support incremental updates.

Cisco IOS IP Configuration Guide

IPC-304

Page 350
Image 350
Cisco Systems 78-11741-02 manual Configuring BGP Route Filtering by Neighbor, Configuring BGP Filtering Using Prefix Lists