Date post: | 12-Jan-2016 |
Category: |
Documents |
Upload: | isabel-lee |
View: | 213 times |
Download: | 0 times |
Connecting people to information
SiSi
SiSi
Internet
W3 Server
SAP Server
FTP ServerWhy Invest in QoS ?
To accelerate the deployment of network services, by enabling predictable response for application traffic and service requirements
Connecting people to information
QoS Signaling
IPv4 PacketData
3-Precedence
ToS Field
IPv6 PacketData
4-Priority
Priority Field
3-Priority
ISL/802.1Q Frame
Tag/MPLS Header
In-Band
RSVP(Guaranteed Service
Controlled Load Service)
Out-of-Band
ATM UNI(CBR, VBR, ABR,
UBR Services)
Frame Relay LMI(CIR Service)
3-Priority
Connecting people to information
Integrated Services
• IntServ (IETF Working group) calls for an explicit signaling protocol (RSVP)
• Resource Reservation Protocol (RSVP)
– Receiver initiated layer 3 signaling protocol
– Designed to reserve bandwidth for in-elastic real-time traffic
– Meant for audio/video streams and multi-cast sessions and not for apps with transient flows
– RSVP classifies traffic based on IP addresses/port numbers
Connecting people to information
Integrated Services - IntServ
• An application explicitly signals its QoS requirements to the network
• Network uses admission and policy control to decide if it can meet the application’s requirements.
• Signaling is done using RSVP and flows from receiver to sender (RESV message)
• At each hop, the network device enforces the contract via policing and prioritizes forwarding via multiple transmit queues
Connecting people to information
Cisco IOS® QoS
Connecting people to information
Cisco IOS® QoS Diff Serv Components
Network EffectMechanismTraffic
Conditioner
Drop RED, WRED, Flow RED
Scheduling
Marking
Metering (Policing)
Shaping
Compress
Fragment
PQ, CQ, WFQ, CB WFQ, WRR, MDRR
CAR, Policy Routing, DSCP, NFCII
CAR
GTS, FRTS
CRTP
LFI, FRF.12
• Sets IP Precedence/DSCP• By Application, Protocol, Address,etc
• Reduce the Volume of Traffic Sent
• Enforce a Maximum Transmission Rate• Conform or Exceed Thresholds
• Bandwidth Management: Traffic Priority• Set Servicing Sequence
• Avoid Congestion by Notifying Source• Prioritize which Traffic Is Told to Reduce
• Conforms Traffic to Committed Bandwidth• Interwork with Layer 2 Notification e.g., BECN
• Reduce Delay on Slower Speed Links• Split, Recombine Larger Frames
Connecting people to information
IP QoS11.1 11.2 11.3
11.1CA11.1CB (ISP8)11.1CC (FIB)11.1CD (ISP8+L3)11.1CE (FIB+L3)
11.1CC
12.0
• WFQ • RED• WRED• RSVP• NetFlow Switching
• CEF• CAR/DCAR• DWFQ• DWRED• QoS Policy Propagation via BGP• NetFlow Services
CYH2 ?8
11.1CC• IP ATM CoS (Ph I)
12.0T• IP ATM CoS (Ph II)
Connecting people to information
One Common Policy
Policy Required:Treat Gold traffic with the highest service level over Silver and Bronze
traffic
Connecting people to information
Sample Class Base Service Deployment
GoldGold
BronzeBronze
Silver
Provisioned Service
Best Effort Delivery
Premium IP
Voice, SNA
E-mail, WebBrowsing
E-Commerce,ERP-Critical
Application Audit Service Levels
Connecting people to information
Queuing’s Premise
• Getting better service is a matter of managing congested queuesmanaging congested queues
• Over-all latency and bandwidth are constant– Make some traffic absorb latency, and therefore give up
bandwidth– Shield other traffic from latency, and therefore gain bandwidth
Connecting people to information
Queuing Algorithms
• Congestion management algorithms– First In First Out– Priority Queuing– Custom Queuing– Weighted Fair Queuing (WFQ)
Connecting people to information
FIFO Queuing
• Premise– Packets leave in order of arrival
• Fixed queue lengths– Results in dropping from tail of
queue under load– Results in flow synchronization
Connecting people to information
FIFO
Transmit Queue
Output Line
Connecting people to information
• Order of Arrival completely determines the bandwidth, promptness and buffer allocation
• Does not provide protection against ill-behaved sources• Bursty sources may cause high delay in delivering some
time sensitive control/signaling messages• Queuing delay of packets is on average and uniform across
all sources
Pitfalls of FIFO
Connecting people to information
FIFO Default and Config
• FIFO is a default queuing algorithm on interfaces that don’t support fancy queuing– i.e. X.25, tunnel
• FIFO can be explicitly configured by turning off WFQ on interface:
no fair-queue
Connecting people to information
caymans#sh int e0Ethernet0 is up, line protocol is up Hardware is Lance, address is 0000.0c14.5a18 (bia 0000.0c14.5a18) Internet address is 171.69.232.116/28 MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255 Encapsulation ARPA, loopback not set, keepalive set (10 sec) ARP type: ARPA, ARP Timeout 04:00:00 Last input 00:00:00, output 00:00:02, output hang never Last clearing of "show interface" counters never
Queueing strategy: fifo Output queue 0/40, 0 drops; input queue 0/75, 0 drops 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 78716 packets input, 25213248 bytes, 0 no buffer Received 78582 broadcasts, 0 runts, 0 giants, 0 throttles 3 input errors, 3 CRC, 3 frame, 0 overrun, 0 ignored, 0 abort 0 input packets with dribble condition detected 71241 packets output, 6905654 bytes, 0 underruns 0 output errors, 1 collisions, 3 interface resets 0 babbles, 0 late collision, 39 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out
FIFO Example
Connecting people to information
Simplest QoS Algorithm: Priority Queuing
• Stated requirement:– If <application> has traffic waiting,
send it nextsend it next
• Commonly implemented– Defined behavior of IP precedence
Connecting people to information
Priority Queuing
Priority (Access)
List
Forwarder
Low Priority
Medium Priority
High Priority
TransmissionQueue
Classification
Connecting people to information
Priority Queuing Implementation Approach
• Identify interesting traffic– Priority-list by protocol
– Priority-list by incoming interface
• Place traffic in various queues
• Dequeue in order of queue precedence
Connecting people to information
Priority Queuing cont.
• Four priority queues - – High, Medium, Normal, Low
• Packets not classified by priority-list mechanism fall into normal queue
• Priority queuing not supported over X.25 and Tunnel interfaces
Connecting people to information
Priority Queuing (PQ)
Traffic Destined
for Interface
Classification by:•Protocol (IP, IPX, AppleTalk, SN
A, DecNet, Bridge, etc.)•Incoming Interface
(EO, SO, S1, etc.)
Interface Buffer Resources
Transmit Queue
Output Line
Interface Hardware•Ethernet•Frame Relay•ATM•Serial Link•Etc.High
Medium
Normal
Low
Q Length Defined by Q
Limit
ClassifyClassify
Absolute Priority Scheduling
Connecting people to information
Pitfalls of Priority-Queuing
• Can cause traffic lockout if configured incorrectly
• FIFO within priority– Within priority, may still be unpredictable– Resource allocation– lower priority queues may starve
Connecting people to information
Priority Queuing Commands
• Priority-list protocol command
– Establishes queuing priority based upon protocol type:
[no] priority-list <list-number> protocol <protocol-name> {high | medium | normal | low} <queue-keyword> <keyword-value>
• Priority-list interface command
– Establishes queuing priority based on packets entering from interface:
[no] priority-list <list-number> interface <interface-type>
<interface-number> {high | medium | normal | low}
Connecting people to information
Priority Queuing Commands
• Priority-list default command
– To assign priority-queue for those packets that do not match any rule in priority-list. If not specified, normal queue is default
[no] priority-list <list> default <queuekeyword>
• Priority-list queue-limit
– Specify maximum number of packets that can be waiting in each priority queue[no] priority-list <list> queue-limit <high-lim> <medium-lim>
<normal-lim> <low-lim>
• Priority-group
– Assigns a specified priority-list to an interface– [no] priority-group <1-16>
Connecting people to information
Priority Queuing ExamplesExample 1:
caymans(config)#access-list 10 permit 239.1.1.0 0.0.0.255
caymans(config)#priority-list 1 protocol ip high list 10
Example 2:
caymans(config)#priority-list 1 protocol decnet high
caymans(config)#priority-list 1 protocol ip medium
Example 3:
caymans(config)#priority-list 1 queue-limit 10 40 60 90
Example 4:
caymans(config)#priority-list 2 protocol decnet medium gt 200
caymans(config)#priority-list 2 protocol bridge high
caymans(config)#priority-list 2 protocol ip medium
Connecting people to information
Priority Queuing Examples
Example 5:caymans(config)#priority-list 4 protocol decnet medium lt 200
caymans(config)#priority-list 4 protocol ip medium tcp 23
caymans(config)#priority-list 4 protocol ip medium udp 53
caymans(config)#priority-list 4 protocol ip high
Example 6:caymans(config)#priority-list 3 interface ethernet 0 high
caymans(config)#priority-list 3 interface ethernet 1 medium
caymans(config)#priority-list 3 interface serial 1 medium
caymans(config)#priority-list 3 default low
Example 7:caymans(config)#interface serial 0
caymans(config-if)#priority-group 4
Connecting people to information
caymans# sh queueing priorityCurrent priority queue configuration:
List Queue Args1 high protocol decnet 1 high protocol ip list 101 medium protocol ip 1 high limit 101 low limit 902 medium protocol decnet gt 2002 high protocol bridge 2 medium protocol ip 3 low default3 high interface Ethernet0 3 medium interface Ethernet1 3 medium interface Serial1 4 medium protocol decnet lt 2004 medium protocol ip tcp port telnet4 medium protocol ip udp port domain4 high protocol ip
Priority Queuing Example
Connecting people to information
caymans#sh int s0Serial0 is down, line protocol is down Hardware is HD64570 MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec) Last input never, output never, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: priority-list 4 Output queue: high 0/20/0, medium 0/40/0, normal 0/60/0, low 0/80/0 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 0 packets input, 0 bytes, 0 no buffer Received 0 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 16 packets output, 2841 bytes, 0 underruns 0 output errors, 0 collisions, 22339 interface resets 0 output buffer failures, 0 output buffers swapped out 108 carrier transitions DCD=down DSR=down DTR=up RTS=up CTS=down
Priority Queuing Example
Connecting people to information
Class-Based Queuing
• Cisco feature: custom queuing
• Stated requirement:– traffic with <characteristics>
needs a guaranteed rate or latencyguaranteed rate or latency
• Characteristics may be:– Application– Traffic source
Connecting people to information
Custom Queuing Implementation Approach
• Identify the traffic
• Distribute into FIFO queue by class
• Dequeue in some rotation– Remove some number of bytes at most– Move to next queue in round robin order
Connecting people to information
Custom Queuing
• Identify the traffic– queue-list by protocol– queue-list by incoming interface
• Distribute into FIFO queue by class– Total 17 queues– Queue number 1-16 is serviced sequentially– Queue number 0 is a system queue, ie. keepalives, therefore emptied first
• Round Robin Dequeue– Configurable byte count to transmit before servicing – the next queue
Connecting people to information
Custom Queuing
Queue #0Queue #0
Transmission QueueTransmission Queue
Queue #1Queue #1Queue #2Queue #2
Queue #3Queue #3Queue #4Queue #4
Queue #5Queue #5Queue #6Queue #6
Queue #9Queue #9Queue #10Queue #10
Queue #11Queue #11Queue #12Queue #12
Queue #13Queue #13Queue #14Queue #14
Queue #15Queue #15Queue #7Queue #7Queue #16Queue #16Queue #8Queue #8
Control Traffic
PriorityPriority (Access) (Access)
List List
ForwarderForwarder
Connecting people to information
Custom Queuing (CQ)
Traffic Destined
for Interface
Interface Buffer
Resources
Q Length Deferred by Queue Limit
Up to 16
3/10
1/10
Weighted RoundRobin Scheduling(byte count)
Classification by:•Protocol (IP, IPX, AppleTalk,
SNA, DecNet, Bridge, etc.)•Incoming interface
(EO, SO, S1, etc.)
Allocate Proportion of
Link Bandwidth)
ClassifyClassify
Interface Hardware•Ethernet•Frame Relay•ATM•Serial Link•Etc.
2/10
3/10
2/10
Link Utilization Ratio
Transmit Queue
Output Line
Connecting people to information
Pitfalls of Custom Queuing
• FIFO by class: – Within class, still unpredictable
Connecting people to information
Custom Queuing Commands
• queue-list protocol
– Establishes queuing priority based on protocol type
[no] queue-list <list-number> protocol <protocol-name> <queue-number> <queue-keyword> <keyword-value>
• queue-list interface
– Establishes queuing priority based on incoming interface
[no] queue-list <list-number> interface <interface-name> <interface-number> <queue #>
Connecting people to information
Custom Queuing Commands
• queue-list default
– Assigns priority-queue for those packets that do not match any rule in priority-list. If not specified, queue number 1 is default.
[no] queue-list <list-number> default <queue-number>
• queue-list queue limit
– Designate queue length limit for a custom queue [no] queue-list <list-number> queue <queue-number> limit
<limit-number>
Connecting people to information
Custom Queuing Commands
• queue-list queue byte-count
– Designate byte-count allowed per queue
[no] queue-list <list-number> queue <queue-number> byte-count <byte-count-number>
• queue-list lowest-custom
– Sets lowest number of queue to be treated as custom
[no] queue-list <list-number> lowest-custom <queue-number>
• custom-queue-list
– Assigns a specified queue-list to an interface
[no] custom-queue-list <list>
Connecting people to information
Custom Queuing Example
caymans(config)#queue-list 4 interface e0 5
caymans(config)#queue-list 4 interface ethernet 1 6
caymans(config)#queue-list 4 interface ethernet 2 7
caymans(config)#queue-list 4 interface serial 0 8
caymans(config)#queue-list 4 default 10
caymans(config)#queue-list 4 protocol arp 4
caymans(config)#queue-list 4 protocol bridge 3
caymans(config)#queue-list 4 protocol ipx 9
Connecting people to information
Custom Queuing Example
caymans(config)#queue-list 1 protocol decnet 3
caymans(config)#queue-list 1 protocol ip 7
caymans(config)#queue-list 2 protocol decnet 2 gt 200
caymans(config)#queue-list 2 protocol ip 7 tcp 23
caymans(config)#queue-list 2 protocol ip 8 udp 53
caymans(config)#queue-list 2 protocol ip 9 tcp 23
caymans(config)#queue-list 3 protocol decnet 2 lt 200
caymans(config)#queue-list 3 protocol ip 1 list 10
caymans(config)#queue-list 3 protpcpl ip 7
caymans(config)#queue-list 3 protocol ip 7
caymans(config)#queue-list 3 default 10
caymans(config)#int s0
caymans(config-if)#custom-queue-list 1
caymans(config-if)#int s1
caymans(config-if)#custom-queue-list 4
queue-list configuration:
Connecting people to information
Custom Queuing Example
caymans#sh queueing customCurrent custom queue configuration:List Queue Args1 5 lowest custom queue1 3 protocol decnet 1 7 protocol ip 2 2 protocol decnet gt 2002 8 protocol ip udp port domain3 10 default3 2 protocol decnet lt 2003 1 protocol ip list 103 7 protocol ip 4 10 default4 5 interface Ethernet0 4 6 interface Ethernet1 4 7 interface Ethernet2 4 8 interface Serial0 4 3 protocol bridge 4 4 protocol arp 4 9 protocol ipx
Connecting people to information
Custom Queuing Example
caymans#sh int s0Serial0 is down, line protocol is down Hardware is HD64570 MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/25
5 Encapsulation HDLC, loopback not set, keepalive set (10 sec) Last input never, output never, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: custom-list 1 Output queues: (queue #: size/max/drops) 0: 0/20/0 1: 0/20/0 2: 0/20/0 3: 0/20/0 4: 0/20/0 5: 0/20/0 6: 0/20/0 7: 0/20/0 8: 0/20/0 9: 0/20/0 10: 0/20/0 11: 0/20/0 12: 0/20/0 13: 0/20/0 14: 0/20/0 15: 0/20/0
16: 0/20/0 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 0 packets input, 0 bytes, 0 no buffer Received 0 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 17 packets output, 3138 bytes, 0 underruns 0 output errors, 0 collisions, 22891 interface resets 0 output buffer failures, 0 output buffers swapped out 116 carrier transitions
Connecting people to information
Why Use WFQ?
• Provides relative bandwidth guarantees–Fair Queuing (FQ) allocates equal share of bandwidth to each active queue–Weighted Fair Queuing (WFQ) allows for unequal allocation of bandwidth
Connecting people to information
Design Intent of Weighted Fair Queuing
• Stated requirement:–“Traffic latency must be predictablepredictable “Reserved flows must achieve a certain bandwidthbandwidth and latencylatency”–“Configuration must be straightforward”–“Should normally do the right thing without manual intervention ”
Connecting people to information
Weighted Fair Queuing (WFQ)
One 200 Byte Data
Packet
Interface BufferResources
TransmitScheduling
Two 100 ByteVoice Packets
Classify
1
11
De-queue
12
Configurable Queues
2
11
Two 100 Byte Packets Transmitted for Every One 200 Byte Packet
Therefore = “Fair”
Flow Classification/Sorting•Source and destination address•Protocol•Session identifier (Port/Socket)
Weighted Fair Scheduling•Requested Qos (IP Precedence, RSVP)•Frame Relay FECN, BECN, DE•Flow throughput (Weighted-Fair)
1122
Connecting people to information
Feature Description
Dynamically identifies data streams using an interface
Dynamically prioritizes those data streams
Connecting people to information
So What?
Equal access for File Transfer traffic
Priority for Interactive Traffic
Future: Guarantees for Real Time Traffic
Hands Free! No Access Lists!
Connecting people to information
Fair Queuing “Conversations”
Ideally: data streams exchanged by applications
Practically: discernible data streams
Source and destination address
Protocol type
Session identifier (port or socket number)
QoS/TOS
Connecting people to information
Configuration
congestive discard policy
hits conversations with more than one message
occurs when
total number of messages > threshold
fair-queue [congestive discard threshold]
[#hashed_queues] [reserved_queues]
fair-queue [congestive discard threshold]
[#hashed_queues] [reserved_queues]
Connecting people to information
Configuration Default
inactive on LANs and high speed lines
inactive on serial lines with LAPB, X.25, PPP Compression, etc.
active on other serial lines at E-1 speed or below
eg: PPP, HDLC, Frame Relay, SMDS
Connecting people to information
Diagnostics/Troubleshooting
show interface [interface name]show interface [interface name]
show queue interface nameshow queue interface name
show queueing [fair | custom | priority]show queueing [fair | custom | priority]
Connecting people to information
Pitfalls of Weighted Fair Queuing
• Requires more sorting than other approaches
Connecting people to information
WFQ Monitoring
lazy-ccartee-dont-touch#sh int ser 3/3Serial3/3 is up, line protocol is up Hardware is cxBus Serial Internet address is 1.1.2.1/24 MTU 4470 bytes, BW 2000 Kbit, DLY 20000 usec, rely 255/255, load 138/255 Encapsulation HDLC, loopback not set, keepalive not set Last input 00:00:11, output 00:00:00, output hang never Last clearing of "show interface" counters 00:05:31 Input queue: 0/75/0 (size/max/drops); Total output drops: 12101 Queueing strategy: weighted fair Outputqueue: 69/64/12102 (size/threshold/drops) Conversations 69/71 (active/max active) Reserved Conversations 0/0 (allocated/max allocated) 30 second input rate 1080000 bits/sec, 584 packets/sec 30 second output rate 1087000 bits/sec, 588 packets/sec 26529 packets input, 6147500 bytes, 0 no buffer Received 6 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 26731 packets output, 6200224 bytes, 0 underruns 0 output errors, 0 collisions, 0 interface resets 0 output buffer failures, 38989 output buffers swapped out 0 carrier transitions RTS up, CTS up, DTR up, DCD up, DSR up
Connecting people to information
WFQ Monitoring
lazy-ccartee-dont-touch#show queueingCurrent fair queue configuration:
Interface Discard Dynamic Reserved threshold queue count queue count Serial3/0 64 256 0 Serial3/1 64 256 0 Serial3/2 64 16 0 Serial3/3 64 256 0
Current priority queue configuration:Current custom queue configuration:Current RED queue configuration:lazy-ccartee-dont-touch#
Connecting people to information
lazy-ccartee-dont-touch#sh queue ser 3/3 Input queue: 0/75/0 (size/max/drops); Total output drops: 59423 Queueing strategy: weighted fair Output queue: 68/64/59423 (size/threshold/drops) Conversations 69/71 (active/max active) Reserved Conversations 0/0 (allocated/max allocated)
(depth/weight/discards) 1/4096/782 Conversation 0, linktype: ip, length: 232 source: 1.1.1.1, destination: 1.1.2.49, id: 0x0001, ttl: 236, TOS: 0 prot: 17, source port 11111, destination port 22222
(depth/weight/discards) 1/4096/782 Conversation 2, linktype: ip, length: 232 source: 1.1.1.1, destination: 1.1.2.51, id: 0x0001, ttl: 250, TOS: 0 prot: 17, source port 11111, destination port 22222
WFQ Monitoring
Show queue serial:
Connecting people to information
Policing & Shaping
Connecting people to information
Traffic Policing & Shaping
• Ensures that traffic does not exceed a (contracted) bandwidth limit
• Policing & Shaping both limit bandwidth but with different impact on traffic– Policing drops more often - more retransmits– Shaping adds variable delay
Connecting people to information
Shaping
Tra
ffic
Time
Traffic Rate
Tra
ffic
Time
Traffic Rate
Traffic Policing vs. Shaping
Policing
Tra
ffic
Time
Traffic Rate
Tra
ffic
Time
Traffic Rate
Connecting people to information
Policing vs. Shaping
• Rate limiting allows larger bursts– More uneven utilization
• Shaping sends smaller bursts in equal intervals– smoother utilization– easier for receiving end
Connecting people to information
Ways to Limit Throughput
• Policing– Committed Access Rate (CAR)
• Traffic shaping– Generic Traffic Shaping(GTS)– Frame Relay Traffic Shaping (FRTS)
Connecting people to information
Basic Policing Mechanism - Token Bucket
• Data needs credits (“tokens”) to be transmitted, otherwise it is dropped
• Tokens are issued at the policing rate• Tokens usually are accumulated in a “bucket”
to accommodate bursts• No limit how fast tokens can be taken out of
the bucket, allows bursts to use large chunks of bandwidth
Connecting people to information
Token Bucket
p
Tokens
BOverflowTokens
PacketsArriving Conform
Exceed
BBurst Size
pToken Arrival Rate
Connecting people to information
Basic Shaping MechanismLeaky Bucket
• Data is transmitted at a given rate
• Buffer (“bucket”) allows for bursts to arrive
• If buffer is full packets are dropped
Connecting people to information
Leaky Bucket
PacketsArriving
BOverflowPackets
pBBurst size
pLeak rate
Packets Are Leakedat a Rate Specified
by p
Connecting people to information
Token vs. Leaky Bucket
• Token bucket–Passes bursts
–No buffering
–Does not smoothes or shapes traffic
• Leaky bucket–Smoothes or shapes traffic, this is achieved by buffering the traffic
–Used in ATM networks for traffic shaping and policing
•Known also as Generic Cell Rate Algorithm (GCRA) in ATM
Connecting people to information
Committed Access Rate (CAR)
• Two functions– Packet classification—IP precedence
and QoS group setting– Access bandwidth management
through rate limiting (policing)
Connecting people to information
Marking: IP Precedence
• QoS marking
• Inband
• Differentiated network services across any media
or topology
IP PacketData
IP Precedence
Type of Service (ToS)
Diff Serv Code Point (DSCP)
Data, Voice, Video
Connecting people to information
CAR—Traffic Matching Specification
• Identify packets of interest for packet classification or rate limiting or both
• Matching specification
–1) All traffic
–2) IP precedence
–3) MAC address
–4) IP access list—standard and extended (slower)
Connecting people to information
Committed Access Rate (CAR)
• Two functions– Packet Classification Packet Classification IP precedence
and QoS group setting– Access Bandwidth ManagementAccess Bandwidth Management
through rate limiting
Connecting people to information
CAR—Action Policies
• Configurable actions– Transmit
– Drop
– Continue (go to the next rate-limitin the list)
– Set precedence and transmit (rewrite the IP precedence bits and transmit)
– Set precedence and continue (rewrite the IP precedence bits and go to the next rate-limit in the list)
Connecting people to information
Committed Access Rate (CAR)Bandwidth Management
Application Hosting
BackboneBackbone
3) Invoke QoS Policy Action Based on EdgeClassification, e.g. DropLow Priority via WRED if Burst Limit Exceeded
1) Packet Classificationthrough IP Precedence and QoS Group Settings
2) Apply Rate Limiting to Matching Traffic Pattern e.g. 25Kbps of Traffic to ‘Bronze’
San Jose
Ottawa
Connecting people to information
CAR Traffic Measurement
• Uses the token bucket schemetoken bucket scheme as a measuring mechanism
• Tokens are added to the bucket at the committed ratecommitted rate and the number of tokens in the bucket is limited by the normal burst size
• Depth of the bucket determines the burst size
Connecting people to information
CAR Traffic Measurement
• Packets arriving with sufficient tokens in the bucket are said to conformconform
• Packets arriving with insufficient tokens in the bucket are said to exceedexceed
Connecting people to information
CAR Traffic Measurement
• Packets arriving exceeding the normal burst but fall within the extended burst limit is handled via a RED-like managed drop policy
• This is to reduce TCP Slow-Start oscillation– (When the exceed-action is to drop packets)
Connecting people to information
CAR Traffic Measurement
• Token bucket configurable parameters– Committed rate (bits/sec)
• Configurable in increments of 8Kbits– Normal burst size (bytes)
• To handle temporary burst over the committed rate limit without paying a penalty
– Extended burst size (bytes)• Burst in excess of the normal burst size
Connecting people to information
Extended Burst
Exceed %
100
BucketDepth
ExtendedBurst
NormalBurst
CAR Policy Examples
Drop
Drop
Per Application CAR
Multimedia
Mission--Critical
Recolor
Recolor
28
Connecting people to information
Marking at the Edge: IP Precedence
• CAR access-list– [no] access-list rate-limit <1–99> <ip_precedence>– [no] access-list rate-limit <100–199>
<mac_address>
• CAR show command– Show interface [interface] rate-limit
Connecting people to information
Marking IP Precedence: CAR
R1#write term….!interface S0 description 128Kbps to R2 rate-limit input access-group 101 128000 8000 16000 conform-action set-prec-transmit 5 exceed-action set-prec-transmit 3 rate-limit input access-group 102 64000 8000 16000 conform-action set-prec-transmit 3 exceed-action set-prec-transmit 1ip address 200.200.14.250 255.255.255.252!access-list 101 permit tcp any any eq wwwaccess-list 102 permit tcp any any eq ftp!
R1S0
R2
Connecting people to information
Traffic Shaping
Traffic Shaping
Tra
ffic
Time
Traffic Rate
Tra
ffic
Time
Traffic Rate
Connecting people to information
Bandwidth Management: Traffic Shaping
• Shaping highly beneficial if downstream device is policing
• Packet bursts are queued instead of being dropped
• Resulting packet stream is “smoothed” and net throughput for bursty traffic is higher
Connecting people to information
Traffic Shaping Queue Structure
• One queue per –Sub-interface
–Access List
–DLCI
• Feeds into queues at hardware layer
ForwarderForwarder
WithinWithinTokenToken
Bucket?Bucket?
InterfaceInterface Congested? Congested?
Sub-InterfaceSub-InterfaceFancy Queues Fancy Queues
HardwareHardwareInterfaceInterfaceQueuesQueues
TransmissionTransmissionQueue Queue
No
Yes
Yes
No
Connecting people to information
FRTS
Shaper
Policy Based on DLCI
Output Interfaces
No Marking
Does Not Run in Distributed Mode
Understands BECN/FECN
Policer
Policy Based on IP
Input and Output Interfaces
Runs in Distributed Mode
Marking
Does not Act on FECN/BECN
CAR
Difference Between CAR and FRTS
Connecting people to information
Traffic Shaping
Transmit Transmit QueueQueue
Output Line
Traffic Destined
for Interface
Classification by:
Extended Access List Functionality
“Leaky Bucket” Shaping
Configured Queuing (e.g.
WFQ, PQ, etc.)
Match
No MatchNo Match
ClassifyClassify
Connecting people to information
Difference between FRTS and GTSGTS
Shaper
Interface Level or Group-Based
Shaping Queue WFQ
Can Be Anything
No Support for FRF.12
Understands BECN/FECN
FRTS
Shaper FR Only
Per DLCI
Shaping Queue PQ,CQ and WFQ(12.0(4)T)
Interface Queue 2 Level Priority
Supports FRF.12
Understands FECN/BECN
Connecting people to information
Generic Traffic ShapingCommands
• Traffic-shape rate bit-rate [burst-size [excess-burst-size]]
• Traffic-shape group access-list bit-rate [burst-size [excess-burst-size]] – bit-rate : access bit rate– burst-size : number of bits per interval – excess-burst-size : number of bits that can exceed
burst-size in first interval of congestion– interval : burst-size/bit-rate
Connecting people to information
Generic Traffic ShapingExample
• Traffic-shape rate 128000 16000 32000– interval = 16000 bits/128000 bps = 0.125 s– transmit 16000 bits per 0.125 s interval– allow to exceed by 32000 bits in the first int
erval
Connecting people to information
Monitor Traffic Shaping
c7200_up(config-if)#traffic-shape rate 128000 16000 32000
c7200_up#show traffic-shaping Access Target Byte Sustain Excess Interval Increment AdapI/F List Rate Limit bits/int bits/int (ms) (bytes) ActEt5/0 128000 6000 16000 32000 125 2000 -c7200_up#
c7200_up(config-if)#traffic-shape rate 128000 8000 32000
c7200_up#show traffic-shaping Access Target Byte Sustain Excess Interval Increment AdapI/F List Rate Limit bits/int bits/int (ms) (bytes) ActEt5/0 128000 5000 8000 32000 62 1000 -
Connecting people to information
Minimum Bandwidth Guarantee
Policy Required :Gold Traffic will always receive a minimum bandwidth of 512Kbps
available at all times
Connecting people to information
• Class definition sets minimum bandwidth
• Queue servicing (metering) controls latency
• Unused capacity is shared amongst theother classes
• Each class can be separately configured for QoS
Class-Based WFQ
40%
25%
10%
Gold
Silver
Bronze
Step 1:Define Scheduling
Step 2:Define Bandwidth
Low Latency, High Servicing
Premium IPBest Effort
Connecting people to information
Policy Required :Reserve BW for my application which is
RSVP enabled and can signal to the network for it’s requirements
Minimum Bandwidth Guarantee
Connecting people to information
RSVP Policy
• RSVP admission control– Accept or deny RSVP requests
– Preempt existing reservations basedon policy
– Policy objects (future)
• Configure RSVP parameters such as – Queuing parameters
– Traffic shaping parameters
Connecting people to information
!interface Serial0/0 ip address 10.1.1.2 255.255.0.0 ip rsvp bandwidth 96 96 bandwidth 128 fair-queue 64 256 1000!
ip rsvp bandwidth [interface-kbps] [single-flow-kbps]
Configuring RSVP
Connecting people to information
Verifying Reservation Accepted
bottom#sho ip rsvp installedBPS To From Protoc DPort Sport Weight Conversation24K 10.1.1.1 10.1.1.2 UDP 16384 16384 4 264
Connecting people to information
The Problem of Congestion
• Uncontrolled, congestion will seriously degrade system performance
– The system buffers fill up
– Packets are dropped, resulting in retransmissions
– This causes more packet loss and increased latency
– The problem builds on itself until the system collapses
Throughput
Congestion
Controlled CongestionControlled Congestion
Uncontrolled CongestionUncontrolled Congestion
Connecting people to information
Drop Policy
Policy Required:Bronze or Silver traffic will be dropped when there is congestion. Gold traffic
will be forwarded unaffected
Connecting people to information
Where Does Internet Congestion Come From?
• 95% of traffic is TCP
• TCP slow start/fast retransmit – Assures maximal utilization of bottleneck– Therefore assures deep queues absent a
control mechanism
Connecting people to information
TCP flow control
• TCP relies on advertised windows
• Smaller TCP receive windows are better for slow links (Trade-off: throughput)
• Larger TCP receive windows => more packets in transit
Connecting people to information
Behavior of a TCP Receiver
• When in receipt of “next message,” schedules an ACK
• When in receipt of something else, acknowledges all it can immediately
Ack N+1
Ack N+1
Ack N+1
N+1
N
N+2N+3
Connecting people to information
Sender Response to ACK
• If ACK acknowledges something– Update credit and send
• If not, presume it indicates a lost packet– Send first unacknowledged
message right away
N+1
Ack N+1
Ack N+1
Ack N+1
N+1
N
N+2N+3
Connecting people to information
N+1
Ack N+1
Ack N+1
Ack N+1
N+1
N
N+2N+3
Multiple Drops in TCP
• In the event of multiple drops within the same session:
–Current TCPs wait for time-out
N+3
Ack N+3
tictictic
Connecting people to information
RED Pushes Back by Drops
• Minimizes work done by router
• Minimizes average queue depth
• Appropriate to interfaces that keep one or less packets in queue per flow
Connecting people to information
Queuing Pushes Back in Time
• Delays acknowledgments
• Stabilizes delay experienced by packets
• Appropriate to:– Interfaces that keep several messages
in queue from each flow– Transactions
Connecting people to information
Random Early Detection (RED)
• “TCP slow-start” is used in the event of congestion– Pros: Congestion resolution– Cons: Possibility of global synchronization
when multiple senders reduce transmission rates then ramp up all at once.
Connecting people to information
• Tool to avoid congestion collapse– All flows experience congestion => packet loss
=> slow start oscillation => collapse !
• Designed in 1993 by Van Jacobsen and Sally Floyd
• Underlying premise: Packet drops will throttle sender’s rate of sending
Random Early Detection (RED)
Connecting people to information
• Without Red, when the queue fills up, all packets that arrive are dropped—tail drop
• With Red, as opposed to doing a tail drop, the router monitors the average queue size and uses randomization to choose connections to notify that a congestion is impending
Random Early Detect (RED)Queue
QueuePointer
PacketsArriving
Connecting people to information
Random Early Detection (RED)
BackboneBackbone• RED:
Anticipates congestionSlows down traffic before queue overflowsAvoids TCP oscillationsMaximizes throughput
• RED uses selective packet loss to signal TCP to slow down
RED
Connecting people to information
Weighted Random Early Detection
GoldHigh Precedence
(Guarantees Mission-Critical Apps, i.e.,Great Plains, Claris,Pivotal, Peoplesoft, Unified m
Messaging)
SilverMedium Precedence
E-Mail, InteractiveVideo, Web
BronzeLow Precedence
E-Fax, FTP
Connecting people to information
RED Packet Drop Thresholds
RED Drop Thresholds
Drop threshold
Probability of Packet Discard
AverageQueue Depth
MaximumThreshold
MinimumThreshold
REDFIFO,TailDrop
High Performance Distributed Implementation
Connecting people to information
Random Early Detection
Pa
ck
et
Dro
p
Pro
ba
bil
ity
Queue Length
“Slope” is adjustable
Queue Max
Pa
ck
et
Dro
p
Pro
ba
bil
ity
Queue Length Queue Max
Pa
ck
et
Dro
p
Pro
ba
bil
ity
Queue Length
Standard Service
Queue Max
WithoutRED
WithRED
WithWRED
Premium Service
Std. Min. Prem. Min.
Connecting people to information
RED - How does it work ?
• Monitors queue depths, randomly selects flows from which to drop packets
• It is a preventive mechanism which aims to prevent router queues from overflowing
Connecting people to information
RED—Packet-Drop Probability
• Packets are dropped sufficiently frequently to control the average queue size
• The probability that a packet is dropped from a connection is proportional to the amount of packets sent by the connection
Connecting people to information
RED - When not to use it
• For protocols like voice over RTP over UDP over IP.
• For non-conforming traffic like Novell Netware of Appletalk
Connecting people to information
Weighted RED (WRED)
• WRED combines REDRED with IP IP PrecedencePrecedence to implement multiple service classes
• Each service class has a defined min and max thresholds, and drop rates
Connecting people to information
Weighted Random Early Detection (WRED)
Interface Buffer
Resources
Discard Text Based On:• Buffer queue depth• IP Precedence• RSVP session
FIFO Scheduling
Pass
Fail
Discard Test
Transmit Queue
Output Line
Connecting people to information
Weighted RED (WRED)
• Reduces the chances of tail-drop since it drops packets when the output interfaces begin to show signs of congestion
• WRED can be configured to ignore IP Precedence and make non-weighted drops
Connecting people to information
When Should I Use WRED?
• Congested long-haul links (e.g., trans-oceanic links)
• Not recommended for campus networks
• When the bulk of your traffic is TCP as oppose to UDP– Remember only TCP will react to a packet dRemember only TCP will react to a packet d
rop UDP will notrop UDP will not
Connecting people to information
Weighted RED (WRED)
BackboneBackbone• Combines IP precedence
with RED
• Separate thresholds and drop rates per class
• Higher priority traffic gets preferred treatment
WRED
Connecting people to information
WRED - Where is it configured?
• WRED operates in the output direction of an interface on core routers where congestion is expected
• Edge routers use tools like CAR to set IP precedence, WRED then acts on this IP precedence information
Connecting people to information
WRED Service Profile Example
Packet DiscardProbability
1
AverageQueue Size
Two Service Levels are Shown;
Up to SixCan Be Defined
StandardMin
StandardMax
PremiumMin
PremiumMax
StandardServiceProfile
PremiumServiceProfile
Adjustable
Connecting people to information
WRED Configuration Example
R3#write terminal!interface Hssi0/0/0 description 45Mbps to R1 ip address 200.200.14.250 255.255.255.252 random-detect exponential-weighting-constant 9 random-detect precedence 0 540 1080 10 random-detect precedence 1 607 1080 10 random-detect precedence 2 674 1080 10 random-detect precedence 3 741 1080 10 random-detect precedence 4 808 1080 10 random-detect precedence 5 875 1080 10 random-detect precedence 6 942 1080 10 random-detect precedence 7 1009 1080 10 random-detect!