

QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping
QoS (Quality of Service) เป็นชุดของ mechanisms ที่ควบคุมการจัดลำดับความสำคัญของ network traffic เพื่อให้ critical applications (voice, video) ได้รับ bandwidth และ latency ที่ต้องการ DiffServ (Differentiated Services) เป็น QoS model ที่ใช้กันมากที่สุด ใช้ DSCP marking สำหรับจำแนก traffic แล้วใช้ queuing algorithms และ traffic shaping สำหรับ enforce policies
เมื่อ network congested ทุก traffic ถูกปฏิบัติเท่ากัน (best-effort) ทำให้ voice call สะดุด, video conference กระตุก แม้ว่า bandwidth จะเหลือพอสำหรับ non-critical traffic QoS แก้ปัญหานี้: classify traffic → mark priority → queue ตามความสำคัญ → shape/police ตาม policy
QoS Models
| Model | วิธีทำงาน | Scalability |
|---|---|---|
| Best-Effort | ไม่มี QoS — FIFO (First In First Out) | Simple, ไม่ guarantee อะไร |
| IntServ (Integrated Services) | Per-flow reservation (RSVP) — reserve bandwidth per application | ไม่ scale (state per flow on every router) |
| DiffServ (Differentiated Services) | Per-hop behavior (PHB) — classify + mark → each hop treats traffic by class | Scales well (no per-flow state) |
QoS Operations
| Step | Operation | Where |
|---|---|---|
| 1. Classification | Identify traffic type (ACL, NBAR, DSCP, CoS) | Ingress (access layer) |
| 2. Marking | Set DSCP/CoS value ใน packet header | Ingress (trust boundary) |
| 3. Policing | Rate-limit traffic ที่เกิน committed rate (drop or re-mark excess) | Ingress or egress |
| 4. Queuing | จัด traffic เข้า queues ตาม class → schedule ส่งออก | Egress (during congestion) |
| 5. Shaping | Buffer excess traffic → send at configured rate (smooth bursts) | Egress |
| 6. Congestion Avoidance | Drop lower-priority traffic ก่อนที่ queue จะ full (WRED) | Egress |
DSCP (Differentiated Services Code Point)
| DSCP Name | DSCP Value | PHB | Use Case |
|---|---|---|---|
| EF (Expedited Forwarding) | 46 | Low latency, low jitter, low loss | Voice (RTP) |
| AF41 | 34 | Assured Forwarding class 4 | Interactive Video |
| AF31 | 26 | Assured Forwarding class 3 | Streaming Video |
| CS6 | 48 | Class Selector 6 | Network Control (routing protocols) |
| CS5 | 40 | Class Selector 5 | Signaling (SIP, H.323) |
| AF21 | 18 | Assured Forwarding class 2 | Transactional Data (ERP, CRM) |
| CS1 | 8 | Class Selector 1 | Scavenger / Bulk (backup, P2P) |
| DF (Default) | 0 | Best-Effort | General internet traffic |
Queuing Algorithms
| Algorithm | วิธีทำงาน | Use Case |
|---|---|---|
| FIFO | First In First Out (no priority) | Default (no QoS) |
| PQ (Priority Queuing) | Strict priority — high priority queue ส่งก่อนเสมอ | Voice (but can starve other queues) |
| WFQ (Weighted Fair Queuing) | Fair scheduling ตาม flow weights | General (Cisco default on slow links) |
| CBWFQ (Class-Based WFQ) | Allocate bandwidth % per class → fair within class | Enterprise QoS (most common) |
| LLQ (Low Latency Queuing) | PQ + CBWFQ — strict priority for voice + bandwidth guarantee for others | Best practice (voice + data QoS) |
LLQ (Recommended)
| Queue | Type | Bandwidth | Traffic |
|---|---|---|---|
| Priority Queue | Strict Priority (LLQ) | ≤ 33% of link | Voice (EF) — always sent first |
| Class 1 | CBWFQ | Guaranteed % | Interactive Video (AF41) |
| Class 2 | CBWFQ | Guaranteed % | Critical Data (AF21) |
| Class 3 | CBWFQ | Guaranteed % | Bulk Data (AF11) |
| Default | CBWFQ | Remaining % | Best-effort (DF) |
Policing vs Shaping
| Feature | Policing | Shaping |
|---|---|---|
| Action on excess | Drop or re-mark excess traffic | Buffer excess → send later (delay) |
| Burst handling | Drop bursts ที่เกิน rate | Absorb bursts → smooth output |
| Direction | Ingress or egress | Egress only |
| Latency impact | ไม่เพิ่ม latency (drop ทันที) | เพิ่ม latency (buffer + delay) |
| Use Case | ISP enforcing customer rate, ingress rate-limit | Match sub-rate circuit (e.g., 100M port shaped to 50M) |
| Token Bucket | Single or dual token bucket | Token bucket with buffer |
WRED (Weighted Random Early Detection)
| Feature | รายละเอียด |
|---|---|
| คืออะไร | Congestion avoidance — randomly drop packets before queue full |
| วิธีทำงาน | เมื่อ queue depth > minimum threshold → start randomly dropping lower priority |
| Advantage | ป้องกัน tail drop (ที่ drop ทุก traffic เท่ากัน) + prevent TCP synchronization |
| DSCP-based | Higher DSCP = lower drop probability, lower DSCP = higher drop probability |
| ไม่ใช้กับ Voice | อย่าใช้ WRED กับ EF (voice) — voice ต้อง priority queue |
QoS Design Best Practices
| Practice | รายละเอียด |
|---|---|
| Mark at trust boundary | Classify + mark ที่ access layer (ใกล้ source ที่สุด) |
| 4-8 classes maximum | อย่ามีมากเกินไป (complex + hard to manage) |
| Voice = Priority Queue ≤ 33% | Voice ต้อง strict priority แต่ไม่เกิน 1/3 ของ bandwidth |
| End-to-end QoS | QoS ต้อง configure ทุก hop (access → distribution → core → WAN) |
| Don’t trust endpoints | Re-mark DSCP ที่ switch ingress (อย่า trust PC markings) |
| Bandwidth sum ≤ 100% | ผลรวม bandwidth allocation ทุก class ต้อง ≤ 100% ของ interface |
| Test with traffic generator | ทดสอบ QoS policy ด้วย iperf3, traffic generator ก่อน production |
ทิ้งท้าย: QoS = Prioritize What Matters
QoS DiffServ model: classify → mark (DSCP) → queue → shape/police EF (DSCP 46) = voice (strict priority), AF classes = data tiers LLQ = best practice (priority queue for voice + CBWFQ for data) Policing = drop excess (ingress), Shaping = buffer excess (egress) WRED = congestion avoidance (drop low priority before queue full) End-to-end: mark at access layer → enforce every hop → WAN
อ่านเพิ่มเติมเกี่ยวกับ Network Load Balancing และ SD-WAN Architecture ที่ siamlancard.com หรือจาก icafeforex.com และ siam2r.com
อ่านเพิ่มเติม: สัญญาณเทรดทอง | XM Signal EA
อ่านเพิ่มเติม: เทรด Forex | XM Signal EA
FAQ
QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping คืออะไร?
QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping เป็นหัวข้อสำคัญในวงการเทคโนโลยีที่ช่วยให้การทำงานมีประสิทธิภาพมากขึ้น ไม่ว่าจะเป็นด้าน IT, Network หรือ Server Management
ทำไมต้องเรียนรู้เรื่อง QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping?
เพราะ QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping เป็นทักษะที่ตลาดต้องการสูง และช่วยให้คุณแก้ปัญหาในงานจริงได้อย่างมืออาชีพ การเรียนรู้ตั้งแต่วันนี้จะเป็นประโยชน์ในระยะยาว
QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping เหมาะกับผู้เริ่มต้นไหม?
ได้แน่นอนครับ บทความนี้เขียนให้เข้าใจง่าย เหมาะทั้งผู้เริ่มต้นและผู้มีประสบการณ์ มี step-by-step guide พร้อมตัวอย่างให้ทำตามได้ทันที
สิ่งที่คุณจะได้เรียนรู้จากบทความนี้
บทความ QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping นี้ครอบคลุมทุกอย่างที่คุณต้องรู้ ตั้งแต่พื้นฐานไปจนถึงการนำไปใช้จริง เขียนจากประสบการณ์จริง ไม่ใช่แค่ทฤษฎี มีตัวอย่างและ step-by-step guide ให้ทำตามได้ทันที
ทำไม QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping ถึงน่าสนใจ?
QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping เป็นหัวข้อที่กำลังได้รับความสนใจสูงมากในปี 2569 ทั้งจากมือใหม่และผู้เชี่ยวชาญ เพราะมีการเปลี่ยนแปลงและพัฒนาใหม่ๆ อยู่ตลอด การติดตามข้อมูลล่าสุดเป็นสิ่งสำคัญ
FAQ
QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping คืออะไร?
อ่านรายละเอียดทั้งหมดในบทความนี้ ครอบคลุมตั้งแต่พื้นฐานไปจนถึงขั้นสูง
iCafeForex | SiamLanCard | Siam2R | XM Signal
สิ่งที่คุณจะได้เรียนรู้จากบทความนี้
บทความ QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping นี้ครอบคลุมทุกอย่างที่คุณต้องรู้ ตั้งแต่พื้นฐานไปจนถึงการนำไปใช้จริง เขียนจากประสบการณ์จริง ไม่ใช่แค่ทฤษฎี มีตัวอย่างและ step-by-step guide ให้ทำตามได้ทันที
ทำไม QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping ถึงน่าสนใจ?
QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping เป็นหัวข้อที่กำลังได้รับความสนใจสูงมากในปี 2569 ทั้งจากมือใหม่และผู้เชี่ยวชาญ เพราะมีการเปลี่ยนแปลงและพัฒนาใหม่ๆ อยู่ตลอด การติดตามข้อมูลล่าสุดเป็นสิ่งสำคัญ
FAQ
QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping คืออะไร?
อ่านรายละเอียดทั้งหมดในบทความนี้ ครอบคลุมตั้งแต่พื้นฐานไปจนถึงขั้นสูง
iCafeForex | SiamLanCard | Siam2R | XM Signal
สิ่งที่ควรรู้เพิ่มเติมเกี่ยวกับ QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping
QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping ยังมีมิติอื่นที่น่าสนใจ การศึกษาเพิ่มเติมจะช่วยให้เข้าใจภาพรวมได้ดีขึ้น แนะนำให้อ่านบทความที่เกี่ยวข้องเพิ่มเติมและฝึกปฏิบัติจริง
อ่านเพิ่มเติม: iCafeForex | XM Signal EA ฟรี | SiamLanCard | Siam2R
สิ่งที่ควรรู้เพิ่มเติมเกี่ยวกับ QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping
QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping ยังมีมิติอื่นที่น่าสนใจ การศึกษาเพิ่มเติมจะช่วยให้เข้าใจภาพรวมได้ดีขึ้น แนะนำให้อ่านบทความที่เกี่ยวข้องเพิ่มเติมและฝึกปฏิบัติจริง
อ่านเพิ่มเติม: iCafeForex | XM Signal EA ฟรี | SiamLanCard | Siam2R
สิ่งที่ควรรู้เพิ่มเติมเกี่ยวกับ QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping
QoS (Quality of Service): DiffServ, Queuing และ Traffic Shaping ยังมีมิติอื่นที่น่าสนใจ การศึกษาเพิ่มเติมจะช่วยให้เข้าใจภาพรวมได้ดีขึ้น แนะนำให้อ่านบทความที่เกี่ยวข้องเพิ่มเติมและฝึกปฏิบัติจริง
อ่านเพิ่มเติม: iCafeForex | XM Signal EA ฟรี | SiamLanCard | Siam2R