GLBP

   GLBP  –  Gateway Load Balancing Protocol

Configuration des interfaces

R1(config)#int fa0/0
R1(config-if)#ip address 192.168.80.251 255.255.255.0
R1(config-if)#no shutdown

R2(config)#int fa0/0
R2(config-if)#ip address 192.168.80.252 255.255.255.0
R2(config-if)#no shutdown

Load Balancing GLBP

3 modes de loadbalancing GLBP: host-dependent, round-robin, ou weighted

  • host-dependent permet d’avoir une afinité entre un host et le routeur( utilisé par exemple dans des contextes de SNAT)
  • weighted permet de positionner un poid sur chaque routeur (routeur de capacité diférente par exemple)
  • round-robin est le mode par defaut
R1(config)#int fa0/0
R1(config-if)#glbp 1 load-balancing ?
  host-dependent  Load balance equally, source MAC determines forwarder choice
  round-robin     Load balance equally using each forwarder in turn
  weighted        Load balance in proportion to forwarder weighting

Configuration

R1(config)#int fa0/0
R1(config-if)#glbp 1 load-balancing round-robin
R1(config-if)#glbp 1 authentication text CISCO123
R1(config-if)#glbp 1 ip 192.168.80.253
R1(config-if)#glbp 1 priority 255
R1(config-if)#glbp 1 preempt

R2(config)#int fa0/0
R2(config-if)#glbp 1 load-balancing round-robin
R2(config-if)#glbp 1 authentication text CISCO123
R1(config-if)#glbp 1 ip 192.168.80.253

Vérifications :

la commande « show glbp » permet de vérifier l’état du « cluster » GLBP sur R1
Il existe 2 « forwarders » avec comme mac : 0007.b400.0101 et 0007.b400.0102
seul le deuxième forwarder est actif sur R1 (0007.b400.0102)

R1#show glbp
FastEthernet0/0 - Group 1
  State is Active
    51 state changes, last state change 00:04:30
  Virtual IP address is 192.168.80.253
  Hello time 100 msec, hold time 1 sec
    Next hello sent in 0.060 secs
  Redirect time 600 sec, forwarder time-out 14400 sec
  Authentication text "CISCO123"
  Preemption enabled, min delay 0 sec
  Active is local
  Standby is 192.168.80.252, priority 100 (expires in 0.924 sec)
  Priority 255 (configured)
  Weighting 100 (default 100), thresholds: lower 1, upper 100
  Load balancing: round-robin
  Group members:
    000c.ce46.dca0 (192.168.80.252)
    000f.f7b1.a580 (192.168.80.251) local
  There are 2 forwarders (1 active)
  Forwarder 1
    State is Listen
      70 state changes, last state change 00:02:03
    MAC address is 0007.b400.0101 (learnt)
    Owner ID is 000c.ce46.dca0
    Redirection enabled, 599.920 sec remaining (maximum 600 sec)
    Time to live: 14399.920 sec (maximum 14400 sec)
    Preemption enabled, min delay 30 sec
    Active is 192.168.80.252 (primary), weighting 100 (expires in 0.920 sec)
    Arp replies sent: 1
  Forwarder 2
    State is Active
      5 state changes, last state change 00:04:02
    MAC address is 0007.b400.0102 (default)
    Owner ID is 000f.f7b1.a580
    Redirection enabled
    Preemption enabled, min delay 30 sec
    Active is local, weighting 100
    Arp replies sent: 1

sur R2
Il exite 2 « forwarders » mac 0007.b400.0101 et 0007.b400.0102
seul le forwarder 1 est actif sur R2 (0007.b400.0101)

R2#show glbp
FastEthernet0/0 - Group 1
  State is Active
    64 state changes, last state change 00:01:59
  Virtual IP address is 192.168.80.253
  Hello time 100 msec, hold time 1 sec
    Next hello sent in 0.040 secs
  Redirect time 600 sec, forwarder time-out 14400 sec
  Authentication text "CISCO123"
  Preemption disabled
  Active is local
  Standby is 192.168.80.251, priority 200 (expires in 0.896 sec)
  Priority 200 (configured)
  Weighting 100 (default 100), thresholds: lower 1, upper 100
  Load balancing: round-robin
  Group members:
    000c.ce46.dca0 (192.168.80.252) local
    000f.f7b1.a580 (192.168.80.251)
  There are 2 forwarders (1 active)
  Forwarder 1
    State is Active
      5 state changes, last state change 00:13:31
    MAC address is 0007.b400.0101 (default)
    Owner ID is 000c.ce46.dca0
    Redirection enabled
    Preemption enabled, min delay 30 sec
    Active is local, weighting 100
    Arp replies sent: 1
  Forwarder 2
    State is Listen
      62 state changes, last state change 00:00:12
    MAC address is 0007.b400.0102 (learnt)
    Owner ID is 000f.f7b1.a580
    Redirection enabled, 599.956 sec remaining (maximum 600 sec)
    Time to live: 14399.952 sec (maximum 14400 sec)
    Preemption enabled, min delay 30 sec
    Active is 192.168.80.251 (primary), weighting 100 (expires in 0.952 sec)

En cas de défaillance de R1 :

R1(config)#int fa0/0
R1(config-if)#shutdown

R2 est en charge des 2 « forwarders » :

R2#show glbp
FastEthernet0/0 - Group 1
  State is Active
    64 state changes, last state change 00:08:35
  Virtual IP address is 192.168.80.253
  Hello time 100 msec, hold time 1 sec
    Next hello sent in 0.048 secs
  Redirect time 600 sec, forwarder time-out 14400 sec
  Authentication text "CISCO123"
  Preemption disabled
  Active is local
  Standby is unknown
  Priority 200 (configured)
  Weighting 100 (default 100), thresholds: lower 1, upper 100
  Load balancing: round-robin
  Group members:
    000c.ce46.dca0 (192.168.80.252) local
  There are 2 forwarders (2 active)
  Forwarder 1
    State is Active
      5 state changes, last state change 00:20:07
    MAC address is 0007.b400.0101 (default)
    Owner ID is 000c.ce46.dca0
    Redirection enabled
    Preemption enabled, min delay 30 sec
    Active is local, weighting 100
    Arp replies sent: 1
  Forwarder 2
    State is Active
      63 state changes, last state change 00:00:50
    MAC address is 0007.b400.0102 (learnt)
    Owner ID is 000f.f7b1.a580
    Redirection enabled, 547.480 sec remaining (maximum 600 sec)
    Time to live: 14347.480 sec (maximum 14400 sec)
    Preemption enabled, min delay 30 sec
    Active is local, weighting 100

TIMER

les timers peuvent être spécifiés en second ou en milisecond
la commande « glbp x timers » permet de configurer la fréquence de paquets hello et le hold time
par defaut :

  • Hello time 3 sec
  • Hold time 10 sec
R1(config)#int fa0/0
R1(config-if)#glbp 1 timers msec 100 1

R2(config)#int fa0/0
R2(config-if)#glbp 1 timers msec 100 1

 

les addresses mac virtuelles sont fournis par le routeur qui à été élu « actif » (AVG)
la commande « glbp x timers redirect » permet configuer, en cas de défaillance de l’AVG,
le nombre seconds pendant lequel la mac virtuelle du routeur défaillant continuera à répondre et ça durer du vie
par defaut :

  • Redirect time : 600 sec
  • forwarder time-out : 14400 sec (4 heures)
R1(config)#int fa0/0
R1(config-if)#glbp 1 timers redirect 5 660

R2(config)#int fa0/0
R2(config-if)#glbp 1 timers redirect 60 660

Vérification

R1#show glbp
FastEthernet0/0 - Group 1
  State is Active
    56 state changes, last state change 02:51:18
  Virtual IP address is 192.168.80.253
  Hello time 100 msec, hold time 1 sec
    Next hello sent in 0.072 secs
  Redirect time 60 sec, forwarder time-out 660 sec
  Authentication text "CISCO123"
  Preemption enabled, min delay 0 sec
  Active is local
  Standby is 192.168.80.252, priority 200 (expires in 0.944 sec)
  Priority 255 (configured)
  Weighting 100 (default 100), thresholds: lower 1, upper 100
  Load balancing: round-robin
  Group members:
    000c.ce46.dca0 (192.168.80.252)
    000f.f7b1.a580 (192.168.80.251) local
  There are 2 forwarders (1 active)
  Forwarder 1
    State is Listen
      70 state changes, last state change 03:14:03
    MAC address is 0007.b400.0101 (learnt)
    Owner ID is 000c.ce46.dca0
    Redirection enabled, 59.924 sec remaining (maximum 60 sec)
    Time to live: 659.924 sec (maximum 660 sec)
    Preemption enabled, min delay 30 sec
    Active is 192.168.80.252 (primary), weighting 100 (expires in 0.924 sec)
    Arp replies sent: 35
  Forwarder 2
    State is Active
      9 state changes, last state change 02:52:32
    MAC address is 0007.b400.0102 (default)
    Owner ID is 000f.f7b1.a580
    Redirection enabled
    Preemption enabled, min delay 30 sec
    Active is local, weighting 100
    Arp replies sent: 35
This entry was posted in IP Services. Bookmark the permalink.

Comments are closed.