cisco — Configuring BGP Filtering by Neighbor

Procedure Configuring BGP Configuring BGP Filtering by Neighbor Command or Action Purpose Step 1 enable Example: Device> enable Enables privileged EXEC mode. Enter your password if prompted. Step 2 configure terminal Example: Device# configure terminal Enters global configuration mode. Step 3 router bgp autonomous-system Example: Device(config)# router bgp 109 Enables a BGP routing process, assign it an AS number, and enter router configuration mode. Step 4 neighbor {ip-address | peer-group name} distribute-list {access-list-number | name} {in | out} Example:

Device(config-router)# neighbor 172.16.4.1 distribute-list 39 in (Optional) Filters BGP routing updates to or from neighbors as specified in an access list. Note You can also use the neighbor prefix-list router configuration command to filter updates, but you cannot use both commands to configure the same BGP peer. Step 5 neighbor {ip-address | peer-group name} route-map map-tag {in | out} Example: Device(config-router)# neighbor 172.16.70.24 route-map internal-map in (Optional) Applies a route map to filter an incoming or outgoing route. Step 6 end Example: Device(config)# end Returns to privileged EXEC mode. Step 7 show ip bgp neighbors Example:

Device# show ip bgp neighbors Verifies the configuration. Step 8 copy running-config startup-config Example: (Optional) Saves your entries in the configuration file. Configuring BGP 23