The following sections describes the parts of the TCP/IP protocol stack.
The device driver layer (also called the Network Interface) is the lowest TCP/IP layer and is responsible for accepting packets and transmitting them over a specific network. A network interface might consist of a device driver or a complex subsystem that uses its own data link protocol.
The Internet Protocol layer handles communication from one machine to another. It accepts requests to send data from the transport layer along with an identification of the machine to which the data is to be sent. It encapsulates the data into an IP datagram, fills in the datagram header, uses the routing algorithm to determine how to deliver the datagram, and passes the datagram to the appropriate device driver for transmission.
The IP layer corresponds to the network layer in the OSI reference model. IP provides a connectionless, "unreliable" packet-forwarding service that routes packets from one system to another.
The primary purpose of the transport layer is to provide communication from one application program to another. The transport software divides the stream of data being transmitted into smaller pieces called packets in the ISO terminology and passes each packet along with the destination information to the next layer for transmission.
This layer consists of Transport Control Protocol (TCP), a connection-oriented transport service (COTS), and the user datagram protocol (UDP), a connectionless transport service (CLTS).
The application layer consists of user-invoked application programs that access services available across a TCP/IP Internet. The application program passes data in the required form to the transport layer for delivery.