Gratuitous ARP Question

Answered Question
Jun 19th, 2010
User Badges:

Hi, I have always thought of GARP as a simple method by which a host can advertise to the local LAN a change in its MAC or IP address to speed up convergence and mitigate ARP timeout times. These kinds of GARPs would be replies.


So, what exactly is a GARP REQUEST and when would this technique be deployed?


Definiiton from website: A Gratuitous ARP could be a request or a reply. A Gratuitous ARP Request is the one where the Source and Destination IP address will be  of the host itself which issues the request and is broadcast to the  subnet and normally there will not be a reply.


Why would a host broadcast a GARP request such as this one and not want a reply....? I can see it being used as a method to test whether there is a duplicate address on the network, but it also has implications for NIC teaming....dont get it!


Thanks

Correct Answer by Edison Ortiz about 7 years 1 month ago

its just a mechanism that the server uses to announce a particular IP address to MAC address binding to other hosts on the same subnet. Correct? Each time it does so, it will announce a different MAC address - one for each of the NICs in the team. Correct?

Correct on both counts.



The reason is that you would have a loop if both NICs were active (assuming L2 adjacency between switches). So, the way to get away from the loop is to have access switches, like the Nexus 5000, that does vPC. Correct?


You would have the same MAC address listed on 2 physical switches which would cause a L2 loop. You are correct.


In the case of switches that allow you to 'stack' 2 physical switches into one like Nexus or 3750, the L2 Loop wouldn't occur as the physical entities are seen as one logical device.


What about the case where you have one dual-port NIC with the same uplink connections to the two switches and no vPC or stacking? Still be a loop?


It depends if the Dual-Port sends the same MAC address or different MAC address toward the switch network.


Same MAC Address, same explanation as above. Different MAC Address, it would work on any switching topology.


Regards,


Edison

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (4 ratings)
Loading.
Edison Ortiz Sun, 06/20/2010 - 06:22
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

GARP Request is the most common use GARP function. The website definition you posted was not complete.

You left out the portion where the destination MAC is the broadcast address so every device on that segment will receive that packet.

If another device in that segment contains the same IP address as the device originating the GARP request, the first device on that segment with the duplicate address will report back to this device with a GARP Reply about the conflict.


Regards,


Edison

ex-engineer Sun, 06/20/2010 - 10:47
User Badges:

Edison:


Thank you.


You're right, I did leave out the part about the broadcast MAC address and that does finish the thought you make. However, that use of GARP Requests ****EDIT for the purpose of detecting duplicate addresses EDIT**** is something I already knew and understood...


While reading a Broadcom White Paper on its NIC teaming functionality - specifically, its description of Smart Load Balancing - this is what I read:


/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:SimSun; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Receive Load Balancing is achieved through an intermediate driver by sending Gratuitous ARPs on a client by client basis using the unicast address of each client as the destination address of the ARP Request (also known as a Directed ARP). This is considered client load balancing and not traffic load balancing. When the intermediate driver detects a significant load imbalance between the physical adapters in an SLB team, it will generate G-ARPs in an effort to redistribute incoming frames. The intermediate driver (BASP) does not answer ARP Requests; only the software protocol stack provides the required ARP Reply. It is important to understand that receive load balancing is a function of the number of clients that are connecting to the server via the team interface.


The use of GARP requests in this context is really what I dont understand...


Do you have any thoughts on this comment above?


Thanks

Edison Ortiz Mon, 06/21/2010 - 07:32
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

On this case, the load-balancing mechanism is performed by informing each client on that segment where to send their packets to.

The driver sends GARP requests to clients and no GARP reply is expected as the client do not have a duplicate address (no conflict).

When the driver notices the load-balancing mechanism isn't even, in other words one device participating on the LB is taking more incoming packets than the other device, it will generate new GARP requests for the remaining clients so incoming packets can be evenly distributed once again.


I hope my explanation makes sense.


In short, you will see GARP replies more often when there is a duplicate IP address on a subnet. The common GARP is the GARP request.


Regards,


Edison

ex-engineer Mon, 06/21/2010 - 18:53
User Badges:

I think I am understanding whats going on now...


I couldnt understand why the GARP requests with the same source and destination IP addresses in the packet if not to test for duplicate addresses. But now I think I see why -- its just a mechanism that the server uses to announce a particular IP address to MAC address binding to other hosts on the same subnet. Correct? Each time it does so, it will announce a different MAC address - one for each of the NICs in the team. Correct?


Another quick question...


Imagine I have a server with 2 NICs and I want to team them. If NIC 1 is connected to access switch 1 and NIC 2 to access switch 2, the only NIC teaming methodology that can be used is one in which one NIC is active and the other is in standby. The reason is that you would have a loop if both NICs were active (assuming L2 adjacency between switches). So, the way to get away from the loop is to have access switches, like the Nexus 5000, that does vPC. Correct?


What about 2 separate NICs, as in the first scenario, BUT the two access switches are stacked, like two 3750s?


What about the case where you have one dual-port NIC with the same uplink connections to the two switches and no vPC or stacking? Still be a loop?



Thanks!

Correct Answer
Edison Ortiz Tue, 06/22/2010 - 11:42
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

its just a mechanism that the server uses to announce a particular IP address to MAC address binding to other hosts on the same subnet. Correct? Each time it does so, it will announce a different MAC address - one for each of the NICs in the team. Correct?

Correct on both counts.



The reason is that you would have a loop if both NICs were active (assuming L2 adjacency between switches). So, the way to get away from the loop is to have access switches, like the Nexus 5000, that does vPC. Correct?


You would have the same MAC address listed on 2 physical switches which would cause a L2 loop. You are correct.


In the case of switches that allow you to 'stack' 2 physical switches into one like Nexus or 3750, the L2 Loop wouldn't occur as the physical entities are seen as one logical device.


What about the case where you have one dual-port NIC with the same uplink connections to the two switches and no vPC or stacking? Still be a loop?


It depends if the Dual-Port sends the same MAC address or different MAC address toward the switch network.


Same MAC Address, same explanation as above. Different MAC Address, it would work on any switching topology.


Regards,


Edison

ex-engineer Thu, 06/24/2010 - 08:35
User Badges:

Edison, thank you once again....Sorry it took me so long to get back...been hectic


As usual, very informative answers...and I think the key I was missing in the formula is the question of whether the NIC has 2 MAC addresses or one. That was the discerning factor that was slipping through my mental cracks...and it makes perfect sense...


The Dell Power Edge servers use the Broadcom NIC teaming utility called BACS. So, with, for example, the PE blade servers and an ESW module in both the A and A' switch fabric slots, both ports on the same NIC --  but with 2 different MACs -- can run active/ative. If the MAcs were the same for both ports they would only be able to run active standby or a loop would exist.


I got it now, right?

Edison Ortiz Thu, 06/24/2010 - 11:48
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

You got it

Actions

This Discussion