The Journey of a Network Engineer

Dec 12 2010   1:19AM GMT

How to manipulate BGP Routes – part 1

Sulaiman Syed Profile: Sulaiman Syed

After knowing how BGP select the best route for the routing update, using the BGP PAs. The next step would be to manipulate these PAs to give the desired route for NLRI

BPG mainly uses 4 variations to manipulate the routes:

  • neighbor distribute-list (standard ACL / extended ACL)
  • neighbor prefix-list
  • neighbor filter-list
  • neighbor route-map

The first two distribute-list and prefix-list will be able to match the network, and the subnet mask. a prefix-list is a straightforward operation. match certain network, with certain subnet mask and filter it out. a simple example that will deny network range to and permit any other network to be advertise to the neighbor will follow the following syntax

ip prefix-list sample seq 5 deny ge 16 le 24

ip prefix-list sample seq 5 permet le 32

router bgp 123

neighbor prefix-list sample out.

BGP’s distributed-list uses ACL to match prefix and prefix length. The way extended ACL is interpreted differently than the normal extended ACL. extended ACL will be used to match the network length (prefix), and the prefix length (subnet). for example

ip prefix-list sample_2 seq 5 deny

ip prefix-list sample_2 seq 5 deny ge 16 le 24

can be written as

ip access0list extended sample_2

deny ip host host

deny ip host host

The following documentation will further help understanding prefix-list. In the next entry, we would discuss how to use neighbor filter-list to match the AS_PATH contents for route manipulation. and a simple guideline when to use which method out of the four to filter and manipulate BGP routes.

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: