Sunday, October 5, 2008

BGP Summary Routes

To advertise a summary route within BGP the aggregate-address command can be used. The default is to advertise the summary alongside all the granular routes. The summary-only keyword can be used to change this behaviour, suppressing the granular route advertisement.

There may be lab requirements to vary how summary routes are advertised, for example consider the following scenario

i) advertise the summary 200.1.0.0/16 only to neighbor a
ii) do not advertise the summary 200.1.0.0/16 to neighbor b only the granular routes


This can be achieved as follows

1)
aggregate-address 200.1.0.0 255.255.0.0 summary-only

This will advertise the summary route only to ALL BGP neighbors

2)

ip prefix-list DENYAGG permit 200.1.0.0/16
route-map DENYAGG deny 10
match ip address prefix-list DENYAGG
route-map DENYAGG permit 20

ip prefix-list ALLOW permit 200.1.0.0/17 le 32
route-map ALLOW permit 10
match ip address prefix-list ALLOW

router bgp x
neigbhor b route-map DENYAGG
neighbor b unsuppress-map ALLOW


There are 2 parts to the above solution: first block the advertisement of the summary address and then second use the unsupress-map feature to permit advertisement of the required granular routes.

No comments: