Quote:
* Network layer Layer 3. : The Network layer provides the functional and procedural means of transferring variable length data sequences from a source to a destination via one or more networks while maintaining the quality of service requested by the Transport layer. The Network layer performs network routing, flow control, segmentation/desegmentation, and error control functions. The router operates at this layer -- sending data throughout the extended network and making the Internet possible, although there are layer 3 (or IP) switches. This is a logical addressing scheme - values are chosen by the network engineer. The addressing scheme is hierarchical.
* Transport layer Layer 4. : The purpose of the Transport layer is to provide transparent transfer of data between end users, thus relieving the upper layers from any concern with providing reliable and cost-effective data transfer. The transport layer controls the reliability of a given link. Some protocols are stateful and connection oriented. This means that the session layer can keep track of the packets and retransmit those that fail.
* Session layer Layer 5. : The Session layer provides the mechanism for managing the dialogue between end-user application processes. It provides for either duplex or half-duplex operation and establishes checkpointing, adjournment, termination, and restart procedures. This layer is responsible for setting up and tearing down TCP/IP sessions.
Because IP handles both QoS and routing, it fits on Layers 3 and 4. TCP fits here as well because of the fact that it tracks sessions, and handles retransmits. TCP also fits on layer 5 because it is stateful, and thus acts as the session layer. UDP is different, and is considered "connectionless" due to the lack of session capabilities.