glbp and active virtual forwarders

Answered Question
May 18th, 2012
User Badges:
  • Bronze, 100 points or more

Hi everybody.

How is everyone doing ?


There can be upto 4 active virtual forwarders. Let say we have 5 routers, r1,r2,r3,r4 and r5 with ip addresses ip1,ip2,ip3,ip4 and ip5 (  ip5>ip4>ip3>ip2>ip1

Glbp has to choose up to 4 active virtual forwarders. How will glbp choose them in our case?  Does Glbp take into account glbp priority first?


I noticed there are two priorities in glbp as can be seen in a packet capture shown below:




.     Time        Source                Destination           Protocol Length Info

    331 410.594000  199.199.199.2         224.0.0.102           GLBP     102    G: 1, Hello, IPv4, Request/Response?


Frame 331: 102 bytes on wire (816 bits), 102 bytes captured (816 bits)

Ethernet II, Src: Cisco_00:01:02 (00:07:b4:00:01:02), Dst: IPv4mcast_00:00:66 (01:00:5e:00:00:66)

Internet Protocol Version 4, Src: 199.199.199.2 (199.199.199.2), Dst: 224.0.0.102 (224.0.0.102)

User Datagram Protocol, Src Port: glbp (3222), Dst Port: glbp (3222)

Gateway Load Balancing Protocol

    Version?: 1

    Unknown1: 0

    Group: 1

    Unknown2: 0000

    Owner ID: c0:01:02:7c:00:00 (c0:01:02:7c:00:00)

    TLV l=28, t=Hello

        Type: Hello (1)

        Length: 28

        Unknown1-0: 00

        VG state?: Standby (16)

        Unknown1-1: 00

        Priority: 100

        Unknown1-2: 0000

        Helloint: 3000

        Holdint: 10000

        Redirect: 600

        Timeout: 14400

        Unknown1-3: 0000

        Address type: IPv4 (1)

        Address length: 4

        Virtual IPv4: 199.199.199.10 (199.199.199.10)

    TLV l=20, t=Request/Response?

        Type: Request/Response? (2)

        Length: 20

        Forwarder?: 2

        VF state?: Active (32)

        Unknown2-1: 00

        Priority: 167

        Weight: 100

        Unknown2-2: 00384002580000

        Virtualmac: Cisco_00:01:02 (00:07:b4:00:01:02)



==============================================================================


My question is what is the purpose of these priorities?



thanks and have a nice weekend.

Correct Answer by Nandan Mathure about 5 years 3 months ago

Hi!

4 AVFs are selected on the basis of Highest IP addresses.

Consider all have same priority and Ip adresses R1=10.10.10.1, R2=10.10.10.2, R3=10.10.10.3, R4=10.10.10.4 and R5=10.10.10.5


So R5 will become the AVG and AVF and other three AVFs would be R4,R3 and R2.


Thanks,

Nandan Mathure

Correct Answer by Kishore Chennupati about 5 years 3 months ago

Hi sarah,


As you have pointed out the weights are more for the load distribution. priority is more for the Active/Standby scenario.

In a glbp group you can have 1AVG and 4AVF's(including the AVG), so when you bring in the 5th router it should just act as a standby and in terms of priority but not become AVF.


In regards to the priority in the above capture, I am not sure how the priotiry 167 is calculated. And as per my understnading the first packet is more for the active/standby .i,e to decide who will be the AVG and second packet is for the AVF. if you type sh glbp on one of the routers. it shows you which  vmac is Active and others are in a learnt phase.


HTH

Kishore

Correct Answer by Giuseppe Larosa about 5 years 3 months ago

Hello Sarah,

your packet capture is very interesting as it shows how the GLBP packet is built.


There is a first data structure called Hello that is relative to AVG election and the node originating the packet is AVG standby, then there is a second data structure called Request/Response.

This second data structure is relative to AVF role and the originating node is AVF active for MAC

00:07:b4:00:01:02 with a priority of 167.


How this second value is calculated is not totally clear as my personal understanding was that AVF should be elected based on the weighting value given to the node in GLBP configuration.


We have seen in another thread (with tests performed by Vijay) as there can be competition when a node fails in taking its AVF role.  In that thread there were some GLBP related debug messages showing priority values that we could not explain in terms of GLBP configuration.


With 5 nodes I agree that once the AVG active and AVG standby are elected, four nodes are elected active AVF and the fitfth node is likely a standby AVF for first AVF.

It would be smart if with 5 routers AVG active would be the AVF standby in order to divide work load on nodes.


Hope to help

Giuseppe

Correct Answer by vijay.swaminathan about 5 years 3 months ago

Hi,


To my knowledge the priority is looked at only for the election of AVG and for the AVF election the load blancing methods are typically used.


so in your case if there are 5 routers, based on the prioirities, Active AVG and standby AVG's will be elected.


for AVF election based on the load balancing technique used , 4 AVF's will be elected.


My guess is the 5th router would never be either a AVG or AVF. it can still be a part of the group but need to confirm.


-Vijay Swaminathan

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.8 (5 ratings)
Loading.
Correct Answer
vijay.swaminathan Fri, 05/18/2012 - 05:55
User Badges:

Hi,


To my knowledge the priority is looked at only for the election of AVG and for the AVF election the load blancing methods are typically used.


so in your case if there are 5 routers, based on the prioirities, Active AVG and standby AVG's will be elected.


for AVF election based on the load balancing technique used , 4 AVF's will be elected.


My guess is the 5th router would never be either a AVG or AVF. it can still be a part of the group but need to confirm.


-Vijay Swaminathan

Correct Answer
Giuseppe Larosa Fri, 05/18/2012 - 06:39
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Sarah,

your packet capture is very interesting as it shows how the GLBP packet is built.


There is a first data structure called Hello that is relative to AVG election and the node originating the packet is AVG standby, then there is a second data structure called Request/Response.

This second data structure is relative to AVF role and the originating node is AVF active for MAC

00:07:b4:00:01:02 with a priority of 167.


How this second value is calculated is not totally clear as my personal understanding was that AVF should be elected based on the weighting value given to the node in GLBP configuration.


We have seen in another thread (with tests performed by Vijay) as there can be competition when a node fails in taking its AVF role.  In that thread there were some GLBP related debug messages showing priority values that we could not explain in terms of GLBP configuration.


With 5 nodes I agree that once the AVG active and AVG standby are elected, four nodes are elected active AVF and the fitfth node is likely a standby AVF for first AVF.

It would be smart if with 5 routers AVG active would be the AVF standby in order to divide work load on nodes.


Hope to help

Giuseppe

sarahr202 Fri, 05/18/2012 - 07:00
User Badges:
  • Bronze, 100 points or more

Thanks Giuseppe.


Please correct me if I am wrong as I find huge difference between what my book says and what actually happens.


My understanding is weight is used to decide how the traffic load is distributed.  For example.  AVG look at the weight and then decides which mac address be sent in arp reply to hosts. If certain avf has higher weight then avg will sends its ( avf's mac) more often than others to hosts in arp reply.


I performed  a lab where 4 routers are connected to a switch, with r1 acting as active and r2 acting as  standby. The second i connect r5 to the network,  r1 was kicked out of the network, r2 the formerly standby router takes up " active ' role and r5 ended up selected as standby router.


I apologise for not very detailed as i have got to run for work.I will getback as soon as i get back from work.



have a great weekend.

Correct Answer
Kishore Chennupati Fri, 05/18/2012 - 18:42
User Badges:
  • Gold, 750 points or more

Hi sarah,


As you have pointed out the weights are more for the load distribution. priority is more for the Active/Standby scenario.

In a glbp group you can have 1AVG and 4AVF's(including the AVG), so when you bring in the 5th router it should just act as a standby and in terms of priority but not become AVF.


In regards to the priority in the above capture, I am not sure how the priotiry 167 is calculated. And as per my understnading the first packet is more for the active/standby .i,e to decide who will be the AVG and second packet is for the AVF. if you type sh glbp on one of the routers. it shows you which  vmac is Active and others are in a learnt phase.


HTH

Kishore

sarahr202 Sat, 05/19/2012 - 14:57
User Badges:
  • Bronze, 100 points or more

Thanks Kishore.


The priority in " hello" TLV  is used to determine avg. We can have upto 4 avfs. The question is :How  are these four avfs  selected if we have 5 routers in glbp group.?   As our friend Giuseppe earlier pointed out:



"there is a second data structure called Request/Response.

This second data structure is relative to AVF role and the originating node is AVF active for MAC

00:07:b4:00:01:02 with a priority of 167."


The problem is what would happen if we have  a contention say our 5 routers initialize at the same time with same weight and priorities values? How does Glbp protocol resolve this contention as it could select up to 4 avfs?


thanks and have a great weekend.

Correct Answer
Nandan Mathure Sat, 05/19/2012 - 15:41
User Badges:
  • Bronze, 100 points or more

Hi!

4 AVFs are selected on the basis of Highest IP addresses.

Consider all have same priority and Ip adresses R1=10.10.10.1, R2=10.10.10.2, R3=10.10.10.3, R4=10.10.10.4 and R5=10.10.10.5


So R5 will become the AVG and AVF and other three AVFs would be R4,R3 and R2.


Thanks,

Nandan Mathure

sarahr202 Sun, 05/27/2012 - 09:18
User Badges:
  • Bronze, 100 points or more

Hi Nandan


I performed the following lab too see if AVF are selected based on higher address. However , i found this is not the case.


R1(199.199.199.1),

R2(199.199.199.2)

R3(199.199.199.3)

R4(199.199.199.4)

R5(199.199.199.5) with weight 20


R1throhgh R4 have default weight.


All these routers are connected to a layer 2 switch.  The ports on switch are administratively shutdown.

Next i configure GLBP on all routers, R5 is configured with priority 200, and weight 20; while the rest of routers are configured with default glbp settings.


Next ,I  used " no shutdown" command using int range f1/1- 5 on the  switch to allow glbp on all routers to initializes around the same time.


That is what I found:


R5#show glbp brief

Interface   Grp  Fwd Pri State    Address         Active router   Standby router

Fa0/0       1    -   200 Active   199.199.199.10  local           199.199.199.4

Fa0/0       1    1   -   Active   0007.b400.0101  local           -

Fa0/0       1    2   -   Listen   0007.b400.0102  199.199.199.1   -

Fa0/0       1    3   -   Listen   0007.b400.0103  199.199.199.2   -

Fa0/0       1    4   -   Listen   0007.b400.0104  199.199.199.4   -


R5#show glbp

FastEthernet0/0 - Group 1

  State is Active

    2 state changes, last state change 00:35:52

  Virtual IP address is 199.199.199.10

  Hello time 3 sec, hold time 10 sec

    Next hello sent in 1.672 secs

  Redirect time 600 sec, forwarder timeout 14400 sec

  Preemption disabled

  Active is local

  Standby is 199.199.199.4, priority 100 (expires in 2.528 sec)

  Priority 200 (configured)

  Weighting 20 (configured 20), thresholds: lower 1, upper 20





Note that R3 199.199.199.3 is not selected as AVF.


If Higher ip address is used to choose avf, then R3 should have selected over R2( 199.199.199.2) or R1( 199.199.199.1)


Next I don't see " weight" has any bearing on selection of avf . For example  R5 has weight 20, R1,R2,R3,R4 have default weight 100. But R5 is still get selected as AVF though it has the least weight of 20 among all routers. One might say R5 has priority of 200. But again that priority is used to elect avg not avf.


The question is what exactly GLBP uses to choose AVF if it is not higher ip address or weight. ?



thanks and have a great weekend

jaighobahi Tue, 06/04/2013 - 10:09
User Badges:

Everybody, thanks for the qestion and answers. I do apologize for attempting to re-question a question that has been answered.  Please, look at the quote and explain two lines in it.

R5#show glbp

FastEthernet0/0 - Group 1

  State is Active

    2 state changes, last state change 00:35:52

  Virtual IP address is 199.199.199.10

  Hello time 3 sec, hold time 10 sec

    Next hello sent in 1.672 secs

  Redirect time 600 sec, forwarder timeout 14400 sec

  Preemption disabled

  Active is local

  Standby is 199.199.199.4, priority 100 (expires in 2.528 sec)

  Priority 200 (configured)

  Weighting 20 (configured 20), thresholds: lower 1, upper 20

1.  Redirect time 600 sec.  What does this mean?

2.  Active is local.  What does this mean?


Okay, my CCNA expires in about two months and I need to take exam 200-101 in order to recertify.  Cisco syllabus shows that High Availability - HSRP, VRRP and GLBP is part of the exam.  Could someone give me an idea of the depth Cisco will go in these topics?


Again, thanks for your help.

blau grana Wed, 06/05/2013 - 23:53
User Badges:
  • Gold, 750 points or more

Hello,

1.  Redirect time 600 sec.  What does this mean?

Redirect time:

– The  time for which the Active Virtual Gateway (AVG) continues to redirect  hosts to an Active Virtual Forwarder. The objective is to continue  handling new ARP requests according to the current load balancing  scheme, in anticipation that a failed virtual forwarder will return  online. If this occurs within the Redirect time, the returning virtual  forwarder will regain his prior load.

http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6550/prod_presentation0900aecd801790a3_ps6600_Products_Presentation.html

http://www.cisco.com/en/US/docs/ios/12_2s/feature/guide/fs_glbp2.html#wp1031226


R5#show glbp

FastEthernet0/0 - Group 1

  State is Active

    2 state changes, last state change 00:35:52

  Virtual IP address is 199.199.199.10

  Hello time 3 sec, hold time 10 sec

    Next hello sent in 1.672 secs

  Redirect time 600 sec, forwarder timeout 14400 sec

  Preemption disabled

  Active is local

  Standby is 199.199.199.4, priority 100 (expires in 2.528 sec)

  Priority 200 (configured)

  Weighting 20 (configured 20), thresholds: lower 1, upper 20

2.  Active is local.  What does this mean?

Active is local means that local router is AVG for group 1, based on your output.


Best Regards

Please rate all helpful posts and close solved questions

jaighobahi Thu, 06/06/2013 - 08:21
User Badges:

Thanks you very much.  I understand the output better now.  Eh ... any word on the new ICND2 exams? 

sarahr202 Sun, 05/27/2012 - 09:43
User Badges:
  • Bronze, 100 points or more

This is what i observed.


At the statup, The first 4 routers to initializes will become AVFs.  One way  we can see the order of initialization is to look at the mac addresses. For example


R5#show glbp brief

Interface   Grp  Fwd Pri State    Address         Active router   Standby router

Fa0/0       1    -   200 Active   199.199.199.10  local           199.199.199.4

Fa0/0       1    1   -   Active   0007.b400.0101  local           -

Fa0/0       1    2   -   Listen   0007.b400.0102  199.199.199.1   -

Fa0/0       1    3   -   Listen   0007.b400.0103  199.199.199.2   -

Fa0/0       1    4   -   Listen   0007.b400.0104  199.199.199.4   -



R5 ( 199.199.199.5) initializes first because mac adress is 0007.b400.0101

R1( 199.199.199.1) initialzes second because mac address is 0007: b400:0102

R2( 199.199.199.2) initializes third because mac address is 0007: b400:0103

R4( 199.199.199.4) initialzes fourth  because mac address is 0007: b400:0104


These 4 routers are the first one to initializes and there is up to 4 avfs, so they are selected as avf  though they have lower ip address( R2,R1's ip is lower that that of R3). Also note that R5 weight which is lower than the rest but still get elected as avf over R3.

vijay.swaminathan Mon, 05/28/2012 - 00:27
User Badges:

As for as my understanding goes: assuming default prioirty:


1. AVG election is based on the router which was booted first

2. Standby election is based on Highest IP address (iff the active is already elected)

3. AVF election is based on the booting order of routers.


to illustrate this, I have labbed up the following.


I have 5 routers connected to the switch say R1 , R2, R3 , R4 and R5.


R1 - 192.168.1.1

R2 - 192.168.1.2

R3 - 192.168.1.3

R4 - 192.168.1.4

R5 - 192.168.1.5


Booting order is R1 -> R2 -> R3 -> R4 -> R5


1. so R1 becomes AVG and AVF

2. R2 booted up next , although has the higher IP address it cannot replace R1. so it stays as being Standby and becomes AVF

3. when R3 is boots up, R3 since having higher IP address than R2, will takeover as "STandby"  R2 will become "LISTEN" and both R3 and R2 will become AVF.

4. On R4, same process as R3.

4. When R5 boots up, since it has the highest IP it becomes "STANDBY". R2, R3 and R4 in "LISTEN" state. But since for this GLBP group we have 4 AVF's it cannot become AVF but listens to all the AVF's in this GLBP group.


-Vijay

Actions

This Discussion

Related Content