2079 1

CSC263 ยท 2079 ยท 10 marks

What is protocol? Explain each layer of OSI model in detail.

What is protocol? Explain each layer of OSI model in detail.[10]

Computer NetworksChapter 1: Introduction to Computer NetworkOSI Reference Model

Quick answer

A network protocol is an established set of rules that determine how data is transmitted between different devices in the same network. It allows connected devices to communicate with each other, regardless of any differences in their internal processes, structure, or design. Network protocols play a critical role in modern digital communications.

Protocol and OSI Model


Part 1: What is a Protocol?

In short, a protocol is a set of rules that governs communication.

Key Elements of a Protocol

ElementDescription
SyntaxRefers to the structure and format of the information/data. It defines how data is arranged.
SemanticsRefers to the meaning of each section of bits. It identifies the route to be taken or the final destination of the message.
TimingRefers to two characteristics: when data should be sent and how fast it should be sent.

Part 2: The OSI Model

The OSI (Open Systems Interconnection) model is a conceptual framework developed by ISO that standardizes the functions of a communication system into 7 distinct layers. Each layer has specific responsibilities and communicates with the layers directly above and below it.

+---------------------------+
|  7. Application Layer     |
+---------------------------+
|  6. Presentation Layer    |
+---------------------------+
|  5. Session Layer         |
+---------------------------+
|  4. Transport Layer       |
+---------------------------+
|  3. Network Layer         |
+---------------------------+
|  2. Data Link Layer       |
+---------------------------+
|  1. Physical Layer        |
+---------------------------+

Layer 7: Application Layer

  • This is the topmost layer and is closest to the end user.
  • It is responsible for node-to-node communication and controls user-interface specifications.
  • It provides network services directly to end-user applications.
  • It handles protocols such as:
    • HTTP/HTTPS: HTTP (Hypertext Transfer Protocol) is used by the World Wide Web (WWW) to manage communication between web browsers and servers. HTTPS is a combination of HTTP with SSL (Secure Socket Layer) for secure communication.
    • SSH (Secure Shell): A terminal emulation software preferred for its ability to maintain an encrypted connection. It is efficient for filling out forms, signing in, authentication, and carrying out bank transactions.
    • Other protocols: FTP, SMTP, DNS, etc.

Layer 6: Presentation Layer

  • This layer is responsible for translation, encryption, and compression of data.
  • It acts as a translator between the application layer and the network.
  • It converts data from the application layer into a format that can be transmitted over the network, and vice versa.
  • Key functions:
    • Data Translation: Converts data formats (e.g., ASCII to EBCDIC).
    • Encryption/Decryption: Ensures data security during transmission.
    • Compression: Reduces the number of bits to be transmitted.
  • Example formats: JPEG, MPEG, GIF, SSL.

Layer 5: Session Layer

  • This layer is responsible for establishing, managing, and terminating sessions (connections) between two communicating devices.
  • It controls the dialog between computers, deciding which side transmits, when, and for how long.
  • Key functions:
    • Session establishment, maintenance, and termination.
    • Synchronization: Adds checkpoints (sync points) in data streams so that in case of failure, transmission can resume from the last checkpoint.
    • Dialog control (half-duplex or full-duplex).
  • Example protocols: NetBIOS, PPTP.

Layer 4: Transport Layer

  • This layer is responsible for end-to-end communication and error-free delivery of data.
  • It corresponds to the Host-to-Host layer in the TCP/IP model.
  • Key functions:
    • Segmentation and Reassembly: Breaks data into smaller segments for transmission and reassembles them at the destination.
    • Flow Control: Manages the rate of data transmission.
    • Error Control: Detects and retransmits lost or corrupted data.
  • The two main protocols at this layer are:
    • TCP (Transmission Control Protocol): Provides reliable and error-free communication between end systems. It performs sequencing and segmentation of data. It is connection-oriented but has more overhead, increasing cost.
    • UDP (User Datagram Protocol): A cost-effective protocol used when reliable transport is not required. It is connectionless and faster than TCP.

Layer 3: Network Layer

  • This layer selects and manages the best logical path for data transfer between nodes.
  • It manages device addressing, tracks the location of devices on the network, and determines the best way to move data.
  • Key functions:
    • Translates logical network addresses into physical addresses.
    • Concerned with circuit, message, or packet switching.
    • Breaks larger packets into smaller packets (fragmentation).
    • Provides connection services including network layer flow control, error control, and packet sequence control.
    • Routers and gateways operate at this layer.
  • Common protocols:
    • IP (Internet Protocol): IPv4 uses 32-bit addresses displayed in dotted decimal notation. IPv6 uses 128-bit alphanumeric addresses arranged in eight groups of 16 bits each, separated by colons.
    • IPX/SPX: Also associated with this layer.

  • This layer is responsible for node-to-node delivery of data (between two directly connected nodes).
  • It ensures that data transferred across the physical layer is error-free.
  • Key functions:
    • Framing: Divides the stream of bits received from the network layer into manageable data units called frames.
    • Physical Addressing: Adds MAC (Media Access Control) addresses of sender and receiver in the frame header.
    • Error Detection and Correction: Detects and possibly corrects errors that may occur in the physical layer.
    • Flow Control: Coordinates the amount of data that can be sent before receiving an acknowledgment.
    • Access Control: Determines which device has control over the communication channel at a given time.
  • Hardware: Switches and bridges operate at this layer.

Layer 1: Physical Layer

  • This is the lowest layer of the OSI model and it carries the raw bit stream over the transmission medium.
  • It is concerned with the physical, electrical, and mechanical characteristics of the connection rather than with the meaning of the bits.
  • Key functions:
    • Bit transmission: Converts the frames handed down by the data link layer into electrical, optical, or radio signals and puts them on the medium.
    • Physical topology: Defines how the devices are arranged in the network (bus, star, ring, or mesh).
    • Transmission mode: Decides whether the transmission is simplex, half duplex, or full duplex.
    • Data rate and synchronization: Fixes the number of bits sent per second and keeps the sender and receiver bit-synchronized.
  • Hardware: Cables, connectors, hubs, repeaters, and network interface cards operate at this layer.

Conclusion

A protocol supplies the syntax, semantics, and timing rules that make communication possible, and the OSI model organizes those rules into seven cooperating layers. At the sender the data travels down all seven layers, each layer adding its own header, crosses the medium as a bit stream, and then travels up the same seven layers at the receiver, where every layer strips the header its peer added. Because each layer only has to honour the interface of the layers directly above and below it, any one layer can be designed, understood, or replaced without disturbing the rest of the stack.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.