2

my doubt is about the ARP protocol. I know the procedure: if a host wants to know the MAC address of another sends a broadcast frame and the destination answers with its MAC. However, if an intermediate node in the considered LAN receives the broadcast frame, does it also learn the source MAC address or it just discard the frame because the IP isn't its?

I hope someone can help me. Thank you for your responses!

3
  • Welcome to Network Engineering! The definite answer is: sometimes. It depends on the operating system.
    – Ron Trunk
    Dec 25, 2018 at 20:06
  • What do you mean by "intermediate node?" That usually means a router, but broadcasts do not cross routers.
    – Ron Maupin
    Dec 25, 2018 at 20:06
  • I referred to another node which is in the LAN but it isn't neither the source nor the destination.
    – Josemi
    Dec 25, 2018 at 20:35

1 Answer 1

2

An intermediate node is one through which a packet must pass in order to reach the destination. Based on your comment, it sounds like you mean peer hosts on the same broadcast domain.

When an ARP request is sent, it is broadcast. That means that every host on the broadcast domain will see the ARP request, and every host seeing the ARP request is supposed to update an existing entry in its ARP table with the requester information.

This is explained in RFC 826, An Ethernet Address Resolution Protocol:

Packet Reception:

When an address resolution packet is received, the receiving Ethernet module gives the packet to the Address Resolution module which goes through an algorithm similar to the following. Negative conditionals indicate an end of processing and a discarding of the packet.

?Do I have the hardware type in ar$hrd?
Yes: (almost definitely)
  [optionally check the hardware length ar$hln]
  ?Do I speak the protocol in ar$pro?
  Yes:
    [optionally check the protocol length ar$pln]
    Merge_flag := false
    If the pair <protocol type, sender protocol address> is
        already in my translation table, update the sender
        hardware address field of the entry with the new
        information in the packet and set Merge_flag to true.
    ?Am I the target protocol address?
    Yes:
      If Merge_flag is false, add the triplet <protocol type,
          sender protocol address, sender hardware address> to
          the translation table.
      ?Is the opcode ares_op$REQUEST?  (NOW look at the opcode!!)
      Yes:
        Swap hardware and protocol fields, putting the local
            hardware and protocol addresses in the sender fields.
        Set the ar$op field to ares_op$REPLY
        Send the packet to the (new) target hardware address on
            the same hardware on which the request was received.

Notice that the <protocol type, sender protocol address, sender hardware address> triplet is merged into the table before the opcode is looked at. This is on the assumption that communcation is bidirectional; if A has some reason to talk to B, then B will probably have some reason to talk to A. Notice also that if an entry already exists for the <protocol type, sender protocol address> pair, then the new hardware address supersedes the old one. Related Issues gives some motivation for this.

Generalization: The ar$hrd and ar$hln fields allow this protocol and packet format to be used for non-10Mbit Ethernets. For the 10Mbit Ethernet <ar$hrd, ar$hln> takes on the value <1, 6>. For other hardware networks, the ar$pro field may no longer correspond to the Ethernet type field, but it should be associated with the protocol whose address resolution is being sought.

What a particular host actually does when it sees an ARP request not intended for it is up to the host OS, which is off-topic here. For example, a host can not only update an existing ARP table entry, it could create an ARP table entry if one does not exist.

When a host responds to an ARP request with an ARP reply, the reply is sent as a unicast, not a broadcast, so the reply will be sent directly to the requesting host. That means the other hosts on the broadcast domain will not even see the ARP reply.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.