[c-nsp] Traffic shaping with BGP communities

Gordon Smith gsmith at wxc.co.nz
Tue Mar 28 21:35:47 EST 2006


Hi,

I'm having a problem getting policing to work based on BGP community
tags.
My intention was to set up something like this:

ip bgp-community new-format
ip community-list 2 permit xxxxx:440
ip community-list 3 permit xxxxx:150
ip community-list 4 permit xxxxx:155
!
route-map shaper permit 10
 match community 4
 set traffic-index 2
!
route-map shaper permit 20
 match community 2
 set traffic-index 1
!
route-map shaper permit 30
 match community 3
 set traffic-index 3
!
router bgp xxxxx
 table-map shaper
!
class-map aaaa
 match bgp-index 1
 exit
!
class-map bbbb
 match bgp-index 3
 exit
!
class-map cccc
 match bgp-index 2
 exit
!
policy-map zzzzz
 class aaaa
  shape average 8000000
  exit
 class bbbb
  shape average 1000000
  exit
 class cccc
  shape average 10000000
  exit

Should be pretty straightforward - class-map is selected by bgp
community, then I apply shaping at the router interface with a
service-policy that points to the policy-map.

Unfortunately, it appears that under the class-map hierarchy, I can't do
a match on bgp-index. It's just not there as an option.

Can anyone shed any light on this? Or suggest another way of doing this?

I don't want to pass this device full route tables. I intended to only
pass it a subset - enough to make policy decisions without swamping its
memory.
It's a 7206 running image c7200-jk9s-mz.124-3
It talks IS-IS and BGP4



More information about the cisco-nsp mailing list