Model and protocol
- Networking model: protocols + standards, explain how networks work (which protocols handle logic and which standards define the physical part)
- Networking protocol: a set of rules (logic) that define how devices and applications exchange data in a network
OSI model
Open Systems Interconnection model (open standard), created by ISO, consists of 7 layers
Adjacent and Same Layer Interaction
- Adjacent-layer interaction: interaction between different layers of the OSI model on the same PC (encapsulation and de-encapsulation, moving ↑↓ up and down at the OSI stack)
- Same-layer interaction: communication between the same layer on two different PCs. Each OSI layer on PC1 communicates with its peer layer on PC2, allowing it to “ignore” the other layers (it doesn’t matter which protocols are used on the other layers)
L7 (Application Layer)
- Provides process-to-process communication | Protocols: HTTP, HTTPS
- Closest to the end user; interacts with software (like a browser) but does not include the applications themselves
- Functions: find who to talk to + Agree how to talk (identifying communication partners and synchronizing communications)
- Identifying communication partners: I type google.com → DNS finds Google’s server → my PC talks to it
- Synchronizing communications: Browser + server agreed to use HTTP/1.1
L6 (Presentation Layer)
- Prepares L7 data for transmission to L4
- Data at the Application layer is in “application format,” but the client may expect another format. L6 translates between application and network formats so it can be sent over the network
- Functions:
- Changing formats (e.g., PNG → JPEG)
- Coding/Decoding (e.g., UTF-8 → ASCII)
- Encryption/Decryption (e.g., SSL in HTTPS)
- Data compression
- Memorize: Presentation = Preparation (Translation / Compatibility)
L5 (Session Layer)
- Controls dialogues (sessions) between communication hosts
- A session = a period of time during which two programs communicate
- Functions: establishes, manages, and terminates connections between local applications (e.g., web browser) and remote applications (e.g., YouTube server)
- Memorize: Session = Dialogue (Start, Manage, End) = Time of interaction
Data flow in OSI model
- Data is prepared in the top 3 layers: L7, L6, L5, and then sent through the bottom 4 layers: L4, L3, L2, L1
- L6 and L5 are more like functional layers (they don’t have dedicated protocols strictly belonging to them)
- Memorize: L7, L6, L5 → create/process data | L4, L3, L2, L1 → send data
- Application developers work with L7 Application, L6 Presentation, L5 Session layers; network engineers work with L4 Transport, L3 Network, L2 Data Link, L1 Physical layers
- Memorize: Encapsulation is when Application + Presentation + Session = make Data; then Transport, Network, and Data Link add headers. Reverse process = De-encapsulation
L4 (Transport Layer)
- Provides host-to-host (end-to-end) communication | Protocols: TCP and UDP
- L4 PDU = Segment = [Data + L4 header]
- Splits large data into smaller segments (easier to send, fewer transmission issues)
- Functions: segments/reassembles data for communication between end hosts
- Memorize: Transport Layer just segments data and ensures complete and correct delivery, but does NOT change the content of the data
L3 (Network Layer)
- Provides connectivity between end hosts on different networks (outside the LAN)
- Protocols: IP, ICMP (ping) | Devices: Routers, L3 Switches
- L3 PDU = Packet = [Data + L4 header + L3 header]
- Functions:
- Logical addressing: assigns source and destination IP addresses
- Path selection: chooses the best route using the routing table
- Fragmentation: breaks packets into smaller pieces if size > MTU (usually 1500 bytes in Ethernet)
- Memorize: Network = Like GPS: use IP address + routing tables to find the best path, with fragmentation if the “road” is too narrow
L2 (Data Link Layer)
- Provides node-to-node communication and data transfer (PC-Switch; Switch-Router; Router-Router)
- Protocols: Ethernet | Devices: NICs, Switches
- L2 PDU = Frame = [L2 trailer + Data + L4,L3,L2 headers]
- Functions:
- MAC addressing: identifies devices on the same network
- Framing: defines how data is formatted and prepared for transmission over the physical medium
- Error detection: detects (and sometimes corrects) errors that occur at the Physical Layer
- Memorize: Data Link = Creates frames ready for sending over cables or wireless (no more encapsulation here — just ready-to-send frames)
L1 (Physical Layer)
- Provides actual transmission of raw bits over the physical medium
- L1 PDU = Bit | Devices: Hubs, repeaters, cables, connectors
- Defines:
- Voltage levels
- Transmission distance
- Cable/wireless specifications
- How 0s and 1s are represented as electrical, optical, or radio signals
Acronyms for memorizing OSI
Please Do Not Throw Sausages Pizza Away
PDU (Protocol Data Units)
- L4 PDU = Segment
- L3 PDU = Packet
- L2 PDU = Frame
- L1 PDU = Bit
TCP/IP Suite
- Conceptual model and set of communication protocols (actually used in internet)
- In practice, the Internet works on TCP/IP model, but when explaining concepts, engineers often use the OSI model (because it’s more detailed and structured)
- Developed by DAPRA
- TCP/IP Layer mapping:
- L4 Application = L5 Session, L6 Presentation, L7 Application OSI
- L3 Transport = L4 Transport OSI
- L2 Internet = L3 Network OSI
- L1 Link = L1 Physical, L2 Data Link OSI
- Note: TCP/IP layer names may differ
📌 These are personal study notes. Please read the full disclaimer for more information.
Category: CCNA