
QoS (Quality of Service): จัดลำดับ Traffic สำหรับ VoIP และ Video
QoS (Quality of Service) คือเทคนิคการจัดลำดับความสำคัญของ network traffic เพื่อให้ applications ที่สำคัญ (VoIP, Video Conference) ได้รับ bandwidth, latency และ jitter ที่เหมาะสม แม้ network จะ congested ถ้าไม่มี QoS ทุก traffic ถูกปฏิบัติเท่าเทียมกัน เมื่อ bandwidth เต็ม VoIP calls จะสะดุด video จะกระตุก
ในยุคที่องค์กรใช้ Teams, Zoom, Google Meet เป็นเครื่องมือหลัก QoS เป็นสิ่งจำเป็น ไม่ใช่ nice-to-have อีกต่อไป บทความนี้จะอธิบายหลักการ QoS วิธี classify traffic และการ configure QoS บนอุปกรณ์ network
ทำไมต้อง QoS
| Application | Bandwidth | Latency | Jitter | Packet Loss |
|---|---|---|---|---|
| VoIP | 80-100 Kbps/call | < 150ms | < 30ms | < 1% |
| Video Conference (HD) | 1.5-4 Mbps | < 150ms | < 30ms | < 1% |
| Video Conference (4K) | 8-20 Mbps | < 100ms | < 15ms | < 0.5% |
| Web Browsing | ไม่จำกัด | < 2 sec | ไม่สำคัญ | ไม่สำคัญ |
| File Transfer | ไม่จำกัด | ไม่สำคัญ | ไม่สำคัญ | ไม่สำคัญ |
ปัญหา: เมื่อ file transfer ขนาดใหญ่วิ่งพร้อมกับ VoIP โดยไม่มี QoS file transfer จะกิน bandwidth ทั้งหมด VoIP จะสะดุดเพราะ latency สูงและ packet loss QoS แก้ปัญหานี้โดย prioritize VoIP ให้ได้ bandwidth ก่อน
QoS Mechanisms
1. Classification and Marking
Classification: ระบุว่า packet นี้เป็น traffic ประเภทอะไร ตาม: source/destination IP, port number (VoIP = UDP 5060 SIP, RTP 16384-32767) DSCP value, VLAN, application Marking: ใส่ค่า DSCP (Differentiated Services Code Point) ใน IP header เพื่อบอกอุปกรณ์ถัดไปว่า packet นี้สำคัญแค่ไหน
DSCP Values ที่นิยม
| DSCP | Per-Hop Behavior | ใช้กับ |
|---|---|---|
| EF (46) | Expedited Forwarding | VoIP (real-time, low latency) |
| AF41 (34) | Assured Forwarding 4 | Video Conference |
| AF31 (26) | Assured Forwarding 3 | Signaling (SIP, H.323) |
| AF21 (18) | Assured Forwarding 2 | Business-critical apps (ERP, CRM) |
| CS1 (8) | Scavenger | Low priority (backup, P2P) |
| 0 (BE) | Best Effort | Default (web, email) |
2. Queuing
Queuing จัดลำดับ packets ใน output queue ก่อนส่งออก interface: Priority Queue (PQ): VoIP ได้ส่งก่อนเสมอ (strict priority) Weighted Fair Queuing (WFQ): แบ่ง bandwidth ตามน้ำหนัก Class-Based WFQ (CBWFQ): กำหนด bandwidth ขั้นต่ำสำหรับแต่ละ class Low Latency Queuing (LLQ): CBWFQ + Priority Queue สำหรับ real-time traffic แนะนำ LLQ สำหรับ enterprise network
3. Policing and Shaping
Policing: จำกัด bandwidth ถ้าเกิน rate จะ drop packets ทันที (ใช้ที่ ingress) Shaping: จำกัด bandwidth ถ้าเกิน rate จะ buffer packets แล้วค่อยส่ง (ใช้ที่ egress) Shaping ดีกว่าสำหรับ WAN links (ไม่ drop packets ลด retransmission)
QoS Design สำหรับ Enterprise
Bandwidth Allocation แนะนำ
| Traffic Class | % Bandwidth | Queue Type |
|---|---|---|
| VoIP (EF) | 10-15% | Priority Queue (strict) |
| Video (AF41) | 15-25% | CBWFQ (guaranteed) |
| Signaling (AF31) | 2-5% | CBWFQ |
| Business Apps (AF21) | 15-25% | CBWFQ |
| Default (BE) | 25-30% | WFQ |
| Scavenger (CS1) | 5-10% | WFQ (lowest weight) |
QoS สำหรับ Microsoft Teams / Zoom
Microsoft Teams DSCP Recommendations
Audio: DSCP EF (46), ports UDP 50000-50019 Video: DSCP AF41 (34), ports UDP 50020-50039 Screen Sharing: DSCP AF21 (18), ports UDP 50040-50059 configure Group Policy (Windows) เพื่อ mark DSCP ที่ endpoint หรือ classify ที่ switch/router ตาม port range
Trust Boundaries
Where to Mark
Trust boundary คือจุดที่ network เริ่ม trust DSCP markings ที่มากับ packet ที่ access switch: trust DSCP จาก IP phones (Cisco phones mark EF เอง) ที่ access switch: re-mark หรือ don’t trust DSCP จาก PCs (users อาจ mark เอง) ที่ distribution/core: trust DSCP ที่ mark แล้วจาก access layer
ทิ้งท้าย: QoS ทำให้ Network ใช้งานได้จริง
QoS ไม่ได้เพิ่ม bandwidth แต่จัดสรร bandwidth ที่มีให้เหมาะสม VoIP ไม่สะดุด video ไม่กระตุก business apps ทำงานได้แม้ bandwidth จำกัด เริ่มจาก classify และ mark traffic ที่ access layer ใช้ LLQ สำหรับ real-time traffic
อ่านเพิ่มเติมเกี่ยวกับ SD-WAN และ Network Design ที่ siamlancard.com หรือจาก icafeforex.com และ siam2r.com