- Cisco BGP Overview
- BGP 4
- Configuring a Basic BGP Network
- BGP Support for 4-byte ASN
- IPv6 Routing: Multiprotocol BGP Extensions for IPv6
- IPv6 Routing: Multiprotocol BGP Link-Local Address Peering
- IPv6 Multicast Address Family Support for Multiprotocol BGP
- Connecting to a Service Provider Using External BGP
- BGP Named Community Lists
- BGP Prefix-Based Outbound Route Filtering
- BGP Route-Map Continue Support for Outbound Policy
- Removing Private AS Numbers from the AS Path in BGP
- Configuring BGP Neighbor Session Options
- BGP Neighbor Policy
- BGP Dynamic Neighbors
- BGP Support for Next-Hop Address Tracking
- BGP Restart Neighbor Session After Max-Prefix Limit Reached
- BGP Support for Dual AS Configuration for Network AS Migrations
- Configuring Internal BGP Features
- BGP VPLS Auto Discovery Support on Route Reflector
- BGP NSF Awareness
- IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family
- BGP Support for BFD
- BGP Support for MTR
- BGP Link Bandwidth
- iBGP Multipath Load Sharing
- BGP Multipath Load Sharing for Both eBGP and iBGP in an MPLS-VPN
- Loadsharing IP Packets Over More Than Six Parallel Paths
- BGP Policy Accounting
- BGP Policy Accounting Output Interface Accounting
- BGP Cost Community
- BGP Support for IP Prefix Import from Global Table into a VRF Table
- BGP Support for IP Prefix Export from a VRF Table into the Global Table
- BGP per Neighbor SoO Configuration
- Per-VRF Assignment of BGP Router ID
- BGP Next Hop Unchanged
- BGP Event-Based VPN Import
- BGP Best External
- BGP PIC Edge for IP and MPLS-VPN
- Configuring BGP: RT Constrained Route Distribution
- Configuring BGP Consistency Checker
- BGP MIB Support
- Cisco-BGP-MIBv2
- BGP Additional Paths
- BGP Attribute Filter and Enhanced Attribute Error Handling
- BGP—Support for iBGP Local-AS
- BGP-Multiple Cluster IDs
- BGP-RT and VPN Distinguisher Attribute Rewrite Wildcard
- BGP-VPN Distinguisher Attribute
- BGP-VRF-Aware Conditional Advertisement
- BGP Diverse Path Using a Diverse-Path Route Reflector
- BGP Graceful Shutdown
Contents
- BGP Policy Accounting Output Interface Accounting
- Finding Feature Information
- Prerequisites for BGP PA Output Interface Accounting
- Information About BGP PA Output Interface Accounting
- BGP PA Output Interface Accounting
- Benefits of BGP PA Output Interface Accounting
- How to Conrigure BGP PA Output Interface Accounting
- Specifying the Match Criteria for BGP PA
- Classifying the IP Traffic and Enabling BGP PA
- Verifying BGP Policy Accounting
- Configuration Examples for BGP PA Output Interface Accounting
- Example: Specifying the Match Criteria for BGP Policy Accounting
- Example: Classifying the IP Traffic and Enabling BGP Policy Accounting
- Additional References
- Feature Information for BGP Policy Accounting Output Interface Accounting
BGP Policy Accounting Output Interface Accounting
Border Gateway Protocol (BGP) policy accounting (PA) measures and classifies IP traffic that is sent to, or received from, different peers. Policy accounting was previously available on an input interface only. The BGP Policy Accounting Output Interface Accounting feature introduces several extensions to enable BGP PA on an output interface and to include accounting based on a source address for both input and output traffic on an interface. Counters based on parameters such as community list, autonomous system number, or autonomous system path are assigned to identify the IP traffic.
- Finding Feature Information
- Prerequisites for BGP PA Output Interface Accounting
- Information About BGP PA Output Interface Accounting
- How to Conrigure BGP PA Output Interface Accounting
- Configuration Examples for BGP PA Output Interface Accounting
- Additional References
- Feature Information for BGP Policy Accounting Output Interface Accounting
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Prerequisites for BGP PA Output Interface Accounting
Before using the BGP Policy Accounting Output Interface Accounting feature, you must enable BGP and Cisco Express Forwarding or distributed CEF on the router.
Information About BGP PA Output Interface Accounting
BGP PA Output Interface Accounting
Policy accounting using BGP measures and classifies IP traffic that is sent to, or received from, different peers. Originally, BGP PA was available on an input interface only. BGP PA output interface accounting introduces several extensions to enable BGP PA on an output interface and to include accounting based on a source address for both input and output traffic on an interface. Counters based on parameters such as community list, autonomous system number, or autonomous system path are assigned to identify the IP traffic.
Using the BGP table-map command, prefixes added to the routing table are classified by BGP attribute, autonomous system number, or autonomous system path. Packet and byte counters are incremented per input or output interface. A Cisco policy-based classifier maps the traffic into one of eight possible buckets that represent different traffic classes.
Using BGP PA, you can account for traffic according to its origin or the route it traverses. Service providers (SPs) can identify and account for all traffic by customer and can bill accordingly. In the figure below, BGP PA can be implemented in Router A to measure packet and byte volumes in autonomous system buckets. Customers are billed appropriately for traffic that is routed from a domestic, international, or satellite source.
BGP policy accounting using autonomous system numbers can be used to improve the design of network circuit peering and transit agreements between Internet service providers (ISPs).
Benefits of BGP PA Output Interface Accounting
Accounting for IP Traffic Differentially
BGP policy accounting classifies IP traffic by autonomous system number, autonomous system path, or community list string, and increments packet and byte counters. Policy accounting can also be based on the source address. Service providers can account for traffic and apply billing according to the origin of the traffic or the route that specific traffic traverses.
Efficient Network Circuit Peering and Transit Agreement Design
Implementing BGP policy accounting on an edge router can highlight potential design improvements for peering and transit agreements.
How to Conrigure BGP PA Output Interface Accounting
Specifying the Match Criteria for BGP PA
The first task in configuring BGP PA is to specify the criteria that must be matched. Community lists, autonomous system paths, or autonomous system numbers are examples of BGP attributes that can be specified and subsequently matched using a route map. Perform this task to specify the BGP attribute to use for BGP PA and to create the match criteria in a route map.
1.
enable
2.
configure
terminal
3.
ip
community-list
{standard-list-number |
expanded-list-number [regular-expression] | {standard |
expanded}
community-list-name} {permit |
deny} {community-number |
regular-expression}
4.
route-map
map-name
[permit |
deny] [sequence-number]
5.
match
community-list
community-list-number
[exact]
6.
set
traffic-index
bucket-number
7.
exit
DETAILED STEPS
Classifying the IP Traffic and Enabling BGP PA
After a route map has been defined to specify match criteria, you must configure a way to classify the IP traffic before enabling BGP policy accounting.
Using the table-map command, BGP classifies each prefix that it adds to the routing table according to the match criteria. When the bgp-policy accounting command is configured on an interface, BGP policy accounting is enabled.
Perform this task to classify the IP traffic and enable BGP policy accounting.
1.
enable
2.
configure
terminal
3.
router
bgp
as-number
4.
table-map
route-map-name
5.
network
network-number
[mask
network-mask]
6.
neighbor
ip-address
remote-as
as-number
7.
exit
8.
interface
type
number
9.
ip
address
ip-address
mask
10.
bgp-policy
accounting
[input |
output] [source]
11.
exit
DETAILED STEPS
Verifying BGP Policy Accounting
Perform this task to verify that BGP policy accounting is operating.
1.
show
ip
cef
[network [mask]] [detail]
2.
show
ip
bgp
[network] [network-mask] [longer-prefixes]
3.
show
cef
interface
[type
number]
policy-statistics [input |
output]
4.
show
cef
interface
[type
number] [statistics] [detail]
DETAILED STEPS
Configuration Examples for BGP PA Output Interface Accounting
Example: Specifying the Match Criteria for BGP Policy Accounting
In the following example, BGP communities are specified in community lists, and a route map named set_bucket is configured to match each of the community lists to a specific accounting bucket using the set traffic-index command:
ip community-list 30 permit 100:190 ip community-list 40 permit 100:198 ip community-list 50 permit 100:197 ip community-list 60 permit 100:296 ! route-map set_bucket permit 10 match community 30 set traffic-index 2 ! route-map set_bucket permit 20 match community 40 set traffic-index 3 ! route-map set_bucket permit 30 match community 50 set traffic-index 4 ! route-map set_bucket permit 40 match community 60 set traffic-index 5
Example: Classifying the IP Traffic and Enabling BGP Policy Accounting
In the following example, BGP policy accounting is enabled on POS interface 7/0 and the table-map command is used to modify the bucket number when the IP routing table is updated with routes learned from BGP:
router bgp 65000 table-map set_bucket network 10.15.1.0 mask 255.255.255.0 neighbor 10.14.1.1 remote-as 65100 ! ip classless ip bgp-community new-format ! interface POS7/0 ip address 10.15.1.2 255.255.255.0 no ip directed-broadcast bgp-policy accounting no keepalive crc 32 clock source internal
Additional References
The following sections provide references related to BGP policy accounting.
Related Documents
Related Topic |
Document Title |
---|---|
BGP commands: complete command syntax, command mode, defaults, usage guidelines, and examples |
|
Switching commands: complete command syntax, command mode, defaults, usage guidelines, and examples |
|
CEF and dCEF configuration information |
IP Switching Cisco Express Forwarding Configuration Guide |
Standards
Standards |
Title |
---|---|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
— |
MIBs
MIBs |
MIBs Link |
---|---|
CISCO-BGP-POLICY-ACCOUNTING-MIB |
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: |
RFCs
RFCs |
Title |
---|---|
No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature. |
— |
Technical Assistance
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |
Feature Information for BGP Policy Accounting Output Interface Accounting
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to . An account on Cisco.com is not required.