Traffic Control and shaping outlined
before shaping and flow control, packets must be classified;
traffic shaping queues excess packets, to maintain a desired flow rate.
Traffic control mark or discard excess flow, maintained at a restricted flow rate.
Control and congestion management mechanisms shaping not, even if there is no congestion, can take effect.
Why do we need regulation?
Restrict access to the resources of high-speed access
to restrict access to certain applications or flow rate of the business class
of layer 2 and layer 3 traffic over the mark
Why plastic?
Prevention and Management in ATM and Frame Relay networks, the flow path of asymmetric bandwidth;
frame relay or ATM network, traffic transmission rate specification
is mainly used in low-speed link
For example transmission control
limit file-sharing service flow rate of 56Kbps
for business-critical traffic does not limit
Examples Traffic Shaping
central site to the remote site does not match the rate of
remote site to the central site over the flow
of two or more cases can cause buffering and delayed or dropped packets
Regulation and shaping
control:
applied to the input direction and the output direction
discarded packets exceeds the limit
dropped TCP packets will result in retransmission of
supporting packet marking and marking
reduce the use of buffers (shaping require additional shaping queue system )
shaping:
only applied to the output direction
than the traffic will be placed in a buffer until the buffer is full
the excess buffers the packet retransmissions can be reduced TCP
does not support the packet is marked with the marking
plastic Frame Relay the congestion indication
Token bucket
when QOS policies embodiment, the user data may be limited to a specific bandwidth when the traffic exceeds the rated bandwidth of the user, it will take over the bandwidth of other ways to deal with. To measure the rated bandwidth, network devices are not using a simple traffic over digital subtraction to decide.
For example, a bandwidth of 100K, and sent to the user's flow of 110K, 110K network devices do not rely minus 100K equal to 10K, it is considered that the user traffic than 10K.
When the network device if the measured traffic exceeds the rated bandwidth required to view the token bucket, the token bucket is placed a certain number of tokens, a token interface sends or receives data 1bit (sometimes 1 Byte data), when the interface after the data by 1bit, but also to remove a token from the bucket. When no token bucket, any traffic is deemed to exceed the rated bandwidth only when there is a token bucket, the data can only be through the interface.
Single token bucket
if there are enough tokens available bucket (conform action), taken from the token packet size equivalent to Tong, the packet is forwarded, if there is not enough tokens are available (exceed action), discarding (or labeled )data pack.
Based on a single token bucket control of
a single rate (uniform rate) Single Barrel: traffic two outcomes, in line with CIR and beyond CIR
Bc: Burst size, the size of the token bucket
Tc: time interval time plus the token, plus a long token
CIR bucket per second to increase the rate of tokens, the user determines the traffic rate
CIR = Bc / Tc
R1(config)#policy-map policy1
R1(config-pmap)#class c1
R1(config-pmap-c)#police ?
<8000-2000000000> Bits per second /CIR
cir Committed information rate
rate Specify police rate
R1(config-pmap-c)#police 8000 ?
<1000-512000000> Burst bytes /Bc
bc Conform burst
conform-action action when rate is less than conform burst
pir Peak Information Rate
<cr>
R1(config-pmap-c)#police 8000 1000 ?
<1000-512000000> Burst bytes
be Excess burst
conform-action action when rate is less than conform burst
pir Peak Information Rate
<cr>
R1(config-pmap-c)#police 8000 1000 conform-action ?
drop drop packet
set-clp-transmit set atm clp and send it
set-discard-class-transmit set discard-class and send it
set-dscp-transmit set dscp and send it
set-frde-transmit set FR DE and send it
set-mpls-exp-imposition-transmit set exp at tag imposition and send it
set-mpls-exp-topmost-transmit set exp on topmost label and send it
set-prec-transmit rewrite packet precedence and send it
set-qos-transmit set qos-group and send it
transmit transmit packet
R1(config-pmap-c)#police 8000 1000 conform-action transmit ex
R1(config-pmap-c)#police 8000 1000 conform-action transmit exceed-action drop
Single rate double barrel
Be: burst number (extra number) of excess
Tc: Bc tokens in the token bucket
Te: Be token bucket token in
return value is exceeded conform conform exceed, violate violation
when the first to a token bucket plus excess, will be put into the second tub.
Compared with the former, allowing only the burst traffic, in fact, beyond Te, as is discarded.
Case:
average rate or 8000bit / s, the normal bucket (normal burst size) size of 1000 bytes, the bucket size exceeds (the excess burst) is 1000 bytes.
policy-map policy1
class c1
police 8000 1000 1000 conform-action transmit exceed-action set-qos-transmit 1 violate-action drop
Dual rate double barrel
Tc of the: the Token in the CIR bucket
Tp of: the Token bucket in the PIR the PIR> the CIR, of Be> Bc
traffic policing according to two different rates:
the Committed Information Rate CIR
Peak Information Rate Peak information rate
Single rate configuration, single barrel and double barrel difference is nothing but the operation a is 2, a is 3
AVG-Rate: Traffic Rate in bps (8,000 to 200,000,000)
the BC: Normal Burst sets The size in bytes
the Default IS 1500 bytes, or the CIR / 32, Whatever IS iN AREAS OF COMMUNICAITIONS
the BE: Excess Burst sets The size in bytes
the default IS the BC
Action:
TRANSMIT (default Conform Action)
drop (default Exceed and violate Action)
SET-prec-TRANSMIT IP-precedence
SET-DSCP-TRANSMIT DSCP
QoS QoS-TRANSMIT-SET-Group
SET TRANSMIT-MPLS MPLS-exp-exp-
SET TRANSMIT frde-
SET-CLP-TRANSMIT
Dual rate configuration
specified CIR and the PIR
CIR = submission information rate (bps)
the PIR peak information rate (bps)
BC be keywords and their associated parameters (integration, respectively - and peak burst - burst) is optional
policy-map policy
class c1
police cir 1600000 bc 400000 pir 2400000 be 400000
conform-action transmit
exceed-action transmit
violate-action drop
case study
policy-map police1
class bulk-ftp
police cir percent 20 pir percent 40 conform-action set-dscp-transmit af11 exceed-action set-dscp-transmit 0 violate-action drop
!
interface Ethernet 0/0
service-policy input police1
!
interface Serial 0/0
service-policy input police1