
MPLS VPN: พื้นฐาน MPLS L3VPN สำหรับเชื่อมต่อสาขา
MPLS (Multiprotocol Label Switching) เป็นเทคโนโลยีที่ ISP ใช้สำหรับให้บริการ WAN connectivity แก่องค์กร MPLS VPN (โดยเฉพาะ L3VPN) เป็นบริการที่องค์กรใช้เชื่อมต่อสำนักงานสาขาหลายแห่งเข้าด้วยกันผ่าน network ของ ISP โดยที่ traffic ของแต่ละลูกค้าถูกแยกออกจากกัน
แม้ว่า SD-WAN จะได้รับความนิยมมากขึ้น แต่ MPLS ยังคงเป็น WAN technology หลักขององค์กรขนาดใหญ่ในไทย เพราะ SLA ที่การันตี, QoS ที่ดี และ reliability สูง บทความนี้จะอธิบายพื้นฐาน MPLS L3VPN เพื่อให้เข้าใจว่ามันทำงานอย่างไร
MPLS คืออะไร
Label Switching
MPLS ใช้ “labels” (ตัวเลข) แทนการ route ด้วย IP address: Traditional routing: ทุก router ต้อง lookup destination IP ใน routing table ทุก hop MPLS: router แรก (ingress) assign label → routers ตรงกลางดูแค่ label (เร็วกว่า) → router สุดท้าย (egress) ถอด label แล้ว route ปกติ Labels ถูก swap ที่แต่ละ hop (push, swap, pop)
MPLS Components
| Component | หน้าที่ | ตำแหน่ง |
|---|---|---|
| PE (Provider Edge) | Router ของ ISP ที่เชื่อมต่อกับลูกค้า | ขอบ ISP network |
| P (Provider) | Core router ของ ISP ทำ label switching | กลาง ISP network |
| CE (Customer Edge) | Router ของลูกค้าที่เชื่อมต่อกับ ISP | สำนักงานลูกค้า |
ความสัมพันธ์
CE-PE: เชื่อมต่อด้วย routing protocol (eBGP, OSPF, static, EIGRP) CE ส่ง routes ของ site ไป PE PE-PE: แลกเปลี่ยน VPN routes ผ่าน MP-BGP (Multiprotocol BGP) ข้าม MPLS core P routers: ทำแค่ label switching ไม่รู้เรื่อง VPN routes ของลูกค้า
L3VPN ทำงานอย่างไร
VRF (Virtual Routing and Forwarding)
VRF คือ virtual router ที่แยก routing table ออกจากกันบน PE router: PE router มี routing table แยกสำหรับลูกค้าแต่ละราย ลูกค้า A ใช้ VRF-A, ลูกค้า B ใช้ VRF-B แม้ลูกค้า A และ B ใช้ IP range เดียวกัน (10.0.0.0/24) ก็ไม่ conflict เพราะอยู่คนละ VRF
Route Distinguisher (RD)
RD ทำให้ routes ของลูกค้าต่างรายไม่ซ้ำกันใน MP-BGP: ลูกค้า A route 10.0.1.0/24 กลายเป็น 65001:100:10.0.1.0/24 ลูกค้า B route 10.0.1.0/24 กลายเป็น 65001:200:10.0.1.0/24 RD แค่ทำให้ unique ไม่ได้ control ว่าใครรับ route
Route Target (RT)
RT control ว่า VRF ไหนจะ import/export routes: Export RT: PE ส่ง routes ออกไปพร้อม RT tag Import RT: PE รับเฉพาะ routes ที่มี RT ตรงกัน ตัวอย่าง: ลูกค้า A ทุก site export RT 65001:100 + import RT 65001:100 ทำให้ทุก site ของลูกค้า A เห็น routes ของกันและกัน
MPLS L3VPN Traffic Flow
ตัวอย่าง
Site A (Bangkok) ส่ง traffic ไป Site B (Chiang Mai): 1. CE-A ส่ง packet ไป PE-A (routing ปกติ) 2. PE-A lookup VRF → หา route ไป Site B → push 2 labels (VPN label + transport label) 3. P routers ดูแค่ transport label → swap label → forward 4. PE-B pop transport label → ดู VPN label → lookup VRF → forward ไป CE-B 5. CE-B รับ packet ปกติ ลูกค้าไม่ต้องรู้เรื่อง MPLS labels เลย เห็นแค่ว่า sites เชื่อมต่อกัน
MPLS QoS
| Class | Traffic Type | Priority | Bandwidth |
|---|---|---|---|
| Real-Time | VoIP, Video Conference | สูงสุด (EF) | การันตี (เช่น 20%) |
| Business Critical | ERP, Database, CRM | สูง (AF) | การันตี (เช่น 30%) |
| Standard | Email, Web browsing | ปกติ (AF) | Best effort (เช่น 40%) |
| Low Priority | Backup, Software update | ต่ำ (BE) | เหลือจากข้างบน |
MPLS QoS ข้อดี: ISP การันตี bandwidth + latency + jitter สำหรับ real-time traffic ต่างจาก internet ที่เป็น best effort ทั้งหมด
MPLS vs SD-WAN vs Internet VPN
| คุณสมบัติ | MPLS | SD-WAN | Internet VPN |
|---|---|---|---|
| SLA | การันตี | ขึ้นกับ underlay | ไม่การันตี |
| QoS | End-to-end | Edge QoS (best effort middle) | ไม่มี |
| ราคา | แพงมาก | ปานกลาง | ถูก |
| Bandwidth | จำกัด (ตามสัญญา) | ยืดหยุ่น (หลาย links) | สูง (internet speed) |
| Reliability | สูงมาก (99.99%) | สูง (multi-path) | ปานกลาง |
| Deploy Time | หลายสัปดาห์-เดือน | วัน-สัปดาห์ | วัน |
เมื่อไหร่ควรใช้ MPLS
| สถานการณ์ | แนะนำ |
|---|---|
| ต้องการ SLA การันตี (latency, jitter) | MPLS |
| Real-time applications สำคัญ (VoIP, trading) | MPLS |
| Budget จำกัด + ต้องการ bandwidth สูง | SD-WAN over internet |
| สาขาเยอะ + ต้องการ flexibility | SD-WAN (hybrid MPLS + internet) |
| สาขาน้อย + งบน้อย | Internet VPN (IPsec) |
ทิ้งท้าย: MPLS ยังไม่ตาย แต่ SD-WAN มาแรง
MPLS L3VPN ยังเป็นมาตรฐานสำหรับ enterprise WAN ที่ต้องการ reliability และ QoS สูงสุด แต่ราคาแพง ทิศทาง: hybrid WAN (MPLS สำหรับ critical traffic + SD-WAN/internet สำหรับ general traffic) เข้าใจพื้นฐาน MPLS จะช่วยออกแบบ WAN strategy ที่เหมาะสม
อ่านเพิ่มเติมเกี่ยวกับ SD-WAN vs MPLS และ BGP Border Gateway Protocol ที่ siamlancard.com หรือจาก icafeforex.com และ siam2r.com