# Q2(a) · OSI model

Subject: Computer Networks

Exam: TEE

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-final/q2a

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-final--q2a/

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

### Q2(a). Describe in detail the layered architecture of OSI reference model with the help of labelled diagram. Write any TWO functionalities of each layer. [10 marks]

### Answer

The **Open Systems Interconnection (OSI)** model separates network functions into seven layers. A layer offers services upward and uses services below. Peer layers communicate logically through protocol rules; actual data moves down the sender’s stack, across links and up the receiver’s stack.

Swipe across the diagram to read its labels ↔

![OSI layers mapped to the four-layer TCP/IP model](https://deep-learning-study-room.vercel.app/cn/fig/tee-models.5bff0518c8.svg)

Diagram: OSI layers mapped to the four-layer TCP/IP model. Labels: OSI layers mapped to the four-layer TCP/IP model | OSI layers mapped to the four-layer TCP/IP model | 7 Application | 6 Presentation | 5 Session | 4 Transport | 3 Network | 2 Data link | 1 Physical | Application | HTTP, DNS, FTP, SMTP | Transport | Internet | Link / network access | Includes physical access | Some textbooks split link into data link + physical: five layers.

OSI seven-layer model mapped to the four-layer TCP/IP model.

| Layer | Task | Example |
| --- | --- | --- |
| 7 Application | Services used by network applications | HTTP, DNS, FTP, SMTP |
| 6 Presentation | Representation, encoding and application data transformations | Character encoding, serialization; encryption as a conceptual function |
| 5 Session | Manage dialogue and synchronization/checkpoints | Session establishment and resumption concepts |
| 4 Transport | Process delivery; reliability/flow control where supplied | TCP, UDP, SCTP; ports |
| 3 Network | Logical addressing and routing across networks | IP; routers |
| 2 Data link | Framing, local link addressing, medium access and error detection | Ethernet/Wi-Fi; MAC addresses |
| 1 Physical | Transmit signal symbols/bits through a medium | Electrical, optical or radio signals |

## Encapsulation and delivery

1. Application creates data. Transport adds a transport header: TCP segment or UDP datagram.
2. IP adds its header to form a packet. The link adds a header and usually a trailer to form a frame.
3. The physical layer carries signals. The destination reverses the process and sends the data to the receiving process.
4. At a router, local framing changes for the next link. A transit router primarily forwards at Layer 3; it need not run the end application.

#### Practical example

A browser request becomes TCP data, an IP packet and then an Ethernet frame. An IP address selects the host/interface, while a TCP port selects the service.

**Yaad rakho:** Application se physical tak wrap; receiver par unwrap.

### Two functions of every OSI layer

| Layer | Function 1 | Function 2 |
| --- | --- | --- |
| Application | Provide application-level network services, such as file transfer | Define application exchanges for services such as email or name resolution |
| Presentation | Translate/serialize data into an agreed representation | Compress data or encrypt/decrypt it where these transformations are required |
| Session | Establish, manage and end a dialogue/session | Provide synchronization/checkpoints for resuming a dialogue |
| Transport | Identify sending/receiving processes using ports and segment/reassemble data | Provide end-to-end reliability and flow control when the selected protocol supports them |
| Network | Provide logical addressing across networks | Select routes and forward packets towards the destination |
| Data link | Frame the data and identify local interfaces | Control shared-medium access and detect link-frame errors |
| Physical | Represent bits as electrical, optical or radio signal symbols | Specify physical-interface/signalling properties such as timing, connectors and transmission rate |

These are reference-model responsibilities; an actual protocol stack may combine them. UDP, for example, does not supply TCP-style reliable delivery merely because both are transport protocols.
