Home » QoS (Quality of Service): DiffServ, DSCP, Traffic Shaping, Policing, Queuing และ WAN QoS
QoS (Quality of Service): DiffServ, DSCP, Traffic Shaping, Policing, Queuing และ WAN QoS
QoS (Quality of Service): DiffServ, DSCP, Traffic Shaping, Policing, Queuing และ WAN QoS
QoS (Quality of Service) จัดการ network traffic เพื่อให้ applications สำคัญได้ performance ที่ต้องการ DiffServ เป็น QoS model ที่ใช้กันมากที่สุด, DSCP marking จำแนก traffic ตามความสำคัญ, Traffic Shaping ควบคุม rate อย่าง smooth, Policing drop traffic ที่เกิน rate, Queuing จัดลำดับ packets ตาม priority และ WAN QoS สำคัญเป็นพิเศษบน bandwidth-limited links
เมื่อ network congested (traffic > bandwidth) ทุก packet ถูกปฏิบัติเท่ากันโดย default: voice call ของ CEO กับ software update ของ intern ใช้ bandwidth เดียวกัน QoS แก้ปัญหาโดย classify traffic → mark → queue/schedule → shape/police → critical apps ได้ priority เสมอ Voice ต้องการ latency < 150ms, jitter < 30ms, loss < 1% — ไม่มี QoS ไม่สามารถ guarantee ได้
QoS Models
| Model |
How |
Scalability |
| Best Effort |
ไม่มี QoS — ทุก packet เท่ากัน (FIFO) |
No guarantee → ไม่เหมาะกับ real-time apps |
| IntServ (Integrated Services) |
Per-flow reservation (RSVP protocol) — guarantee bandwidth per flow |
ไม่ scale (state per flow บนทุก router) |
| DiffServ (Differentiated Services) |
Classify → Mark (DSCP) → Per-Hop Behavior — no per-flow state |
Scale ดี (ใช้กันมากที่สุด) |
DSCP (Differentiated Services Code Point)
| Class |
DSCP Value |
Per-Hop Behavior |
Use Case |
| EF (Expedited Forwarding) |
46 (101110) |
Low latency, low jitter, low loss — strict priority |
Voice (VoIP) |
| AF41 |
34 |
Assured Forwarding class 4, low drop |
Video conferencing (interactive) |
| AF31 |
26 |
Assured Forwarding class 3, low drop |
Streaming video |
| AF21 |
18 |
Assured Forwarding class 2, low drop |
Business-critical data (ERP, CRM) |
| AF11 |
10 |
Assured Forwarding class 1, low drop |
Bulk data (backup, file transfer) |
| CS6 |
48 |
Network control |
Routing protocols (OSPF, BGP) |
| CS2 |
16 |
OAM (Operations, Administration, Maintenance) |
Network management (SNMP, SSH) |
| DF (Default) |
0 (000000) |
Best effort |
Internet, non-critical traffic |
QoS Components
| Component |
Function |
Where |
| Classification |
Identify traffic type (by DSCP, ACL, NBAR, application) |
Ingress (as close to source as possible) |
| Marking |
Set DSCP/CoS value ใน packet header |
Ingress (trust boundary: access switch or IP phone) |
| Queuing |
จัดลำดับ packets ใน output queue ตาม priority |
Egress (congested interface) |
| Scheduling |
ตัดสินใจว่า queue ไหนส่ง packet ถัดไป |
Egress |
| Shaping |
Buffer excess traffic → send at configured rate (smooth) |
Egress (WAN interface) |
| Policing |
Drop/remark traffic ที่เกิน rate (no buffering) |
Ingress or Egress |
| Congestion Avoidance |
Drop packets ก่อน queue full (WRED) |
Egress (prevent tail drop) |
Queuing Mechanisms
| Mechanism |
How |
Use |
| FIFO |
First In, First Out — no priority |
Default (no QoS) |
| PQ (Priority Queuing) |
Strict priority — high queue always first |
Voice (EF) — but can starve other queues |
| WFQ (Weighted Fair Queuing) |
Fair sharing based on flow weight |
General — automatic fair distribution |
| CBWFQ (Class-Based WFQ) |
Assign bandwidth guarantee per class |
Enterprise standard — guarantee per traffic class |
| LLQ (Low Latency Queuing) |
CBWFQ + strict priority queue for voice/video |
Best practice: LLQ for voice + CBWFQ for other classes |
Shaping vs Policing
| Feature |
Shaping |
Policing |
| Action |
Buffer excess → send later (smooth rate) |
Drop or remark excess (immediate) |
| Buffer |
ใช้ buffer → adds latency |
ไม่ใช้ buffer → no added latency |
| Direction |
Egress only |
Ingress or Egress |
| Use Case |
WAN interface ที่ต้อง match provider CIR |
ISP rate limiting, untrusted traffic |
| TCP Impact |
TCP adapts smoothly (gradual rate match) |
TCP retransmits (bursty drops → sawtooth) |
WAN QoS Design
| Class |
% Bandwidth |
Queue Type |
Applications |
| Voice |
10-15% |
LLQ (strict priority) |
VoIP (DSCP EF) |
| Interactive Video |
15-25% |
LLQ or CBWFQ |
Video conferencing (DSCP AF41) |
| Critical Data |
25-30% |
CBWFQ (guaranteed) |
ERP, CRM, database (DSCP AF21-AF31) |
| Bulk Data |
10-15% |
CBWFQ |
Backup, file transfer (DSCP AF11) |
| Network Control |
5% |
CBWFQ |
Routing protocols, management (DSCP CS6) |
| Best Effort |
Remaining |
Default queue |
Internet, non-classified (DSCP 0) |
ทิ้งท้าย: QoS = Guarantee Performance for Critical Apps
QoS Models: best effort (none), IntServ (per-flow, doesn’t scale), DiffServ (per-class, scalable — standard) DSCP: EF (voice), AF41 (video), AF21-31 (business data), CS6 (network control), DF (best effort) Components: classify → mark → queue → schedule → shape/police → congestion avoidance Queuing: FIFO (none), PQ (strict), WFQ (fair), CBWFQ (guaranteed per class), LLQ (CBWFQ + priority) Shaping vs Policing: shape = buffer + smooth (egress, WAN) | police = drop (ingress/egress, rate limit) WAN Design: voice 10-15% LLQ + video 15-25% + critical data 25-30% + best effort remainder Key: QoS is essential on bandwidth-limited WAN links — classify at edge, enforce at WAN, measure end-to-end
อ่านเพิ่มเติมเกี่ยวกับ SD-WAN Architecture Application-Aware Routing และ Network Design Patterns Spine-Leaf Campus ที่ siamlancard.com หรือจาก icafeforex.com และ siam2r.com