A computer connected to an IP/Ethernet LAN has two addresses. One is the address of the network card,
called the MAC address. The MAC, in theory, is a globally unique and unchangeable address which is stored on the
network card itself. MAC addresses are necessary so that the Ethernet protocol can send data back and forth,
independent of whatever application protocols are used on top of it. Ethernet builds "frames" of data, consisting
of 1500 byte blocks. Each frame has an Ethernet header, containing the MAC address of the source and the
destination computer.
The second address is the IP address. IP is a protocol used by applications, independent of whatever
network technology operates underneath it. Each computer on a network must have a unique IP address to
communicate. IP addresses are virtual and are assigned via software.
IP and Ethernet must work together. IP communicates by constructing "packets" which are similar to
frames, but have a different structure. These packets cannot be delivered without the data link layer. In our case
they are delivered by Ethernet, which splits the packets into frames, adds an Ethernet header for delivery, and
sends them down the cable to the switch. The switch then decides which port to send the frame to, by comparing
the destination address of the frame to an internal table which maps port numbers to MAC addresses.
When an Ethernet frame is constructed, it must be built from an IP packet. However, at the time of
construction, Ethernet has no idea what the MAC address of the destination machine is, which it needs to create
an Ethernet header. The only information it has available is the destination IP from the packet's header. There
must be a way for the Ethernet protocol to find the MAC address of the destination machine, given a destination
IP.
This is where ARP, the Address Resolution Protocol, comes in.