Feedback
|
Table Of Contents
Information About BGP Policy Accounting
BGP Policy Accounting Overview
Benefits of BGP Policy Accounting
How to Configure BGP Policy Accounting
Specifying the Match Criteria for BGP Policy Accounting
Classifying the IP Traffic and Enabling BGP Policy Accounting
Verifying BGP Policy Accounting
Monitoring and Maintaining BGP Policy Accounting
Specifying the Match Criteria for BGP Policy Accounting Example
Classifying the IP Traffic and Enabling BGP Policy Accounting Example
Feature Information for BGP Policy Accounting
BGP Policy Accounting
Border Gateway Protocol (BGP) policy accounting measures and classifies IP traffic that is sent to, or received from, different peers. Policy accounting is enabled on an input interface, and 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
Your software release may not support all the features documented in this module. For the latest feature information and caveats, see 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 for BGP Policy Accounting" section.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Contents
•
Information About BGP Policy Accounting
•
How to Configure BGP Policy Accounting
•
Feature Information for BGP Policy Accounting
Prerequisites
Before using the BGP Policy Accounting feature, you must enable BGP and CEF or dCEF on the router.
Information About BGP Policy Accounting
•
BGP Policy Accounting Overview
•
Benefits of BGP Policy Accounting
BGP Policy Accounting Overview
Border Gateway Protocol (BGP) policy accounting measures and classifies IP traffic that is sent to, or received from, different peers. Policy accounting is enabled on an input interface, and 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 interface. A Cisco IOS policy-based classifier maps the traffic into one of eight possible buckets, representing different traffic classes.
Using BGP policy accounting, you can account for traffic according to the route it traverses. Service providers (SPs) can identify and account for all traffic by customer and bill accordingly. In Figure 1, BGP policy accounting 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.
Figure 1 Sample Topology for BGP Policy Accounting
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 Policy Accounting
Account 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. Service providers can account for traffic and apply billing, according to the route 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 Configure BGP Policy Accounting
•
Specifying the Match Criteria for BGP Policy Accounting (required)
•
Classifying the IP Traffic and Enabling BGP Policy Accounting (required)
•
Verifying BGP Policy Accounting (optional)
•
Monitoring and Maintaining BGP Policy Accounting (optional)
Specifying the Match Criteria for BGP Policy Accounting
The first task in configuring BGP policy accounting 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.
To specify the BGP attribute to use for BGP policy accounting and create the match criteria in a route map, use the following commands in global configuration mode:
Classifying the IP Traffic and Enabling BGP Policy Accounting
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 it adds to the routing table based on the match criteria. When the bgp-policy accounting command is configured on an interface, BGP policy accounting is enabled.
To classify the IP traffic and enable BGP policy accounting, use the following commands beginning in global configuration mode:
Verifying BGP Policy Accounting
To verify that BGP policy accounting is operating, perform the following steps:
Step 1
Enter the show ip cef EXEC command with the detail keyword to learn which accounting bucket is assigned to a specified prefix.
In this example, the output is displayed for the prefix 192.168.5.0. It shows that the accounting bucket number 4 (traffic_index 4) is assigned to this prefix.
Router# show ip cef 192.168.5.0 detail192.168.5.0/24, version 21, cached adjacency to POS7/20 packets, 0 bytes, traffic_index 4via 10.14.1.1, 0 dependencies, recursivenext hop 10.14.1.1, POS7/2 via 10.14.1.0/30valid cached adjacencyStep 2
Enter the show ip bgp EXEC command for the same prefix used in Step 1—192.168.5.0— to learn which community is assigned to this prefix.
In this example, the output is displayed for the prefix 192.168.5.0. It shows that the community of 100:197 is assigned to this prefix.
Router# show ip bgp 192.168.5.0BGP routing table entry for 192.168.5.0/24, version 2Paths: (1 available, best #1)Not advertised to any peer10010.14.1.1 from 10.14.1.1 (32.32.32.32)Origin IGP, metric 0, localpref 100, valid, external, bestCommunity: 100:197Step 3
Enter the show cef interface policy-statistics EXEC command to display the per-interface traffic statistics.
In this example, the output shows the number of packets and bytes that have been assigned to each accounting bucket:
LC-Slot7# show cef interface policy-statisticsPOS7/0 is up (if_number 8)Bucket Packets Bytes1 0 02 0 03 50 50004 100 100005 100 100006 10 10007 0 08 0 0
Monitoring and Maintaining BGP Policy Accounting
To monitor and maintain the BGP Policy Accounting feature, use the following commands in EXEC mode, as needed:
Configuration Examples
•
Specifying the Match Criteria for BGP Policy Accounting Example
•
Classifying the IP Traffic and Enabling BGP Policy Accounting Example
Specifying the Match Criteria for BGP Policy Accounting Example
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:190ip community-list 40 permit 100:198ip community-list 50 permit 100:197ip community-list 60 permit 100:296!route-map set_bucket permit 10match community 30set traffic-index 2!route-map set_bucket permit 20match community 40set traffic-index 3!route-map set_bucket permit 30match community 50set traffic-index 4!route-map set_bucket permit 40match community 60set traffic-index 5Classifying the IP Traffic and Enabling BGP Policy Accounting Example
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 65000table-map set_bucketnetwork 10.15.1.0 mask 255.255.255.0neighbor 10.14.1.1 remote-as 65100!ip classlessip bgp-community new-format!interface POS7/0ip address 10.15.1.2 255.255.255.0no ip directed-broadcastbgp-policy accountingno keepalivecrc 32clock source internalAdditional References
Related Documents
Related Topic Document TitleCisco IOS commands
BGP commands
BGP configuration information
Cisco BGP Features Roadmap" module chapter of the Cisco IOS IP Routing: BGP Configuration Guide
Cisco Express Forwarding (CEF) and distributed CEF (dCEF) commands
Cisco Express Forwarding (CEF) and distributed CEF (dCEF) configuration information
"Cisco Express Forwarding Overview" module of the Cisco IOS Switching Services Configuration Guide
MIBs
Technical Assistance
Feature Information for BGP Policy Accounting
Table 1 lists the release history for this feature.
Use Cisco Feature Navigator to find information about platform support and software image support. Cisco Feature Navigator enables you to determine which software images support a specific software release, feature set, or platform. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Note
Table 1 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.
Cisco and the Cisco Logo are trademarks of Cisco Systems, Inc. and/or its affiliates in the U.S. and other countries. A listing of Cisco's trademarks can be found at www.cisco.com/go/trademarks. Third party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1005R)
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.
© 2004-2011 Cisco Systems, Inc. All rights reserved.
Feedback
