The Open Standards Interconnection model (OSI) is a network architecture reference model developed by the International Organization for Standardization in the 1980s. It is a conceptual model rather than a real-life implementation designed as a reference for developing network architectures and protocols.
Having a standardised, multi-layer model has a number of benefits:
Modularisation and abstraction – different components can handle different layers of the stack. If you’re a web developer, you just need to worry about the application layer, not the full stack.
Standard interfaces – interaction between layers is well defined so that you can design your product to run on top of a lower layer protocol regardless of who developed that.
Interoperability – protocols at each layer are specified such that different vendor equipment should be able to talk to each other at the same layer.
The application layer provides a communication interface to an application on a device.
The presentation layer negotiates to ensure that data is presented to the application layer in the correct format.
The session layer starts, stops and maintains connections, dialogs or sessions between devices.
The transport layer handles the transfer of data between a source and a destination. This could include flow control, segmentation/desegmentation and error control.
The network layer defines logical addresses and the routing between them.
The data link layer prepares data for transmission across a physical media, including hardware addressing.
The physical layer determines the physical properties of the media used for data transmission.
We can loosely equate the two models as follows:
Includes the OSI Application, Presentation and Session layers
Roughly equates to the OSI Transport Layer
Roughly Equates to the OSI Network Layer
Includes the OSI Data Link and Physical layers.
Although TCP/IP is the model most people use, engineers will still refer to layers by their OSI layer number. For example IP and routers as layer 3, a network switch as a layer 2 device or TCP as a layer 4 protocol.