Internet Layer
After the transport information is added, the data packet is passed
to the Internet layer of the TCP/IP protocol stack. In this layer,
IP adds the following header information:
-
The source IP address
-
The destination IP address
-
The transport protocol
-
The checksum value
-
Time to Live (TTL) information
In
addition to adding this information, the Internet layer is also
responsible for resolving the destination IP addresses to a MAC
address. The ARP performs this resolution. The MAC address is added
to the packet header and the packet is handed down to the network
interface layer.
Network
Interface Layer
The
network interface layer adds two types of information—a preamble and
a cyclical redundancy check (CRC)—to the packet that it receives
from IP. The preamble is a sequence of bytes that identifies the
beginning of a frame. The CRC is a mathematical computation that is
added to the end of the frame to
verify that the frame has not been corrupted. After the information
is added to the frames at the network interface layer, they are
merged onto the network. The frames are sent to all computers on the
network.
Destination Computer
When
the frames reach the destination computer, the network interface
layer on this computer discards the preamble and recalculates the
CRC. If this value matches the value calculated before
transmission, then the destination MAC address on the frame is
examined. If the MAC address is a broadcast address or if the MAC
address matches that of the destination computer, the frame is
passed to the IP in the Internet layer above, otherwise the frame is
discarded. At the IP layer, IP recalculates the checksum and
compares it with the value calculated before transmission to
determine if the packet arrived intact. Then IP passes the packet to
the transport protocol identified in the IP header.
At
the transport layer, if the packet is received by TCP, it checks the
sequence number on the packet and sends an acknowledgement back to
the TCP at the source computer. Then, it uses the TCP port
information on the packet to send it onwards to the appropriate
application in the application layer above. If UDP receives the
packet from the Internet layer, it uses the UDP port information on
the packet to send it to the appropriate application in the
application layer without sending an acknowledgement to the source
computer. After the application receives the data, it processes it
as required.