GLBP Configuration
GLBP Configuration
hostname R1
interface g0/0
ip address 192.168.1.2 255.255.255.0
glbp 1 ip 192.168.1.1
glbp 1 priority 110
glbp 1 preempt
glbp 1 ip 192.168.1.1: Configures the virtual IP (VIP) for GLBP group 1.
priority 110: Sets a higher priority for R1 (default is 100), making it the primary
active router.
preempt: Ensures R1 regains the role of active router if it comes back online.
weighting 100: Configures the weight for load balancing (higher weight = more
traffic).
glbp 1 weighting 100
no shutdown
R2 Configuration (Backup)
hostname R2
interface g0/0
ip address 192.168.1.3 255.255.255.0
glbp 1 ip 192.168.1.1
glbp 1 priority 100
glbp 1 preempt
priority 100: Default priority, so R2 will be the backup if R1 is available.
weighting 50: Low weight, meaning R2 will receive less traffic than R1 during load
balancing.
glbp 1 weighting 50
no shutdown
Configuration on PC
IP Address: 192.168.1.10
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1 (VIP)
Verification commands/ On R1 and R2
show glbp
On PC1
ping 192.168.1.1
Test the failover by shutting down R1’s interface and observing R2 take over the
traffic
R1(config)# interface g0/0
R1(config-if)# shutdown
Once R1's interface is down, R2 should take over as the Active router.