Wednesday, May 5, 2010

Suppress and Unsuppress maps

Not going to dive into any great detail on this, just some notes. Say you have a router hosting these subnets:
10.0.1.0/24
10.0.2.0/24
10.0.3.0/24
10.0.4.0/24

The administrator...you, wants to advertise an aggregate address for these in the form of 10.0.0.0/8, but wants to also advertise theses specific subnets along with the aggregate:

10.0.2.0/24
10.0.3.0/24

On the aggregating router we would enter the following:

access-list 1 deny 10.0.2.0 0.0.0.255
access-list 1 deny 10.0.3.0 0.0.0.255
access-list 1 permit any


route-map SUPPRESS permit 10
match ip address 1


router bgp (as)
aggregate-address 10.0.0.0 255.0.0.0 suppress-map SUPRESS

Seems a bit counter-intuitive huh?!? Well think of it this way. The access list is going to permit any routes we WANT suppressed, and deny any that we do not. So we will advertise this to any other bgp routers. Their routing tables should have these entries:

10.0.0.0/8
10.0.2.0/24
10.0.3.0/24

BUT WAIT.... what if there is a specific neighbor that we want to unsuppress some other routes for...well, guess what?  Its access-list time again!

access-list 2 permit 10.0.4.0 0.0.0.255

route-map unSUPRESS permit 10
match ip address 2

router bgp (as)
neighbor (ip address) unsuppress-map unSUPPRESS


dont forget to do a clear ip bgp * (soft) to reset your neighbors.
After that command, that specific neighbors routing table should contain these entries:


10.0.0.0/8
10.0.2.0/24
10.0.3.0/24
10.0.4.0/24

Go ahead, try it out for yourself!

No comments:

Post a Comment