OSI model

Mnemonics to remember layer names from top to bottom:

All people seem to need data processing

7 Application

network related APIs which can be used e.g. by email apps. These are not applications themselves, this is only OS API to work with network.

6 Presentation

Data convertion: encryption, decryption, compression.

5 Session

Initiate sessions, accept incoming sessions, opens and closes existing sessions.

This is the layer responsible for opening and closing communication between the two devices. The time between when the communication is opened and closed is known as the session. The session layer ensures that the session stays open long enough to transfer all the data being exchanged, and then promptly closes the session in order to avoid wasting resources. The session layer also synchronizes data transfer with checkpoints.

netstat -a shows all sessions

4 Transport

Segmentation: transport protocol breaks up the data into chunks: datagrams/segments with sequence number ( wrapped in IP packets, later wrapped in frames) send to receiver, and it will reassemble the data back from packets (plus check correctness, FCS)

3 Network

IP (Internet Protocol) (logical address)

decimal notation: 192.168.4.132

8 bit each octet [0..255], 2^8 - 1 = 255

When the frame is passed from one router to another, particular router strips off the frame to understand where to send the data based on IP address, then it wraps the packet to new frame and send further. The new frame type will be the appropriate for whatever technology is used for further router connection (cable, DSL).

Any device which deals with MAC (physical address) address is part of this Layer 2 (NIC, switch).

  • NIC (Network Interface card, сетевая карта):

    • creates and sends frames

      • frame (PDU) - encapsulated data for transmission

        • FCS - Frame check sequence (4 bytes). It uses CRC - cyclic redundancy check.

  • NIC has two aspects:

    • LLC (Logical link control) - talks to OS using drivers

    • MAC (Media access control) - creates and addresses frames

1 Physical

  • cables, hubs

Unit of data specified by protocol at each level - protocol data unit (PDU). E.g. frame is a PDU for layer 2.

Last updated