Thursday, July 7, 2011

First Hop Redundancy Protocols Part 3 - Object tracked GLBP Load balancing with OSPF routing

GLBP(Gateway Load Balancing Protocol) helps us to achieve load balancing with fault tolerance. In HSRP/VRRP there is only one Active/Master router. In GLBP highly flexible network can be configured with the help of AVG(Actual Virtual Gateway) & AVF(Actual Virtual Forwarder) planes.

  • In same GLBP group, there is only one AVG. 
  • Same GLBP group can have multiple AVF. Two AVF's are default.
  • Key point in working of GLBP is, only AVG replies to ARP requests of the clients. Every AVF is configured with virtual MAC address, AVG router in GLBP group sends MAC addresses to clients. Load-balancing is achieved by replying with different ARP replies.
  • AVG is elected on the basis of priority configured. Backup AVG remains in standby mode and responds if primary AVG fails. 
  • Load balancing & redundancy is achieved by AVF. Active & Backup AVG has two AVF's  independently. Every AVF has its own Virtual MAC address assigned by AVG.
  • AVF's are always in active state with respect to each other. Higher weight AVF will be in active state while other one is in Listen state. So Active AVG router can have Forwarder 1 in Listen state & Forwarder 2 in Active state, Standby AVG can have Forwarder 1 in Active state & Forwarder 2 in Listen state. Active AVG will distribute the MAC addresses to ARP queries depending upon the Load balancing algorithm configured.
  • AVF can be changed to Listen state if the weight goes below the threshold. Then this AVF will stop forwarding traffic & active AVG will not advertise these virtual MAC address.
  • In current scenario, both the GLBP groups are tracking s0/0 interfaces. If s0/0 goes down the priority decreases by value of 10. The weight set is 200 with threshold of 191. So as soon as the s0/0 interface goes down weight becomes 190, which is below configured threshold. This will overthrow the respective AVF. That AVF will go into Listen state and stops forwarding.
  • For GLBP group 20, R1 is Active AVG with priority 125.
  • For GLBP group 21. R4 is Active AVG with priority 125.
  • Cross links have more OSPF interface cost. Preferred links are R1 s0/0 - R3 s0/0 from Host 1 to Host 2 and R4 s0/0 to R2 s0/0 from Host 2 to Host 1.
  • Active AVG is aware of all AVF's states present in Active AVG as well as Standby AVG.
  • Observe the "sh glbp" output when R1 s0/0 goes down. Weight goes down by 10, i.e. 190. This causes the AVF's to go into Listen state. Both Active AVF's are in Standby AVG router R2 (192.168.56.251). 
  • Normal operation (no link or router down)
    • GLBP group 20 - 192.168.56.252
      • Active AVG - R1
      • Standby AVG - R2
      • Active AVF's - R1 Forwarder 1, R2 Forwarder 2
    • GLBP group 21 - 192.168.57.252
      • Active AVG - R4
      • Standby AVG - R3
      • Active AVF's - R4 Forwarder 1, R3 Forwarder 2
  • For example, Lets say if R1 s0/0 goes down, then
    • GLBP group 20 - 192.168.56.252
      • Active AVG - R1
      • Standby AVG - R2
      • Active AVF's - R2 Forwarder 1, R2 Forwarder 2
  • Active AVG priority is manually specified, it does not depend upon Weight. Preemption is enabled too overthrow lower priority routers.
Router Configurations - 

R1 - 
---------------------------------------------------------------------------------------------------------------------------------
track 1 interface Serial0/0 ip routing
!
!
interface Loopback1
 ip address 199.199.199.199 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.56.250 255.255.255.0
 duplex auto
 speed auto
 glbp 20 ip 192.168.56.252
 glbp 20 priority 125
 glbp 20 preempt
 glbp 20 weighting 200 lower 191
 glbp 20 authentication text ninja
 glbp 20 weighting track 1 decrement 10
!
interface Serial0/0
 ip address 11.1.1.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 ip address 12.1.1.1 255.255.255.0
 ip ospf network point-to-point
 ip ospf cost 80
!
router ospf 1
 log-adjacency-changes
 network 11.1.1.0 0.0.0.255 area 0
 network 12.1.1.0 0.0.0.255 area 0
 network 192.168.56.0 0.0.0.255 area 0

R2 -
---------------------------------------------------------------------------------------------------------------------------------
track 1 interface Serial0/0 ip routing
!
!
interface Loopback1
 ip address 198.198.198.198 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.56.251 255.255.255.0
 duplex auto
 speed auto
 glbp 20 ip 192.168.56.252
 glbp 20 priority 120
 glbp 20 preempt
 glbp 20 weighting 200 lower 191
 glbp 20 authentication text ninja
 glbp 20 weighting track 1 decrement 10
!
interface Serial0/0
 ip address 14.1.1.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 ip address 13.1.1.1 255.255.255.0
 ip ospf network point-to-point
 ip ospf cost 80
!
router ospf 1
 log-adjacency-changes
 network 13.1.1.0 0.0.0.255 area 0
 network 14.1.1.0 0.0.0.255 area 0
 network 192.168.56.0 0.0.0.255 area 0

R3 - 
---------------------------------------------------------------------------------------------------------------------------------
track 1 interface Serial0/0 ip routing
!
!
interface Loopback1
 ip address 195.195.195.195 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.57.250 255.255.255.0
 duplex auto
 speed auto
 glbp 21 ip 192.168.57.252
 glbp 21 priority 120
 glbp 21 preempt
 glbp 21 weighting 200 lower 191
 glbp 21 authentication text ninja
 glbp 21 weighting track 1 decrement 10
!
interface Serial0/0
 ip address 11.1.1.2 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 ip address 13.1.1.2 255.255.255.0
 ip ospf network point-to-point
 ip ospf cost 80
!
router ospf 1
 log-adjacency-changes
 network 11.1.1.0 0.0.0.255 area 0
 network 13.1.1.0 0.0.0.255 area 0
 network 192.168.57.0 0.0.0.255 area 0

R4 -
---------------------------------------------------------------------------------------------------------------------------------
track 1 interface Serial0/0 ip routing
!
!
interface Loopback1
 ip address 191.191.191.191 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.57.251 255.255.255.0
 duplex auto
 speed auto
 glbp 21 ip 192.168.57.252
 glbp 21 priority 125
 glbp 21 preempt
 glbp 21 weighting 200 lower 191
 glbp 21 authentication text ninja
 glbp 21 weighting track 1 decrement 10
!
interface Serial0/0
 ip address 14.1.1.2 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 ip address 12.1.1.2 255.255.255.0
 ip ospf network point-to-point
 ip ospf cost 80
!
router ospf 1
 log-adjacency-changes
 network 12.1.1.0 0.0.0.255 area 0
 network 14.1.1.0 0.0.0.255 area 0
 network 192.168.57.0 0.0.0.255 area 0

Normal Operation R1 output - 
---------------------------------------------------------------------------------------------------------------------------------
R1#sh glbp
FastEthernet0/0 - Group 20
  State is Active
    2 state changes, last state change 00:06:50
  Virtual IP address is 192.168.56.252
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 2.220 secs
  Redirect time 600 sec, forwarder time-out 14400 sec
  Preemption enabled, min delay 0 sec
  Active is local
  Standby is 192.168.56.251, priority 120 (expires in 9.276 sec)
  Priority 125 (configured)
  Weighting 200 (configured 200), thresholds: lower 191, upper 200
    Track object 1 state Up decrement 10
  Load balancing: round-robin
  There are 2 forwarders (1 active)
  Forwarder 1
    State is Active
      1 state change, last state change 00:06:40
    MAC address is 0007.b400.1401 (default)
    Owner ID is c801.1034.0000
    Redirection enabled
    Preemption enabled, min delay 30 sec
    Active is local, weighting 200
  Forwarder 2
    State is Listen
    MAC address is 0007.b400.1402 (learnt)
    Owner ID is c802.1034.0000
    Redirection enabled, 598.528 sec remaining (maximum 600 sec)
    Time to live: 14398.312 sec (maximum 14400 sec)
    Preemption enabled, min delay 30 sec
    Active is 192.168.56.251 (primary), weighting 200 (expires in 7.884 sec)

R1 output with R1 s0/0 down -
---------------------------------------------------------------------------------------------------------------------------------
R1#sh glbp
FastEthernet0/0 - Group 20
  State is Active
    2 state changes, last state change 00:08:54
  Virtual IP address is 192.168.56.252
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 1.368 secs
  Redirect time 600 sec, forwarder time-out 14400 sec
  Preemption enabled, min delay 0 sec
  Active is local
  Standby is 192.168.56.251, priority 120 (expires in 8.396 sec)
  Priority 125 (configured)
  Weighting 190, low (configured 200), thresholds: lower 191, upper 200
    Track object 1 state Down decrement 10
  Load balancing: round-robin
  There are 2 forwarders (0 active)
  Forwarder 1
    State is Listen
      2 state changes, last state change 00:00:10
    MAC address is 0007.b400.1401 (default)
    Owner ID is c801.1034.0000
    Redirection enabled
    Preemption enabled, min delay 30 sec
    Active is 192.168.56.251 (secondary), weighting 200 (expires in 8.396 sec)
  Forwarder 2
    State is Listen
    MAC address is 0007.b400.1402 (learnt)
    Owner ID is c802.1034.0000
    Redirection enabled, 599.108 sec remaining (maximum 600 sec)
    Time to live: 14398.904 sec (maximum 14400 sec)
    Preemption enabled, min delay 30 sec
    Active is 192.168.56.251 (primary), weighting 200 (expires in 8.448 sec)
R1#

So GLBP provides more control over the Network than HSRP/VRRP. Happy Networking.

No comments:

Post a Comment