data for going on to the physical connection Layer 1 Physical Electrical and Optical Connection Sends packet as a bitstream Figure 5.8 The OSI reference model application interface and common communication services. It offers services such as encryption, compression, and reformatting. The presentation layer adds a field in each packet that tells how the information within the packet is encoded. It indicates whether any compression has been performed and, if so, indicates what type of com- pression so that the receiver can decompress it properly. It also indicates whether there has been any encryption, and if there has, it indicates what type so that the receiver can properly decrypt it. The presentation layer ensures that the transmitter and receiver see the information in the same format. Typically, Layer 6 processing is handled by an application rather than by a separate process running on a computer. In some cases, Layer 6 processing is handled by a process running at Layer 5. Layer 5, the session layer, supports connections between sessions and handles administrative tasks and security. It establishes and monitors connections between computers, and it provides the control structure for communication between appli- cations. Examples of session layer protocols include Network Basic Input/Output System (NetBIOS) and Lightweight Directory Access Protocol (LDAP). Layer 4, the transport layer, corrects transmission errors and ensures that the information is delivered reliably. It provides an end-to-end error recovery and flow control capability. It deals with packet handling, repackaging of messages, division of messages into smaller packets, and error handling. Examples of transport layer Chapter 5 Data Communications Basics protocols include Transmission Control Protocol (TCP), User Datagram Protocol (UDP), and Sequenced Packet Exchange (SPX). Layer 3, the network layer, identifies computers on a network and determines how to direct information transfer over that network. In other words, it is a routing and relay