Data Communication Components · Computer Networks

SVGVector Architecture Diagram (SVG)
COMPUTER NETWORKS · Module 1★ High PriorityOSI ModelIT Sem 6 · Code 100602 · Seven layers, PDUs, encapsulationMNEMONIC7 to 1: All People Seem To Need Data Processing1 to 7: Please Do Not Throw Sausage Pizza Away. PDUs: bit, frame, packet, segment.Core BreakdownLayeringISO 1984 model: 7 layers give modularity, interoperability, independent change.Sender encapsulates (adds H and T) going down; receiver decapsulates going up.L1 PhysicalRaw bits: signal levels, data rate, bit sync, topology, transmission mode.Hardware: hubs, repeaters, cables, modems.L2 Data LinkFraming, MAC address, flow and error control (CRC), medium access. Hop-to-hop.Sublayers LLC and MAC; hardware: switches, bridges, NICs.L3 NetworkLogical (IP) addressing, routing, fragmentation to fit the MTU. Host-to-host.Hardware: routers and Layer 3 switches; protocols IPv4, IPv6, ICMP.L4 TransportPort addressing, segmentation, TCP or UDP, end-to-end flow and error control.Process-to-process delivery; TCP 3-way handshake, HTTP 80, HTTPS 443.L5-L7 UpperSession: dialog, checkpoints. Presentation: translate, encrypt, compress.Application: HTTP, FTP, SMTP, DNS; TCP/IP merges L5-L7 into one layer.Diagram: Seven Layers and PDUsPDUDevice7 ApplicationData6 PresentationData5 SessionData4 TransportSegment3 NetworkPacketRouter2 Data LinkFrameSwitch1 PhysicalBitsHubFrame = H2 | H3 | H4 | Data | T2Sender adds headers going downReceiver strips them going up⚠️ Exam Traps & Viva Favorites① Hop vs host vs process?Hop-to-hop = L2 frames using MAC. Host-to-host =L3 packets using IP. Process-to-process = L4segments using port numbers.② Why did TCP/IP win?It was built and tested in Berkeley UNIX beforestandardization. OSI was designed by committeefirst, so implementations came late.③ Session checkpoints?Checkpoints let a crashed long transfer resumefrom the last one, e.g. resend bytes 8,001 to10,000, not the whole file.Tip: PDUs bit, frame, packet, segmentMaster Revision Table(learn it row by row!)OSI layerTCP/IP layerPDU / unitAddress usedDelivery scopeApplication (7)ApplicationData / messageURI, nameApplication to applicationPresentation, SessionMerged into ApplicationDataSession IDDialog and formatTransport (4)TransportSegment / datagramPort number (16 bit)Process to processNetwork (3)InternetPacketIP address (32/128 bit)Host to host (source to destination)Data Link (2)Network accessFrameMAC address (48 bit)Hop to hop (node to node)Physical (1)PhysicalBitsVoltage, light, radioPhysical interfaceQUICK FACTSEncapsulation: H7..H3 added going down, L2 adds header H2 and trailer T2 (FCS)TCP/IP model has 4 or 5 layers · PDU names: segment (TCP), datagram (UDP)Ports: HTTP 80, HTTPS 443, DNS 53 · MAC = 48 bit hex, IPv4 = 32 bitVERIFIED★ Golden rule: MAC for hop, IP for host,port for process.

The OSI Reference Model


1. Introduction to Layered Architecture

The Open Systems Interconnection (OSI) model was developed by the International Organization for Standardization (ISO) in 1984 as a conceptual framework for understanding and standardizing network communications between heterogeneous computer systems.

Why Layering?

  • Modularity & Abstraction: Decomposes complex network tasks into 7 discrete, manageable layers.
  • Interoperability: Standardized interfaces allow hardware and software from different vendors to work together seamlessly.
  • Independent Evolution: Modifying or upgrading protocols in one layer does not affect adjacent layers as long as the interfaces remain intact.

2. The 7 Layers and Protocol Data Units (PDUs)

MermaidDiagram
Rendering diagram…

Mnemonic to remember top-to-bottom: All People Seem To Need Data Processing.
Mnemonic to remember bottom-to-top: Please Do Not Throw Sausage Pizza Away.


3. Data Encapsulation and Decapsulation

When an application transmits data, it moves down through the protocol stack. Each layer prepends a Header (and the Data Link layer appends a Trailer) containing control information for its peer layer at the receiving host.

MermaidDiagram
Rendering diagram…
  • Encapsulation: Moving down the stack (Sender adds H7…H2H_7 \dots H_2 and T2T_2).
  • Decapsulation: Moving up the stack (Receiver strips headers after verifying integrity and routing).

4. Detailed Functionality of Each Layer

Layer 1: Physical Layer

  • Responsibility: Transmitting unstructured raw bit streams over a physical communication channel.
  • Key Functions:
    1. Physical Characteristics of Interfaces: Mechanical specifications of plugs/connectors (RJ-45) and transmission medium.
    2. Representation of Bits: Defines voltage levels, optical wavelengths, or RF modulation representing 0s and 1s.
    3. Data Rate (Signaling Rate): Transmission speed in bits per second (bps).
    4. Synchronization of Bits: Clock synchronization between sender and receiver.
    5. Line Configuration: Point-to-point or multipoint.
    6. Physical Topology: Mesh, Star, Bus, or Ring.
    7. Transmission Mode: Simplex, Half-Duplex, or Full-Duplex.
  • Hardware: Hubs, Repeaters, Cables (UTP, Fiber), Modems.

Layer 2: Data Link Layer (DLL)

  • Responsibility: Transforming a raw physical transmission facility into a reliable, error-free link for Hop-to-Hop (Node-to-Node) delivery.
  • Sublayers:
    • LLC (Logical Link Control): Manages frame synchronization, flow control, and multiplexing network layer protocols.
    • MAC (Media Access Control): Controls how devices share access to the physical transmission medium.
  • Key Functions:
    1. Framing: Packages network layer packets into discrete frames with headers and trailers.
    2. Physical Addressing: Adds sender and receiver MAC addresses (48-bit hex, e.g., AA:BB:CC:DD:EE:FF).
    3. Flow Control: Prevents a fast sender from swamping a slow receiver (Stop-and-Wait, Sliding Window).
    4. Error Control: Detects and retransmits damaged/lost frames via CRC (Cyclic Redundancy Check) and ARQ.
    5. Access Control: Resolves channel contention when two or more devices attempt to transmit simultaneously (CSMA/CD, CSMA/CA).
  • Hardware: Switches, Bridges, Network Interface Cards (NICs).

Layer 3: Network Layer

  • Responsibility: Delivering packets from Source-to-Destination (Host-to-Host) across multiple interconnected networks.
  • Key Functions:
    1. Logical Addressing: Assigns global IP addresses (IPv4: 32-bit, IPv6: 128-bit) that transcend local subnet boundaries.
    2. Routing: Determines the optimal path from source to destination using routing algorithms (OSPF, BGP, RIP).
    3. Packetizing & Fragmentation: Encapsulates transport segments; fragments large packets to conform to the Maximum Transmission Unit (MTU) of intermediate links.
  • Hardware: Routers, Layer 3 Switches.

Layer 4: Transport Layer

  • Responsibility: Reliable, End-to-End (Process-to-Process) delivery of complete messages between specific applications.
  • Key Functions:
    1. Service-Point (Port) Addressing: Uses 16-bit Port numbers (e.g., HTTP = 80, HTTPS = 443, DNS = 53) to direct data to the exact executing process.
    2. Segmentation and Reassembly: Divides application messages into segments with sequence numbers, reassembling them in exact order at the receiver.
    3. Connection Control:
      • Connection-oriented (TCP): 3-way handshake, guaranteed in-order delivery.
      • Connectionless (UDP): Fast, best-effort delivery without connection setup.
    4. End-to-End Flow & Error Control: Windowing mechanisms across the entire network path (unlike DLL which operates hop-by-hop).

Layer 5: Session Layer

  • Responsibility: Establishing, managing, synchronizing, and terminating dialogs between communicating systems.
  • Key Functions:
    1. Dialog Control: Decides whether communication is half-duplex or full-duplex.
    2. Synchronization & Checkpointing: Inserts checkpoints into long data streams. If a crash occurs at byte 8,000 in a 10,000-byte file, only bytes 8,001–10,000 need retransmission rather than the whole file.

Layer 6: Presentation Layer

  • Responsibility: Ensuring semantic and syntactic compatibility of exchanged data between different computer architectures.
  • Key Functions:
    1. Translation: Converts between different character encodings (e.g., EBCDIC to ASCII/UTF-8, endianness conversions).
    2. Encryption / Decryption: Secures confidential data before transmission (e.g., TLS/SSL).
    3. Data Compression: Reduces bit volume for efficient transmission (Lossless or Lossy).

Layer 7: Application Layer

  • Responsibility: Providing user interfaces and software applications access to network services.
  • Key Services:
    • Network Virtual Terminal (TELNET, SSH).
    • File Transfer, Access, and Management (FTAM, FTP, SFTP).
    • Mail Services (SMTP, IMAP, POP3).
    • Web Browsing (HTTP, HTTPS).
    • Directory Services (DNS, LDAP).

5. Summary: OSI vs. TCP/IP Model

OSI Layer (7 Layers) TCP/IP Layer (4/5 Layers) Primary Protocols Addressing Type Scope of Delivery
Application (7) Application Layer HTTP, DNS, SMTP, FTP Uniform Resource Identifier (URI) Application-to-Application
Presentation (6) (Merged into Application) SSL/TLS, JPEG, ASCII — —
Session (5) (Merged into Application) Sockets, NetBIOS, RPC Session ID —
Transport (4) Transport Layer TCP, UDP, SCTP Port Number (16-bit) Process-to-Process
Network (3) Internet Layer IPv4, IPv6, ICMP, ARP IP Address (32/128-bit) Host-to-Host (Source-to-Dest)
Data Link (2) Network Access / Link Layer Ethernet, Wi-Fi, PPP MAC Address (48-bit) Hop-to-Hop (Node-to-Node)
Physical (1) Physical Layer Cat6, 802.11 PHY, Optical Bits / Wavelength / Voltage Physical interface

Frequently Asked Questions

QDistinguish between Hop-to-Hop, Host-to-Host, and Process-to-Process Delivery.
  • Hop-to-Hop (Data Link Layer): Moves a frame from one intermediate device (node/router) to the next physical adjacent node using MAC addresses.
  • Host-to-Host (Network Layer): Moves a packet from the original sender host to the final destination host across multiple intermediate networks using IP addresses.
  • Process-to-Process (Transport Layer): Delivers data to the specific application/program running on the host using Port numbers.
QWhat is the function of checkpoints in the Session Layer?

Checkpoints allow long file transmissions to recover from mid-stream failures without re-transmitting the entire file from the start.

QWhy did the TCP/IP model succeed over the OSI model commercially?

TCP/IP was implemented in Berkeley UNIX and widely tested before standardization, whereas the OSI model was designed theoretically by committee before extensive software implementation.

QWhat is the PDU at each of the lower OSI layers?

Physical: bits. Data Link: frame. Network: packet. Transport: segment (TCP) or datagram (UDP).

AI LearningWeb Platform

Coursify — Personal AI Course Generator

Struggling with a difficult subject or concept? Turn any engineering topic into a structured course with interactive lessons, quizzes, and research-backed explanations.

← All Computer Networks modules