0% found this document useful (0 votes)
9 views

Class 2

Network congestion occurs when a network component experiences more input traffic than it can handle with available resources. Common causes are queuing delay, packet dropping, and blocking. Quality of service mechanisms like classification, marking, and policing help manage network congestion. Classification identifies traffic type by inspecting packet headers and payloads. Marking changes packet headers to reflect classification using fields like IP precedence, DiffServ codepoints, and traffic class. Policing limits throughput by allowing, dropping, or remarking packets based on their conformance to configured rates and burst sizes.

Uploaded by

Yassine Zitouni
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Class 2

Network congestion occurs when a network component experiences more input traffic than it can handle with available resources. Common causes are queuing delay, packet dropping, and blocking. Quality of service mechanisms like classification, marking, and policing help manage network congestion. Classification identifies traffic type by inspecting packet headers and payloads. Marking changes packet headers to reflect classification using fields like IP precedence, DiffServ codepoints, and traffic class. Policing limits throughput by allowing, dropping, or remarking packets based on their conformance to configured rates and burst sizes.

Uploaded by

Yassine Zitouni
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

QUALITY OF SERVICE

CLASS 2
QOS MECHANISMS
NETWORK
CONGESTION
Network Congestion
• Definition: Congestion is a state of a network component where it
experiences more input traffic than it is able to handle with the
available (shared) resources.
• Network nodes handle congestion differently, depending on the OSI
layer it is associated with.
Network Congestion
Congestion in Layer 3

• Congested routers have unstable output queues

• Network congestion causes (i) Queuing Delay, (ii) Packet dropping,


and (iii) Blocking
Network Congestion
Layer 4: Sliding Windows in TCP

Congestion Window (CWND)


Receiver window (RWND)
CLASSIFICATION
Classification
Definition

• Definition: Classification is the practice of inferring application’s nature


based on the inspection of specific characteristics
• Examples of applications natures:
• web browsing
• streaming
• voice calls
• Hard-coded or automatically performed by routers
• Inspection types:
• Header inspection
• Payload inspection
Classification
Header Inspection

Layer 4 (Transport Layer): “Source Port” and “Destination Port”

Classic ports:
• 80 HTTP - Nature: web
• 443 SSL - Nature: playback/browsing (streaming)
• 22 SSH - Nature: interactive
• 5060 VoIP - Nature: voice calls
Is there a problem with this approach?
Classification
Header Inspection

Layer 4 (Transport Layer): “Source IP address”, “Destination IP


address”, “Next-level protocol”
Classification
Header Inspection

• Layer 2 (Link Layer): “Destination MAC address” and “Source MAC


address”
Classification
Payload Inspection – Network-Based Application Recognition (NBAR)

• Definition: Network-Based Application Recognition (NBAR) is a classification


method that is able to identify application information from the segment’s
payloads.
• Must be enabled at a given NIC
• May create overhead..
• Is able to identify:
• URL
• MIME-type (zip file, image, etc.)
• User-agent (Mozilla, Opera, etc.)
• Can be used to block websites!
MARKING
Marking
Definition: Marking is the act of changing one or more header fields in
the packet to reflect the classification result
Marking
Ethernet (IEEE 802.11Q)
Marking
IPv4
ToS
Marking
IPv4 – IP Precedence: First design, RFC791 (1981)

Rank of precedence (3 bits)


0 000 Routine (lowest priority)
1 001 Priority
2 010 Immediate
3 011 Flash
4 100 Flash Override
5 101 Critic/Critical
6 110 Internetwork Control
7 111 Network Control (highest priority)
Marking
IPv4 – IP Precedence: First design, RFC791 (1981)
Queue threshold

4 3 3 2 2 1 1

Rank of precedence 4 3 2 2 1 1
0 000 Routine 3
1 001 Priority
2 010 Immediate
3 011 Flash
4 100 Flash Override 4 3 2 2 1 1
5 101 Critic/Critical
6 110 Internetwork Control
7 111 Network Control
Marking
IPv4 – IP Precedence: First design, RFC791 (1981)

Type of Service (7 bits)


Bit 3: 0 = normal delay 1 = low delay
Bit 4: 0 = normal throughput 1 = high throughput
Bit 5: 0 = normal reliability 1 = high reliability
Bit 6-7: Reserved for future use
Marking
IPv4 – IP Precedence: Second design, RFC1349 (1992)

Precedence is unchanged! Must Be Zero (MBZ) bit


Marking
IPv4 – IP Precedence: Second design, RFC1349 (1992)

Type of Service (7 bits)


8 1000 minimize delay
4 0100 maximize throughput
2 0010 maximize reliability
1 0001 minimize monetary cost
0 0000 normal service
Marking
Per-Hop Behavior (PHB)

Each type of service is implemented as the same “behavior” throughout every router in the data flow.
Marking
IPv4 – Differentiated Services (DiffServ)

Differentiated Service Per-Hop Behavior Default PHB:


CodePoint (DSCP) (PHB) 000000 Best Effort
Marking
IPv4 – DiffServ: Class-Selector PHB, RFC 2474 (1998)

Class selector name DSCP value IP Precedence value IP Precedence name


Default / CS0 000000 000 Routine
CS1 001000 001 Priority
CS2 010000 010 Immediate
CS3 011000 011 Flash
CS4 100000 100 Flash Override
CS5 101000 101 Critic/Critical
CS6 110000 110 Internetwork Control
CS7 111000 111 Network Control
Marking
IPv4 – DiffServ: Assured Forwarding (AF) PHB, RFC 2597 (1999)

Drop Class 1 Class 2 Class 3 Class 4

001 010 010 010 011 010 100 010


Low
AF11 AF21 AF31 AF41

001 100 010 100 011 100 100 100


Medium
DiffServ-AF PHB has two functions: AF12 AF22 AF32 AF42
1. Queuing
2. Congestion Avoidance 001 110 010 110 011 110 100 110
High
AF13 AF23 AF33 AF43
For a packet marked with a specific class:
• forwarding is independent of other classes
• there are dedicated resources (capacity and
buffer) Conversion: “Class name” -> decimal
AFxy = (8x + 2y)D
• spare resources may be used, even if it is
more than the required amount.
Marking
IPv4 – DiffServ: AF PHB – Class-Based Weighted Fair Queue (CBWFQ)

10%

What does it mean


“percentage of capacity”?
Marking
IPv4 – DiffServ: Expedited Forwarding (EF) PHB, RFC 2597 (1999)

DSCP name: EF
DSCP binary: (101 110)B
DSCP decimal: (46)D

DiffServ-EF PHB has two functions:


1. Queuing - priority queue
2. Policing - non-blocking policies

For a packet marked as EF:


• same rules applied to AF
• output has transmission priority over other
queues
Marking
IPv4 – DiffServ: EF PHB – Low Latency Queue (LLQ)

What happens if LLQ is always busy?


Marking
IPv4 – Hybrid DiffServ Networks
Marking
IPv6 – DiffServ: Traffic Class
Marking How to organize the
The different types of queues queues so they have their
promised performance?

How to select packets to


drop when queue is full?

How to organize the queues so that


non-priority queues have a chance to
transmit?
POLICING
Use Case: Committed Information Rate (CIR)

How can we guarantee that the user does not get more
throughput than it is actually paying for?
Policing
Definition: Policing is a QoS mechanism used to limit throughput of a
given traffic flow by performing one of the following actions to arriving
packets:
• Allow packet to pass
• Drop the packet
• Re-mark the packet with different priority
Policing
• In Policing, packets may be categorized in terms of conformity to the
traffic contract, i.e.,
• Conforming: OK rate
• Exceeding: using the excess burst capacity (more about it later)
• Violating: higher rate than allowed
• Categories are optional and must be configured
• Example of actions are:
• Conforming – pass
• Exceeding – lower priority [optional]
• Violating – drop
Policing
Single-Rate, Two-Color Policer (Single Bucket)

When a new packet arrives:

If packet size (Bytes) <= Token budget, then:


Packet is conforming
Tokens are consumed and packet goes through
Else:
Packet is exceeding
Tokens are kept and packet is handled accordingly (drop or priority)

Tokens are replenished into the token bucket according to:


(Packet arrival time - Previous packet arrival time) * Police Rate / 8

Replenished tokens are “spilled” if bucket is full


Policing
Single-Rate, Three-Color Policer (Two Bucket)

Bc: Committed Burst


Be: Excess Burst
Policing
Double-Rate, Three-Color Policer (Two Bucket)

CIR: Committed Information Rate


PIR: Peak Information Rate
Policing
Summary
Wrapping up

What did you learn today?


• Classification
• Marking
• IP Precedence
• DiffServ (AF, EF)
• Policing
• Single-Rate, Two-Color
• Single-Rate, Three-Color
• Double-Rate, Three-Color

You might also like