Subtopic Notes

14.1 Protocols

14. Communication and internet technologies

  • Set of rules or standards that define how data is transmitted and received between computers in a network.
  • Ensures consistent communication, error handling, flow control, security, and structured data exchange between devices.
  • Viewed as a stack, with each layer handling a specific function like transmission, routing, or formatting, ensuring organized and efficient communication.

TCP/IP Protocol

  • Layered model with four layers (like a stack): Application, Transport, Internet, and Data Link
  • Each layer uses specific protocols to handle data transmission, such as TCP and IP
  • Each layer of the stack is implemented as software, module, program, or code.
  • TCP (Transmission Control Protocol)
    • Manages the connection between two devices and ensures reliable data delivery
    • Used in the transport layer
    • Responsibilities: Host to host communication, Retransmitting missing packets, Reassembling packets in correct order
  • IP (Internet Protocol)
    • Sets the rules for packet exchange and determines the routing path for those packets
    • Used in Internet Layer
    • Responsibilities: Correct routing, communication between networks, handles addressing, adds IP header
  • Application Layer
    • Provides services for user applications like web browsing, email, or file transfer.
    • Provides the user interface
    • Prepares data for transmission by formatting it and applying application-specific protocols (e.g., HTTP, FTP, SMTP).
    • Sending a message: The user’s message is created here and passed to the Transport Layer
    • Receiving a message: Performs the action requested by the user
  • Transport Layer
    • Ensures reliable or efficient delivery of data between two devices
    • Sending a message: Splits data from the application layer into individual packets, adds headers, and sends them to the internet layer. It manages packet flow, detects loss or corruption, and ensures reliable delivery
    • Receiving a message: It reads packet headers to identify the correct application layer, removes the headers, and forwards the data
  • Internet Layer
    • The internet layer manages data transmission using IP addresses
    • It identifies the target network and host, then sends packets via the data link layer, routing each packet along the best available path
    • Defines the addressing method e.g. subnetting
    • Sending a message: Adds sender and receiver IP addresses and an error checking method.
    • Receiving a message: Reassembles packet fragments, removes the IP header, and passes the data to the transport layer.
  • Data Link Layer/Network Interface Layer
    • Converts electrical data into signals for transmission, giving upper layers access to the physical network
    • Formats data into frames, links IP addresses to MAC addresses, and ensures proper network protocols are used.
    • Sending a message: Sends data over the physical medium (e.g., Ethernet cable or Wi-Fi) to the next device.
    • Receiving a message: Checks the checksum for errors, then forwards the data to the internet layer.

Protocols Examples

  • HTTP/S (HyperText Transfer Protocol/Secured)
    • Used for accessing and transferring web pages and other content from a web server to a web browser (client).
  • FTP (File Transfer Protocol)
    • Used for transferring files between computers on a network. Supports uploading and downloading files to and from servers.
  • POP3 (Post Office Protocol version 3)
    • Retrieves emails from a server, downloading them to the user’s device and usually deleting them from the server afterward.
  • IMAP (Internet Message Access Protocol)
    • Allows users to view and manage emails directly on the mail server without downloading them, supporting access from multiple devices.
  • SMTP (Simple Mail Transfer Protocol)
    • Used for sending and forwarding emails from a client to a server or between email servers.
  • BitTorrent Protocol
    • Provides peer-to-peer (P2P) file sharing network model
    • Allows users to download and upload pieces of a file from multiple users at once instead of relying on a single server
    • Better speed and efficiency
    • Swarms: All peer computers connected, each holding all or part of the file being shared.
    • Tracker: Central server that keeps track of which peers have which file parts and shares their IP addresses so they can connect with one another.
    • Seed: Peer that has the complete file and uploads it to others.
    • Process:
      • A client software is available to download by the user
      • The user opens a torrent descriptor file using a BitTorrent client
      • The file is divided into many small pieces.
      • The client downloads pieces from multiple peers and uploads pieces to others at the same time.
      • As soon as the user has at least one piece, they start sharing it with the swarm.
      • For downloading to work, at least one peer in the swarm must have the complete file.