A Networker Blog

Quality of Service Summary

QOS PARAMETERS

Jitter
Bandwidth
Average delay
Admission Control
Drops
End to end Delay = Fixed + Variable Delay
Fixed = Link (depend on the link speed)
Variable = Processing if the router is configure to work in “Best Effort”
• Processing Delay is the time between input interface switch to the output interface
• Queuing Delay is the time that packet stay in the queuing buffer.

PACKET LOSS
Usually “Tail Drop” happen when the output queuing is full
Less common reasons for packet loss:
• CPU is overrun
• Input Queuing is full
• Frame Error
HOW TO INCREASE THE BANDWIDTH?
TCP/RTP Header Compression
Payload Compression – Stacker and Predictor are available in the IOS
Queuing:
• Priority Queuing
• Custom Queuing
• Modified Deficit Round Robin (12000 series)
• Class based Weight Fair Queuing

HOW TO REDUCE DELAY?

Increase the link capacity
Enable Queuing
Payload Compression
• Reduce the amount of data, virtually increase the bandwidth
• The compress packet is smaller, so need less time to be transmitted, also in case of retransmission
Header Compression

HOW TO PREVENT PACKET LOSS?
Increase the link
• Guarantee enough bandwidth do sensitive applications QoS (PQ, CQ, MDRR, etc)
Prevent congestion dropping the less important packet before the congestion occur (Weight Random Early Detection)
Traffic Shaping : Delay packet instead drop them (GTS – Generic Traffic Shaping, FRTS – Frame Relay Traffic Shaping and Class Based Shaping
Traffic Policing : Can limit the rate of less important traffic (CAR – Committed Access Rate)

QoS Models

Best Effort
Integrated Service . RSVP signaling
Differentiated Service . QoS in the IP Packet

INTEGRATED SERVICES

• Resource Reservation via RSVP to reserve the bandwidth
• Admission Control to check if can get the requested resources

Integrated Services RFC 1633 (RSVP for Integrated Services RFC 2210)
COPS (Common Open Policy Service) RFC 2748 – Protocol between the PDP (Policy Decision Point) and PEP (Policy Enforcement Point)
COPS usage for RSVO RFC 2749

RSVP

The main applications are voice and video.
Usually the host request RSVP and then, have the amount of bandwidth and guaranteed delay.

There are 3 types of IntServ implementations:

a) Enable RSVP in each network node
• The weight fair queuing could be used to provide the resources in the backbone
• The first issue is that the RSVP consume lots of resource in terms of signaling and special information.
• The WFQ is very CPU intensive algorithm and does not run in a high speed link
b) Enable RSVP in the edges of network nodes and use class of service in the core (Intserv integrated with Diffserv)
• If you enable the RSVP in the edges you can still have the RSVP signaling and special commands, but we can implement the Class Based WFQ mapping the RSVP traffic to a priority queuing can support moderate speed.
• If you enable the WRED (Weight Randon Early Drop) in the core, you can have much higher speed

c) Enable RSVP in the edges of network nodes and use best effort in the core, usually when the core is non-congested

INTSERV SUPPORTED BY THE IOS

RSVP and WFQ since 95
RSVP for all VoIP platforms
Support hop by hop or pass through mode
RSVP to DSPC (DiffServ Point Code)

INTSERV BENEFITS AND DRAWBACKS

Benefits
• Resource admission control end to end
• Per request policy admission control
• Signaling on dynamic port numbers (ex .H323)
Drawbacks
• Continuous Signaling due stateless architecture
• Not scalable

COPS (COMMON OPEN POLICY SERVICE)

We have the following benefits when we use the COPS with RSVP:
- Centralized Manage of Services
- Centralized admission control
- RSVP become more scalable

DIFFERENTIATED SERVICE MODEL

Complex traffic classification performing in the edge of the network (DSPC- Differentiated Service Point Code)
No per flow/per application state in the core
The core only perform per hop behavior
Scalability

DIFFERENTIATED SERVICE MODEL – ADDITIONAL REQUIREMENTS

Wide variety of services and provisioning policies
Decouple service and application in use
No application modification
No hop-by-hop signaling
Interoperability with no DS node compliant
Incremental Deployment
NOTE:
DiffServ replaces the IP Precedence field and the main difference is that Diffserv support 64 Classes and the IP Precedence only 8 Classes

The provisioning is very important because the QoS does not create a bandwidth, but manage the traffic between classes.
The services are defining by Per Hopping Behavior (PHB) what is implement in the network.

TOPOLOGY TERMINOLOGY

The DiffServ consist in two components, both DS Boundary Node and DS Interior Node must be able to apply the PHB to the packets.
DS Boundary Nodes
• DS Ingress Node
• The DS Ingress Node is responsible for apply the TCA (Traffic Conditioning Agreement) in the ingress packet
• DS Egress Node may not apply the TCA and send the traffic direct to the peering domain, or may apply the TCA between two domains
DS Interior Nodes
DS Region may support different PHB internally and different point code PHB mapping, but to allow the services span across de regions, the peering DS Domain must be establish a peering SLA.

TRAFFIC TERMINOLOGY

• Flow : sequence of packets identified by source, destination address, protocol identifier
• Traffic Stream: Collections of flow with same kind of set parameters
• Traffic Profile: Typical traffic stream and the provisioning should be performance by the profiles
• Behavior Aggregator : It is a collection of packets with the same DS
• Per Hop Behavior is applied to each BA according to the QoS policy
• PHB Mechanism : Specific algorithm that is implemented in a node to realize one or more PHB

Diffserv Field
DiffServ replace the TOS byte.
The DSPC use 6 bits and 2 remain unused
There are 3 IETF standards for those 8 bits:
• RFC 791 include the TOS fields (3 bits) and remaining bits are used for delay (1 bit), throughput (1 bit), reliable (1 bit), etc
• RFC 1812 modify by setting to zero the lower significant bits
• RFC 2474 Replace the TOS by DS

DSCP Encoding

- XXXXX0 = Standard Action
- XXXX11 = Experimental/Local Use
- XXXX10 = EXP/LU
- Default DSCP = 000000
- Default PHB = FIFO, Tail-Drop

PHB Options:

Default = Best Effort
Class Selector = IP Precedence, to guarantee the backward compatibility, set the bits XXX000 to maintain the IP Precedence compatibility.
Expedited Forwarding = Used for low delay service, set the DSCP=101110 or 0×2E or 46 decimal
• Priority Queuing can set the priority queuing, but does not police the bandwidth
• IP RTP Prioritization can be used with Weight Fair Queuing or CB-LLQ
• Class Based Low Latency Queuing (CB-LLQ) is similar to the IP RTP and can be used with Weight Fair Queuing
• Modified Deficit Round Robin does the low latency queuing, but not the police bandwidth.
• The Expedited Forwarding can work with multiple QoS mechanisms and accommodate some or all AF PHB:
• CB-WFQ with 4 classes and WRED in each class
• MDDR with WRED in each class
Assurance Forwarding = Used for Guaranteed bandwidth and allow extra bandwidth if available. There are 4 classes. The DSCP value is aaadd0, where aaa is the class, the dd is the drop probability.
AF1 = 001
AF2 = 010
AF3 = 011
AF4 = 100
Drop => 01 = Low
10 = Medium
11 = High

The Assurance Forwarding must try to minimize the long term congestion within each class, but for short term congestion like burst, the AF require some queue management algorithm like WRED.

Building Block of QoS

IP QoS Actions:

• Classification
• CAR (ACL,QoS Group and DSPC)
• WRED (IP Precedence)
• TOS based dWRED (IP Precedence)
• QoS Group based dWRED (IP Precedence)
• WFQ (Flow Parameters)
• PQ and CQ (ACL, Interface, packet size and protocol)
• Metering
• CAR
• GTS (Generic Traffic Shaping) ACL
• FRTS
• CB-Shaping
• CB-Policing
• CB-WFQ
• CB-LLQ
• MDRR
• IP RTP Prioritization
• Dropping/Scheduling
• Tail Drop
• WFQ
• CAR
• Class Based Policing
• WRED
• Policing – Limit the excess rate
• CAR
• CB-Policing
• Shaping – Used to limit excess rate, by delaying the excess traffic
• GTS
• FRTS
• CB-Shaping
• Marking – Market the packet based on classification or metering
• IP Precedence – Passthrough
• DSCP – Passthrough
• QoS Group – Local
• Experimental bits MPLS – Passthrough
• ATM CLP Bit – Passthrough
• FR DE Bit – Passthrough
• Trunking Priority – Passthrough
• Queuing
• FIFO
• PQ
• CQ
• WFQ
• DWFQ
• TOS based dWRED
• QoS Group based dWRED
• MDRR
• Forwarding
• Process Switching – The oldest forward mechanism, since the first router.
• Fast Switching – Store the most usual destinations
• Optimum Switching – Optimization of the Fast Switching for high end router.
• Silicon Switching
• Autonomous Switching
• Netflow Switching – Forward by recognizing or caching information
• Cisco Express Forwarding – Create a FIB (Forward Information Base) which is more efficient then cache the entire routing table and create one to one from FIB and Routing Table.
• Policy Based Routing

Flow of the Packet in DiffServ Mechanism

Classifier:

Each QoS Mechanism has your own Classification Option described above

Meter:

Token Bucket Model is used for Meter

Marker:

Each QoS Mechanism has your own Marker Option described above
The marker can be local or go through the network

Shaping:

The Token Bucket model is used to measure the arrival rate and determine when the packet can be forward.


QOS Summary

• The relevant parameters that should be considering are bandwidth, delay and jitter
• There are few ways to increase the bandwidth: Increase the link speed, Implement QoS, Payload Compression and Header Compression.
• To reduce the delay there are few ways to implement: Increase the link speed, QoS with Low Latency Queuing, Header Compression decreasing the serial link delay, and Payload Compression decreasing the serial link delay.
• To reduce the packet loss, we can increase the bandwidth and implement QoS with priority in guaranteed bandwidth to the priority traffic.
• The name of three QoS models: Best Effort, Integrated Services and DiffServ
• The two main blocks of the Integrated Services are Resource Reservation and Admission Control
• The protocol used to implement the QoS in the Integrated Services is RSVP
• The benefits of Differentiated Services model compare to the Integrated Services model , provide more scalable QoS solution by applying QoS mechanism
• DSCP is Differentiated Services Code Point is used to mark IP packet and occupies the higher 6 bits.
• The Standards PHBs: EF (Expedited Forward), AF (Assurance Forwarding), Class Selector
• The backward compatibility between DiffServ and IP Precedence are mapped according to the following map: EF – IP Precedence 5, AF1 – IP Precedence 1, AF2 – IP Precedence 2, AF3 – IP Precedence 3, AF4 – IP Precedence 4 and the Default DSCP map into IP Precedence 0.
• AF guarantee the bandwidth and may use more bandwidth if it is available.
• EF guarantee to the traffic class and ensure the minimum delay.
• Name the QoS building block: Classifier, Metering, Marking, Dropping, Policing, Shaping and Queuing.
• The purpose of classification is used to assign packets to traffic classes with different QoS requirements
• Marking is used to allow the simplified classification on the other devices in the network.
• The available markers are : IP Precedence, DSCP, MPLS Experimental, QoS Group, Frame Relay DE, ATM CLP bit, 802.1qCOS, ISL Bits.
• Mark and Classify: CAR, Policy-Based Routing, QoS Policy Propagation through BGP, Class Based Policy and Class Based Marking
• Measure the rate and Traffic: Class Based Policy and Class Based Shaping, CAR, IP RTP Prioritization
• The forward mechanisms are: CEF, Process Switching, Fast Switching, Netflow Switching and Optimum Switch.
• Queuing Mechanisms are: FIFO, Priority Queuing, Custom Queuing, WFQ, dWFQ, CoS-Based dWFQ, Class Based WFQ and Class Based LLQ

CLASSIFICATION AND MARKING

Policy Based Routing (PBR)

• PBR can only be applied in the incoming traffic
• Bypass the forward mechanism
• Use the route map , where MATCH command is used to classify and SET command is used to process the packet
• Route map is applied to the inbound interfaces

Basic applications:

• Implementation of more complex routing
• Classification and Marking

The PBR can only classify and Mark inbound or local traffic.

Configuration Sequence

• Create a route map (route-map <name> [permit/deny] <sequence number> match <condition> set <parameter>
• Apply the route map to the incoming interface or local traffic generation

PBR Classification under route map config
Match ip Address <#acl>
Match length <min> <max>

PBR Marking under route map config
Set ip precedence <precedence> (support 8 classes)
Set ip qos-group <qos-group>
Set ip tos <tos>

Applying the route map . Under the interface (Inbound Traffic)
Ip policy-map <route-map name> (new release ip local route-cache policy-map <route-map name> )

Applying the route map. Under the config (Traffic Generated by the Router)
Ip local policy-map <route-map name> (new release ip local route-cache policy-map <route-map name> )

NOTE
The PBR put the router in Process Switching and since release 11.3 we are be able to enable the fast switching. The command to enable

Debuging

- Show route-map
- Debug ip policy

Sumary PBR

- Static Classification and marking
- The PBR has performance limitations due complex ACL and sequential processing.
- and PBR is used for 2 purposes: bypassing the traditional based forwarding and marking and classifying the packets.
- The Route Map is used to implement PBR
- The PBR can be applied to input packet or local packet
- The classification can be done via standard Access List, Extended Access List and the Packet Size.
- The PBR can set the output interface to bypass the routing table and also mark the packet using the ToS, IP Precedence, or QoS Group.

QoS Policy Propagation through BGP (QPPB)

QPPB can only classify and marking the ingress traffic.
Policy propagation, where a QoS policy is encoded into the BGP Attribute. BGP communities are typically used to encode a QoS policy.
Marking of IP Precedence or QoS group based on the QoS learned via BGP
BGP Policy usually set on ingress routers for route propagation and egress for packet forwarding in an Autonomous System. The BGP carrier this information into another AS and translate using route map into IP Precedence or QoS Group. Marking is enable on per interface basis.

The QPPB steps:
• Propagate the class of service by encoding into BGP attributes (BGP Communities, AS Path, IP Prefixes, any other BGP attribute.
• Translate the BGP Attribute into IP Precedence or QoS group
• Enable CEF and packet marking on interfaces (input interfaces)

CEF Review:
- Forwarding Information Base contain all the networks that are taken from routing table. Those entry points to direct accessible next hops. Adjacency pointers are used to get the information about these next hops. In case of CEF with QoS, the FIB will contain the IP Precedence and/or QoS Group.
- Adjacency Tables contain a list of direct connect neighboring IP Devices . The Layer 2 header is created in advance to accelerate the encapsulation process.
- The CEF was introduced in the Series 7xxx in 11.1C and all risc-based platform in IOS 12.0
- QPPB is only supported in high end routers and must support CEF
The QPPB Configuration:
• Enable CEF
• Create a route map to set IP Precedence or QoS Group (under config, route-map <name> permit <seq> set ip precedence <precedence> or set ip qos-group <group>)
• Apply the route map to BGP routes (under config-router, table-map <route map name>)
• Enable per interface packet marking (under config-int, bgp-policy source ip-prec-map or bgp-policy source ip-qos-map)
• Enable per interface packet marking (under config-int, bgp-policy destination ip-prec-map or bgp-policy destination ip-qos-map) OBS: The destination override the source commands, even if we add the four commands into the router.
- Classification and marking to the customer is more complex:
o Must be performed in all edge router
o The PRB and CAR not scalable
o The QPPB is the only scalable mechanism to classify and mark packets based on their source or destination ip address.
QPPB will set to zero all packets not specifically matched by a table map is also prevent from anyone to try to use the high IP Precedence, because it will be remark as precedence 0.
The QPPB can propagate a QoS class of service information throughout an AS, this allows more scalable QoS design where classification is performed in one router and automatically propagate to all other routers in AS.
BGP is used to propagate the CoS by encoding into any BGP attribute available.
QPPB is limited to assigning IP networks to traffic classes.
QPPB requires the forward CEF switching.

OTHERS CLASSIFICATION AND MARKINGS

Classification:
- Automatic classification (WFQ, WRED, ..)
- Manual classification (CQ, PQ, CB-WFQ,…)

Marking:
- CAR
- Class-based policing
- Class-based marking

Summay of all mechanism in IOS to classify and mark

- CAR
- Class-based policing
- Class-based marking
- PRB
- QPPB

QUEUING MECHANISM

Hardware Queuing:

Still use the FIFO strategy, but also is known as transmit queuing.

Software Queuing:

FIFO

Benefits
• Simple
• Fast
• One queuing
• Supported in all platforms
• Supported in all IOS
Drawbacks
• Unfair allocation
• Starvation
• Jitter
Interfaces less the 2Mbps, came with WFQ enable, so if we wan to use the FIFO we should use the command no fair-queuing. All the interfaces with more than 2Mbps came with FIFO enable
FIFO Queuing command, under config-int hold queuing <buffer> out . Default is 40 packets.

PQ – Strict prioritization of the packets

Priority Queuing use 4 FIFO queuing
The classification could be based on those itens:
• Source Interface
• IP ACL
• Packet Size
• Fragments
• TCP source or destination port number
• UDP source or destination port number

Priority queuing also support others protocols with ACL and Packet Size
• IPX
• CLNS
• DECNET
• Appletalk
• VINES
• DLSw

Benefits
- Low delay, high priority
- Support on most platform
- Support in IOS 10.0 and above

Drawbacks
- All FIFO with single class
- Starvation of the lower priority when the higher priority are congested
- Manual configuration of classification every hop

Configuration
- Under config, use command priority-list <list number>
- Under config-int, use the command priority-group <priority list number>

Monitor
- Show interface
- Show queuing priority

CQ – Service up 16 classes

The scheduling mechanism it is a little bit different, use bytes instead packets
The CQ use 16 FIFO queuing
The classification could be based on those items:
• Source Interface
• IP ACL
• Packet Size
• Fragments
• TCP source or destination port number
• UDP source or destination port number

Benefits
• Guarantee starvation between classes
• Support on most platform
• Support in IOS 10.0 and above

Drawbacks
• All FIFO with single class
• Manual configuration of classification every hop
• Not accurate bandwidth allocation
• Higher Jitter due scheduling

Configuration
• under config, queuing-list <list number>
• under config-int custom-list <queuing list number>

WFQ – Service bandwidth guarantee for each individual flow

WFQ solve the following problems:
• FIFO queuing cause starvation and delay
• PQ cause starvation of the lower priority classes
• CQ cause long delays
WFQ solution
• Have a dedicated queuing for each flow
• Fairly and accurately allocated bandwidth
• Use IP Precedence as weight
The WFQ use a fixed number of queues, and the default number is 256, but can go up to 4096 and this number must be bigger than the number of flows.

WFQ has two types of dropping:
• Congestion Discard Threshold (The early drop should start with 8 packets)
• Aggressive dropping with Hold Queuing Limit (The WFQ can support the maximum of 10 packets)
WFQ Classification
• Source Address
• Destination IP Address
• Protocol Number
• ToS Field
• Source TCP/UDP port
• Destination TCP/UDP port
Hash is used to translate flow parameters into a queue number.
WFQ Scheduling is used to define the Finish Time (FT)
• The WFQ Scheduling prevent reordering of packet within a single flow.
• Small packet are automatically preferred over large packet
IP Precedence to Weight Mapping
• 0 – 4096
• 1 – 2048
• 2 – 1365
• 3 – 1024
• 4 – 819
• 5 – 682
• 6 – 585
• 7 – 512
• 32 – 128
• 1024 – 4 (RSVP)

Benefits
• Simple configuration
• Guarantee throughput to all flows
• Support on most platforms
• Support in all IOS above 11.0
• Drop most aggressive flows

Drawbacks
• It is not always possible to have one flow per queuing
• Does not allow manual classification
• It can not provide fixed guaranteed
• Performance limitation due to complex classification and scheduling mechanism
• All drawbacks of FIFO queuing within single queue

Configuration
• under config-int, command fair-queue
• under config-int, command fair-queue CDT (1 to 4096, default 64)
• under config-int, command hold-queue (default 1000)

dynamic queues 16, 32 up to 4096 (default 256)
reservable queues 0 to 1000 (default 0) used for RSVP

Monitor
• Show interface
• Show queue
• Show queueing

Modular QoS CLI and QoS Mechanism

Input

1) Classify
2) Mark
3) Police
4) Forward

CB-Policing – Police
CB-Marking – Set

Output

1) Classify
2) Mark
3) Police
4) Shape
5) WRED
6) Queue
7) Schedule

CB-WFQ – Bandwidth
CB-LLQ – Priority
CB-WRED – Randon-detect
CB-Policing – Police
CB-Shaping – Shape
CB-Marking – Set

More 2 come :D

Enjoy

Victor Cappuccio.-

2 Responses

Subscribe to comments with RSS.

  1. certproject said, on January 29, 2008 at 10:21 am

    Nice materials…certainly will help me on my ONT review..Thank you

  2. VoIP said, on February 5, 2008 at 6:22 pm

    Hello,

    What a great post. Thank you for your hard effort. It’s a brilliant work.


Leave a Reply