search
Log In
19 votes
6.9k views

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
in Computer Networks
edited by
6.9k views
0

if this question is about RARP then option d) will be the answer. please correct me if i'm wrong!!

 

12 Answers

44 votes
 
Best answer

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
5

Correct answer would be D

 

Address Resolution Protocol (ARP) is a protocol for mapping an Internet Protocol address (IP address) to a physical machine address (MAC) that is recognized in the local network.

ARP is used to find MAC address through IP address.

MAC Address is the physical address of the device

0

Hence Option D is Correct.(See MadeEasy and *** answers)

https://www.cse.iitk.ac.in/users/dheeraj/cs425/lec13.html

1
yes the resource says correctly source computer broadcasts destinations ip address to fetch MAC but it does not infer option D because option D says the packet contains an broadcast ip address example 192.168.1.255/24 which is incorrect am i right?
0

@durgesh Kumar 6 ,Initially I was also thinking C is correct but seeing the question correctly I also think D is correct because Arp request packet contain empty or false MAC address source ishttps://www.geeksforgeeks.org/computer-network-arp-reverse-arprarp-inverse-arpinarp-proxy-arp-gratuitous-arp/. And we achieve broad cast  by limited broadcast address. I think ie 255.255.255.255 (It is used to broad cast with in a LAN) for me it make sense

1
I think this answer is perfect. I too marked this question incorrectly. This question teaches importance of  giving attention to each and every word in question. Here two most important words are "in its subnet" & "broadcast IP/MAC"
0

 If in the question instead of "in its subnet" it was given " in a different subnet" then what would have been the answer?

 

22 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
0
Best Explanation!
0
Thank you. This explains about within subnet but outside the subnet or in another network, packet will go to the gateway and using SM and IP, the network is found and then after the packet enters the network the DESTMAC is broadcast address so all bits will be 1 and then same steps? But doesn't the DESTMAC change router to router along the way so it shouldn't be all 1. Also how do we indicate that its a broadcast message  if MAC is changing and the IP should not be a broadcast as we need the original IP of the destination to get its MAC?
17 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
1
I think C is right
0
it is said "in local subnet" means same subnet
3

Option C is correct.

Check below link under "Example" section-

https://en.m.wikipedia.org/wiki/Address_Resolution_Protocol

 

 

0
Won't it be broadcasting IP rather than Mac because we are trying to find MAC address using IP
2
Correct answer would be D
4

The following is a screenshot from 
Data_Communication_and_Networking_by_Behrouz.A.Forouzan from 5th.edition​​​​​​. 

So, I feel option D should be the answer.

4
"The query is broadcast over the link using the link-layer broadcast address"

link-layer address is MAC address.
7

Here is a live traffic capture where i have pinged an ip 192.168.0.156 then immediately system generated arp packet with broadcast MAC address.

 

so i think option C is right.

0

@sreenivas.s1995 Now - a - days networking system is more complex . Is it a local subnet ??may be your network is connected via bridge so irrespective of the fact if you ping outside your local subnet then definitelly  destination would be broad cast mac only ,as it will go to bridge only than remaining story. may be my interpretation is wrong please correct me .

1

http://scientificsentence.net/Networking/ARP.html

LOOK at it sir....where IP broadcast address is used

1
Please watch only std. Book  Kurose and ross they given MAC okk.
7 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
5 votes
d
that it sends a broadcast request with having IP in local......:o
0
Don't remember the option but I marked the same. But, few people are saying broadcast MAC option .
0
It asks for MAC from IP, why will it broadcast MAC?
0
Ya, that's what the doubt is. Didn't remember if the option was ARP TO broadcast MAC ADDRESS. Or ARP with IP address.
1
Google says:
ARP stands for Address Resolution Protocol. When you try to ping an IP address on your local network, say 192.168.1.1, your system has to turn the IP address 192.168.1.1 into a MAC address. ... Because it is a broadcast packet, it is sent to a special MAC address that causes all machines on the network to receive it.
0
How does this make the ip answer wrong??
0
yes
but not sure that gateway comes in the way ornot
0
Can you recall option ? Was it an ARP request to broadcast MAC Address ?
0
Were there two options which had broadcast ip address? Or was it only one option?
0
two option regarding broadcast ip one its own subnet and other in its gateway
0
ARP request will be broadcasted in the same network using mac address FF:FF:FF:FF which is a broadcast address
0

No. We say Broadcasting is implemented at Network Layer but in actual, it is being implemented at Data Link Layer using MAC address (which is called Broadcast MAC address - FF:FF:FF:FF:FF:FF). 

Answer is C.

2 votes

The correct answer is C.

Refer page 467 of Computer Networking: A top down approach, attaching a screenshot here

 

1
Option D is correct....

Because the source sends ARP request packet with broadcast IP address to local subnet when the ARP packet is received by adapters then MAC Address
1
I think no reference book mentions that arp is sent with broadcast ip address.So answer should be c .
4
Some people do not care about references. They only care for their coaching.
0
Thats the point sir .

Because they didn't read any std Books.

Only instructor is std for them.

However in both books (kuross and ross and forouzan )this conept clearly mentioned .
2 votes

According to RFC 826 machine will create a ARP REQUEST Packet as follows: 

HARDWARE TYPE PROTOCOL TYPE
HLEN  PLEN OPCODE
SOURCE MAC ADDRESS (X's MAC):(known)
SOURCE IP(X's IP):(known)
TARGET MAC(Y's MAC) : 00:00:00:00:00
TARGET IP(Y's IP):(known)

       

This ARP requests must be sent as broadcasts. There is no way that an ARP request can be sent to the right system. After all, the whole reason for sending an ARP request is that X does not  know the Ethernet address Y . So an Ethernet address of all ones is used, i.e. FF:FF:FF:FF:FF:FF

This ARP Packet will be encapsulated inside a Ethernet frame  and broadcasted. 

FF:FF:FF:FF:FF:FF X's MAC TYPE ARP REQUEST PACKET CRC

 

By convention, every machine on the Ethernet is required to pay attention to packets with this as an address. So every machine sees every ARP requests. They all look to see whether the request is for their own address. If so, they respond. If not, they could just ignore it.

2 votes

Ans C) Please refer to the screenshot from Kurose and Ross. 

Answer:

Related questions

6 votes
2 answers
1
954 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$
asked Sep 8, 2016 in Computer Networks makhdoom ghaya 954 views
5 votes
5 answers
2
4k views
Which of the following protocol pairs can be used to send and retrieve e-mails (in that order)? IMAP POP3 SMTP, POP3 SMTP MIME IMAP, SMTP
asked Feb 7, 2019 in Computer Networks Arjun 4k views
6 votes
4 answers
3
3.3k views
Consider three machines M, N, and P with IP addresses $100.10.5.2, \: 100.10.5.5$, and $100.10.5.6$ respectively. The subnet mask is set to $255.255.255.252$ for all the three machines. Which one of the following is true? M, N, and P all belong to the same subnet Only M and N belong to the same subnet Only N and P belong to the same subnet M, N, and P belong to three different subnets
asked Feb 7, 2019 in Computer Networks Arjun 3.3k views
16 votes
6 answers
4
6k 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 number of switches needed is ______
asked Feb 7, 2019 in Computer Networks Arjun 6k views
...