Redirected
edited by
19,196 views
38 votes
38 votes

Suppose that in an IP-over-Ethernet network, a machine X wishes to find the MAC address of another machine Y  in its subnet. Which one of the following techniques can be used for this?

  1. X sends an ARP request packet to the local gateway’s IP address which then finds the MAC address of Y and sends to X
  2. X sends an ARP request packet to the local gateway’s MAC address which then finds the MAC address of Y and sends to X
  3. X sends an ARP request packet with broadcast MAC address in its local subnet
  4. X sends an ARP request packet with broadcast IP address in its local subnet
edited by

12 Answers

Best answer
75 votes
75 votes

Steps in ARP Operation : 

  1. The sender (X) knows its own IP address and  MAC address. X also knows the IP address of the target (Y) . It needs to find MAC address of Y
  2. IP asks ARP to create an ARP request message, filling in X's IP and MAC address and Y's IP address. The destination MAC address is set to all 0s.
  3. The message is passed to Data Link layer where it is encapsulated in a frame using MAC address of X as the source address and physical broadcast address (all 1s)  as the destination address.
  4. Every host in subnet receives the request message because we have used broadcast MAC address in the destination address. All machines except Y (we have specified Y's IP address in our ARP request message) drop the ARP request message. 
  5. Y replies with an ARP reply message that contains its MAC address.
  6. When X receives this message, it gets to know the MAC address of Y.

Please note that, a host uses its own IP address and network mask to decide if target IP address is in its own network or not.

If it is in its network, it uses ARP to resolve the MAC address.

If target IP address is not in its network, it takes the help of default gateway to resolve MAC address using ARP.

Since in question it is clearly mentioned that X (source) and Y (destination) both are in the same subnet, we need not send ARP request message targeted at gateway and then expect it to give the MAC address of Y to X.

So the correct answer is option C.

edited by
39 votes
39 votes
In ARP request, the destination MAC is broadcasted (all 1's) and the packet is sent to the local subnet.

Do not confuse yourself that MAC is required then why IP is not broadcast? See it this way: If destination IP is broadcast, how would the destination machine ever know that its MAC has been requested by someone.

To clear confusion, you've 4 fields

 SIP • DestIP • SMAC • DESTMAC

Try filling these fields, if you broadcast ip (all 1's in DestIP), and you want to know the destination MAC, is there any way the destination machine can recognise that its MAC has been requested by a machine with SIP and SMAC address?

The correct answer was broadcast MAC in local subnet.
edited by
19 votes
19 votes
correct answer is option c.

Since both are present in the same subnet thus an ARP request packet can be sent as bradcast MAC address, all will see but only destination will reply as a unicast reply.
reshown by
9 votes
9 votes
Answer is Option C

If you are thinking of option D then once think like this

In option C they have give broadcast MAC address “It means FF:FF:FF:FF:FF:FF” which is true.

It will send with the destination IP address only

I also mistakenly think of it as option D and got a reward of “-2.67” marks

Don’t do the same mistake which I have faced..
edited by
Answer:

Related questions

26 votes
26 votes
6 answers
2
Arjun asked Feb 7, 2019
19,665 views
Consider that $15$ machines need to be connected in a LAN using $8$-port Ethernet switches. Assume that these switches do not have any separate uplink ports. The minimum ...
13 votes
13 votes
6 answers
3
7 votes
7 votes
2 answers
4
makhdoom ghaya asked Sep 8, 2016
2,178 views
Which of the following file transfer protocols use $TCP$ and establishes two virtual circuits between the local and remote server ?$FTP$$TFTP$ $TELNET$$NFS$