[rbak-nsp] route-map matching prefixes AND communities?

Voigt, Thomas Thomas.Voigt at netkom.de
Fri Jul 20 04:18:41 EDT 2012


Hi all,

actual we are doing outbound route filtering to our upstream peers with an route-map like this:

########################################################
ip prefix-list OurOwnPrefixes
  seq 10 permit a.b.c.d/z
  seq 20 permit e.f.g.h/y
  seq 100 deny any

ip prefix-list Customer1
  seq 10 permit i.j.k.l/x
  seq 100 deny any

ip prefix-list Customer2
  seq 10 permit m.n.o.p/w
  seq 100 deny any

route-map Upstream-out permit 10
  match ip address prefix-list OurOwnPrefixes
  set as-path prepend <ASN> <ASN> <ASN>
 route-map Upstream-out permit 20
  match ip address prefix-list Customer1
  set as-path prepend <ASN> <ASN> <ASN> 
 route-map Upstream-out permit 30
  match ip address prefix-list Customer2
  set as-path prepend <ASN> <ASN> <ASN> 

router bgp <ASN>
  neighbor q.r.s.t external
    remote-as <Upstream-ASN>
   address-family ipv4 unicast
      route-map Upstream-out out
########################################################

Now I'd like to make the number of prepended ASNs controlled by BGP communities.
For example like this:

community = 10 -> no announcement to this upstream
community = 11 -> prepend <ASN>
community = 12 -> prepend <ASN> <ASN>
community = 13 -> prepend <ASN> <ASN> <ASN>

and so on.

In Cisco IOS there is an "continue" keyword to let the route map continue in an defined seq number after an successful match. So we can test first the prefixes and then (after the "continue" seq number) the communities. 
Can we configure similar in SEOS?

How do you deal with BGP communities?

-- 
Regards
Thomas Voigt 



More information about the redback-nsp mailing list