Table Of Contents
Quality of Service Policy Propagation via Border Gateway Protocol
Configure Policy Propagation Based on Community Lists
Configure Policy Propagation Based on the AS Path Attribute
Configure Policy Propagation Based on an Access List
Quality of Service Policy Propagation via Border Gateway Protocol
Feature Summary
The Quality of Service (QoS) policy propagation via Border Gateway Protocol (BGP) feature allows you to classify packets based on access lists, BGP community lists, and BGP autonomous system (AS) paths. The supported classification policies include Internet Protocol (IP) precedence setting and the ability to tag the packet with a QoS class identifier internal to the router. After a packet has been classified, you can use other QoS features such as Committed Access Rate (CAR) and Weighted Random Early Detection (WRED) to specify and enforce business policies to fit your business model.
The QoS policy propagation via BGP feature was introduced in Cisco IOS Release 11.1(17)CC. With Release 11.1(20)CC, the QoS policy propagation via BGP feature has the following enhancements:
•
QoS group ID—You can set an internal QoS group ID that can be used later to perform rate-limiting or weighted fair queuing based on the Qos group ID. In the previous release you could only set up to eight IP precedence level to classify packets. By setting the QoS group ID in addition to the IP precedence, you can now have more than eight classes on which to perform rate-limiting or weighted fair queuing.
•
Source and destination address lookup—You can specify whether the IP precedence level or QoS group ID used is obtained from the source (input) address or destination (output) address entry in the route table. In the previous release you could only use the destination address. You can now specifying the input or output address.
Benefits
BGP policy propagation provides the following benefits:
•
Allows you to classify packets using access lists, community lists, and AS paths.
•
Leverages BGP to distribute QoS policy to remote routers in your network.
•
Allows ingress routers to prioritize incoming and outgoing traffic.
•
Allows you to classify packets based on IP precedence or QoS group ID.
List of Terms
Autonomous system (AS) path—A collection of networks under a common administration sharing a common routing strategy. BGP carries the AS path in its routing updates. You can filter routing updates by specifying an access list on both incoming and outbound updates based on the BGP AS path.
Border Gateway Protocol (BGP)—Interdomain routing protocol that replaces EGP. BGP exchanges reachability information with other BGP systems. It is defined by RFC 1163.
Cisco Express Forwarding (CEF)—CEF is an advanced Layer 3 IP switching technology. CEF optimizes network performance and scalability for networks with large and dynamic traffic patterns, such as the Internet, on networks characterized by intensive Web-based applications, or interactive sessions. Although you can use CEF in any part of a network, it is designed for high-performance, highly resilient Layer 3 IP backbone switching.
Committed Access Rate (CAR)—CAR limits the input or output transmission rate on an interface or subinterface based on a flexible set of criteria. In addition, CAR classifies packets by setting the IP precedence. CAR can be used to rate-limit traffic based on packet characteristics such access list, incoming interface, or IP precedence. CAR provides configurable actions, such as transmit, drop, or set precedence, when traffic conforms to or exceeds the rate limit.
Community list—A community is a group of destinations that share some common attribute. You use community lists to create groups of communities to use in a match clause of a route map. Just like an access list, a series of community lists can be created.
Internet Protocol (IP) precedence—Bits within the ToS (type of service) field of the IP header that can be used to classify packets.
QoS group ID—User-specified number that is assigned to a packet when that packet matches user-specified criteria. The packet can then be classified based on that number.
Weighted Random Early Detection (WRED)—Drops packets selectively based on IP precedence. Packets with a higher IP precedence are less likely to be dropped than packets with a lower precedence. Thus, higher priority traffic is delivered with a higher probability than lower priority traffic. WRED is useful on any output interface where you expect to have congestion. However, WRED is usually used in the core routers of a network, rather than the edge. Edge routers assign IP precedences to packets as they enter the network. WRED uses these precedences to determine how it treats different types of traffic.
Document Conventions
Command descriptions use these conventions:
•
Boldface indicates commands and keywords that are entered literally as shown.
•
Italics indicate arguments for which you supply values; in contexts that do not allow italics, arguments are enclosed in angle brackets ( >).
•
Square brackets ([ ]) indicate optional elements.
•
Braces ({ }) group required choices, and vertical bars ( | ) separate alternative elements.
•
Braces and vertical bars within square brackets ([{ | }]) indicate a required choice within an optional element.
Platforms
This feature is supported on these platforms:
•
Cisco 7200 series
•
Cisco 7500 series
•
Cisco 7000 series routers with the RSP7000 and RSP7000CI
Supported MIBs and RFCs
None
Restrictions
Subinterfaces on an ATM interface that has the bgp-policy command enabled must use Cisco Express Forwarding (CEF) mode because distributed CEF (dCEF) is not supported. dCEF uses the VIP rather than the RSP to perform forwarding functions.
Prerequisites
For the QoS policy propagation via BGP feature to work, you must enable BGP and CEF/dCEF on the router.
Configuration Tasks
This section describes the tasks required to configure QoS policy propagation via BGP and how to verify the information is correct. You can propagate QoS policy using access lists, BGP community lists, and BGP AS paths. You can use any combination of these methods. The tasks are discussed in the following sections:
•
Configure Policy Propagation Based on Community Lists
•
Configure Policy Propagation Based on the AS Path Attribute
•
Configure Policy Propagation Based on an Access List
Configuring QoS policy propagation via BGP consists of the following steps:
Step 1
Configure BGP and CEF or DCEF.
Step 2
Define the policy.
Step 3
Apply the policy through BGP.
Step 4
Configure the access list, BGP community list, or BGP AS path.
Step 5
Enable the policy on an interface.
Step 6
Enable CAR, DWRED, or DWFQ to use the policy.
This document discusses steps 2 through 5. To configure BGP, refer to the Network Protocols Configuration Guide, Part 1. To configure CEF/dCEF, CAR, and WRED, refer to the appropriate feature module. Cisco IOS Release 11.1 documents and Release 11.1 CC feature documents can be found on the Documentation CD-ROM and on Cisco Connection Online (CCO).
For examples of propagating QoS policy using access lists, BGP community lists, and BGP AS paths, see the "Configuration Examples" section later in this chapter.
Configure Policy Propagation Based on Community Lists
This section describes how to configure QoS policy propagation via BGP using community lists. The tasks listed in this section are required unless noted as optional. This section assumes you have already configured CEF/dCEF and BGP on your router.
CautionIf you specify both source and destination on the interface, the software looks up the source address in the routing table and classifies the packet based on the source address first; then the software looks up the destination address in the routing table and reclassifies it based on the destination address.
To configure the router to propagate the IP precedence and/or the QoS group ID based on the community lists, perform the following steps beginning in global configuration mode:
Configure Policy Propagation Based on the AS Path Attribute
This section describes how to configure QoS policy propagation via BGP based on the AS path. The tasks listed in this section are required unless noted as optional. This section assumes you have already configured CEF/dCEF and BGP on your router.
CautionIf you specify both source and destination on the interface, the software looks up the source address in the routing table and classifies the packet based on the source address first; then the software looks up the destination address in the routing table and reclassifies it based on the destination address.
To configure the router to propagate the IP precedence and QoS group ID based on the AS-path attribute, perform the following steps beginning in global configuration mode:
Configure Policy Propagation Based on an Access List
This section describes how to configure QoS precedence propagation via BGP based on an access list. The tasks listed in this section are required unless noted as optional. This section assumes you have already configured CEF/dCEF and BGP on your router.
CautionIf you specify both source and destination on the interface, the software looks up the source address in the routing table and classifies the packet based on the source address first; then the software looks up the destination address in the routing table and reclassifies it based on the destination address.
To configure the router to propagate the IP precedence and QoS group ID based on an access list, perform the following steps beginning in global configuration mode:
Verify the Configuration
This section describes how to verify that QoS policy propagation via BGP is configured correctly. The tasks listed in this section are optional.
To verify the configuration, perform any of the following steps in EXEC mode:
Configuration Examples
The following example shows how to create route maps to match access lists, BGP community lists, and BGP AS paths and apply IP precedence to routes learned from neighbors.
In this example, Router A learns routes from AS 10 and AS 60. QoS policy is applied to all packets that match the defined route maps. Any packets from Router A to AS 10 or AS 60 are sent to the appropriate QoS policy.
Router A's Configuration
router bgp 30table-map precedence-mapneighbor 20.20.20.1 remote-as 10neighbor 20.20.20.1 send-communityneighbor 20.20.20.1 route-map precedence-map out!ip bgp-community new-format!! Match community 1 and set the IP precedence to priority and set the QoS group to 1route-map precedence-map permit 10match community 1set ip precedence priorityset ip qos-group 1!! Match community 2 and set the IP precedence to immediateroute-map precedence-map permit 20match community 2set ip precedence immediate!! Match community 3 and set the IP precedence to flashroute-map precedence-map permit 30match community 3set ip precedence flash!! Match community 4 and set the IP precedence to flash-overrideroute-map precedence-map permit 40match community 4set ip precedence flash-override!! Match community 5 and set the IP precedence to criticalroute-map precedence-map permit 50match community 5set ip precedence critical!! Match community 6 and set the IP precedence to internetroute-map precedence-map permit 60match community 6set ip precedence internet!! Match community 7 and set the IP precedence to networkroute-map precedence-map permit 70match community 7set ip precedence network!! Match ip address access list 69 or match AS path 1, set the IP precedence to! critical, and set the Qos group to 9route-map precedence-map permit 75match ip address 69match as-path 1set ip precedence criticalset ip qos-group 9!! For everything else, set the IP precedence to routineroute-map precedence-map permit 80set ip precedence routine!! Define the community listsip community-list 1 permit 60:1ip community-list 2 permit 60:2ip community-list 3 permit 60:3ip community-list 4 permit 60:4ip community-list 5 permit 60:5ip community-list 6 permit 60:6ip community-list 7 permit 60:7!! Define the AS pathip as-path access-list 1 permit ^10_60! Define the access listaccess-list 69 permit 69.0.0.0Router B's Configuration
router bgp 10neighbor 30.30.30.1 remote-as 30neighbor 30.30.30.1 send-communityneighbor 30.30.30.1 route-map send_community out!ip bgp-community new-format! Match prefix 10 and set community to 60:1route-map send_community permit 10match ip address 10set community 60:1!! Match prefix 20 and set community to 60:2route-map send_community permit 20match ip address 20set community 60:2!! Match prefix 30 and set community to 60:3route-map send_community permit 30match ip address 30set community 60:3!! Match prefix 40 and set community to 60:4route-map send_community permit 40match ip address 40set community 60:4!! Match prefix 50 and set community to 60:5route-map send_community permit 50match ip address 50set community 60:5!! Match prefix 60 and set community to 60:6route-map send_community permit 60match ip address 60set community 60:6!! Match prefix 70 and set community to 60:7route-map send_community permit 70match ip address 70set community 60:7!! For all others, set community to 60:8route-map send_community permit 80set community 60:8!! Define the access listsaccess-list 10 permit 61.0.0.0access-list 20 permit 62.0.0.0access-list 30 permit 63.0.0.0access-list 40 permit 64.0.0.0access-list 50 permit 65.0.0.0access-list 60 permit 66.0.0.0access-list 70 permit 67.0.0.0The following example shows how to configure several interfaces to classify packets based on the IP precedence and QoS group ID.
interface Hssi5/0/0.1 point-to-pointip address 200.28.38.2 255.255.255.0bgp-policy source ip-prec-mapno ip mroute-cacheno cdp enableframe-relay interface-dlci 20 IETFinterface Hssi6/0/0.1 point-to-pointip address 200.28.28.2 255.255.255.0bgp-policy source qos-groupno ip mroute-cacheno cdp enableframe-relay interface-dlci 20 IETFCommand Reference
This section documents new commands. All other commands used with this feature are documented in the Cisco IOS Release 11.1 command reference publications.
bgp-policy
To enable QoS policy propagation via BGP on the interface, use the bgp-policy interface configuration command. To disable QoS policy propagation via BGP, use the no form of the command.
bgp-policy {source | destination} {ip-prec-map | ip-qos-map}
Syntax Description
Default
Disabled
Command Mode
Interface configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1 CC. This command was modified in Cisco IOS Release 11.1(20)CC to include the input, output, and ip-qos-map keywords. This command was modified in Cisco IOS Release 11.1(21)CC to change the input keyword to source and the output keyword to destination.
For the QoS policy propagation via BGP feature to work, you must enable BGP and CEF/dCEF. In addition, the proper route-map configuration must be in place to specify the IP precedence or QoS group ID (for example, set ip precedence route-map configuration command).
CautionIf you specify both source and destination on the interface, the software looks up the source address in the routing table and classifies the packet based on the source address first; then the software looks up the destination address in the routing table and reclassifies it based on the destination address.
To display QoS policy information for the interface, use the show ip interface command.
Examples
The following example enables QoS policy propagation via BGP on an interface based on the source address and the IP precedence setting. For a complete configuration example, refer to the "Configuration Examples" section earlier in this document.
router# configure terminalrouter(config)# interface ethernet 4/0/0router(config-if)# bgp-policy source ip-prec-maprouter(config-if)# endrouter#set ip qos-group
To set a group ID that can be used later to classify packets, use the set ip qos-group route-map configuration command. To remove the group ID, use the no form of this command.
set ip qos-group group-id
no set ip qos-group group-idSyntax Description
Default
No group ID is specified.
Command Mode
Route map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1 CC.
This feature allows you to set a group ID in the routing table that can be used later to classify packets into QoS groups based on prefix, AS, and community string. These packets can then be rate limited or weighted fair queued based on the QoS group ID.
To display QoS group information, use the show ip cef command.
Examples
The following example sets the QoS group to 1 for all packets that match community 1. These packets are then rate limited based on the QoS group ID. For a complete configuration example, refer to the "Configuration Examples" section earlier in this document.
router# configure terminalrouter(config)# route-map precedence-map permit 10router(config)# match community 1router(config)# set ip qos-group 1router(config)# interface hssi0/0/0router(config-if)# bgp-policy source qos-grouprouter(config-if)# endshow ip cef
To display entries in the FIB table based on the IP address, use the show ip cef EXEC command.
show ip cef network [mask [longer-prefix] [detail]
Syntax Description
Command Mode
EXEC
Usage Guidelines
This command was updated in Cisco IOS Release 11.1 CC to add information on the QoS group ID.
Sample Display
The following is sample output from the show ip cef command for the network address 51.0.0.0:
Router# show ip cef 51.0.0.051.0.0.0/8, version 161, cached adjacency 200.31.51.20 packets, 0 bytes, precedence priority (1), qos-group 1via 50.50.50.1, 0 dependencies, recursivenext hop 200.31.51.2, FastEthernet5/1/0 via 50.0.0.0/8valid cached adjacencyshow ip interface
To display the usability status of interfaces configured for IP, use the show ip interface EXEC command.
show ip interface [type number]
Syntax Description
Command Mode
EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0. This command was modified in Cisco IOS Release 11.1 CC to add information on QoS policy propagation.
The Cisco IOS software automatically enters a directly connected route in the routing table if the interface is usable. A usable interface is one through which the software can send and receive packets. If the software determines that an interface is not usable, it removes the directly connected routing entry from the routing table. Removing the entry allows the software to use dynamic routing protocols to determine backup routes to the network (if any).
If the interface can provide two-way communication, the line protocol is marked "up." If the interface hardware is usable, the interface is marked "up."
If you specify an optional interface type, you will see only information on that specific interface.
If you specify no optional arguments, you will see information on all the interfaces.
When an asynchronous interface is encapsulated with PPP or SLIP, IP fast switching is enabled. A show ip interface command on an asynchronous interface encapsulated with PPP or SLIP displays a message indicating that IP fast switching is enabled.
Sample Display
The following is sample output from the show ip interface command:
Router# show ip interface hssi 5/0/0.1Hssi5/0/0.1 is up, line protocol is upInternet address is 200.28.38.2/24Broadcast address is 255.255.255.255Address determined by non-volatile memoryMTU is 4470 bytesHelper address is not setDirected broadcast forwarding is enabledOutgoing access list is not setInbound access list is not setProxy ARP is enabledSecurity level is defaultSplit horizon is enabledICMP redirects are always sentICMP unreachables are always sentICMP mask replies are never sentIP fast switching is enabledIP fast switching on the same interface is enabledIP Optimum switching is disabledIP Flow switching is enabledIP CEF switching is enabledIP Distributed switching is enabledIP LES Flow switching turbo vectorIP Flow CEF switching turbo vectorIP multicast fast switching is disabledIP multicast distributed fast switching is disabledRouter Discovery is disabledIP output packet accounting is disabledIP access violation accounting is disabledTCP/IP header compression is disabledProbe proxy name replies are disabledGateway Discovery is disabledPolicy routing is disabledWeb Cache Redirect is disabledBGP Policy Mapping is enabled (source ip-prec-map)describes the fields in the display.


