Figure 8-3 illustrates the different steps that are processed at the router. Router B sends BGP routing updates to Router A, where they are passed through a table-map statement. The table-map uses a route-map statement, which checks for criteria (such as AS number, AS-PATH, and BGP community) in BGP routing updates. The route entries in the Forwarding Information Base (FIB) (generated by Cisco Express Forwarding [CEF]) are extended with BGP Policy Accounting-specific traffic indexes. Ingress or egress traffic is then monitored for the FIB entries. Each time a packet takes a specific route, the associated traffic index (bucket) counters for the (sub)interface are updated.

Figure 8-3. BGP Policy Accounting Example

The BGP Policy Accounting principles can be summarized as follows:

  • Account the number of packets and bytes, per (sub)interface, for the different combinations of input/output traffic and source/destination FIB lookups.

  • Only the traffic following the BGP routes is accounted. For example, you cannot account for the traffic issued from your local autonomous system.

  • It can track up to a maximum of eight different buckets for each (sub)interface. Note that some platforms and IOS releases support up to 64 buckets. The buckets are globally defined for the router.

  • CEF or distributed CEF (dCEF) must be enabled for BGP Policy Accounting to work.

  • The statistical results can be read via SNMP with CISCO-BGP-POLICY-ACCOUNTING-MIB, but the BGP Policy Accounting configuration is available only via the CLI.

  • BGP Policy Accounting is available on the Virtual Routing and Forwarding (VRF) interfaces.

  • The packets blocked by an access list are not accounted, because the packets are blocked before the FIB is accessed, where the traffic index accounting takes place.

  • A CPU performance impact occurs when BGP Policy Accounting is enabled, because each forwarded packet updates counters during the entry lookup in the FIB.

The devices and Cisco IOS Software releases that support BGP Policy Accounting are as follows:

  • The Input BGP Policy Accounting feature was initially supported by platforms that support Cisco IOS release 12.0(9)S: Cisco 7200, 7500, and 12000 series routers. The number of supported platforms in Cisco IOS release 12.2(13)T is much larger. This includes 1400, 1600, 1700, 2600, 3600, 7100, 7200, 7500, AS5300, AS5350, AS5400, AS5800, AS5850, ICS7750, IGX 8400 URM, MGX 8850, and uBR7200. All line cards from the 12000 (except the ATM line cards and the line cards with engine 4) support Input BGP Policy Accounting. Because it was introduced in different IOS versions on the different line cards, you should check the documentation.

  • Output BGP Policy Accounting was added in 12.0(23)S and 12.3(4)T. On the 12000, the engine 3 line cards support Output BGP Policy Accounting.

  • Today, most platforms supporting CEF also support some variations of BGP Policy Accounting.

  • 64 buckets are supported in 12.0(23)S, 12.0(23)ST, and 12.2(9)T for all software implementations: 1400, 1600, 1700, 2600, 3600, 7100, 7200, 7500, AS5300, AS5350, AS5400, AS5800, AS5850, ICS7750, IGX 8400 URM, MGX 8850, uBR7200, 7200, 7500, and 12000 (engines 0, 1, and 2). For hardware implementations (such as engine 3 [and above] line cards on the 12000), the number of buckets varies between eight and 64.

Part II: Implementations on the Cisco Devices