Configuring Quality of Service
This chapter explains how to configure Quality of Service (QoS) on the RPM-XF, which supports the following features:
•
Committed access rate (CAR) measures traffic rates and, based on the rates, takes actions (such as dropping packets). RPM-XF QoS supports CAR ("police") on input packets and shaping ("shape") on output packets.
•
Random Early Detection (RED) is a congestion avoidance mechanism that takes advantage of TCP's congestion control mechanism. By randomly dropping packets prior to periods of high congestion, RED tells the packet source to decrease its transmission rate. Assuming the packet source is using TCP, it will decrease its transmission rate until all the packets reach their destination, indicating that the congestion is cleared.
•
Weighted random early detection (WRED) uses an algorithm to randomly discard packets during congestion. This approach reduces congestion by causing the packet source to slow down.
Weighted RED (WRED) generally 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.
•
Bandwidth reservation, also referred as fair queueing, assigns bandwidth to certain streams of packets.
•
Low-latency priority queueing can be assigned for real-time traffic such as voice and video.
•
Traffic shaping is used to control traffic by maintaining data flow at a set rate.
•
Set specifies an IP precedence/DSCP or MPLS experimental value that can be used by other routers to manage QoS.
•
802.1q support allows PXF switching for ARPA encapsulation.
In addition, the RPM-XF supports QoS policy propagation through the Border Gateway Protocol (QPPB). For a QPPB configuration example, see "Quality of Service Policy Propagation Example Using Border Gateway Protocol" section
General QoS Configuration Procedure
You can configure WRED, CAR, and other qualities of service by performing the following tasks:
1.
Create a QoS boilerplate that defines the criteria for prioritizing traffic.
2.
Apply the boilerplate to an interface.
Figure 10-1 shows an overview of the QoS process.
Figure 10-1 QoS Process
Creating a QoS Boilerplate
This section provides the information you need to create a QoS boilerplate. To create a QoS boilerplate, perform two procedures:
1.
Create a class map—The class map tells the RPM-XF how to recognize the packets that are subject to QoS.
2.
Create a policy map—The policy map lists QoS services to be applied to packets described by one or more class maps.
Creating a Class Map
The following procedure describes how to create a class map.
Step 1
Assign a name to your class map by entering the class-map name command. In the following example, a class map named mink is created.
Router(config)# class-map mink
As the example shows, after you enter the class-map name command, you enter class map configuration mode (config-cmap).
Note
Some Cisco IOS documents refer to the QoS configuration modes as the modular CLI.
Step 2
Describe the characteristics of the packets that are subject to QoS by entering the match command. In the following example, the packet is described as being associated to access group 10 and having the IP precedence bit set to 1.
Router(config-cmap)# match access-group 10
Router(config-cmap)# match ip precedence 1
Step 3
Exit class map configuration mode.
Router(config-cmap)# exit
As a result of the creation of a class map, the router can recognize packets that are subject to QoS. You must now tell the router the action to take on those packets.
Creating a Policy Map
The following procedure describes how to create a policy map.
Step 1
Assign a name to your policy map by entering the policy-map name command. In the following example, a policy map named lynx is created.
Router(config)# policy-map lynx
As the example shows, after you enter the policy-map name command, you enter policy map configuration mode (config-pmap).
Step 2
Associate the policy map with a class map.
Router(config-pmap)# class mink
As the example shows, after entering the class name command, enter the policy map class configuration mode (config-pmap-c).
Step 3
Describe the QoS actions you want the router to perform when the router encounters a packet that has the characteristics described by the class map.
In this example, the router executes default behavior for the police command. (See the "Specifying a Committed Access Rate" section for details.)
Router(config-pmap-c)#
police 80000
Step 4
Exit policy map configuration mode.
Router(config-pmap-c)# exit
Router(config-pmap)# exit
You have completed the creation of a QoS boilerplate, which can be assigned to an interface.
Assigning a QoS Boilerplate to an Interface
Use the service-policy command to assign a QoS boilerplate to an interface. In the following example, the policy map lynx is assigned to traffic that enters the gigabit Ethernet interface of an RPM-XF.
Router(config)# interface gigabitethernet 1/0
Router(config-if)# service-policy input lynx
Class Map Commands
This section describes commands for creating and modifying class maps.
Creating a Class Map
You can create a class map and enter class-map configuration mode by entering the class-map command.
class-map [match-any | match-all] class-map-name
[no] class-map class-map-name
|
|
match-any |
A single match rule is sufficient for class membership. |
match-all |
Only those packets that have all the specified attributes are part of the class. |
class-map-name |
Any word or number. Note The class named class-default is reserved and cannot be modified with match statements. |
The default value is match-all.
Use the no class-map command to delete a class map.
Cisco IOS software supports a maximum of 255 unique class maps.
In the following example, a class-map named mink is created. In the example, the default value of match-all is used.
Router(config)# class-map mink
Matching Attributes
Use the match command to define the characteristics of the packets that belong to the class map.
[no] match match_statement
The match command match_statement is one of the following values:
•
match [not] access-group number—Specifies that the packet must (or must not) be permitted by the access group whose number is from 1 to 2699.
•
match [not] access-group name access-list-name—Specifies that the packet must (or must not) be permitted by the access list whose name is access-list-name.
•
match [not] any—Specifies that all (or no) packets belong to this class.
•
match [not] ip dscp code-point-value1 [º[code-point_value8]]—Specifies that the packet IP differentiated service code point (dscp) value must (or must not) match one or more of the code-point values in the range 0 to 63. You can specify up to eight code point values, separating consecutive values with a space.
•
match [not] ip precedence prec_value1 [º[prec_value8]]—Specifies that the packet IP precedence value must (or must not) match one or more precedence values in the range 0 to 7. You can specify up to eight precedence values, separating consecutive values with a space.
•
match [not] qos-group number—Specifies that the packet QoS group number value must (or must not) be in the group number range 0 to 99.
•
match [not] ip rtp lowest-udp-port:2000-65535 range:0-16383—Used to match a packet that has an even numbered UDP port within (or outside of) the specified range. Only even ports are matched because they carry the real time data streams. Odd ports are not matched because they only carry control information.
•
match [not] mpls experimental experimental-value—Specifies that the packet experimental bits must (or must not) match the specified experimental value(s) (in the range from 0 to 7). You can specify up to eight experimental values, separating consecutive values with a space. Note that this match can only match MPLS (tagged) frames.
Use the no form of this command to disable the match attributes.
To construct your mapping rules, enter one or more match commands. Each packet is compared to the criteria specified by the match commands to determine if the packet contains the attribute you specify.
The RPM-XF supports a maximum of 16 match statements in a class map.
In the following example, a class map is created that tells the router to look for packets that belong to access group 1 and have an IP precedence value of 3 or 7.
Router(config)# class-map mink
Router(config-cmap)# match access-group 1
Router(config-cmap)# match ip precedence 3 7
Policy Map Commands
This section describes commands for creating and modifying policy maps.
Creating a Policy Map
You can create a policy map and enter policy-map configuration mode by entering the policy-map command from global configuration mode.
policy-map policy-map-name
[no] policy-map policy-map-name
The policy-map-name can be any word or number.
Use the no form of the command to remove a policy map.
In the following example, a policy map named lynx is created.
Router(config)# policy-map lynx
Assigning a Class to a Policy Map
Use the class class-map-name command from policy-map configuration mode to assign a class map to a policy map.
[no] class class-map-name
The class-map-name is the name assigned to the class map.
Use the no form of the command to remove a class.
You can use a special class map name called class-default on a given interface to assign QoS policies to all packets that are not already described in the policy map by a class of a different name.
After you enter the class class-map-name command, you enter policy-map class configuration mode, in which you can enter QoS policies.
Tip
A packet is processed by a policy map as soon as a match is found. When you assign class names to a policy map, assign the first name to the class that is most likely to be used. This can improve QoS performance.
In the following example, the class map named mink is assigned to the policy map named lynx.
Router(config)# policy-map lynx
Router(config-pmap)# class mink
In the following example, the default class map is assigned to the policy map named lynx.
Router(config)# policy-map lynx
Router(config-pmap)# class class-default
Specifying a Committed Access Rate
To specify a committed access rate (CAR), enter the police command while you are in policy-map class configuration mode. You can use this command to control low-priority traffic, so that an interface has more bandwidth for high-priority traffic or to enforce a specific rate on an interface.
police bps [normal-burst | max-burst | conform-action action | exceed-action action]
[
no] police [normal-burst | max-burst | conform-action action | exceed-action action]
|
|
bps |
A value from 8000 to 2,000,000,000 bits per second. |
normal-burst |
A value from 2000 to 1,024,000,000 bytes. |
max-burst |
A value from 2000 to 1,024,000,000 bytes. |
conform-action action |
Indicates the action that should be taken if the rate is not exceeded. See Table 10-1 for a list of actions. |
exceed-action action |
Indicates the action that should be taken if the rate is exceeded. See Table 10-1 for a list of actions. |
Table 10-1 CAR Actions
|
|
drop |
Drop all matched traffic. |
set-dscp-transmit value |
Set dscp and send it (mark unmatched traffic with a new dscp value). Value is in the range 0 to 63. |
set-mpls-exp-transmit value |
Set the MPLS experimental bits and send it. Value is in the range 0 to 7. |
set-prec-transmit value |
Rewrite packet procedure and send it (mark matched traffic with a new IP precedence value). Value is in the range 0 to 7. |
set-qos-transmit value |
Set QoS group and send it (mark matched traffic with a new QoS value). Value is in the range 0 to 99. |
transmit |
Forward traffic. |
If you enter only police bps at the command line, the following default behavior occurs: traffic that conforms to the bps value is transmitted and traffic that exceeds the bps value is dropped.
Use the no form of the command to disable policing.
In the following example, CAR is assigned to the class named mink.
Router(config)# policy-map lynx
Router(config-pmap)# class mink
Router(config-pmap-c)# police 720000 90000 90000 conform-action transmit exceed-action
drop
Enabling Weighted Random Early Detection
Use the random-detect command to enable weighted random early detection (WRED), which randomly discards packets during congestion based on IP precedence settings. The random-detect command enables a WRED drop policy for a traffic class that includes a bandwidth guarantee.
Note
The bandwidth must be set before you can enable WRED (see Bandwidth Reservation and Low-Latency Priority Queueing).
Note
On the ATM interface, you can only use WRED on a variable bit rate (VBR) PVCs. You cannot use WRED on PVCs configured for an unspecified bit rate (UBR).
random-detect [ewc value | prec prec-value min-value max-value mark-denom]
[
no] random-detect [ewc value | prec prec-value min-value max-value mark-denom]
|
|
ewc value |
Exponential-weighting-constant (ewc) value allows you to modify the default method that random-detect uses to calculate average queue size. Random-detect determines the average queue size based on the current queue length and the last average queue length. You can specify a value from 1 to 16. • The higher the value, the more dependent the average is on the historical average, making WRED slow to react to changing traffic conditions that may be only temporary. • The lower the value, the less dependent the average is on the historical average, making WRED more sensitive to rapidly changing traffic conditions. |
prec |
Specify the precedence values according to the information in Table 10-2. |
Tip
In most cases, the benefits of WRED can be best realized if you use the random-detect keyword without arguments.
Table 10-2 Precedence Values
|
|
precedence |
A value from 0 to 7. 0 typically represents low-priority traffic that can be aggressively managed (dropped) ; 7 represents high-priority traffic. |
min-value |
Specifies a minimum threshold. Enter a value in the range of 32 to 16,384. |
max-value |
Specifies a maximum threshold. Enter a value in the range of 32 to 16,384. |
mark-denom |
Specifies drop probability. Enter a value in the range of 1 to 65,535. For example, if you set this value to 256, 1 out of 256 packets is dropped when the average queue is at the maximum threshold. |
Use the no form of the command to disable WRED.
The following example shows the implementation of WRED.
Router(config)# policy-map lynx
Router(config-pmap)# class class-default
Router(config-pmap-c)# random-detect
Bandwidth Reservation and Low-Latency Priority Queueing
This section explains how to configure bandwidth reservation and low-latency priority. These queueing methods let you offer differentiated service to customers.
The RPM-XF typically uses a single queue for packets from all traffic streams waiting for the link to transmit them in the order of their arrival. This method is simple, efficient, and offers optimal average delay per packet because it always uses the entire link bandwidth. But the single queue method does not distinguish among different traffic streams—the more traffic in a stream, the larger its share of the link bandwidth.
Bandwidth reservation divides the link bandwidth among the different traffic streams into multiple queues, with each queue receiving its fair share of the link bandwidth divided among all non-empty queues. You do not waste bandwidth associated with an empty queue, and by dividing the unused bandwidth to the queues with packets to send, multiple queueing has the same average delay per packet as the single queue scheme, with the advantage of fairness.
Low-latency priority queueing lets you assign a guaranteed minimum bandwidth to one queue to minimize the packet-delay variance for delay-sensitive traffic, such as live voice and video.
Note
Bandwidth and low-latency priority cannot be combined in the same class.
Bandwidth Reservation Queueing
Use the bandwidth command to create multiple class queues.
The rate-in-kbps parameter is a value in the range from 8 to 2,000,000 representing between 1% to 99% of the link bandwidth.
Use the no form of the command to disable bandwidth queueing.
The following sample configuration creates two class queues.
•
A 18 kbps queue for packets with IP precedence bit settings of 1, 2, 3, or 4.
•
A 54 kbps queue for packets with IP precedence bit settings of 5, 6, or 7.
Assuming that the interface has 128 kbps bandwidth, the two class queues receive 25% and 62% of the interface bandwidth. All other traffic, including IP precedence 0, receives the rest of the bandwidth—8 kbps or 13%.
Router# configure terminal
Router(config)# class-map city
Router(config-cmap)# match ip precedence 1 2 3 4
Router(config-cmap)# class-map boston
Router(config-cmap)# match ip precedence 5 6 7
Router(config-cmap)# policy-map precedence-queues
Router(config-pmap)# class city
Router(config-pmap-c)# bandwidth 16
Router(config-pmap-c)# class boston
Router(config-pmap-c)# bandwidth 40
Router(config-pmap-c)# interface switch1:1
Router(config-if)# service-policy output precedence-queues
The actual throughput of a queue may be higher when one or more of the other queues on the link are idle.
Low-Latency Priority Queueing
Low-latency priority queueing lets you assign a specified share of the link bandwidth to one queue that receives priority over all others. Low-latency priority queueing minimizes the packet-delay variance for delay-sensitive traffic, such as live voice and video.
Use the priority command to create a low-latency priority queue.
The rate-in-kbps parameter is a value in the range from 8 to 2,000,000, representing the guaranteed minimum bandwidth.
Use the no form of the command to disable priority queueing.
The following sample configuration creates a priority queue for voice traffic, and applies it to interface switch1.1.
Router# configure terminal
Router(config)# class-map voice
Router(config-cmap)# match ip rtp 2000 2000
Router(config-cmap)# policy-map voice-queue
Router(config-pmap)# class voice
Router(config-pmap-c)# priority 56
Router(config-pmap-c)# interface switch1:1
Router(config-if)# service-policy output voice-queue
The actual throughput of a priority queue may be higher than the minimum because it allocates the entire link bandwidth to a priority queue if all the other queues on the link are empty.
Generic Traffic Shaping
The RPM-XF uses traffic shaping as a mechanism to control or modify the flow of traffic on an interface to meet the requirements of a remote site, or to conform to a service rate that is provided on that interface. Generic Traffic Shaping (GTS) supports traffic shaping on all interfaces regardless of the encapsulation of the interface.
There are two implementations of traffic shaping in the current Cisco IOS software: GTS and Frame Relay Traffic Shaping (FRTS). This section describes GTS.
Note
The RPM-XF does not support Frame Relay.
Note
Use the traffic shape command in policy map class configuration mode. It is not supported in interface configuration mode.
The traffic shape command limits the throughput equal to rate-in-kbps.
The rate-in-kbps parameter is a value in the range from 56 to 2,000,000, representing the maximum throughput allowed.
Use the no form of the command to disable traffic shaping.
In the following sample configuration, the traffic shape is set to a throughput of 100.
Router(config-pmap-c)# shape 100
Specifying a Queue Limit
This section describes how to specify the number of packets held by the queue. Increase the queue limit to reduce the number of packets dropped due to temporary congestion on the assigned interface. Queue limit operates on the default packet drop method of congestion management.You cannot use the queue limit command on ATM PVCs configured for unspecified bit rate (UBR).
Note
On the ATM interface, you can only apply queue limits on variable bit rate (VBR) PVCs.
The packets parameter is a number of packets from 32 to 16,384 in powers of 2 (for example, 64, 128, 256).
Note
If the number of packets specified is not a power of 2, the number entered is automatically rounded up to a power of 2. For example, if the number of packets is entered as 60, it will be rounded up to 64.
Use the no form of the command to return the queue limit to its default value.
Use the show interface command to determine the current queue limit. If you set the queue limit to a high value, this may reduce the number of packet buffers available to other interfaces.
In the following example, the queue limit is set to 256 packets:
Router(config)# policy-map lynx
Router(config-pmap)# class class-default
Router(config-pmap-c)# queue-limit 256
Applying Set Values
The set command allows you to mark bit values that can be used by other routers to manage QoS.
set {ip {dscp value | precedence value} | qos-group value | atm-clp | mpls experimental
value}
[
no] set {ip {dscp value | precedence value} | qos-group value | mpls experimental value}
Externally visible values are the following.
|
|
dscp |
A value between 0 and 63. |
precedence |
A precedence bit setting between 0 and 7. 0 typically represents low-priority traffic; 7 represents high-priority traffic. |
Internally visible values are the following.
|
|
qos-group |
Sets a group ID in the routing table that can be used to classify packets into QoS groups. Values range between 0 and 99. |
atm-clp |
Sets the ATM cell-loss priority. Use this argument to increase the likelihood that ATM cells on the specified PVC are dropped under heavy congestion. |
mpls experimental |
A value between 0 and 7, where 0 typically represents low priority traffic and 7 represents high priority traffic. Note set mpls experimental will cause the experimental bits to be set only on imposition frames (i.e. frames with tags being added to the MPLS tag stack). Note set mpls experimental is only valid on an input policy map. |
Use the no form of the command to return the set values to their defaults.
In the following sample configuration, bit values are set for IP precedence and a QoS group.
Router(config)# policy-map lynx
Router(config-pmap)# class mink
Router(config-pmap-c)# set ip precedence 7
Router(config-pmap-c)# set qos-group 8
Service-Policy Command
To associate a policy map with an interface, use the service-policy command.
service-policy [input | output] name
[
no] service-policy [input | output] name
|
|
input |
Incoming traffic on an interface. |
output |
Outgoing traffic on an interface. |
name |
Name of a policy map. |
Note
The bandwidth, low-latency priority, random-delete, queue limit, and shape parameters are used with output only, and are ignored when using the input argument.
Use the no form of the command to remove a service policy from an interface.
No more than two service policies can be associated with an interface, one for input and one for output.
On the ATM interface, you can only apply a policy map on a PVC.
In the following example, the policy map lynx is applied to the incoming traffic on an interface of the Gigabit Ethernet line card.
Note
CEF switching must be on to use the service-policy command.
Router(config)# interface gigabitethernet 1/0
Router(config-if)# service-policy input lynx
In the following example, a policy map is applied to an ATM PVC.
Router(config)# interface switch1.1
Router(config-if)# pvc 0/101
Router(config-if-atm-vc)# service-policy input lynx
Show Commands
This section lists show commands you can use to get information about class maps and policy maps.
show policy map
This command displays the configuration of one or all policy maps and lists information about the configurations. For example,
Router# show policy-map lynx
random-detect exponential-weighting-constant 9
random-detect precedence 0 16 32 10
random-detect precedence 1 18 32 10
random-detect precedence 2 20 32 10
random-detect precedence 3 22 32 10
random-detect precedence 4 24 32 10
random-detect precedence 5 26 32 10
random-detect precedence 6 28 32 10
random-detect precedence 7 30 32 10
show policy-map interface
This command displays statistics of a policy map on one or all interfaces. This example shows statistics for a particular serial interface.
Router# show policy-map interface [pos1/0]
service-policy input: lynx
class-map: mink (match-all)
show class-map
This command lists the class maps and displays their match statements. For example,
Router# show class-map mink
Class Map match-all mink (id 3)
Class Map match-all pink (id 4)
Class Map match-any class-default (id 0)
Class Map match-all customer_pri (id 2)
show vlans
This command can list up to 1000 virtual LAN subinterfaces. For example,
Virtual LAN ID: 1 (IEEE 802.1Q Encapsulation)
VLAN Trunk Interface: GigabitEthernet1/0
Protocols Configured: Address: Received: Transmitted:
IP 200.1.1.1 18 273894058
Quality of Service Policy Propagation Example Using Border Gateway Protocol
Quality of Service (QoS) Policy Propagation using Border Gateway Protocol (QPPB) allows you to classify packets by IP precedence based on BGP community lists, BGP autonomous system paths, and access lists. 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 policies to fit your business model.
The example below shows how t odo the following.
1.
Create route maps to match BGP community lists, access lists, and BGP AS paths.
2.
Apply IP precedence to routes learned from neighbors.
In this example, the RPM-XF learns routes from autonomous system (AS) 10 and AS 60. QoS policy is applied to all packets that match the defined route maps. Any packets from the RPM-XF to AS 10 or AS 60 are sent to the appropriate QoS policy (see Figure 10-2).
Figure 10-2 RPM-XF Routes and QoS Policy Application
RPM-XF Configuration
Router(config)# router bgp 30
Router(config)# table-map precedence-map
Router(config-router)# neighbor 20.20.20.1 remote-as 10
Router(config-router)# neighbor 20.20.20.1 send-community
Router(config-router)# neigh 20.20.20.1 route-map precedence-map out
Router(config)# ip bgp-community new-format
Match community 1, set the IP precedence to priority, and set the QoS group to 1.
Router(config)# route-map precedence-map permit 10
Router(config-route-ma)# match community 1
Router(config-route-ma)# set ip precedence priority
Router(config-route-ma)# set ip qos-group 1
Match community 2 and set the IP precedence to immediate.
Router(config)# route-map precedence-map permit 20
Router(config-route-ma)# match community 2
Router(config-route-ma)# set ip precedence immediate
Match community 3 and set the IP precedence to Flash.
Router(config)# route-map precedence-map permit 30
Router(config-route-ma)# match community 3
Router(config-route-ma)# set ip precedence flash
Match community 4 and set the IP precedence to Flash-override.
Router(config)# route-map precedence-map permit 40
Router(config-route-ma)# match community 4
Router(config-route-ma)# set ip precedence flash-override
Match community 5 and set the IP precedence to critical.
Router(config)# route-map precedence-map permit 50
Router(config-route-ma)# match community 5
Router(config-route-ma)# set ip precedence critical
Match community 6 and set the IP precedence to internet.
Router(config)# route-map precedence-map permit 60
Router(config-route-ma)# match community 6
Router(config-route-ma)# set ip precedence internet
Match community 7 and set the IP precedence to network.
Router(config)# route-map precedence-map permit 70
Router(config-route-ma)# match community 7
Router(config-route-ma)# set 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 9.
Router(config)# route-map precedence-map permit 75
Router(config-route-ma)# match ip address 69
Router(config-route-ma)# match as-path 1
Router(config-route-ma)# set ip precedence critical
Router(config-route-ma)# set ip qos-group 9
For everything else, set the IP precedence to routine.
Router(config)# route-map precedence-map permit 80
Router(config-route-ma)# set ip precedence routine
Define the community lists.
Router(config)# ip community-list 1 permit 60:1
Router(config)# ip community-list 2 permit 60:2
Router(config)# ip community-list 3 permit 60:3
Router(config)# ip community-list 4 permit 60:4
Router(config)# ip community-list 5 permit 60:5
Router(config)# ip community-list 6 permit 60:6
Router(config)# ip community-list 7 permit 60:7
Define the AS path.
Router(config)# ip as-path access-list 1 permit ^10_60
Define the access list.
Router(config)# access-list 69 permit 69.0.0.0
Router B Running Configuration
RouterB(config)# router bgp 10
RouterB(config-router)# neighbor 30.30.30.1 remote-as 30
RouterB(config-router)# neighbor 30.30.30.1 send-community
RouterB(config-router)# neigh 30.30.30.1 route-map send_community out
RouterB(config)# ip bgp-community new-format
Match prefix 10 and set community to 60:1.
RouterB(config)# route-map send_community permit 10
RouterB(config-route-ma)# match ip address 10
RouterB(config-route-ma)# set community 60:1
Match prefix 20 and set community to 60:2.
RouterB(config)# route-map send_community permit 20
RouterB(config-route-ma)# match ip address 20
RouterB(config-route-ma)# set community 60:2
Match prefix 30 and set community to 60:3.
RouterB(config)# route-map send_community permit 30
RouterB(config-route-ma)# match ip address 30
RouterB(config-route-ma)# set community 60:3
Match prefix 40 and set community to 60:4.
RouterB(config)# route-map send_community permit 40
RouterB(config-route-ma)# match ip address 40
RouterB(config-route-ma)# set community 60:4
Match prefix 50 and set community to 60:5.
RouterB(config)# route-map send_community permit 50
RouterB(config-route-ma)# match ip address 50
RouterB(config-route-ma)# set community 60:5
Match prefix 60 and set community to 60:6.
RouterB(config)# route-map send_community permit 60
RouterB(config-route-ma)# match ip address 60
RouterB(config-route-ma)# set community 60:6
Match prefix 70 and set community to 60:7.
RouterB(config)# route-map send_community permit 70
RouterB(config-route-ma)# match ip address 70
RouterB(config-route-ma)# set community 60:7
For all others, set community to 60:8.
RouterB(config)# route-map send_community permit 80
RouterB(config-route-ma)# set community 60:8
Define the access lists.
RouterB(config)# access-list 10 permit 61.0.0.0
RouterB(config)# access-list 20 permit 62.0.0.0
RouterB(config)# access-list 30 permit 63.0.0.0
RouterB(config)# access-list 40 permit 64.0.0.0
RouterB(config)# access-list 50 permit 65.0.0.0
RouterB(config)# access-list 60 permit 66.0.0.0
RouterB(config)# access-list 70 permit 67.0.0.0
The following example shows how to configure several interfaces to classify packets based on the IP precedence and QoS group ID.
ip address 200.28.38.2 255.255.255.0
bgp-policy source ip-prec-map
frame-relay interface-dlci 20 IETF
ip address 200.28.28.2 255.255.255.0
bgp-policy source qos-group