OSI protocols are used to implement various networks. The OSI protocols are split into layers for easier organization and understanding. The layers form a hierarchy starting with the application level, then the presentation level, session level, transport level, network level, and the lowest level is the physical level. Each layer receives information from the layer above, processes it and passes it down to the next layer. Each layer adds its own header to the incoming information before it is passed to the level below. Headers generally include address of destination and source, check sums (for error control), type of protocol used in the current layer, and other options such as flow control options and sequence numbers (used to ensure data is sent in order).
Not all layers are mandatory, it depends on which protocols are implemented. The Internet protocol suite is not intended to be compliant with OSI, and efforts to use it as a model for OSI protocols or the OSI model will eventually fail. They have a better chance of working when additional and lesser-known ISO documents are considered, such as the Internal Organization of the Network Layer.
Nevertheless, there have been real-world examples of pure OSI protocol stacks that do not implement all the layers. The Manufacturing Automation Protocol (MAP) user group, focused on real-time control of manufacturing robots of various types, implements layer 1 (physical), a two-sublayer layer 2 (data link) with LLC Type 3 on top of the medium access layer, and then the Layer 7 Manufacturing Message System on top. Layers 3 through 6 are not present. This high-performance stack is intended just for the robots themselves; the robot controller would load files with a full 7-layer stack with FTAM file transfer on top. TCP/IP is not derived from OSI. Parts of the Signaling System 7 stack are OSI derivatives.
This level is in charge of transferring data between systems in a network, using network-layer addresses of machines to keep track of destinations and sources. This layer uses routers and switches to manage its traffic (control flow control, error check, routing etc).
The transport layer transfers data between source and destination processes. Generally, two connection modes are recognized, connection-oriented or connectionless. Connection-oriented service establishes a dedicated virtual circuit and offers various grades of guaranteed delivery, ensuring that data received is identical to data transmitted. Connectionless mode provides only best-effort service without the built-in ability to correct errors, which includes complete loss of data without notifying the data source of the failure. No logical connection, and no persistent state of the transaction exists between the endpoints, lending the connectionless mode low overhead and potentially better real-time performance for timing-critical applications such as voice and video transmissions.
This layer defines and encrypts/decrypts data types from the application layer. Protocols such as MIDI, MPEG, and GIF are presentation layer formats shared by different applications.
This keeps track of how each application talks to another application. Destination and source addresses are linked to specific applications.