User guide

8-16 MPLS Module Installation and User Guide
Configuring Destination-Sensitive Accounting
Figure 8-2: Destination-sensitive accounting based on BGP community strings
In this example, all IP unicast traffic forwarded by the BlackDiamond switch to one of
two BGP communities is counted. Each IP subnet associated with the configured BGP
community is mapped to a different accounting bin. The steps that follow describe how
to configure the accounting feature. This example assumes that the VLANs are created,
IP forwarding is enabled, and accounting is enabled.
1 Create the route map bgp_example. Then map the communities 1111:1 and 2222:2 to
the newly created route map and assign a bin number to each BGP community.
create route-map bgp_example
create route-map bgp_example add 100 permit match-one
create route-map bgp_example 100 add match community 1111:1
create route-map bgp_example 100 add set accounting-index 1 value 1
create route-map bgp_example add 200 permit match-one
create route-map bgp_example 200 add match community 2222:2
create route-map bgp_example 200 add set accounting-index 1 value 2
MPLS_23
BGP cloud
Accounting Table Bins
1111:1
2222:2
Packet count from VLAN 2 to
BGP routes with community string 2222:2
Byte count from VLAN 2 to
BGP routes with community string 2222:2
VLAN 1
VLAN 2
VLAN 3
Data traffic
DSA
default
0
1
1
2
23
3
4567
Accounting
table cell
contains
64-bit packet
and
byte counts
BGP routes with
community string 1111:1
BGP routes with
community string 2222:2
VLAN
IP prefixes associated with
BGP community string 1111:1, 2222:2