---
title: "Communication protocol and OSI architecture"
subject: "Telecommunications"
chapter: 8
key: "semester_8/telecommunications:protocol-osi-architecture"
source: https://www.bctengineer.com/q/semester_8/telecommunications/protocol-osi-architecture
site: BCT Engineering
---

# Communication protocol and OSI architecture

Telecommunications · Chapter 8: Data Communication

- Asked in: 2068 Bhadra (old course), 2+14 marks
- Video: [What is OSI Model? full Explanation | Networking](https://www.youtube.com/watch?v=1msEo8PIcbw) — Learn Coding
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/telecommunications/protocol-osi-architecture
- Whole chapter: https://www.bctengineer.com/md/semester_8/telecommunications/chapter-8

## Question

What is communication protocol? Explain the OSI architecture used in data communication.

## Short answer

A protocol is a set of rules governing data exchange, specifying syntax, semantics, and timing. The OSI model has seven layers: Physical (bit transmission), Data Link (framing, MAC), Network (addressing/routing), Transport (end-to-end reliability), Session, Presentation, and Application.

## Answer

#### Communication protocol
A **communication protocol** is a set of rules and conventions that govern the exchange of data between two communicating entities. Both ends must follow the same protocol to understand each other. A protocol defines three key elements:
- **Syntax:** format of data and control information (field order and sizes, e.g. a header of 20 bytes).
- **Semantics:** meaning of each field and the action to take (e.g. what an ACK or error code means).
- **Timing:** when and how fast data is sent, sequencing and speed matching.

Examples: HDLC (data link), IP (network), TCP (transport), HTTP and SMTP (application), Q.931 in ISDN.

#### OSI reference model
The **Open Systems Interconnection (OSI)** model was developed by **ISO** (ISO 7498, 1984) so that systems from different vendors can communicate. It divides the communication task into **seven layers**. Each layer performs a defined set of functions, uses the services of the layer below and gives services to the layer above. Layers on two machines talk to each other by **peer protocols**, while actual data moves down one stack, across the medium and up the other.

Layering principles: a layer for each different level of abstraction, well-defined functions, small interface flow across boundaries, and enough layers to separate functions but not too many.

```text
 Host A                                  Host B
+----------------+                  +----------------+
| 7 Application  |<---------------->| 7 Application  |
| 6 Presentation |<---------------->| 6 Presentation |
| 5 Session      |<---------------->| 5 Session      |
| 4 Transport    |<---------------->| 4 Transport    |
| 3 Network      |<->[3]<---->[3]<->| 3 Network      |
| 2 Data link    |<->[2]<---->[2]<->| 2 Data link    |
| 1 Physical     |<->[1]<---->[1]<->| 1 Physical     |
+-------+--------+  router  router  +-------+--------+
        +========= physical medium =========+
```
Layers 1–3 are **network-dependent** (also run in intermediate nodes); layers 4–7 are **end-to-end** (only in hosts).

#### 1. Physical layer
- Sends the raw **bit stream** over the medium.
- Defines mechanical (connectors, pins), electrical (voltage levels, bit duration), functional (meaning of pins) and procedural specifications.
- Line coding, bit synchronisation, data rate, simplex/half/full duplex, topology.
- Examples: RS-232/V.24, X.21, 10Base-T, ISDN I.430. Data unit: **bit**.

#### 2. Data link layer
- Turns the raw line into a reliable link between **adjacent nodes**.
- **Framing** (start/end of frame, bit stuffing), physical (MAC) addressing.
- **Error control** with CRC and ARQ (retransmission), **flow control** (sliding window).
- In LANs it is split into **LLC** and **MAC** (medium access, e.g. CSMA/CD) sublayers.
- Examples: HDLC, LAPB, LAPD, PPP, IEEE 802.3. Data unit: **frame**.

#### 3. Network layer
- Delivers packets from **source host to destination host** across many networks.
- **Logical addressing** (IP address), **routing** (choosing paths), switching, congestion control, fragmentation, internetworking.
- Connection-oriented (virtual circuit) or connectionless (datagram) service; accounting.
- Examples: IP, X.25 packet layer, ICMP. Data unit: **packet**.

#### 4. Transport layer
- **End-to-end (process-to-process)** reliable delivery of the complete message.
- Segmentation and reassembly, **port addressing**, end-to-end error and flow control, connection management, multiplexing several sessions on one network connection.
- Hides network details from upper layers; gives the quality of service required.
- Examples: TCP, UDP, ISO TP0–TP4. Data unit: **segment**.

#### 5. Session layer
- Establishes, manages and terminates **sessions** (dialogues) between applications.
- **Dialogue control:** who talks when (half/full duplex, token management).
- **Synchronisation:** inserts checkpoints so that after a failure transfer restarts from the last checkpoint, not from the start.
- Examples: RPC, NetBIOS, ISO 8327.

#### 6. Presentation layer
- Concerned with **syntax and semantics** of the information exchanged.
- **Translation** between different codes (ASCII, EBCDIC) and data formats (ASN.1).
- **Encryption/decryption** for security and **compression** to reduce bits.
- Examples: JPEG, MPEG, SSL/TLS encryption, ASN.1.

#### 7. Application layer
- Gives the user and application programs access to network services.
- Services: file transfer and access (FTAM, FTP), e-mail (X.400, SMTP), directory (X.500), virtual terminal, web (HTTP), network management.

#### Data flow and encapsulation
Each layer adds its own **header** (and the data link layer also a trailer) to the data from the layer above; the receiver removes them in reverse order.

```text
          Data                       Layer 7
        AH|Data                      7  (headers
      PH|AH|Data                     6   added at
    SH|PH|AH|Data                    5   each layer)
  TH|SH|PH|AH|Data       = segment   4
NH|TH|SH|PH|AH|Data      = packet    3
DH|NH|....|Data|DT       = frame     2
0110100101110...         = bits      1
```

#### Summary table

| Layer | Main function | Data unit | Device/example |
|---|---|---|---|
| 7 Application | User services | Message | HTTP, FTP, X.400 |
| 6 Presentation | Translate, encrypt, compress | Message | ASCII, JPEG, TLS |
| 5 Session | Dialogue, checkpoints | Message | RPC, NetBIOS |
| 4 Transport | End-to-end reliability | Segment | TCP, UDP |
| 3 Network | Routing, logical address | Packet | IP, router |
| 2 Data link | Framing, error/flow control | Frame | HDLC, bridge |
| 1 Physical | Bits on medium | Bit | RS-232, repeater |

#### Advantages of the layered OSI model
- Divides a complex task into small, manageable parts.
- Changes in one layer do not affect others (modularity).
- Equipment from different vendors can work together (open standards).
- Clear framework for teaching, design and troubleshooting.

The OSI model is mainly a reference model; practical networks mostly use the TCP/IP suite, whose layers map onto OSI (application ≈ 5–7, transport = 4, internet = 3, network access = 1–2).

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which set correctly lists the three key elements a communication protocol defines?
   A. Syntax, semantics, timing
   B. Syntax, routing, addressing
   C. Framing, timing, encryption
   D. Semantics, topology, timing
   Answer: A. A protocol defines syntax (format), semantics (meaning and action) and timing (when and how fast data is sent). (Key point: Three elements of a protocol)

2. Which protocol element decides what an ACK or an error code means and what action follows?
   A. Syntax
   B. Timing
   C. Semantics
   D. Encapsulation
   Answer: C. Semantics gives meaning to each field and the action to take; syntax is only the format. (Key point: Semantics)

3. In the OSI model, which layers also run in intermediate nodes such as routers?
   A. Layers 4 to 7
   B. Layers 1 to 3
   C. Layers 5 to 7 only
   D. Layer 4 only
   Answer: B. Layers 1-3 are network-dependent and run in intermediate nodes; layers 4-7 are end-to-end and run only in hosts. (Key point: Network-dependent vs end-to-end layers)

4. What is the purpose of synchronisation checkpoints in the session layer?
   A. To encrypt the data
   B. To route packets around congestion
   C. To restart a transfer from the last checkpoint after a failure
   D. To convert ASCII to EBCDIC
   Answer: C. Checkpoints let a transfer resume from the last one instead of from the start after a failure. (Key point: Session layer checkpoints)

5. Which is the correct pairing of layer and data unit?
   A. Network - frame; Data link - packet
   B. Transport - segment; Network - packet; Data link - frame
   C. Transport - packet; Network - segment
   D. Physical - frame; Data link - bit
   Answer: B. Transport gives segments, network packets, data link frames and physical bits; each lower layer adds its header (data link also a trailer). (Key point: Encapsulation and data units)

## Related in Telecommunications

- [Short note: OSI architecture](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Ashort-note-osi-architecture) — Telecommunications, chapter 8
- [Communication protocol and its need](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Acommunication-protocol-need) — Telecommunications, chapter 8, asked 3×
- [Switching techniques in data communication](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Aswitching-techniques-data-comm) — Telecommunications, chapter 8, asked 3×
- [Flow control mechanisms in data communication](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Aflow-control-mechanisms) — Telecommunications, chapter 8
- [SS7 vs OSI; MTP-L2 signal units](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Ass7-vs-osi-mtp2-units) — Telecommunications, chapter 5
- [Short note: Routing algorithm in data communication](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Arouting-algorithm-data-comm) — Telecommunications, chapter 8, asked 2×

## Related in other subjects

- [I/O functions used with data files](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Afile-io-functions) — Computer Programming, chapter 10, asked 2×
- [Data warehouse architecture and components](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Adw-architecture-components) — Data Mining, chapter 1
- [National data warehouse process architecture](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Anepal-national-data-warehouse) — Data Mining, chapter 1
- [Architecture of data mining system](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Adm-system-architecture) — Data Mining, chapter 1
