The Journey of a Network Engineer

Dec 19 2010   3:46AM GMT

How to manipulate BGP Routes – part 3

Sulaiman Syed Profile: Sulaiman Syed

This is the last part of BGP route manipulation. As discussed in the earlier entries, routes can be manipulated by

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

A valid question before talking bout route-maps is, when to use a route-map? A general rule will be that when route manipulation is concerned with network prefixes, then neighbor distribute-list and prefix-list will suffice. filter-list will be used when route manipulation is based on AS information. route-maps should be used when the conditions are variable. They could be based on network prefixes, AS, next_hop, weight, local_pref, origin, MED, etc.

The following lines are the command line syntax for route-maps

neighbor neighbor-id route-map name {in | out}

route-map name {permit | deny} number

match ….


The match is the condition or conditions that we want to base our route manipulation on, while the set is the course of action we would like to take.

the following example shows how we can set the weight of 200 to routes advertised by a certain BGP neighbor ( and the routes have ASN 55 in the AS PATH.

router bgp 111

neighbor route-map weight-200 in

ip as-path access-list 5 permit _55_

route-map weight-200 permit 10

match as-path 5

set weight 200

route-map weight-200 permit 20

The second route map was necessary, without it all other routes advertised by neighbor that don’t have ASN 55 will be removed.

This concludes the manipulation of 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: