Gratuitous ARP
Address Resolution
Protocol(ARP)
 It is protocol for mapping an Internet Protocol
address to a physical machine address that is
recognized in the local network.
 It is a low-level network protocol for translating
network layer addresses into link layer addresses.
 A table called the ARP cache, is used to maintain
a correlation between each MAC address and its
corresponding IP address.
ARP Header
 Hardware Type - this is 1 for Ethernet.
 Protocol Type - the protocol used at the network
layer.
 Hardware Address Length - this is the length in
bytes, so it would be 6 for Ethernet.
 Protocol Address Length - For TCP/IP th value
is 4 bytes.
 Operation Code - this code indicates whether the
packet is an ARP Request (1) or an ARP
Response (2).
 Senders Hardware Address - hardware address
of the source node.
 Senders Protocol Address - layer 3 address of
the source node.
 Target Hardware Address - used in a RARP
request, the response carries both the
destination's hardware and layer 3 addresses.
 Target Protocol Address - used in an ARP
request, the response carries both the
destination's hardware and layer 3 addresses.
What is Gratuitous ARP
 It occurs when a host sends an ARP request
looking for its own IP address.
 It is an Address Resolution Protocol packet where
the source and destination IP are both set to the
IP of the machine issuing the packet and the
destination MAC is the broadcast
address ff:ff:ff:ff:ff:ff.
 The Gratuitous ARP is sent as a broadcast, as a
way for a node to announce or update its IP to
MAC mapping to the entire network.
What is use of Gratuitous ARP
 It helps to detect IP conflicts. When a machine
receives an ARP request containing a source IP
that matches its own, then it knows there is an IP
conflict.
 They inform switches of the MAC address of the
machine on a given switch port, so that the switch
knows that it should transmit packets sent to that
MAC address on that switch port.
Example
Scenario 1- Case of Duplicate IP
address
PC1: IP configured with
172.16.10.10/16
PC2: Trying to use
172.16.10.10/16
PC2 is trying to use an IP 172.16.10.10 that is being utilized by PC1,
Before PC2 assigns the IP address to itself, it will generate a G-ARP to
check for duplicate IP
Scenario 1- Case of Duplicate IP
address
 PC2 received the reply from PC1 as Duplicate IP
address Detected.
 PC2 will not assigned the IP address on it’s
system.
Scenario 2- No Duplicate IP address
Assigning an IP address to an end-user, G-ARP protocol checks
for duplicate IP address and generates the below header
If there is no IP conflict , no reply will be generated and IP will be
assigned to the system.
Gratuitous Address Resolution Protocol(G-ARP)

Gratuitous Address Resolution Protocol(G-ARP)

  • 1.
  • 2.
    Address Resolution Protocol(ARP)  Itis protocol for mapping an Internet Protocol address to a physical machine address that is recognized in the local network.  It is a low-level network protocol for translating network layer addresses into link layer addresses.  A table called the ARP cache, is used to maintain a correlation between each MAC address and its corresponding IP address.
  • 3.
  • 4.
     Hardware Type- this is 1 for Ethernet.  Protocol Type - the protocol used at the network layer.  Hardware Address Length - this is the length in bytes, so it would be 6 for Ethernet.  Protocol Address Length - For TCP/IP th value is 4 bytes.  Operation Code - this code indicates whether the packet is an ARP Request (1) or an ARP Response (2).
  • 5.
     Senders HardwareAddress - hardware address of the source node.  Senders Protocol Address - layer 3 address of the source node.  Target Hardware Address - used in a RARP request, the response carries both the destination's hardware and layer 3 addresses.  Target Protocol Address - used in an ARP request, the response carries both the destination's hardware and layer 3 addresses.
  • 6.
    What is GratuitousARP  It occurs when a host sends an ARP request looking for its own IP address.  It is an Address Resolution Protocol packet where the source and destination IP are both set to the IP of the machine issuing the packet and the destination MAC is the broadcast address ff:ff:ff:ff:ff:ff.  The Gratuitous ARP is sent as a broadcast, as a way for a node to announce or update its IP to MAC mapping to the entire network.
  • 7.
    What is useof Gratuitous ARP  It helps to detect IP conflicts. When a machine receives an ARP request containing a source IP that matches its own, then it knows there is an IP conflict.  They inform switches of the MAC address of the machine on a given switch port, so that the switch knows that it should transmit packets sent to that MAC address on that switch port.
  • 8.
  • 9.
    Scenario 1- Caseof Duplicate IP address PC1: IP configured with 172.16.10.10/16 PC2: Trying to use 172.16.10.10/16 PC2 is trying to use an IP 172.16.10.10 that is being utilized by PC1, Before PC2 assigns the IP address to itself, it will generate a G-ARP to check for duplicate IP
  • 10.
    Scenario 1- Caseof Duplicate IP address  PC2 received the reply from PC1 as Duplicate IP address Detected.  PC2 will not assigned the IP address on it’s system.
  • 11.
    Scenario 2- NoDuplicate IP address Assigning an IP address to an end-user, G-ARP protocol checks for duplicate IP address and generates the below header If there is no IP conflict , no reply will be generated and IP will be assigned to the system.