Three models exist for communication between hosts on a network whether or not the network is an intranet or the Internet. The first model is the unicast model, which is one-to-one communication. In Figures 1-4a through 1-4c, one host desires to send traffic to another specific host on the same IP subnet (IP addressing and subnets are covered in detail in Chapter 2, “Internet Protocol (IP), Unicast, Broadcast and Multicast Addresses”). For the ethernet Local Area Network (LAN), the hosts must contend with two different address schemes. The first scheme is the ethernet address that is burned into the Network Interface Card (NIC). The ethernet address is a six-byte (48-bit) link layer address that is globally unique and cannot be changed. Because the ethernet address is burned into the NIC, the ethernet address of the host changes if the NIC is changed. We have seen that on an ethernet LAN all data traffic is encapsulated in frames. Even though the host is sending to an IP address, the IP packet must be encapsulated in an ethernet frame. To accomplish the encapsulation, the sending host must resolve the receiving host’s IP to ethernet address mapping. The mapping is accomplished using the Address Resolution Protocol (ARP).
In Figures 1-4a-c, host A wishes to send a packet to host B. Host A knows the IP address of host B but not the ethernet address of host B. The ARP process, illustrated in the figures, proceeds as follows:
1. Host A sends an ARP broadcast (see Figure 1-4a) that all hosts on the network receive, including the router.
2. Host B receives the ARP and recognizes that the IP address contained in the ARP request belongs to host B. Host B sends an ARP reply that contains the ethernet address for host B (see Figure 1-4b).
3. Host A can now encapsulate the IP packet in an ethernet frame and transmit the frame to host B (see Figure 1-4c).
a. Host A sends an ARP request for IP address 172.16.1.2.
b. Host B responds with its ethernet address.
c. Host A can now send to host B.
If host A wants to send a packet to a host on another IP subnet, then the packet must be sent to the router. Host A will have a default gateway configured that points to the router interface attached to the LAN containing host A. Because the destination IP address is on a different subnet, host A knows to send the frame to the router and will send an ARP for the router’s ethernet address. When the router receives the frame, the IP packet is extracted and the router determines from the destination IP address whether or not the destination is on a directly connected network. If it is on a directly connected network, the router sends an ARP onto that network to resolve the ethernet address of the destination. When the ARP reply is received from the destination, the router can build an ethernet frame containing the IP packet and then send the frame to the destination. If the destination is not on a directly connected network, the router consults the routing table and determines the next router where the frame should be sent. IP unicast routing protocols are not covered in this book, but references are listed at the end of the chapter for further study.