Download Rate Limiting

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

TCP congestion control wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Drift plus penalty wikipedia , lookup

RapidIO wikipedia , lookup

IEEE 1355 wikipedia , lookup

Leaky bucket wikipedia , lookup

Net bias wikipedia , lookup

Deep packet inspection wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Quality of service wikipedia , lookup

Transcript
D-Link QoS Technology Brief
Arthur Chiang
Ethernet Switch Product Dept.
Jan 2011
HQ
Agenda
What is QoS
Policing
• Prioritizing
• Rate Limiting
• Three Color Marker
Queuing
• Scheduling
• Congestion Control
• Shaping
What is Quality of Service (QoS)
Definition
QoS is a set of techniques to manage network resources, including delay,
delay variation, bandwidth and packet loss.
Users or data flows are able to be guaranteed a certain level of performance
through these functions.
Policing
QoS
Queuing
What is Quality of Service (QoS)
Explanation of Features
Policing
• A given policy to prioritize or limit the maximum data rate of traffic.
• Policy can be port-based, flow-based, queue-based.
Queuing
• Manages the data stored in device buffer memory.
• Decides the sequence of data forwarding.
• Allocates the buffer resource.
Agenda
What is QoS
Policing
• Prioritizing
• Rate Limiting
• Three Color Marker
Queuing
• Scheduling
• Congestion Control
• Shaping
Prioritizing
Priority Tags
Two kinds of priority tags
• IEEE 802.1p tag in L2 Ethernet header
• Usually inserted by switches as part of 802.1Q VLAN tag according to the policy bound on the
ingress port.
• Might not be carried across L3 networks as it is a L2 tag
(Note)
• DSCP (IP Precedence) tag in L3 IP header.
• A field of IP header with default value 0.
• Usually modified by applications such as VoIP, IP-TV, and P2P based on the prioritization needs.
• Can be carried across L3 networks
L2 Header
802.1Q
L3 Header
ToS
IP Precedence
802.1p CFI
3bits
1bit
VLAN ID
12bits
Data
Delay/Cost/…
3bits
5bits
DSCP
8bits
Prioritizing
Sequence of Packet Forwarding
Priority Queues
• Switch will store all the packets into port egress buffer before transmitting it.
• Each egress buffer is divided into several priority queues and packets stored in higher
queues will be served first.
• Generally speaking, packets with higher priority tag will be mapped to higher queues.
However, it can be changed according to the policies of switch itself.
Add Priority
Tag
Queue
Mapping
Ingress
Egress
Highest Priority
Higher Priority
Lower Priority
Lowest Priority
Prioritizing
Applications of Prioritizing
Prioritize traffic of endpoints on different ports
• Insert the priority tag to untagged packets according to the port default priority.
• Map packets with higher priority tag to higher queue.
Policy (Default Port Priority)
Action: Add 802.1p tag with low
priority
High Priority
Middle Priority
Low Priority
No Priority
Policy (Default Port Priority)
Action: Add 802.1p tag with
middle priority
Client-2
IP Phone
Client-1
Advanced Prioritizing
Change Priority Tag and Queue Mapping
Change priority tag
• Using ACL to match specific flow (eg. IP, protocol type) and force the change of priority
tag of packets.
Change queue mapping
• Using either L2 (802.1p) or L3 (DSCP) priority tag to map the system queue.
• Force the change of the queue mapping for specific flow by using ACL.
Add Priority Tag
Change
Priority Tag
Queue Mapping
Change Queue
Mapping
Change
Priority Tag
Ingress
Highest Priority
Higher Priority
Lower Priority
Lowest Priority
Egress
Advanced Prioritizing
Applications of Prioritizing
Prioritizes different network services on the same port
• If two or more applications are in the same port, replace the priority tag of critical
applications to make sure it will be served first.
Local prioritization
• For a user or application that need priority in local network only: Changing the priority
queue mapping, instead of replacing the priority tag, can limit the impact of the
prioritization.
Same service level
in the internet
Policy (ACL Rule)
Match: VoIP Protocol
Action: Replace priority tag with ‘high’
Client-2
Client-1
High Priority
Middle Priority
Low Priority
ERP
Server
Policy (ACL Rule)
Match: Client-1 MAC Address
Action: Force mapping to high
queue
Client-2
IP Phone
Client-1
Summary
Planning Priority Policy for Network
Guarantee the service level in the network
• Set priority policies on access ports of edge switches.
• Keep the consistent queue mapping policy among the network to save system resource
of backbone switches.
Policy: Voice changes
to high priority
High priority maps
to high queue
High priority maps
to high queue
Low priority maps
to low queue
Low priority maps
to low queue
High priority maps
to high queue
Low priority maps
to low queue
High priority maps
to high queue
Low priority maps
to low queue
Policy: Data changes
to low priority
High Priority
Low Priority
Rate Limiting
Definition of Rate Limiting
Rate Limiting
• A given threshold for data flow. User can set up QoS actions for traffic exceeding the
threshold. Such as:
- Drop (Bandwidth Control)
- Replace priority tag
- Delay forwarding (Shaping)
bps
Action
Rate
Rate Limiting
Time
Rate Limiting
Type of Rate Limiting
Port-based Rate limiting
• Hard limits the ingress/egress data rate per physical port, regardless of the content of
the data.
• Manages the data rate at access layer devices, preventing the overloading of backbone
networks.
Flow-based Rate limiting
• Controls the data rate of a specific flow by using ACL rules, for example, a specific IP or
L4 protocol.
• Well manages the bandwidth or QoS policies for service running on the physical ports.
Queue-based Rate limiting
• Hard limits the ingress/egress data rate per egress queue basis, regardless of the content
of the data.
• Prevents the egress bandwidth from being occupied by a specific queue, especially in the
applications of Strict Priority scheduling and 3 color marker.
Note: Most of the switch controllers support only drop action on Queue-based Rate Limiting nowadays
Rate Limiting
Advanced Rate Limiting
For some critical applications or customer-signed Service Level Agreement
(SLA), administrators define two thresholds for better bandwidth
allocation and service quality.
• Committed Information Rate (CIR): A guaranteed data rate of traffic. The sum of all CIR
must be smaller than corresponding physical interface or the bandwidth cannot be
guaranteed.
• Peak Information Rate (PIR): A maximum data rate of traffic. Sometimes called Exceed
Information Rate (EIR). Usually, switch will do best-effort delivery for traffic exceeding CIR
and drop the traffic exceeding PIR. However, the action can be changed depending on
different environment.
bps
Action
bps
Rate
Action 2
PIR
Action 1
CIR
Single Rate
Time
Two Rate
Time
Rate Limiting
Advanced Rate Limiting – Three Color Marker
Three Color Marker borrows the DSCP value in IP header as the color code.
There are three color codes – red, yellow and green, and the ‘DSCP’ to ‘color
code’ mapping can be defined by users.
Two different Color Marker mechanisms:
• RFC2697 Single Rate Three Color Marker (srTCM): Adds color tag according to
configured buffer size; Focuses more on the size of packets.
• RFC2698 Two Rate Three Color Marker (trTCM): Adds color tag according to data
rates; Focuses more on the data rates.
Two different operating modes for 3 color marker
• Color blind mode: Do not trust the original DSCP value in packet; assume all packets
are uncolored. Usually used at access layer network.
• Color aware mode: Trust the original DSCP value in packet; assume all packets are
colored. Usually used at aggregation/core layer.
Three Color Marker
Single Rate Three Color Marker
The srTCM meters a traffic stream and marks its packets according to three
traffic parameters: CIR, Committed Buffer Size (CBS) and Excess Buffer Size
(EBS).
A packet is marked green if it does not exceed the CBS, yellow if it does exceed
the CBS, but not the EBS, and red otherwise.
Buffer
Memory
Mark Green
Mark Red
CIR
Mark Yellow
CBS
EBS
Three Color Marker
Two Rate Three Color Marker
The trTCM meters a traffic stream and marks its packets according to two traffic
parameters: CIR and PIR.
A packet is marked green if it does not exceed the CIR, yellow if it does exceed
the CIR, but not the PIR, and red if it exceed PIR.
Buffer
Memory
Mark Red
PIR
Mark Yellow
CIR
Mark Green
Three Color Marker
Color Blind/Aware Mode Process
Color Blind Mode
• Meters and marks color tag to the packet according to the CIR/PIR or CBS/EBS.
• Drop Red packets and remark the DSCP tag to Green or Yellow according to the color tag.
Color Aware Mode
• Meters the Green and Yellow traffic and mark to Yellow or Red according to the CIR/PIR
or CBS/EBS.
• Drop Red packets and remark the DSCP tag of Green packets to Yellow for over-threshold
Green traffic.
G
R
Revise Color
Tag
Drop Policer
3 Color Marker
Y
R
Y
R
Y
Queue Mapping
G
Ingress
Egress
Three Color Marker
Planning a Service Guaranteed Network with Three Color Marker
Set color blind mode and high CIR for important services at access
switches.
Set color aware mode to simplify the configuration and unify the QoS
policy on aggregation switches.
Make sure the green traffic won’t exceed the physical bandwidth.
Policy:
Policy:
- VoIP, Admin with high CIR, PIR
Green: Transparent
(Do
nothing)
- Employee
with middle
CIR,
PIR
Yellow:with
Set low
PIR CIR,
for yellow
- Guest
PIR
Action:
Drop RedDSCP
packet
- Remark
of Green/Yellow packet
- Drop Red packet
…
…
Traffic
Physical port bandwidth
Green Traffic
Rate Limiting
Summary
For single user/service per port, use port-based rate limiting with drop
action to control the traffic bandwidth.
For multiple users/services per port, use flow-based rate limiting with drop
action to prevent the interference between each service.
To maximize the port bandwidth usage and also guarantee the service level
of each service in a multiple users/services per port, use three Color
marker function to fine tune the traffic among the port.
• Mark Green for minimum bandwidth of each service
IPTV
to make sure it will be served first.
• Mark Yellow for maximum bandwidth of each
service, doing best effort forwarding when
traffic conflict.
VoIP
• Mark Red for traffic exceed the maximum
bandwidth of each service, drop these
packets to limit the maximum bandwidth
of this port.
PIR
Data
Total UNI (User Network Interface) Bandwidth
CIR
Agenda
What is QoS
Policing
• Prioritizing
• Rate Limiting
• Three Color Marker
Queuing
• Scheduling
• Congestion Control
• Shaping
Scheduling
Scheduled Data Forwarding
Traditional scheduling mechanism
• First-In First-Out (FIFO) Queuing, Strict Priority Queuing (SPQ), Round-Robin, Weighted
Round-Robin (WRR) Queuing
More accurate scheduling is required to make the egress bandwidth
usage more properly
• Fair Queue (FQ), WFQ, Deficit Round Robin (DRR), WDRR: Forwarding/scheduling
decision is made by byte count and utilization of queues, the true weight of each queue.
• Smooth Forwarding: Fairly distributes packets with different priorities in each weighted
round, making the weight of queues not impacted by priority.
Compound scheduling mechanism is required to well control various IP
services nowadays
• ST + *RR: Mission critical services, such as VoIP & VOD, have to be forwarded without
any delay, while other services can share the rest of bandwidth by using any kind of
round-robin mechanism.
Scheduling
Example of Scheduling
High Priority
Middle Priority
Low Priority
FIFO: Do not change the sequence of traffic. First-in, first-out.
FIFO
SPQ: Packets with higher priority will always be served first. However, if higher queues are
always occupied, traffic in lower queues will never be forwarded.
SPQ
WRR: Packets will be forwarded depending on the assigned weight (number of packets) of
each queue. The forwarding ticket will jump to next queue when “weight” is reached or
queue is empty. It solves the problem of SPQ, however, the switch’s real output may not
match the weight settings if the packet size of each priority is different.
WRR
Scheduling
Example of Scheduling (continue)
High Priority
Middle Priority
Low Priority
DRR/WFQ: Use byte count instead of packet count as the weight index. The allowed
forwarding byte of each queue will increase every round. If the size of next packet is greater
than allowed forwarding byte, round-robin mechanism will skip this queue until its allowed
forwarding byte is greater than the packet size. It makes the real output more like the
weight configuration.
DRR/
WFQ
Smooth Forwarding: Makes rapid passes for each queue and use more turns for high
queues instead of waiting all packets transmitted in high queues.
Smoothed
Round
Robin
3rd
2nd
1st round
Congestion Control
Traditional Congestion Control
When ports are overloading, traffic congestion will happen
In traditional device, packets will be dropped when corresponding
queue is full (Tail-drop).
However, Tail-drop causes TCP global synchronization
when burst traffic happens.
Drop
Queue 1
Queue 2
Ingress
Egress
Queue 3
Queue 4
(Note)
problem
Congestion Control
Random Early Detection (RED)
To avoid TCP global synchronization, some new drop algorithm were
presented:
• Random Early Detection (RED): Drop packets based on the utilization of queues. By
randomly dropping packets prior to congestion, RED informs packet sources decreasing
its transmission rate. It prevents the TCP global synchronization (Note) problem and makes
queue usage fairer when traffic burst happens.
• Weighted Random Early Detection (WRED): Associates with the weight of queues,
higher drop rate for lower priority queue.
• Simple Random Early Detection (SRED): Define the drop rates for color tags in
specific queue. Assure the QoS not to be impacted especially for Green packets.
Random Drop
Queue 1
Queue 2
Egress
Ingress
Queue 3
Random Drop
Queue 4
RED Threshold
Shaping
Traditional Devices
To lower the packet lose rate, almost all switch controllers have built-in
expensive buffer memory to prevent the data re-transmission.
Switch stores the traffic in buffer memory and delays the transmission until the
egress bandwidth is available.
However, the best-effort traffic shaping is no longer enough for the QoS
requirement nowadays.
Buffer
Memory
bps
Store to buffer
bps
Max. Switching
Capacity
Data
Time
Data
Delay
Forwarding
Time
Shaping
Flow-based Traffic Shaping
Due to device buffer memory is limited, reserve the resource for important
applications can improve the quality of service.
Configurable buffer size:
• Committed Burst Size (CBS) for Green packets
• Peak Burst Size (PBS), Excess Burst Size (EBS) for Yellow packets.
Drop
No reservation for
Data exceeding
CIR
CBS for Data
PIR
Buffer
Memory
PBS for IPTV
bps
CIR
Drop
Max. Switching
Capacity
Data
Store to PBS
PIR
Overall Output
Store to CBS
CIR
CBS for IPTV
IPTV
Delay
Forwarding
Time