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 10.20.0.0/24 to 10.20.255.0/24 and permit any other network to be advertise to the neighbor will follow the following syntax

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

ip prefix-list sample seq 5 permet 0.0.0.0/0 le 32

router bgp 123

neighbor 1.1.1.1 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 10.5.0.0/16

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

can be written as

ip access0list extended sample_2

deny ip host 10.5.0.0 host 255.255.0.0

deny ip host 10.20.0.0 0.0.255.255 host 255.255.255.0

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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: