PDA

View Full Version : ARP and IP


tsunamoro
12-25-2007, 07:27 AM
When the Internet Layer Protocols are introduced (page 83), it is asserted that "All paths through the DoD model go through IP".
This concept is well explained in the ICMP echo request (page 88) where we can see an IP header; that means ICMP data are incapsulated inside IP datagram.
When ARP is explained (pages 90-91), in the trace from an ARP request I can't see an IP header.
Does it mean that ARP doesn't use IP datagrams as ICMP does?

Another question related to the first above: Does ARP only use hardware broadcast (i.e. layer 2 broadcast)?

Thank you.

saviola-1983
11-04-2008, 07:26 AM
To Ethetnet_II, IP and ARP is distinguished by the 16bits TYPE field.

0x0800 for IP
0x0806 for ARP


So, the relationship between ARP and IP is just as the relationship between ICMP and TCP or UDP, which are distinguished by the 8bits PROTOCOL field in IP header.


Never think ARP includes IP , or IP includes ARP.
They are at the same layer while with different function.




Here's an example packet for ARP Request:

Raw Data:
0x0000 FF FF FF FF FF FF 00 1E 2A 41 3C 29 08 06 00 01
0x0010 08 00 06 04 00 01 00 1E 2A 41 3C 29 C0 A8 01 67
0x0020 00 00 00 00 00 00 C0 A8 01 01


Decoded:

Ethernet II
Destination MAC: FF:FF:FF:FF:FF:FF
Source MAC: 00:1E:2A:41:3C:29
Ethertype: 0x0806 (2054) - ARP
ARP
Hardware: 0x0001 (1) - Ethernet
Protocol: 0x0800 (204 - IP
Hardware address length: 0x06 (6)
Protocol address length: 0x04 (4)
Operation: 0x0001 (1) - ARP Request
Sender MAC address: 00:1E:2A:41:3C:29
Sender IP address: 192.168.1.103
Target MAC address: 00:00:00:00:00:00
Target IP address: 192.168.1.1