Home » MPLS Deep Dive: Labels, LSP, LDP, RSVP-TE, VPN L2/L3 และ Traffic Engineering
MPLS Deep Dive: Labels, LSP, LDP, RSVP-TE, VPN L2/L3 และ Traffic Engineering
MPLS Deep Dive: Labels, LSP, LDP, RSVP-TE, VPN L2/L3 และ Traffic Engineering
MPLS (Multiprotocol Label Switching) เป็น forwarding technology ที่ใช้ labels แทน IP lookup เพื่อส่ง packets อย่างรวดเร็ว Labels คือ 32-bit header ที่ติดบน packet, LSP (Label Switched Path) คือ path ที่ packet วิ่งผ่าน label-switched routers, LDP สร้าง labels อัตโนมัติตาม IGP, RSVP-TE สร้าง explicit paths สำหรับ traffic engineering, VPN L2/L3 ใช้ MPLS สร้าง virtual private networks และ Traffic Engineering จัดสรร bandwidth อย่าง optimal
แม้ SD-WAN จะได้รับความนิยม แต่ MPLS ยังเป็นหัวใจของ service provider networks : Internet backbone ใช้ MPLS, enterprise WAN ยังพึ่ง MPLS VPN, mobile backhaul ใช้ MPLS, data center interconnect ใช้ MPLS TE ความเข้าใจ MPLS เป็น fundamental สำหรับ network engineers
MPLS Label Format
Field
Bits
Purpose
Label
20 bits
Label value (0-1,048,575) — กำหนด forwarding behavior
EXP (TC)
3 bits
Traffic Class / QoS (เหมือน DSCP สำหรับ MPLS)
S (Bottom of Stack)
1 bit
1 = last label (bottom of stack), 0 = more labels
TTL
8 bits
Time to Live (loop prevention เหมือน IP TTL)
Reserved Labels
Label
Name
Purpose
0
Explicit NULL (IPv4)
Pop label + use EXP for QoS (preserve QoS to egress)
1
Router Alert
Force packet to CPU (OAM, RSVP)
2
Explicit NULL (IPv6)
เหมือน label 0 แต่สำหรับ IPv6
3
Implicit NULL
Penultimate Hop Popping (PHP) — pop label ที่ hop ก่อนสุดท้าย
4-15
Reserved
สงวนไว้สำหรับใช้ในอนาคต
MPLS Operations
Operation
Router Role
Action
Push
Ingress LER (Label Edge Router)
เพิ่ม label บน packet (IP → MPLS)
Swap
Transit LSR (Label Switch Router)
เปลี่ยน label เป็น new label + forward ไป next hop
Pop
Egress LER
ถอด label → forward เป็น IP packet (MPLS → IP)
PHP (Penultimate Hop Pop)
Penultimate LSR
Pop label ที่ hop ก่อนสุดท้าย → egress LER ไม่ต้อง pop (ลด processing)
LDP (Label Distribution Protocol)
Feature
รายละเอียด
คืออะไร
Protocol ที่แจก labels อัตโนมัติตาม IGP routing table
How
Router discover neighbors → exchange label bindings สำหรับทุก prefix ใน RIB
Transport
TCP port 646 (reliable label exchange)
Discovery
UDP multicast 224.0.0.2 port 646 (Hello messages)
Label Allocation
Downstream Unsolicited — allocate labels โดยไม่ต้องรอ request
Advantage
Simple, automatic, follows IGP → ไม่ต้อง manual config
Limitation
ไม่มี traffic engineering (ใช้ IGP shortest path เท่านั้น)
RSVP-TE (Traffic Engineering)
Feature
รายละเอียด
คืออะไร
Protocol ที่สร้าง explicit LSPs (กำหนด path เอง — ไม่ตาม IGP shortest path)
How
Head-end router ส่ง PATH message → transit routers reserve bandwidth → RESV message กลับ
Explicit Path
กำหนด path ที่ LSP ต้องวิ่งผ่าน (strict/loose hop)
Bandwidth Reservation
Reserve bandwidth ตาม path → guaranteed bandwidth
CSPF
Constrained Shortest Path First — คำนวณ path ที่ meet constraints (bandwidth, link color)
Fast Reroute (FRR)
Pre-computed backup path → sub-50ms failover ถ้า primary path fail
Make-Before-Break
สร้าง new LSP ก่อน → แล้วค่อย tear down old LSP (hitless reroute)
MPLS VPN Types
Type
Layer
Service
Use Case
L3VPN (BGP/MPLS)
Layer 3
SP routes customer packets (PE runs routing with CE)
Most common enterprise WAN VPN
L2VPN (VPWS)
Layer 2
Point-to-point L2 circuit (pseudowire)
Extend VLAN ข้าม WAN (leased line replacement)
L2VPN (VPLS)
Layer 2
Multipoint L2 service (virtual switch)
Multi-site L2 connectivity (like one big switch)
EVPN
Layer 2+3
Modern L2VPN with BGP control plane
Data center + WAN (replaces VPLS)
6VPE
Layer 3
IPv6 over MPLS (IPv4 core carries IPv6 VPN)
IPv6 connectivity over IPv4 MPLS backbone
L3VPN (BGP/MPLS VPN)
Component
Role
PE (Provider Edge)
Router ที่ connect กับ customer → run VRF + MP-BGP
CE (Customer Edge)
Customer router ที่ connect กับ PE (ไม่รู้จัก MPLS)
P (Provider)
Core router ที่ forward MPLS labels (ไม่รู้จัก VPN routes)
VRF (Virtual Routing and Forwarding)
แยก routing table สำหรับแต่ละ customer บน PE
RD (Route Distinguisher)
ทำให้ overlapping customer prefixes unique ใน BGP
RT (Route Target)
Control import/export routes ระหว่าง VRFs
Label Stack
2 labels: outer (transport — LDP/RSVP) + inner (VPN — BGP)
Traffic Engineering
Feature
Purpose
Bandwidth Optimization
ใช้ links ทุกเส้น (ไม่แค่ shortest path) → maximize utilization
Fast Reroute
Sub-50ms failover ด้วย pre-computed backup paths
Link Coloring (Affinity)
Tag links ด้วย colors → LSP เลือกเฉพาะ links ที่ match color
Auto-Bandwidth
ปรับ bandwidth reservation อัตโนมัติตาม actual traffic
Priority/Preemption
High-priority LSP สามารถ preempt lower-priority LSP (ยึด bandwidth)
ทิ้งท้าย: MPLS = The Backbone of Service Provider Networks
MPLS Deep Dive Labels: 20-bit value + EXP (QoS) + S (stack) + TTL = 32-bit header Operations: push (ingress), swap (transit), pop (egress), PHP (penultimate hop pop) LDP: auto label distribution following IGP (simple, no TE) RSVP-TE: explicit paths + bandwidth reservation + FRR (sub-50ms failover) L3VPN: PE-CE-P architecture, VRF, RD, RT, 2-label stack (transport + VPN) L2VPN: VPWS (point-to-point), VPLS (multipoint), EVPN (modern replacement) TE: bandwidth optimization, link coloring, auto-bandwidth, priority/preemption
อ่านเพิ่มเติมเกี่ยวกับ BGP Advanced Route Reflectors และ OSPF Advanced Areas LSA Types ที่ siamlancard.com หรือจาก icafeforex.com และ siam2r.com