QoS (Quality of Service) - part2
This is part 2 of 2. My shortish summarized version of Quality of Service (QoS), Congestion Avoidence, Policing and Shaping.
Congestion Avoidence with WRED:
- ONLY TCP traffic
- TCP Global Synchronization happens to TCP flows during periods of congestion. Each sender will reduce their TX rate (at same time) – (Window-size to half) when packet loss occurs.
- WRED designed to avoid numerous and sudden packet drops that can cause TCP Global Synchronization.
- Randomly drops packets from TCP flows to minimize synchronization.
- Dropping becomes more aggressive as queues fill up.
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
ECN (Explicit Congestion Notification):
- WRED enhancement
- Sender and receiver MUST support ECN
- Instead of dropping packets, tells sender to slow down
- 2x ECN bits:
- 00 = NOT ECN capable
- 01 = ECN capable
- 10 = ECN capable
- 11 = Congestion experienced
- When upstream router gets packet with 11 bit set, it returns ECN-echo packet to sender (application / host) and tells it to slow down.
- Can be enabled under policy-map with
random-detect ecn
.
Compression:
- Payload Compression
- TCP Header Compression (suppress redundent header information)
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
LFI (Link Fragmentation and Interleaving):
- Cause higher bandwidth usage due to packets being fragmented and every fragment needs it’s own header.
- Used to reduce serialization delay
- NOT used on links faster than 768 Kbps
- ONLY used on Frame-relay and PPP
Traffic Policing:
- Drops or marks traffic exceeding specified thresholds
- Use “Token Bucket” concept
Single Token Bucket:
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Dual Token Bucket:
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Traffic Shaping:
- Shapes per class and NOT per interface
- Queues excess traffic and send at desired rate (class-based)
- Cannot mark traffic with shaping
- Can shape per average or peak rate
- BECN (Backwards Explicit Congestion Notification)
- FECN (Forward Explicit Congestion Notification)
Example Shaping:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
Example Queueing (Nested policy and class-maps):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
Catalyst QoS (Class Of Service (COS)):
- Layer 2
- Classification, marking, policing, etc. done in hardware ASICs (CEF)
- Switch QoS capabilities defined in terms of:
- Queues (priority / standard)
- Thresholds (ammount of packets possibly held in queue)
- Queues can be configured as:
- Priority Queues
- Weighted Round-robin (WRR) – Custom queue
- Weighted Round-robin (WRR) – Priority queue
- Thresholds can be configured with:
- Tail drop
- WRED
- Also uses class-maps and policy-maps
- IP phones normaly tags voice packets – can be “caught” by switch and manipulated.
- Supports TX queues (RX queues ONLY on high end switches)
Example switch QoS support tags:
- 2Q2T = 2x Queue, 2x Thresholds per Queue
- 1P2Q2T = 1x Priority Queue, 2x Standard Queues, 2x Thresholds per Queue
Example:
1 2 3 4 5 6 7 8 9 10 |
|
- 5 = queue1, 6 = queue2, 10 = queue3, 1 = queue 4 (Last queue becomes priority queue)
- 5 + 6 + 10 + 1 = 22
- Queue1 = 5 / 22 * 100 = 22.73% of total bandwidth
- Queue2 = 6 / 22 * 100 = 27.27% of total bandwidth
- Queue3 = 10 / 22 * 100 = 45.45% of total bandwidth
- Queue4 = 1 / 22 * 100 = 4.55% of total bandwidth
Auto-QoS:
- cef MUST be anabled (
ip cef
) - bandwidth MUST be configured on interface (
bandwidth <BPS>
) - IP address MUST be assigned
Example:
1 2 3 4 5 6 7 8 |
|
PAK Priority:
- Router auto-tags all “mission-critical” (control-plane) traffic with IPP6/CS6
- Is an un-changeable internal mechanism
TX-Ring:
- Hardware queue of a router
- Automatically tuned by later Cisco IOS versions
- Typically holds 32 – 64 packets by default
- Reduce to 3 on slow, smaller then 1.5Mbit/s links
show controllers <INTERFACE> | incl tx_limited