Q.1
14 MarksClient-server architecture is a network architecture where central machines called servers provide services, and host computers called clients request those services.
Servers run continuously with a fixed IP address. Clients initiate requests and do not communicate directly with other clients.
Applications on the Internet include:
- Web browsing: Web browsers query web servers for pages using HTTP.
- Electronic mail: Mail clients send and retrieve messages through mail servers using SMTP and IMAP.
- File transfer: Users download and upload files through FTP servers.
- Domain Name System (DNS): Resolvers query DNS servers to map domain names to IP addresses.
Also asked in Winter 2024 Q2c OR, Summer 2024 Q2a
The Simple Mail Transfer Protocol (SMTP) is an application-layer protocol used to transfer email messages reliably across the Internet over a TCP connection on port 25.
SMTP is a push protocol: the sending mail server pushes the message to the receiving mail server. The transfer follows three main phases:
- Connection setup: The client opens a TCP connection to the server. The server greets the client with a 220 code, and the client introduces itself using
HELOorEHLO. - Mail transfer: The client identifies the sender with
MAIL FROMand the recipient withRCPT TO. It then issues theDATAcommand, transmits the message body line by line, and signals the end of the text with a single period (.) on an empty line. - Connection closure: The client sends the
QUITcommand, and the server closes the connection.
The lines starting with C: are sent by the client and the lines starting with S: by the server.
S: 220 mail.example.com ESMTP
C: HELO client.example.com
S: 250 Hello
C: MAIL FROM: sender@example.com
S: 250 OK
C: RCPT TO: receiver@example.com
S: 250 OK
C: DATA
S: 354 Start mail input
C: Subject: Test Mail
C: Hello!
C: .
S: 250 OK
C: QUIT
S: 221 GoodbyeThe Open Systems Interconnection (OSI) model is a theoretical seven-layer reference framework developed by the International Organisation for Standardisation (ISO) to guide network protocol design. Each layer provides services to the layer above it and receives services from the layer below it.
Seven layers of the OSI model
7 Application (HTTP, DNS, SMTP)
6 Presentation (format, encrypt)
5 Session (dialog control)
4 Transport (end to end)
3 Network (routing, IP)
2 Data link (frames, MAC)
1 Physical (bits on wire)- Physical layer: Transmits raw unstructured bit streams across physical transmission media. It defines electrical signals, data rates, pin layouts, and connector types.
- Data link layer: Packages raw bits into data frames for node-to-node delivery. It handles physical MAC addressing, media access control, and link-level error detection.
- Network layer: Routes packets across diverse networks from source to destination host. It performs logical IP addressing and path determination using routing algorithms.
- Transport layer: Delivers complete messages between application processes. It provides segmentation, end-to-end flow control, connection management, and error recovery.
- Session layer: Establishes, maintains, and terminates communication sessions between software processes. It manages dialog control and session checkpoints.
- Presentation layer: Formats data for the application layer. It handles character code translation (such as ASCII to EBCDIC), data compression, and encryption.
- Application layer: Serves as the user interface to network services. It supports applications with protocols such as HTTP, DNS, and SMTP.
Comparison with the TCP/IP model
The TCP/IP model is a practical four-layer architecture developed for the Internet.
| Feature | OSI model | TCP/IP model |
|---|---|---|
| Layer count | 7 layers | 4 layers |
| Session and presentation | Defined as distinct layers | Merged into the application layer |
| Protocol design | Reference model defined before protocols | Protocols developed before the model |
| Network layer service | Supports connectionless and connection-oriented services | Supports only connectionless service (IP) |
| Transport layer delivery | Guaranteed reliable delivery | Choice between reliable TCP and best-effort UDP |
| Practical usage | Theoretical guide; rarely deployed in practice | Dominant standard powering the Internet |
The OSI model is a 7-layer theoretical reference framework, while the TCP/IP model is a 4-layer practical architecture that merges session and presentation tasks into the application layer.