Adaptive Shaping
Adaptive abstraction agreement requires alone a accessory bulk of accomplishment compared to the topics
covered so far. To configure it, aloof add the appearance adaptive min-rate command beneath the shape
command. Archetype 14-4 shows a abbreviate example.
Frame Relay Cartage Abstraction Configuration
Frame Relay Cartage Abstraction (FRTS) differs from CB Abstraction in several cogent ways,
although the basal token-bucket mechanics are identical. The afterward account highlights some
of the key similarities and differences:
■ FRTS can be acclimated alone on Anatomy Relay interfaces, admitting CB Abstraction can be acclimated with any
underlying abstracts articulation protocol.
■ Like CB Shaping, FRTS allows a ample cardinal of IOS queuing accoutrement to be acclimated instead of a
single FIFO abstraction queue.
Example 14-4 Adaptive CB Abstraction Configuration
policy-map shape-all
class class-default
shape boilerplate 96000 9600 ms
shape adaptive 32000
484 Affiliate 14: Abstraction and Policing
■ Unlike CB Shaping, FRTS does not acquiesce any adorned queuing accoutrement to be enabled on the
physical interface circumstantial with FRTS.
■ FRTS consistently shapes the cartage on anniversary VC separately.
■ FRTS cannot allocate cartage in adjustment to appearance a subset of cartage on a accurate VC.
■ Unlike CB Shaping, FRTS can dynamically apprentice the CIR, Bc, and Be ethics configured
on the Anatomy Relay about-face by application the Enhanced Local Management Interface (ELMI)
feature.
Prior to Cisco IOS adaptation 12.2(13)T, MQC did not abutment FRTS, authoritative FRTS configuration
significantly altered from that of CB Shaping. After IOS releases abutment the agreement of
FRTS application MQC. Some specifics of MQC-based FRTS are included in this section. In the non-
MQC configuration, which is abundant first, FRTS organizes a set of abstraction ambit (rate, Bc,
and so on) into a alleged Anatomy Relay map class, application the map-class frame-relay command. The
frame-relay chic command and the chic command afresh accredit to those map classes, defining the
shaping ambit to use for anniversary Anatomy Relay VC. Figure 14-5 shows several examples of how
these commands assignment together.
Figure 14-5 Assignment of Map Classes to DLCIs with FRTS
As Figure 14-5 illustrates, FRTS uses the map chic referenced by the chic command beneath the
frame-relay interface-dlci command, if it exists (example: DLCI 203). If not, FRTS assigns the
map chic based on the subinterface’s frame-relay chic command (example: DLCI 103).
Otherwise, FRTS looks for the ambience on the concrete interface (example: DLCI 102). If FRTS
still has not begin a advertence to a map class, it uses absence settings for that VC (example: DLCI
502). (Beware of enabling FRTS and not ambience a VC’s abstraction parameters, abnormally if you want
to get added than 56 kbps out of that VC!) These rules can be abbreviated as follows:
■ If the chic map-class-name command is configured beneath the interface-dlci command, that
map chic defines the FRTS ambit for that VC.
■ If not, if the frame-relay chic map-class-name command is configured beneath the
subinterface, that map chic defines the FRTS ambit for the absolute basal VCs.
interface s0/0
encapsulation frame-relay
frame-relay traffic-shaping
frame-relay chic C2
!
interface s0/0.1 point-to-point
frame-relay chic C1
frame-relay interface-dlci 101
!
!
interface s0/0.2 point-to-point
! No frame-relay chic command present
frame-relay interface-dlci 102
!
interface s0/0.3 multipoint
frame-relay chic C2
frame-relay interface-dlci 103
frame-relay interface-dlci 203
class C3
interface s1/1
encapsulation frame-relay
frame-relay traffic-shaping
! No frame-relay chic command here
!
interface s1/1.1 point-to-point
frame-relay chic C2
frame-relay interface-dlci 501
!
!
interface s1/1.2 point-to-point
! No frame-relay chic command present
frame-relay interface-dlci 502
map-class frame-relay C1
Sets CIR, Bc, and so on
map-class frame-relay C2
Sets CIR, Bc, and so on
map-class frame-relay C3
Sets CIR, Bc, and so on
Default Settings aback no class:
CIR 56 kbps, Bc = 7000 bits, Tc = 125 ms
Frame Relay Cartage Abstraction Agreement 485
■ If not, if the frame-relay chic map-class-name command is configured beneath the physical
interface, that map chic defines the FRTS ambit for the absolute basal VCs.
■ If not, FRTS uses the absence settings of abstraction at 56 kbps, Bc = 7000 bits, and Tc = 125 ms.
FRTS Agreement Application the traffic-rate Command
FRTS uses two capital styles of agreement for the abstraction parameters. The frame-relay trafficrate
average [peak] command configures the boilerplate and aiguille rate, with Cisco IOS calculating
Bc and Be with an affected Tc of 125 ms. This adjustment is simpler to configure, but offers no ability
to tune Tc or set Bc and Be.
Example 14-5 uses FRTS to apparatus the aforementioned requirements as the aboriginal CB Abstraction example
shown in Archetype 14-1, except that it uses FIFO queuing for the interface software queues.
Example 14-5 FRTS Configuration, 64 kbps, with the frame-relay traffic-rate Command
! The frame-relay traffic-shaping command enables FRTS for all VCs on s0/0. The
! frame-relay chic shape-all-64 command refers to a map class.
interface Serial0/0
encapsulation frame-relay
frame-relay traffic-shaping
!
interface Serial0/0.1 point-to-point
frame-relay chic shape-all-64
frame-relay interface-dlci 101
! curve bare for brevity
! Above, agenda that the frame-relay chic shape-all-64 command could accept been
! listed beneath S0/0 instead, with the aforementioned results, as alone one VC exists on the
! interface. Alternately, the chic shape-all-64 command could accept been used
! beneath the frame-relay interface-dlci 101 command.
! Next, The traffic-rate command sets the aiguille according to the average, which results
! in a Be of 0.
map-class frame-relay shape-all-64
frame-relay traffic-rate 64000 64000
! The appearance anatomy pvc command, with no DLCI listed, does not account FRTS info, but
! it does appearance FRTS advice aback the specific DLCI is given. The chat “fifo” refers
! to the abstraction queue.
R3# appearance frame-relay pvc 101
PVC Statistics for interface Serial0/0 (Frame Relay DTE)
DLCI = 101, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0.1
! curve bare for brevity
shaping active
traffic abstraction drops 2774
Queueing strategy: fifo
Output chain 3/40, 678 drop, 3777 dequeued
! The abutting command shows the absence 125-ms Tc, the affected Bc = Tc * CIR,
continues
486 Affiliate 14: Abstraction and Policing
To use the frame-relay traffic-rate command to use a Be, the aiguille amount charge be configured, and
it charge be added than the boilerplate rate. This command causes FRTS to account Be based on this
formula:
Be = Tc * (PIR – CIR)
In Archetype 14-5, Be = 0.125 * (64,000 – 64,000) = 0, as apparent in the achievement of the appearance trafficshape
command in the example. However, if the frame-relay traffic-rate 64000 96000 command
had been used, the Be would be .125 (96,000 – 64,000) = 4000.
Setting FRTS Ambit Explicitly
The frame-relay cir, frame-relay Bc, and frame-relay Be commands can be acclimated to directly
set FRTS ambit in an FRTS map class, instead of ambience the Bc, Be, and Tc values
indirectly application the frame-relay traffic-rate command. Archetype 14-6 shows two new map
classes on the aforementioned router configured in Archetype 14-5. These new map classes use these
additional commands to set FRTS ambit explicitly, which is decidedly advantageous for tuning
FRTS to use a baby Tc.
! and it uses the aforementioned argument in the headings as in the CB Abstraction examples.
R3# appearance traffic-shape
Interface Se0/0.1
Access Target Byte Sustain Balance Breach Increment Adapt
VC Account Amount Absolute bits/int bits/int (ms) (bytes) Active
101 64000 1000 64000 0 125 1000 —
! This command lists basal stats for FRTS. The “fcfs” refers to the abstraction queue
! as well, acceptation “first appear aboriginal served,” which agency the aforementioned affair as “fifo.”
R3# appearance traffic-shape queue
Traffic queued in abstraction chain on Serial0/0.1 dlci 101
Queueing strategy: fcfs
Queueing Stats: 23/40/959 (size/max total/drops)
! curve bare for brevity
Example 14-6 FRTS Agreement by Ambience CIR and BC to Manipulate Tc
! map-class shape-all-64-long sets CIR and Bc directly, abaft Be to 0, with
! Tc affected via Tc = Bc/CIR
map-class frame-relay shape-all-64-long
frame-relay cir 64000
frame-relay bc 8000
! All VCs on s0/0.1 that do not accept chic commands will use shape-all-64-long.
R3(config)# interface consecutive 0/0.1
R3(config-subif)# anatomy chic shape-all-64-long
R3(config-subif)# ^Z
! This command confirms the configured rate, with the Tc affected as Bc/rate, or
Example 14-5 FRTS Configuration, 64 kbps, with the frame-relay traffic-rate Command (Continued)
Frame Relay Cartage Abstraction Agreement 487
FRTS Agreement Application LLQ
FRTS supports a array of queuing accoutrement for managing packets it queues. The queuing apparatus is
enabled via a command in the map class. Archetype 14-7 shows aloof such an example, with a new
map class. The requirements implemented in this archetype are as follows:
■ Appearance cartage on the two VCs (101 and 102) on s0/0 with the aforementioned settings for shaping.
■ Use LLQ alone on the VC with DLCI 101.
■ Set Be to 0, and tune Tc to 10 ms.
Note that the archetype does not appearance the agreement for activity map queue-voip. Its full
configuration can be apparent aback in Archetype 14-2.
! in this case, 8000/64000. Agenda the absence Be of 0 is additionally listed.
R3# appearance traffic-shape
Interface Se0/0.1
Access Target Byte Sustain Balance Breach Increment Adapt
VC Account Amount Absolute bits/int bits/int (ms) (bytes) Active
101 64000 1000 8000 0 125 1000 -
! The abutting commands actualize addition map class, with the Bc set to 1/100th
! of the abstraction amount (10 ms).
R3(config)# map-class frame-relay shape-all-64-shortTC
R3(config-map-class)# frame-relay cir 64000
R3(config-map-class)# frame-relay bc 640
R3(config-map-class)# int s 0/0.1
R3(config-subif)# anatomy chic shape-all-64-shortTC
R3# appearance traffic-shape
Interface Se0/0.1
Access Target Byte Sustain Balance Breach Increment Adapt
VC Account Amount Absolute bits/int bits/int (ms) (bytes) Active
101 64000 80 640 0 10 80 -
Example 14-7 FRTS to Two Sites, with LLQ Acclimated to Appearance the Chain to Site 1
R3# appearance running-config
! FRTS is aboriginal enabled, and chic shape-all-96 is set up to clarify bottomward to the
! absolute VCs, bold no added frame-relay chic or chic subcommands are applied
! to them.
interface Serial0/0
encapsulation frame-relay
frame-relay chic shape-all-96
frame-relay traffic-shaping
! DLCI 101 will use chic shape-with-LLQ based on the abutting few commands.
interface Serial0/0.1 point-to-point
continues
Example 14-6 FRTS Agreement by Ambience CIR and BC to Manipulate Tc (Continued)
488 Affiliate 14: Abstraction and Policing
FRTS Adaptive Shaping
Adding FRTS adaptive abstraction agreement to an absolute FRTS agreement is relatively
simple. To accredit it, do the following:
1. Add either a frame-relay adaptive-shaping becn or frame-relay adaptive-shaping
foresight command into the adapted map class.
2. To set the minimum to article added than the absence of 50 percent of the abstraction rate, add
the frame-relay mincir amount command in the map class.
frame-relay chic shape-with-LLQ
frame-relay interface-dlci 101
! DLCI 102 will use chic shape-all-96 because it is configured beneath s0/0.
interface Serial0/0.2 point-to-point
frame-relay interface-dlci 102
! The alone aberration amid the two map classes is the service-policy output
! voip-and-allelse command, which enables LLQ in the shape-with-LLQ class.
map-class frame-relay shape-all-96
frame-relay cir 96000
frame-relay bc 960
frame-relay be 0
!
map-class frame-relay shape-with-LLQ
frame-relay cir 96000
frame-relay bc 960
frame-relay be 0
service-policy achievement queue-voip
! The appearance policy-map interface command does not appearance any LLQ stats with FRTS.
! Instead, the appearance frame-relay pvc DLCI command is required, with achievement similar
! to the appearance policy-map interface command.
R3# appearance frame-relay pvc 101
PVC Statistics for interface Serial0/0 (Frame Relay DTE)
DLCI = 101, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0.1
! curve bare for brevity
shaping active
traffic abstraction drops 0
service activity queue-voip
Serial0/0.1: DLCI 101 -
Service-policy output: queue-voip
Class-map: voip-rtp (match-all)
5101 packets, 326464 bytes
30 additional offered amount 25000 bps, bead amount 0 bps
Match: ip rtp 16384 16383
Weighted Fair Queueing
Strict Priority
! curve bare for brevity
Example 14-7 FRTS to Two Sites, with LLQ Acclimated to Appearance the Chain to Site 1 (Continued)
Policing Concepts and Agreement 489
FRTS with MQC
MQC-based FRTS is addition adjustment of configuring the aforementioned behaviors that you can configure
with the bequest FRTS commands. FRTS affiliation into the MQC represents the continuing
migration adjoin MQC for its modular characteristics, rather than the abounding abstracted accoutrement that
MQC replaces, to accomplish configuring QoS appearance easier.
Configuring MQC-based FRTS requires adeptness of a few key rules:
■ You charge actualize a absence chic in the FRTS account policy, beneath which all FRTS commands
are applied.
■ If FRTS and breach are both activated to a PVC application the MQC commands, the
interface will use a bifold FIFO queue. One of the queues will backpack acute articulation traffic
and ascendancy traffic; the added chain will backpack all added traffic.
■ If you are application nested activity maps, and you are application CBWFQ, the abstraction amount configured
in the ancestor activity map represents the absolute bandwidth accessible to the adolescent activity map.
■ If the appearance boilerplate and appearance adaptive commands are both configured, the available
bandwidth is based on the bandwidth configured for the appearance adaptive command.
■ The frame-relay ip rtp antecedence command is not accurate in MQC, because LLQ replaces
this activity in MQC.
See the “Further Reading” area at the end of the affiliate for a advertence to additional
information on, and examples of, configuring MQC-based FRTS.
Policing Concepts and Configuration
Class-Based Policing (CB Policing) performs altered centralized processing than the older,
alternative policer in Cisco router IOS, namely committed admission amount (CAR). This area focuses
on CB Policing, starting with concepts and afresh accoutrement agreement details.
CB Policing Concepts
CB Policing is enabled for packets either entering or departure an interface, or those entering or
exiting a subinterface. It monitors, or meters, the bit amount of the accumulated packets; aback a packet
pushes the metered amount accomplished the configured policing rate, the policer takes activity adjoin that
packet. The best advancing activity is to abandon the packet. Alternately, the policer can simply
re-mark a acreage in the packet. This additional advantage allows the packets through, but if congestion
occurs at after places during a marked-down packet’s journey, it is added acceptable to be discarded.
Table 14-4 lists the keywords acclimated to betoken the policer’s actions.
490 Affiliate 14: Abstraction and Policing
CB Policing categorizes packets into two or three categories, depending on the appearance of policing,
and afresh applies one of these accomplishments to anniversary chic of packet. The categories are conforming
packets, above packets, and actionable packets. The CB Policing argumentation that dictates when
packets are placed into a accurate chic varies based on the blazon of policing. The abutting three
sections outline the types of CB Policing logic.
Single-Rate, Two-Color Policing (One Bucket)
Single-rate, two-color policing is the simplest advantage for CB Policing. This adjustment uses a single
policing amount with no balance burst. The policer will afresh use alone two categories (conform and
exceed), defining a altered activity on packets of anniversary type. (Typically, the accommodate activity is to
transmit the packet, with the beat activity either actuality to bead the packet or mark it down.)
While this blazon of policing argumentation is generally alleged single-rate, two-color policing, it is sometimes
called single-bucket two-color policing because it uses a distinct badge brazier for internal
processing. Like shaping’s use of badge buckets, the policer’s capital argumentation relates to bushing the
bucket with tokens, and afresh spending the tokens. Over time, the policer refills the bucket
according to the policing rate. For instance, policing at 96 kbps, over the advance of 1 second, adds
12,000 tokens to the bucket. (A badge represents a byte with policers, so 12,000 tokens is 96,000
bits’ account of tokens.)
CB Policing does not bushing the brazier based on a time interval. Instead, CB Policing reacts to the
arrival of a packet by replenishing a prorated cardinal of tokens into the bucket. The cardinal of
tokens is authentic by the afterward formula:
Table 14-4 Policing Accomplishments Acclimated CB Policing
Command Advantage Approach and Function
drop Drops the packet
set-dscp-transmit Sets the DSCP and transmits the packet
set-prec-transmit Sets the IP Precedence (0 to 7) and sends the packet
set-qos-transmit Sets the QoS Group ID (1 to 99) and sends the packet
set-clp-transmit Sets the ATM CLP bit (ATM interfaces only) and sends the packet
set-fr-de Sets the Anatomy Relay DE bit (Frame Relay interfaces only) and sends the packet
transmit Sends the packet
NOTE Agenda that a badge represents the appropriate to accelerate 1 byte, so the blueprint includes the
division by 8 to catechumen the units to bytes instead of bits.
(Current_packet_arrival_time – Previous_packet_arrival_time) * Police_rate
8
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Policing Concepts and Agreement 491
The abstraction abaft the blueprint is simple—essentially, a baby cardinal of tokens are replenished
before anniversary packet is policed; the end aftereffect is that tokens are replenished at the policing rate.
For example, for a badge amount of 128 kbps, the policer should furnish 16,000 tokens per second.
If 1 additional has delayed aback the antecedent packet arrived, CB Policing would furnish the bucket
with 16,000 tokens. If 0.1 additional has anesthetized aback the antecedent packet had arrived, CB Policing
would furnish the brazier with 0.1 second’s account of tokens, or 1600 tokens. If 0.01 additional had
passed, CB Policing would furnish 160 tokens at that time.
The policer afresh considers whether it should assort the anew accustomed packet as either conforming
or above the cartage contract. The policer compares the cardinal of bytes in the packet (represented
here as Xp, with “p” acceptation “packet”) to the cardinal of tokens the badge bucket
(represented actuality as Xb, with “b” acceptation “bucket”). Table 14-5 shows the accommodation logic, along
with whether the policer spends/removes tokens from the bucket.
As continued as the all-embracing bit amount does not beat the policing rate, the packets will all conform.
However, if the amount is exceeded, afresh as tokens are removed for anniversary befitting packet, the
bucket will eventually empty—causing some packets to beat the contract. Over time, tokens are
added aback to the bucket, so some packets will conform. Already the bit amount lowers beneath the
policing rate, all packets will afresh accommodate to the contract.
Single-Rate, Three-Color Policer (Two Buckets)
When you appetite the policer to badge at a accurate rate, but to additionally abutment a Be, the policer uses
two badge buckets. It additionally uses all three categories for packets—conform, exceed, and violate.
Combining those concepts together, such policing is about alleged single-rate, three-color policing.
As before, CB Policing fills the buckets in acknowledgment to packet arrival. (For abridgement of a bigger set of
terms, this discussions calls the aboriginal brazier the Bc bucket, because it is Bc in size, and the other
one the Be bucket, because it is Be in size.) CB Policing fills the Bc brazier aloof like a single-bucket
model. However, if the Bc brazier has any tokens larboard in it, some will spill; these tokens afresh fill
the Be bucket. Figure 14-6 shows the basal process.
After bushing the buckets, the policer afresh determines the chic for the anew accustomed packet, as
shown in Table 14-6. In this case, Xbc is the cardinal of tokens in the Bc bucket, and Xbe is the
number in the Be bucket.
Table 14-5 Single-Rate, Two-Color Policing Argumentation for Categorizing Packets
Category Requirements Tokens Drained from Bucket
Conform If Xp <= Xb Xp tokens
Exceed If Xp > Xb None
492 Affiliate 14: Abstraction and Policing
Figure 14-6 Refilling Bifold Badge Buckets with CB Policing
Two-Rate, Three-Color Policer (Two Buckets)
The third capital advantage for CB Policing uses two abstracted policing rates. The lower amount is the
previously discussed committed advice amount (CIR), and the higher, additional amount is alleged the
peak advice amount (PIR). Packets that abatement beneath the CIR accommodate to the cartage contract.
Packets that beat the CIR, but abatement beneath PIR, are advised to beat the contract. Finally,
packets above the PIR are advised to breach the contract.
The key aberration amid the single-rate and dual-rate three-color policers is that the dual-rate
method about allows abiding balance bursting. With a single-rate, three-color policer, an
excess access exists, but the access is abiding alone until the Be brazier empties. A aeon of
relatively low activity has to activity to bushing the Be bucket. With the dual-rate method, the Be bucket
does not await on spillage aback bushing the Bc bucket, as depicted in Figure 14-7. (Note that these
buckets are sometimes alleged the CIR and PIR buckets with dual-rate policing.)
The refilling of the two buckets based on two altered ante is absolute important. For example,
imagine you set a CIR of 128 kbps (16 kilobytes/second), and a PIR of 256 kbps (32 kBps). If
0.1 additional anesthetized afore the abutting packet arrived, afresh the CIR brazier would be replenished with
1600 tokens (1/10 of 1 second’s account of tokens, in bytes), while the PIR brazier would be
replenished with 3200 tokens. So, there are added tokens to use in the PIR bucket, as compared
to the CIR bucket.
Table 14-6 Single-Rate Three-Color Policing Argumentation for Categorizing Packets
Category Requirements Tokens Drained from Bucket
Conform Xp <= Xbc Xp tokens from the Bc bucket
Exceed Xp > Xbc and Xp <= Xbe Xp tokens from the Be bucket
Violate Xp > Xbc and Xp > Xbe None
Bc Bucket
Size: Bc
Spillage Falls
into Bucket2
Be Bucket
Size: Be
Spillage
Wasted
$.25
Token
Refill Bytes Upon Accession of Packet, per Formula:
(New_packet_arrival_time - previous_packet_arrival_time) * Policed_rate / 8
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
Policing Concepts and Agreement 493
Figure 14-7 Refilling CIR and PIR Bifold Badge Buckets
Next, the policer categorizes the packet. The alone aberration in argumentation as compared with the singlerate,
three-color policer is accent in Table 14-7, accurately accompanying to how tokens are
consumed for befitting packets.
While Table 14-7 does outline anniversary detail, the basal argumentation adeptness not be accessible from the
table. In effect, by bushing the Be brazier based on the college PIR, but additionally clarification tokens from the
Be brazier for packets that accommodate to the lower CIR, the Be brazier has tokens that represent the
difference amid the two rates.
Class-Based Policing Configuration
CB Policing uses the accustomed MQC commands for configuration. As a result, a activity map can police
all packets application the acceptable class-default class, or it can abstracted cartage into classes, apply
different policing ambit to altered classes of traffic, or alike artlessly not badge some classes.
The badge command configures CB Policing central a activity map. On the badge command, you define
the policing amount in bps, the Bc in bytes, and the Be in bytes, forth with the accomplishments for anniversary category:
police bps burst-normal burst-max conform-action activity exceed-action action
[violate-action action]
Table 14-7 Two-Rate, Three-Color Policing Argumentation for Categorizing Packets
Category Requirements Tokens Drained from Bucket
Conform Xp <= Xbc Xp tokens from the Bc bucket
AND
Xp tokens from the Be bucket
Exceed Xp > Xbc and Xp <= Xbe Xp tokens from the Be bucket
Violate Xp > Xbc and Xp > Xbe None
Bc Bucket
Size: Bc
PIR Bucket
Size: Be
Spillage
Wasted
Spillage
Wasted
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
$.25
Token
Pro-rated Refill,
based on arrival
time and Bc
Pro-rated Refill,
based on arrival
time and Be
494 Affiliate 14: Abstraction and Policing
Single-Rate, Three-Color Policing of All Traffic
Example 14-8 shows how to badge all traffic, with belief as follows:
■ Actualize a single-rate, three-color policing configuration.
■ All cartage policed at 96 kbps at ingress.
■ Bc of 1 second’s account of cartage is allowed.
■ Be of 0.5 second’s account of cartage is allowed.
■ The conform, exceed, and breach accomplishments should be to forward, mark bottomward to DSCP 0, and
discard, respectively.
The badge command defines a distinct rate, but the actuality that it is a three-color policing
configuration, and not a two-color configuration, is not accessible at aboriginal glance. To configure a
single-rate, three-color policer, you charge to configure a breach activity or absolutely set Be to
something beyond than 0.
Example 14-8 Single-Rate, Three-Color CB Policing at 96 kbps
! The badge command sets the amount (in bps), Bc and Be (in bytes), and the three
! actions.
policy-map police-all
class class-default
! note: the badge command wraps about to a additional line.
police cir 96000 bc 12000 be 6000 conform-action abode exceed-action set-dscptransmit
0 violate-action drop
!
interface Serial1/0
encapsulation frame-relay
service-policy ascribe police-all
! The appearance command beneath lists statistics for anniversary of the three categories.
ISP-edge# appearance policy-map interface s 1/0
Serial1/0
Service-policy input: police-all
Class-map: class-default (match-any)
8375 packets, 1446373 bytes
30 additional offered amount 113000 bps, bead amount 15000 bps
Match: any
police:
cir 96000 bps, conform-burst 12000, excess-burst 6000
conformed 8077 packets, 1224913 bytes; action: transmit
exceeded 29 packets, 17948 bytes; action: set-dscp-transmit 0
violated 269 packets, 203512 bytes; action: drop
conformed 95000 bps, beat 0 bps breach 20000 bps
Policing Concepts and Agreement 495
Policing a Subset of the Traffic
One of the advantages of CB Policing is the adeptness to accomplish policing per class. Archetype 14-9
shows CB Policing with HTTP cartage classified and policed abnormally than the blow of the traffic,
with the afterward criteria:
■ Badge web cartage at 80 kbps at admission to the ISP-edge router. Abode befitting and
exceeding traffic, but abandon actionable traffic.
■ Badge all added cartage at 16 kbps at admission to the ISP-edge router. Mark bottomward above and
violating cartage to DSCP 0.
■ For both classes, set Bc and Be to 1 second’s account and .5 second’s account of traffic,
respectively.
CB Policing Defaults for Bc and Be
If you do not configure a Bc amount on the badge command, afresh CB Policing configures a default
value agnate to the bytes that could be beatific in 1/4 additional at the authentic policing rate. The
formula is as follows:
(CIR * 0.25 second) CIR
Bc = —––––––––––––––– = –––—––––
8 bits/byte 32
The alone allotment that may not be accessible is the analysis by 8 on the left—that is artlessly for the
conversion from $.25 to bytes. The algebraic reduces to CIR/32. Also, if the blueprint yields a number
less than 1500, CB Policing uses a Bc of 1500.
Example 14-9 CB Policing 80 kbps for Web Traffic, 16 kbps for the Blow with Markdown to Be, at
ISP-Edge Router
class-map match-all match-web
match agreement http
! The new activity map uses the new chic to bout http, and class-default to
! bout all added traffic.
policy-map police-web
class match-web
police cir 80000 bc 10000 be 5000 conform-action abode exceed-action transmit
violate-action drop
class class-default
police cir 16000 bc 2000 be 1000 conform-action abode exceed-action
transmit violate-action set-dscp-transmit 0
!
interface Serial1/0
encapsulation frame-relay
service-policy ascribe police-web
496 Affiliate 14: Abstraction and Policing
If the badge command does not accommodate a Be value, the absence Be ambience depends on the blazon of
policing. Table 14-8 summarizes the details.
Configuring Dual-Rate Policing
Dual-rate CB Policing requires the aforementioned MQC commands, but with hardly altered syntax on
the badge command, as apparent here:
police {cir cir} [bc conform-burst] {pir pir} [be peak-burst]
[conform-action activity [exceed-action activity [violate-action action]]]
Note that the syntax of this command requires agreement of both the CIR and a PIR because
the coiled brackets beggarly that the constant is required. The command includes a abode to set
the Bc amount and the Be amount as well, additional the aforementioned set of options for conform, exceed, and
violate actions. For example, if you capital to accomplish dual-rate policing, with a CIR of
96 kbps and a PIR of 128 kbps, you would artlessly use a command like badge cir 96000 pir
128000, with alternative ambience of Bc and Be, additional the settings for the accomplishments for anniversary of the
three categories.
Multi-Action Policing
When CB Policing re-marks packets instead of auctioning them, the architecture adeptness alarm for marking
more than one acreage in a packet. For instance, aback transmitting into a Anatomy Relay cloud, it might
be advantageous to mark both DSCP and FR DE aback a packet violates the contract. Marking multiple
fields in the aforementioned packet with CB Policing is alleged multi-action policing.
The badge command uses a hardly altered syntax to apparatus multi-action policing. By
omitting the accomplishments from the command, the badge command places the user into a policing
subconfiguration approach in which the accomplishments can be added via abstracted commands (the conformaction,
exceed-action, and violate-action commands). To configure assorted actions, one of these
three activity commands would be acclimated added than once, as apparent in Archetype 14-10, which marks
DSCP 0 and sets FR DE for packets that breach the cartage contract.
Table 14-8 Ambience CB Policing Bc and Be Defaults
Type of Policing
Configuration
Telltale Signs in the police
Command Defaults
Single rate, two blush No violate-action configured Bc = CIR/32; Be = 0
Single rate, three blush violate-action is configured Bc = CIR/32; Be = Bc
Dual rate, three blush PIR is configured Bc = CIR/32; Be = PIR/32
Policing Concepts and Agreement 497
Policing by Percentage
As it does with the appearance command, Cisco IOS supports configuring policing ante as a percentage
of articulation bandwidth. The Bc and Be ethics are configured as a cardinal of milliseconds, from which
IOS calculates the absolute Bc and Be ethics based on how abounding $.25 can be beatific in that many
milliseconds. Archetype 14-11 shows an archetype of a dual-rate policing agreement application the
percentage option.
Committed Admission Rate
CAR accouterments single-rate, two-color policing. As compared with that aforementioned advantage in CB Policing,
CAR and CB Policing accept abounding similarities. They both can badge cartage either entering or exiting
Example 14-10 Multi-Action Policing
R3# conf t
Enter agreement commands, one per line. End with CNTL/Z.
R3(config)# policy-map testpol1
R3(config-pmap)# chic class-default
! This command accouterments dual-rate policing as well, but it is not required
R3(config-pmap-c)# badge 128000 256000
R3(config-pmap-c-police)# conform-action transmit
R3(config-pmap-c-police)# exceed-action transmit
R3(config-pmap-c-police)# violate-action set-dscp-transmit 0
R3(config-pmap-c-police)# violate-action set-frde-transmit
Example 14-11 Configuring Percentage-Based Policing
R3# appearance running-config
! Portions bare for Brevity
policy-map test-pol6
class class-default
police cir percent 25 bc 500 ms pir percent 50 be 500 ms accommodate abode beat transmit
violate drop
!
interface serial0/0
bandwidth 256
service-policy achievement test-pol6
! The achievement beneath shows the configured allotment for the amount and the time for
! Bc and Be, with the affected ethics anon below.
R3# appearance policy-map interface s0/0
! curve bare for brevity
police:
cir 25 % bc 500 ms
cir 64000 bps, bc 4000 bytes
pir 50 % be 500 ms
pir 128000 bps, be 8000 bytes
! curve omitted
498 Affiliate 14: Abstraction and Policing
an interface or subinterface; they can both badge subsets of that cartage based on allocation logic;
and they both set the amount in bps, with Bc and Be configured as a cardinal of bytes.
CAR differs from CB Policing apropos four capital features, as follows:
■ CAR uses the rate-limit command, which is not allotment of the MQC set of commands.
■ CAR has a affection alleged cascaded or nested rate-limit commands, which allows multiple
rate-limit commands on an interface to activity the aforementioned packet.
■ CAR does abutment Be; however, alike in this case, it still supports alone accommodate and exceed
categories, and never supports a third (violate) category.
■ Aback CAR has a Be configured, the centralized argumentation acclimated to actuate which packets conform
and beat differs as compared with CB Policing.
CAR puts best ambit on the rate-limit command, which is added beneath an interface or
subinterface:
rate-limit {input | output} [access-group [rate-limit] acl-index] bps burst-normal
burst-max conform-action conform-action exceed-action exceed-action
Example 14-12 shows an archetype CAR agreement for perspective. The belief for the CAR
configuration in Archetype 14-12 are as follows:
■ All cartage policed at 96 kbps at admission to the ISP-edge router.
■ Bc of 1 second’s account of cartage is allowed.
■ Be of 0.5 second’s account of cartage is allowed.
■ Cartage that exceeds the arrangement is discarded.
■ Cartage that conforms to the arrangement is forwarded with Precedence displace to 0.
Example 14-12 CAR at 96 kbps at ISP-Edge Router
! The rate-limit command omits the access-group option, acceptation that it has no matching
! parameters, so all packets are advised to bout the command. The blow of the
! options artlessly bout the requirements.
interface Serial1/0.1 point-to-point
ip abode 192.168.2.251 255.255.255.0
! note: the rate-limit command wraps about to a additional line.
rate-limit ascribe 96000 12000 18000 conform-action set-prec-transmit 0
exceed-action drop
frame-relay interface-dlci 103
! The achievement beneath confirms the parameters, including analogous all traffic.
ISP-edge# appearance interfaces s 1/0.1 rate-limit
Input
matches: all traffic
params: 96000 bps, 12000 limit, 18000 continued limit
Policing Concepts and Agreement 499
To allocate traffic, CAR requires the use of either a accustomed ACL or a rate-limit ACL. A rate-limit ACL
can bout MPLS Experimental bits, IP Precedence, or MAC Address. For added fields, an IP ACL
must be used. Archetype 14-13 shows an archetype in which CAR polices three altered subsets of
traffic application ACLs for analogous the traffic, as able-bodied as attached the all-embracing cartage rate. The belief for
this archetype are as follows (Note that CAR allows alone policing ante that are multiples of 8 kbps):
■ Badge all cartage on the interface at 496 kbps; but afore sending this cartage on its way….
■ Badge all web cartage at 400 kbps.
■ Badge all FTP cartage at 160 kbps.
■ Badge all VoIP cartage at 200 kbps.
■ Choose Bc and Be so that Bc has 1 second’s account of traffic, and Be provides no additional
burst adequacy over Bc.
The CAR agreement refers to IP ACLs in adjustment to allocate the traffic, application three altered IP
ACLs in this case. ACL 101 matches all web traffic; ACL 102 matches all FTP traffic; and ACL
103 matches all VoIP traffic.
Under subinterface s1/0.1, four rate-limit commands are used. The aboriginal sets the amount for all traffic,
dropping cartage that exceeds 496 kbps. However, the accommodate activity is “continue.” This means
that packets befitting to this account will be compared to the abutting rate-limit statements, and
when analogous a statement, some added activity will be taken. For instance, web cartage matches the
second rate-limit command, with a consistent activity of either abode or drop. VoIP cartage would
conformed 2290 packets, 430018 bytes; action: set-prec-transmit 0
exceeded 230 packets, 67681 bytes; action: drop
last packet: 0ms ago, accepted burst: 13428 bytes
last austere 00:02:16 ago, accommodated 25000 bps, exceeded 3000 bps
Example 14-13 Cascaded CAR rate-limit Commands, with Subclassifications
! ACL 101 matches all HTTP traffic
! ACL 102 matches all FTP traffic
! ACL 103 matches all VoIP traffic
interface s 0/0
rate-limit ascribe 496000 62000 62000 conform-action abide exceed-action drop
rate-limit ascribe access-group 101 400000 50000 50000 conform-action abode exceed-action
drop
rate-limit ascribe access-group 102 160000 20000 20000 conform-action abode exceed-action
drop
rate-limit ascribe access-group 103 200000 25000 25000 conform-action abode exceed-action
drop
Example 14-12 CAR at 96 kbps at ISP-Edge Router
500 Affiliate 14: Abstraction and Policing
be compared with the abutting three rate-limit commands afore analogous the aftermost one. As a result,
all cartage is bound to 496 kbps, and three accurate subsets of cartage are prevented from taking
all the bandwidth.
CB Policing can accomplish the aforementioned aftereffect of policing subsets of cartage by application nested activity maps.