user5078020
user5078020

Reputation:

What is target protocol address in ARP request message

I am trying to understand about ARP and its application. So far i have read about the structure of an ARP request message header. It consists of following fields with relevant info to be filled

Hardware Type(2 Bytes):  1 (for Ethernet is 1)
Protocol Type(2 Bytes): IPv4 2048
Hardware Address Length (1 Bytes): Ethernet MAC address is 6 bytes
Protocol Address Length(1 Byte): IPv4 is 4
OP Code(2 bytes) : 1 for ARP request and 2 arp reply
Sender Hardware Address(6 Bytes): MAC address of device sending message (my         MAC)
Sender Protocol Address( bytes 1 and 2):protocol address of device sending(my IP)
target hardware address (6 bytes):should all be set to 0
Target Protocol Address (4 bytes):What should be in this field?

Well my simple question is:

If ARP is a broadcast message (which means, it is a message sent to many from a single node), how would I know what target protocol address to fill? Which raises another question, can ARP not be used to ping all the devices connected (known and unknown) in the network and get their MAC and IP.

Upvotes: 0

Views: 669

Answers (1)

Ron Maupin
Ron Maupin

Reputation: 6452

ARP (Address Resolution Protocol) resolves a layer-2 address from a layer-3 address. An ARP request is broadcast at layer-2 with a specific layer-3 address for which you want to resolve the layer-2 address.

Basically, you are asking every host on the layer-2 domain, "Who has this specific layer-3 address?" Every host on the layer-2 domain will receive the request, but only the host with that layer-3 address will respond to the request, supplying its layer-2 address to the requesting host.

Upvotes: 0

Related Questions