[c-nsp] Communities on local prefixes

Michiel Kranenburg michiel.kranenburg at concepts-ict.nl
Wed Mar 18 09:47:28 EDT 2009


Hi Andy,

Attach a route-map to your bgp network statement e.g. network x.x.0.0
mask 255.255.0.0 route-map TEST-OUT.

This will solve you issue.


Cheers,

Michiel

-----Oorspronkelijk bericht-----
Van: cisco-nsp-bounces at puck.nether.net
[mailto:cisco-nsp-bounces at puck.nether.net] 
Verzonden: woensdag 18 maart 2009 8:17
Aan: cisco-nsp at puck.nether.net
Onderwerp: [c-nsp] Communities on local prefixes

Hi,

I would like to set a BGP community tag on local (non-customer) prefixes
before I send them to my peers and customers.

Right now I am doing this with a route-map when I configure the
neighbor.

Somewhat like this:

router bgp 65001
...
neighbor 1.2.3.4 route-map TEST-OUT out 
...
network x.x.0.0 mask 255.255.0.0
...


route-map TEST-OUT permit 20
 match ip address prefix-list local-out
 set community 65001:9999

ip prefix-list local-out seq 5 permit x.x.0.0/16
ip prefix-list local-out seq 10 deny 0.0.0.0/0 le 32

This would tag my local prefixes with 65001:9999

While this is working, I don't find it to be the optimal solution. I
want to
avoid setting communities on an outgoing route-map and I would like to
have
my local prefixes tagged before they reach the "TEST-OUT" route-map.

In other words, when I do: sh ip bgp x.x.0.0 on the local router, I
would
like to see this:

  Local
    0.0.0.0 from 0.0.0.0
      Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced,
local, best
      Community: 65001:9999   <========

Is there a way to do so?

Thank you.

-
Andy


_______________________________________________
cisco-nsp mailing list  cisco-nsp at puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/


More information about the cisco-nsp mailing list