Open Systems Interconnection (OSI) was developed in 1977 by ISO.
TCP/IP was developed in 1969.
OSI Layers
OSI model layers:
- Application
- Presentation
- Session
- Transport
- Network
- Data Link
- Physical
A mnemonic way to remember these layers is to memorize the sentence All People Seem To Need Data Processing. The initial of each word corresponds to a layer, in reverse order.
Examples of protocols for each layer:
- Cable
- ARP
- IP
- TCP, UDP, ICMP
- NFS, SQL, RPC
- JPEG, ASCII, MIDI
- HTTP, FTP and SMTP
Encryption is in the OSI presentation layer.
In TCP/IP model, encryption is done accross different layers.
- Application: SHTTP
- Transport: TLS
- Network: IPSec
- Data link: 802.11
OSI wanted to avoid this redundancy and chose presentation layer for this function.
Compression is done in the OSI presentation layer.
OSI Concepts
There are different concepts:
- Entitity
- SAP
- PDU
- PCI
- SDU
- IDU
- ICI
An entity is an agent and that manages a system or node within a specific layer. The entity should inform both the sublayer and the peer within the same layer the way to connect to process the information.
A protocol is the rules defined for communication between entities within the same layer. We can say that the protocol is horizontal.
A Service Access Point (SAP) is the access point between adjacent layers, and perform data operations. We can say that the SAP us vertical.
Entities in level N offer services to entities on level N+1.
A protocol data unit (PDU) is the unit of information that is handled between entities of a given level.
PDU(n) is the PDU value in layer n.
PDUs linked to each layer depending on each level, are:
- Physical: bit
- Datalink: frame
- Network: packet
- Different name depending on protocol:
- TCP: segment
- UDP: datagram
- Level 5: data stream
- Level 6: data stream
- Level 7: data stream
The Interface Data Unit (IDU) is the unit of information that is shared between entities of different layers. I suspect that IDU and PDU are the same thing.
A service data unit (SDU) at a given layer is the PDU provided from the layer above.
PDU(n) = SDU(n-1)
The protocol control information (PCI) is the control information that must be added to the SDU in order to be able to transfer it as a PDU within that layer. The PCI goes usually at the header, but it could also be a tail (for example in data link and network layers).
PDU(n) = PCI(n) + SDU(n)
The Interface Control Information (ICI) is the PCI between layers. I suspect that ICI and PCI are the same thing.
OSI Data Operations
There are different data operations:
- Segmentation
- Block
- Concatenation
Segmentation means splitting the PCI and SDU into different PDUs. This is sometimes done because of architecture limits. The opposite is assembling.
Block means grouping multiple PCIs and SDUs in the same PDU within the same level. Unblock is the oppsite.
Concatenation means grouping different PDUs within the same SDU in the layer below. The opposite is called split.
Communication types:
- Connected
- Not connected
Communication can use connection in one layer and be connectionless in a different layer.
Entities communicate within the same layer using a protocol. The communication between layers is done using service primitives.
OSI Service Primitives
A service primitive is used to communicate different layers.
Data transfer service primitive:
- Request
- Indication
- Response
- Confirm
We consider two systems A and B, where A transfers to B from N+1 and N.
Request means that layer N+1 requests a service to layer N within system A.
Indication means that layer N informs N+1 that it has activated the service within system B.
Response is a response from layer N+1 in system B.
Confirm is a response from layer N to layer N+1 in system A to confirm the reception.
You have either the 2 first (non-confirmed services) service primitives, or all the 4 (confirmed services).
OSI Protocols
You can read this post about computer network protocols.
You can read this post about transport OSI layer protocols.