Home » Network Redundancy: HSRP, VRRP, GLBP และ First-Hop Redundancy Protocols
Network Redundancy: HSRP, VRRP, GLBP และ First-Hop Redundancy Protocols
Network Redundancy: HSRP, VRRP, GLBP และ First-Hop Redundancy Protocols
First-Hop Redundancy Protocols (FHRPs) ให้ default gateway redundancy สำหรับ end devices เมื่อ primary gateway ล่ม traffic จะ failover ไป standby gateway อัตโนมัติโดยไม่ต้อง reconfigure clients HSRP (Cisco proprietary), VRRP (open standard) และ GLBP (Cisco, load balancing) เป็น 3 protocols หลักที่ใช้กันในปัจจุบัน
End devices ส่วนใหญ่ config default gateway เป็น static IP เดียว ถ้า gateway router ล่ม → ทุก device ใน subnet ออก internet ไม่ได้ FHRPs แก้ปัญหา: สร้าง virtual IP (VIP) ที่ shared ระหว่าง 2+ routers → clients ชี้ไป VIP → ถ้า active router ล่ม standby takes over ภายใน 1-3 วินาที
FHRP Comparison
Feature
HSRP
VRRP
GLBP
Standard
Cisco proprietary
Open standard (RFC 5798)
Cisco proprietary
Active/Standby
1 Active + 1 Standby + listeners
1 Master + Backup(s)
1 AVG + multiple AVFs
Load Balancing
ไม่มี (Active-Standby only)
ไม่มี (Master-Backup only)
มี (multiple AVFs share traffic)
Virtual IP
ต้องต่างจาก interface IP
สามารถใช้ interface IP ได้
ต้องต่างจาก interface IP
Virtual MAC
0000.0c07.acXX (XX=group)
0000.5e00.01XX
0007.b400.XXYY
Preemption
Disabled by default
Enabled by default
Enabled by default (AVG)
Multicast
224.0.0.2 (HSRPv1), 224.0.0.102 (v2)
224.0.0.18
224.0.0.102
Timers
Hello 3s, Hold 10s
Advert 1s, Master Down 3×advert+skew
Hello 3s, Hold 10s
IPv6
HSRPv2
VRRPv3 (RFC 5798)
GLBP for IPv6
HSRP (Hot Standby Router Protocol)
Feature
รายละเอียด
Versions
HSRPv1 (groups 0-255), HSRPv2 (groups 0-4095, IPv6 support)
Active Router
Router ที่ forward traffic สำหรับ VIP (highest priority wins)
Standby Router
Router ที่รอ takeover เมื่อ active fails
Priority
0-255 (default 100), highest priority = active
Preemption
ต้อง enable manually (standby preempt) → higher priority reclaims active role
Tracking
Track interface/object → decrement priority เมื่อ tracked object fails
States
Initial → Listen → Speak → Standby → Active
Authentication
Plaintext or MD5 (HSRPv2)
VRRP (Virtual Router Redundancy Protocol)
Feature
รายละเอียด
Standard
RFC 5798 (VRRPv3 — IPv4 + IPv6)
Master Router
Router ที่ forward traffic (highest priority)
IP Owner
Router ที่มี VIP เป็น real interface IP = priority 255 (always master)
Priority
1-254 (default 100), 255 = IP owner
Preemption
Enabled by default (higher priority takes over)
Advertisement
Master ส่ง advertisement ทุก 1 second (default)
Master Down
3× advertisement + skew time → elect new master
Multi-vendor
Open standard → works across vendors (Cisco, Juniper, Arista, etc.)
GLBP (Gateway Load Balancing Protocol)
Feature
รายละเอียด
AVG (Active Virtual Gateway)
Elected leader ที่ assign virtual MACs ให้ AVFs
AVF (Active Virtual Forwarder)
Routers ที่ forward traffic (สูงสุด 4 AVFs per group)
Load Balancing
AVG ตอบ ARP ด้วย different virtual MACs → distribute clients across AVFs
Round Robin
Default: สลับ virtual MAC ทุก ARP reply
Weighted
Assign weights → AVF ที่ weight สูงกว่าได้ traffic มากกว่า
Host-dependent
Same client always gets same AVF (same virtual MAC per source)
Advantage
ใช้ bandwidth ของทุก routers (ไม่มี idle standby)
Limitation
Cisco proprietary only
HSRP/VRRP Load Balancing Workaround
Method
วิธีทำ
Multiple Groups
สร้าง 2 HSRP/VRRP groups ที่ VIPs ต่างกัน → R1 active group 1, R2 active group 2
Client Split
ครึ่งหนึ่ง clients ใช้ VIP1, อีกครึ่งใช้ VIP2
DHCP Pools
DHCP pool A → gateway VIP1, pool B → gateway VIP2
Result
Both routers active (different groups) → load shared
Interface Tracking
Feature
รายละเอียด
Purpose
Monitor uplink → ถ้า uplink ล่ม → ลด priority → failover to standby
Track Interface
Track WAN interface → decrement priority by X เมื่อ interface down
Track IP SLA
Track reachability (ping/HTTP) → decrement เมื่อ unreachable
Track List
Track multiple objects (AND/OR logic)
Decrement
ต้อง decrement มากพอให้ priority ต่ำกว่า standby → trigger failover
Design Best Practices
Practice
รายละเอียด
Use VRRP for multi-vendor
Open standard → works across all vendors
Enable preemption
ให้ primary router กลับมาเป็น active เมื่อ recover (HSRP ต้อง enable manual)
Configure tracking
Track uplinks → failover เมื่อ uplink ล่ม (ไม่ใช่แค่ interface down)
Tune timers
ลด hello/hold timers สำหรับ faster failover (sub-second possible)
Use authentication
MD5 authentication ป้องกัน rogue routers join FHRP group
Multiple groups for LB
ใช้ 2 groups + split clients สำหรับ active-active
Consider Anycast Gateway
EVPN-VXLAN environments → distributed anycast gateway แทน FHRP
ทิ้งท้าย: FHRPs = Gateway Never Goes Down
FHRPs HSRP: Cisco, active-standby, preempt off by default VRRP: open standard (RFC 5798), master-backup, preempt on by default GLBP: Cisco, load balancing across 4 AVFs (uses all routers) All: virtual IP shared → seamless failover for clients Tracking: monitor uplinks → auto-failover when path fails Modern: EVPN anycast gateway replacing FHRP in data center fabrics
อ่านเพิ่มเติมเกี่ยวกับ EVPN-VXLAN Fabric Spine-Leaf และ Network Load Balancing Layer 4 7 ที่ siamlancard.com หรือจาก icafeforex.com และ siam2r.com