Application, Session and Presentation Layers – Complete Lesson

1. Application Layer – The Door to the Network

Dear student, imagine you walk into a big library. You do not directly touch the books stored deep inside. Instead, you talk to the librarian at the front desk. The librarian understands your request, finds the book, and gives it to you. That librarian is like the Application Layer of the OSI model. It is the layer where you, the user, actually communicate with the computer.

The application layer is Layer 7 (the top layer) of the OSI model. It does NOT mean “applications” like Microsoft Word or Chrome browser itself. Instead, it means the protocols and services that allow those applications to use the network. Think of it as the interface between the user and the network.

Key Idea: The application layer enables the user (whether human or software) to access the network. It provides user interfaces and support for services such as email, remote file access, shared database management, and other distributed information services.

1.1 What Exactly Does the Application Layer Do?

The application layer has several important jobs:

  • Identify communication partners: It finds out whether the other computer or server is available to communicate.
  • Determine resource availability: It checks if there is enough network resource to carry out the communication.
  • Synchronize communication: It makes sure both sides agree on how to exchange data.

Think about it this way: before you make a phone call, you first check if the other person’s phone is reachable. The application layer does this same job for network communication!

1.2 Common Application Layer Protocols

Now, let me ask you a question: When you type “www.google.com” in your browser, what happens behind the scenes? The answer involves several application layer protocols. Let us learn each one deeply.

1.2.1 Domain Name System (DNS)

Every server on the Internet has an IP address like 142.250.80.46. Now, can you remember the IP addresses of all your favorite websites? Of course not! It would be impossible. This is where DNS comes in.

DNS (Domain Name System) is like a phone book for the Internet. It converts human-readable domain names (like www.google.com) into machine-readable IP addresses (like 142.250.80.46).

How DNS Works (Simple Flow):User types: www.example.com | v [DNS Server] ——- Looks up in its table ——-+ | | | Table contains: | | www.example.com –> 93.184.216.34 | | | v v Returns IP: 93.184.216.34 Browser uses this IP

DNS names are organized into domains:

  • .com – commercial organizations
  • .edu – educational institutions
  • .net – network providers
  • .org – non-profit organizations
  • .et – Ethiopia’s country domain

A DNS server contains a table that maps hostnames to IP addresses. When you type a website name, your computer asks the DNS server for the IP address. Without DNS, the Internet as we know it would not work!

Example: When you type www.mu.edu.et (Mekelle University), DNS finds the IP address of Mekelle University’s web server so your browser can connect to it.

Now let me test you: What would happen if the DNS server is down?

If the DNS server is down, you cannot access any website by its name. You would have to type the raw IP address directly (like typing 142.250.80.46 instead of google.com). This is very difficult for normal users. The Internet would feel “broken” even though the servers are still running.

1.2.2 Web Client and Web Server (HTTP)

After DNS gives the IP address, your browser (the web client) connects to the web server. This connection uses HTTP (HyperText Transfer Protocol).

Web Communication Flow:[Web Client/Browser] –HTTP Request on Port 80–> [Web Server] ^ | | | +———- HTTP Response (HTML page) ———+

Key points about HTTP:

  • HTTP uses port 80 by default
  • The content of web pages is written in HTML (HyperText Markup Language)
  • HTTP allows web servers and clients from different manufacturers to work together seamlessly
  • HTTPS (HTTP Secure) uses port 443 and encrypts data
Deep Example: Imagine you open your browser and type www.facebook.com. Here is what happens step by step:
1. Your browser asks DNS: “What is the IP address of www.facebook.com?”
2. DNS replies: “It is 157.240.1.35”
3. Your browser connects to 157.240.1.35 on port 80 (or 443 for HTTPS)
4. Your browser sends an HTTP request: “GET me the homepage”
5. Facebook’s server sends back HTML code
6. Your browser reads the HTML and displays the Facebook page you see
All of steps 1-6 involve application layer protocols (DNS and HTTP)!

1.2.3 File Transfer Protocol (FTP)

FTP (File Transfer Protocol) is used to transfer files between a client and a server over the network. It is like a digital courier that picks up files from one computer and delivers them to another.

Very important detail about FTP ports: FTP is unique because it uses two different ports:

FTP Two-Port System:Client –Port 21 (Control)–> Server [To start session, send commands] Client <--Port 20 (Data)--- Server [To actually transfer files]Port 21 = Control Connection (commands like "login", "get file", "put file") Port 20 = Data Connection (the actual file moves through here)
Deep Example: Suppose a student at Woldia University wants to upload an assignment file to the university’s FTP server. Here is what happens:
1. The student’s FTP client connects to the server using port 21 (control connection)
2. The student enters username and password through port 21
3. The student sends the command “PUT assignment.pdf” through port 21
4. The actual file data of assignment.pdf travels through port 20 (data connection)
5. After transfer is complete, the data connection on port 20 closes
6. The control connection on port 21 stays open for more commands

This two-port system is a key exam point! Many students confuse which port does what.

FTP client software is built into most operating systems and web browsers. You can even type ftp://servername in your browser’s address bar!

1.2.4 Email Servers (SMTP, POP3, and IMAP4)

Email is one of the most important services on the Internet. Three protocols work together to make email work:

Email Protocol Comparison:+——–+——————-+—————————+——————+ | Protocol| Used For | What Happens to Mail | Port | +——–+——————-+—————————+——————+ | SMTP | Sending mail | Pushes mail from client | Port 25 | | | (client->server | to server OR server to | | | | or server->server)| server | | +——–+——————-+—————————+——————+ | POP3 | Receiving mail | Downloads mail to client, | Port 110 | | | | then DELETES from server | | +——–+——————-+—————————+——————+ | IMAP4 | Receiving mail | Downloads mail to client, | Port 143 | | | | KEEPS copy on server | | +——–+——————-+—————————+——————+

Mailbox format: Every email mailbox follows this format: user@company.domain

Example: misgana@wcu.edu.et – Here “misgana” is the user, “wcu” is the company (Wolkite University), and “edu.et” is the domain.

Deep Example – Complete Email Journey:
Imagine Abebe at Wolkite University wants to send an email to Hanna at Addis Ababa University.

Step 1 (Sending): Abebe writes the email in his email client (like Outlook or Gmail). His client uses SMTP to push the email to Wolkite’s mail server.
Step 2 (Server to Server): Wolkite’s mail server uses SMTP again to send the email to AAU’s mail server over the Internet.
Step 3 (Receiving): Hanna opens her email client. If her client uses POP3, the email is downloaded to her computer and deleted from the server. If she uses IMAP4, the email is downloaded but a copy stays on the server, so she can read it from any device later.

Teacher’s Question: Which protocol would you recommend for a student who checks email from both a phone and a computer lab? Why?

I would recommend IMAP4. Here is why: If the student uses POP3, when she checks email from the phone, the mail is downloaded and deleted from the server. When she goes to the computer lab later, the email would not be there anymore! But with IMAP4, the mail stays on the server, so she can read the same emails from her phone, the computer lab, or any other device. All devices stay synchronized.

1.3 Specific Services Provided by the Application Layer

Beyond the protocols we discussed, the application layer provides four specific services:

1. Network Virtual Terminal (NVT):
A network virtual terminal is a software version of a physical terminal. It allows a user to log on to a remote host. The application creates a software emulation of a terminal at the remote host. Your computer talks to this software terminal, which then talks to the host. The remote host thinks it is communicating with one of its own terminals and allows you to log on.

Network Virtual Terminal:[Your Computer] –> [Software Terminal Emulation] –> [Remote Host] (NVT acts as a fake (Host thinks it is physical terminal) talking to its own terminal directly)

2. File Transfer, Access, and Management (FTAM):
This service allows you to:
Access files on a remote host (read or make changes)
Retrieve files from a remote computer for local use
Manage or control files on a remote computer from your local computer

3. Mail Services:
This provides the basis for email forwarding and storage. We already discussed SMTP, POP3, and IMAP4 above.

4. Directory Services:
This provides distributed database sources and access for global information about various objects and services. For example, Active Directory in Windows networks is a directory service that helps users find network resources like printers, servers, and other users.

Quick Check – Fill in the Blanks:
1. The application layer is Layer ___ of the OSI model.
2. ___ converts domain names to IP addresses.
3. FTP uses port ___ for control and port ___ for data transfer.
4. ___ protocol downloads email and keeps a copy on the server.
5. A ___ ___ ___ is a software version of a physical terminal.

1. 7 – The application layer is the top layer (Layer 7) of the OSI model.
2. DNS (Domain Name System) – It acts as the Internet’s phone book.
3. 21 for control, 20 for data – Remember: control first (21), then data moves (20).
4. IMAP4 – Unlike POP3 which deletes mail after download, IMAP4 keeps it on the server.
5. Network virtual terminal – It creates a software emulation so the remote host thinks you are a local terminal.

2. Session Layer – The Dialogue Controller

Now, let me ask you something: Have you ever been in a meeting where two people talk at the same time and nobody understands anything? What is needed in that situation? Yes – someone needs to control who speaks when! That is exactly what the Session Layer (Layer 5) does for network communication.

The lowest four layers (Physical, Data Link, Network, and Transport) provide reliable data exchange. But some applications need extra control over the dialogue. For example:

  • A remote terminal application might need half-duplex communication (only one side talks at a time)
  • A transaction-processing application might need checkpoints so it can recover if something fails
  • A message application might need to pause a dialogue, prepare a new message, and then resume where it stopped

These capabilities could be built into each application at Layer 7. But because they are needed by many different applications, it makes more sense to put them in a separate layer: the Session Layer.

Simple Analogy: Think of the session layer as a meeting chairperson. The chairperson decides who speaks (dialogue control), organizes topics into groups (grouping), and takes notes at key points so if the meeting is interrupted, it can continue from where it stopped (recovery/checkpointing).

2.1 Key Services of the Session Layer

The primary job of session layer protocols is to set up, manage, and end sessions between applications. It provides three key services:

See also  Transport Layer Complete Study Guide – Data Communication Chapter 3

2.1.1 Dialogue Discipline

The session layer controls how data flows between two communicating devices. It can be:

  • Two-way simultaneous (Full Duplex): Both sides can send and receive at the same time – like a phone call where both people can talk at once.
  • Two-way alternate (Half Duplex): Only one side can send at a time – like a walkie-talkie where you press a button to speak and must release it to listen.
Full Duplex vs Half Duplex:FULL DUPLEX: Computer A: ======> Data =======> Computer B (simultaneously) Computer A: <====== Data <====== Computer BHALF DUPLEX: Computer A: ======> Data =======> Computer B Computer A: <====== (waits) <==== Computer B Computer A: <====== Data <====== Computer B Computer A: ======> (waits) ====> Computer B
Deep Example: Consider a bank’s ATM network. When you withdraw money, the ATM sends your request to the bank server. The session layer ensures that the ATM sends the request, then waits for the server’s response before sending the next request. This is half-duplex dialogue discipline – the session layer controls the turn-taking.

2.1.2 Grouping

The session layer can mark the flow of data to define groups. This is very useful in business applications.

Deep Example: Imagine a large retail store like Shola Mall in Addis Ababa transmitting daily sales data to its regional head office. The data includes sales from many departments: Electronics, Clothing, Food, etc.

The session layer adds markers between each department’s data:
– [START: Electronics] … sales data … [END: Electronics]
– [START: Clothing] … sales data … [END: Clothing]
– [START: Food] … sales data … [END: Food]

These markers tell the head office computer: “Okay, Electronics data is complete. Calculate the total for Electronics, then start a new count for Clothing.” Without grouping, the head office would not know where one department’s data ends and another begins!

2.1.3 Recovery (Checkpointing)

This is one of the most important services of the session layer. The session layer can insert checkpoints into the data stream. If a failure occurs between checkpoints, only the data since the last checkpoint needs to be retransmitted – not the entire file!

Checkpoint Example – Sending 2000 Pages:Pages: [1-100] [101-200] [201-300] … [1901-2000] CP1 CP2 CP3 CP20Scenario: Failure happens at page 250 (between CP2 and CP3)WITHOUT checkpoints: Retransmit ALL 2000 pages from the beginning! WITH checkpoints: Only retransmit pages 201-250 (from CP2 onward)Result: Huge time and bandwidth saved!
Deep Example: A government office in Bahir Dar is sending a 2000-page report to the federal office in Addis Ababa over a slow network connection. Without checkpoints, if the connection fails at page 1500, all 2000 pages must be resent! But with session layer checkpoints every 100 pages, if it fails at page 1500, only pages 1401-1500 need to be resent. The first 1400 pages are already acknowledged as received. This saves enormous time and network resources.

Let me ask you: Why don’t we just add checkpoints after every single page? Wouldn’t that be safest?

Good thinking, but no! If we add a checkpoint after every single page, the system would spend more time managing checkpoints than actually sending data. Each checkpoint requires the receiver to send an acknowledgment back, and the sender must record the checkpoint state. Too many checkpoints = too much overhead = slower transmission. That is why checkpoints are placed at reasonable intervals (like every 100 pages in our example), not after every single page.

Multiple Choice Question: A company is sending a large database backup over the network. The connection fails halfway through. Which session layer service allows the company to resume from the last saved point instead of starting over?
A) Dialogue discipline
B) Grouping
C) Checkpointing/Recovery
D) Encryption

Answer: C) Checkpointing/Recovery
Explanation: Checkpointing is the session layer service that inserts markers (checkpoints) in the data stream. If a failure occurs, the system can retransmit only the data since the last checkpoint. Dialogue discipline (A) controls who sends when. Grouping (B) organizes data into logical groups. Encryption (D) is a presentation layer function. The key word in the question is “resume from the last saved point” – that is exactly what checkpointing does.

3. Presentation Layer – The Translator

Now let me ask you: What happens when an Amharic speaker and an English speaker try to communicate? They need a translator, right? The Presentation Layer (Layer 6) is the translator of the network world.

The presentation layer is concerned with the syntax and semantics (the format and meaning) of the information exchanged between two systems. It makes sure that data sent by one system can be properly understood by the receiving system, even if the two systems use different internal formats.

Simple Analogy: Imagine you wrote a letter in Amharic and want to send it to someone in China who only reads Chinese. The presentation layer is like a translator service that:
1. Takes your Amharic letter
2. Translates it into a common language (like English) that both sides understand
3. At the receiving end, translates from English into Chinese
This way, both sides can communicate even though they use different languages internally.

3.1 Three Main Responsibilities of the Presentation Layer

3.1.1 Translation

Different computers use different encoding systems. For example, one computer might use ASCII encoding while another uses EBCDIC. If they exchange data directly, the data would be meaningless to the receiving computer.

Translation Process:Sender’s Format –> [Common Format] –> Receiver’s FormatExample: ASCII “HELLO” –> [Common Format] –> EBCDIC “HELLO” (Computer A) (Computer B)The presentation layer at sender converts ASCII to common format. The presentation layer at receiver converts common format to EBCDIC. Result: Both computers understand “HELLO” even though they use different encodings!

The presentation layer at the sender changes information from sender-dependent format into a common format. The presentation layer at the receiver changes the common format into receiver-dependent format. This ensures interoperability between different encoding methods.

Deep Example: A student sends a document from a Mac computer (which uses Unicode encoding) to a friend who has an old mainframe computer (which uses EBCDIC encoding). Without the presentation layer, the friend would see garbage characters. The presentation layer on the Mac side converts the Unicode to a common format. The presentation layer on the mainframe side converts the common format to EBCDIC. The friend can now read the document perfectly!

3.1.2 Encryption

When sensitive information (like passwords, bank details, or exam results) is sent over the network, it must be protected from hackers. The presentation layer provides encryption and decryption.

  • Encryption: The sender transforms the original information into another form (ciphertext) before sending it over the network.
  • Decryption: The receiver reverses the process to transform the ciphertext back to the original form (plaintext).
Encryption and Decryption:Sender: “Hello” –[Encryption]–> “X\$#&p@” –[Network]–> “X\$#&p@” –[Decryption]–> “Hello” :Receiver (Original) (Ciphertext – unreadable) (Original recovered)
Deep Example: When you log into your email account and type your password “Abebe123”, the presentation layer encrypts it before sending it over the network. Even if a hacker captures the data on the network, they would see something like “7f8a9b2c” instead of “Abebe123”. Only the email server can decrypt it back to the original password. This is how HTTPS (secure HTTP) works – it uses encryption at the presentation layer level.

3.1.3 Compression

Data compression reduces the number of bits needed to represent the information. This is especially important for multimedia data like text, audio, and video.

Compression Example:Original video file: 500 MB After compression: 100 MB Compression ratio: 5:1Benefits: – Faster transmission (100 MB vs 500 MB) – Less storage space needed – Less bandwidth consumed – Cheaper network costs
Deep Example: When you watch a YouTube video, the original video file might be extremely large. The presentation layer compresses it before transmission. At your end, it is decompressed so you can watch it. Common compression formats include JPEG (for images), MP3 (for audio), and MP4 (for video). Without compression, watching a 2-hour movie online would take enormous bandwidth and time!

Quick Question: Which presentation layer function is most important when sending a high-resolution medical X-ray image from a hospital in Jimma to a specialist in Addis Ababa?

Compression is the most important function here. A high-resolution X-ray image can be hundreds of megabytes. Without compression, sending it over the network would take a very long time and consume too much bandwidth. Compression reduces the file size significantly, making the transmission fast and practical. Encryption would also be important (for patient privacy), but compression is the primary concern for making the transmission feasible in the first place.

4. TCP/IP Model – How It Compares to OSI

Now, dear student, you have learned about the OSI model’s top three layers. But in the real world, the Internet does NOT use the OSI model – it uses the TCP/IP model. Let me explain the difference clearly.

The TCP/IP model has four or five layers (depending on the book you read):

OSI Model (7 Layers)TCP/IP Model (4-5 Layers)What Happened?
Application LayerApplication LayerOSI’s top 3 layers are combined into one TCP/IP Application layer
Presentation Layer
Session Layer
Transport LayerTransport LayerMostly the same
Network LayerInternet LayerSimilar but called “Internet Layer”
Data Link LayerNetwork Access LayerOSI’s bottom 2 layers are combined into Network Access
Physical Layer
Very Important Point for Exams: In the TCP/IP model, the Application layer combines the functions of OSI’s Application, Presentation, and Session layers. So when you use HTTP (application), send encrypted data (presentation), and maintain a session (session) in TCP/IP, all these are handled by the single TCP/IP Application layer!

4.1 TCP/IP Transport Layer Protocols

The TCP/IP transport layer has two important protocols:

A. TCP (Transmission Control Protocol):
Reliable and connection-oriented
– Provides error checking and flow control
– Establishes a virtual link, transfers data, then terminates the connection
– Examples: FTP, Email (SMTP)
Analogy: Like a registered mail – you get confirmation that it arrived

B. UDP (User Datagram Protocol):
Unreliable and connectionless
– Does NOT check for errors or control flow
– Just sends data without confirming receipt
– Examples: SNMP, live video streaming
Analogy: Like a regular letter – you send it and hope it arrives, no confirmation

TCP vs UDP Comparison:TCP: [Connect] –> [Send Data] –> [Confirm] –> [Disconnect] (Reliable, slow, but guaranteed delivery)UDP: [Send Data] –> (done! no confirmation) (Fast, no guarantee, but quick)

4.2 TCP/IP Internet Layer

The Internet layer is responsible for routing and delivery of data across networks. It handles communication across different network types. Key protocols at this layer include:

  • IP (Internet Protocol): Handles addressing and routing
  • ARP (Address Resolution Protocol): Maps IP addresses to MAC addresses

4.3 TCP/IP Network Access Layer

The Network Access layer combines OSI’s Physical and Data Link layers. It deals with pure hardware issues:

  • Wires, cables, satellite links
  • Network Interface Cards (NICs)
  • Access methods like CSMA/CD (Carrier Sense Multiple Access with Collision Detection)
  • Ethernet operates here – hardware at Physical layer, CSMA/CD at Data Link layer

Short Answer Question: Why does the TCP/IP model combine the OSI Application, Presentation, and Session layers into a single Application layer?

The TCP/IP model was developed based on practical experience with real networks, not theoretical design. In practice, application developers often handle presentation functions (like encryption, compression, translation) and session functions (like dialogue control) within the application itself. There was no strong need to separate these into different layers. The OSI model separated them for theoretical clarity, but TCP/IP combined them for practical simplicity. This is why TCP/IP became the dominant model used on the actual Internet.

See also  Network Layer and Routing Complete Study Guide – Data Communication Chapter 4

Fill in the Blanks:
1. In TCP/IP model, the OSI Application, Presentation, and Session layers are combined into the ___ layer.
2. ___ is a reliable, connection-oriented transport protocol.
3. ___ is an unreliable, connectionless transport protocol.
4. The TCP/IP Internet layer is similar to the OSI ___ layer.
5. ___ protocol maps IP addresses to MAC addresses.

1. Application – All three OSI top layers merge into one TCP/IP Application layer.
2. TCP (Transmission Control Protocol) – It guarantees delivery with error checking.
3. UDP (User Datagram Protocol) – It just sends data without guarantees.
4. Network – Both handle routing and logical addressing.
5. ARP (Address Resolution Protocol) – It resolves IP to hardware (MAC) addresses.

Exam-Focused Revision Notes

Application Layer – Quick Points

  • Application layer = Layer 7 of OSI model (topmost layer)
  • It is the interface between user and network
  • It identifies communication partners and checks resource availability
  • DNS: Converts domain names to IP addresses (Internet’s phone book)
  • HTTP: Used for web browsing, uses port 80 (HTTPS uses port 443)
  • FTP: File transfer, uses port 21 (control) and port 20 (data)
  • SMTP: Sends email (client to server or server to server), port 25
  • POP3: Receives email, downloads and deletes from server, port 110
  • IMAP4: Receives email, downloads and keeps on server, port 143
  • Network Virtual Terminal = software version of a physical terminal
  • Mailbox format: user@company.domain

Session Layer – Quick Points

  • Session layer = Layer 5 of OSI model
  • Controls the dialogue between applications
  • Three key services:
    • Dialogue Discipline: Full duplex (two-way simultaneous) or Half duplex (two-way alternate)
    • Grouping: Marks data to define logical groups
    • Recovery (Checkpointing): Inserts checkpoints; if failure occurs, retransmits only data since last checkpoint
  • Primary job: set up, manage, and end sessions
  • Not always needed – some applications don’t use session layer services

Presentation Layer – Quick Points

  • Presentation layer = Layer 6 of OSI model
  • Concerned with syntax and semantics of information
  • Three responsibilities:
    • Translation: Converts sender’s format → common format → receiver’s format (handles different encoding like ASCII vs EBCDIC)
    • Encryption: Transforms data into unreadable form for privacy; Decryption reverses it
    • Compression: Reduces number of bits; important for multimedia (text, audio, video)

TCP/IP Model – Quick Points

  • TCP/IP has 4 layers: Application, Transport, Internet, Network Access
  • TCP/IP Application layer = OSI Application + Presentation + Session combined
  • TCP: Reliable, connection-oriented, error checking, flow control (e.g., FTP, Email)
  • UDP: Unreliable, connectionless, no error checking (e.g., SNMP, live streaming)
  • Internet Layer: Routing and delivery across networks (IP, ARP)
  • Network Access Layer: Combines OSI Physical + Data Link; handles hardware (wires, NICs, CSMA/CD, Ethernet)

Quick Revision Quiz

MCQ 1: Which protocol is used to send email from a client to a server?
A) POP3
B) IMAP4
C) SMTP
D) FTP

Answer: C) SMTP
SMTP (Simple Mail Transfer Protocol) is specifically designed for sending email. POP3 and IMAP4 are for receiving/downloading email. FTP is for file transfer, not email.

MCQ 2: Which presentation layer function reduces the size of data for transmission?
A) Translation
B) Encryption
C) Compression
D) Checkpointing

Answer: C) Compression
Compression reduces the number of bits in the data, making transmission faster and more efficient. Translation handles format conversion, Encryption handles security, and Checkpointing is a session layer function.

MCQ 3: In the TCP/IP model, which layers of the OSI model are combined into the Application layer?
A) Physical and Data Link
B) Network and Transport
C) Application, Presentation, and Session
D) Transport and Session

Answer: C) Application, Presentation, and Session
The TCP/IP Application layer combines all three of the OSI model’s upper layers. Physical and Data Link are combined into Network Access layer. Network maps to Internet layer. Transport remains similar.

Fill in the Blanks:
1. FTP uses port ___ for control connection.
2. The session layer service that inserts markers in data for recovery is called ___.
3. ___ protocol downloads email and deletes it from the server.
4. The presentation layer changes data from sender-dependent format to a ___ format.
5. UDP stands for ___ ___.

1. 21
2. Checkpointing (or Recovery)
3. POP3
4. Common
5. User Datagram Protocol

Challenge Exam Questions

These questions are difficult and exam-focused. Try to answer each one before clicking “Show Answer”.

Question 1 (MCQ)

A student types “www.aau.edu.et” in a browser. The browser contacts a DNS server, but the DNS server does not have the record. What is the most likely result?
A) The browser automatically tries the IP address 192.168.1.1
B) The DNS server forwards the request to another DNS server up the hierarchy
C) The web page loads using HTTP without an IP address
D) The browser switches to using FTP protocol

Answer: B) The DNS server forwards the request to another DNS server up the hierarchy
Detailed Explanation: DNS uses a hierarchical distributed database. If a local DNS server does not have the record for “www.aau.edu.et”, it does not give up. Instead, it forwards the query to a higher-level DNS server (like the .et domain server), which may forward it further to the AAU authoritative DNS server. This hierarchical forwarding continues until the IP address is found or the query fails completely. Option A is wrong because the browser cannot guess IP addresses. Option C is wrong because HTTP requires an IP address to connect. Option D is wrong because FTP is a completely different protocol and cannot help with web browsing.

Question 2 (List and Explain)

List and explain the three key services provided by the session layer. Give a real-world example for each.

1. Dialogue Discipline: The session layer controls how data flows between two devices. It can be full duplex (both sides send simultaneously, like a phone call) or half duplex (one side at a time, like a walkie-talkie). Example: In a telnet session, the session layer enforces half-duplex communication so the remote server knows when the user is typing a command versus when the server is sending output.

2. Grouping: The session layer marks the data flow to define logical groups. Example: A supermarket chain sending daily sales data from each branch to headquarters. The session layer inserts markers between each branch’s data so headquarters can process each branch’s totals separately.

3. Recovery (Checkpointing): The session layer inserts checkpoints in the data stream so that if a failure occurs, only data since the last checkpoint needs retransmission. Example: A bank sending a 5000-transaction file with checkpoints every 500 transactions. If failure occurs at transaction 2300, only transactions 2001-2300 are retransmitted, not all 5000.

Question 3 (Fill in the Blanks)

Fill in the missing words:

The ___ layer is Layer 6 of the OSI model and is responsible for the ___ and ___ of information exchanged between systems. Its three main functions are ___, ___, and ___. The function that ensures privacy by transforming data into an unreadable form is called ___. The function that reduces the number of bits for efficient transmission of multimedia is called ___.

Presentation layer is Layer 6 of the OSI model and is responsible for the syntax and semantics of information exchanged between systems. Its three main functions are translation, encryption, and compression. The function that ensures privacy by transforming data into an unreadable form is called encryption. The function that reduces the number of bits for efficient transmission of multimedia is called compression.

Question 4 (MCQ)

Which of the following statements about FTP is CORRECT?
A) FTP uses only one port (port 80) for both control and data
B) FTP uses port 20 for control and port 21 for data transfer
C) FTP uses port 21 for control and port 20 for data transfer
D) FTP does not use any specific ports; it dynamically selects random ports

Answer: C) FTP uses port 21 for control and port 20 for data transfer
Detailed Explanation: This is a very common exam trick question! Many students confuse the port numbers. Remember this trick: “21 comes before 20 in counting, and control comes before data” – so port 21 is for control (commands like login, get, put) and port 20 is for the actual data transfer (the file itself). Option A describes HTTP, not FTP. Option B has the ports reversed. Option D is completely wrong – FTP has well-defined standard ports.

Question 5 (List and Explain)

Compare and contrast SMTP, POP3, and IMAP4. Your answer should include: purpose, direction of mail flow, what happens to mail on the server, and port number for each.

SMTP (Simple Mail Transfer Protocol):
Purpose: Sending email
Direction: Client → Server OR Server → Server
What happens on server: Mail is stored/received (not downloaded)
Port: 25
Key point: SMTP can only PUSH mail; it cannot pull/download mail from a server

POP3 (Post Office Protocol version 3):
Purpose: Receiving/downloading email
Direction: Server → Client
What happens on server: Mail is DELETED from server after download
Port: 110
Key point: Once downloaded, mail exists only on the client device. If the client’s hard disk fails, mail is lost permanently

IMAP4 (Internet Message Access Protocol version 4):
Purpose: Receiving/downloading email
Direction: Server → Client
What happens on server: Mail is KEPT on server after download
Port: 143
Key point: Mail remains on server, allowing access from multiple devices. Changes (like marking as read) are synchronized across all devices

Question 6 (MCQ)

A system needs to send a 3000-page document over an unreliable network connection. The session layer inserts checkpoints every 200 pages. If the connection fails at page 1450, how many pages need to be retransmitted?
A) 1450 pages
B) 3000 pages
C) 50 pages
D) 250 pages

Answer: C) 50 pages
Detailed Explanation: With checkpoints every 200 pages, the checkpoints are at pages 200, 400, 600, 800, 1000, 1200, 1400, 1600, etc. When the failure occurs at page 1450, the last successful checkpoint was at page 1400. Therefore, only pages 1401 to 1450 need to be retransmitted, which is 50 pages. Without checkpoints, all 3000 pages would need retransmission. Without checkpoints up to the failure point, 1450 pages would be retransmitted (option A). This example perfectly demonstrates why checkpointing saves tremendous time and bandwidth.

Question 7 (Fill in the Blanks)

In the TCP/IP model, the ___ layer combines the functions of OSI’s Physical and Data Link layers and deals with hardware issues like wires, NICs, and ___. The protocol ___ operates at this layer using the access method called ___. The TCP/IP ___ layer is equivalent to OSI’s Network layer and contains protocols like IP and ___.

In the TCP/IP model, the Network Access layer combines the functions of OSI’s Physical and Data Link layers and deals with hardware issues like wires, NICs, and satellite links. The protocol Ethernet operates at this layer using the access method called CSMA/CD (Carrier Sense Multiple Access with Collision Detection). The TCP/IP Internet layer is equivalent to OSI’s Network layer and contains protocols like IP and ARP.

Question 8 (Short Answer)

Explain why the presentation layer’s translation function is necessary. Use the example of a computer using ASCII encoding communicating with a computer using EBCDIC encoding.

The translation function is necessary because different computers use different encoding systems to represent characters and numbers. ASCII and EBCDIC are two different encoding standards. In ASCII, the letter ‘A’ is represented as 01000001, but in EBCDIC, ‘A’ is represented as 11000001. If an ASCII computer sends “HELLO” directly to an EBCDIC computer, the EBCDIC computer would interpret the binary patterns differently and display garbage characters.

The presentation layer solves this by introducing a common intermediate format. The sending computer’s presentation layer converts the ASCII “HELLO” into the common format. The common format travels over the network. The receiving computer’s presentation layer converts the common format into EBCDIC “HELLO”. Both computers can now understand the data correctly, even though they use completely different internal encoding systems. This is called interoperability.

See also  Data Communication: Complete Lesson for Ethiopian Students

Question 9 (MCQ)

Which of the following is NOT a responsibility of the presentation layer?
A) Translating data between different encoding formats
B) Encrypting data for secure transmission
C) Compressing data to reduce transmission size
D) Establishing checkpoints for data recovery

Answer: D) Establishing checkpoints for data recovery
Detailed Explanation: Checkpointing is a function of the Session Layer (Layer 5), NOT the Presentation Layer (Layer 6). Translation (A), Encryption (B), and Compression (C) are all presentation layer responsibilities. This question tests whether you can correctly assign functions to the right layer – a very common exam trap!

Question 10 (List and Explain)

List the four specific services provided by the application layer and explain each with an example relevant to Ethiopian context.

1. Network Virtual Terminal (NVT): A software version of a physical terminal that allows a user to log on to a remote host. The remote host thinks it is communicating with its own terminal. Ethiopian Example: A student at Bahir Dar University uses NVT to log into the university’s mainframe server from a computer lab to access the library catalog system.

2. File Transfer, Access, and Management (FTAM): Allows users to access, retrieve, and manage files on remote computers. Ethiopian Example: A teacher at Jimma University accesses and edits student grade files stored on the university’s central server from her home computer.

3. Mail Services: Provides the basis for email forwarding and storage. Ethiopian Example: A government employee in Dire Dawa sends a report via email to the ministry in Addis Ababa using SMTP, and the minister reads it using IMAP4 from both his office computer and phone.

4. Directory Services: Provides distributed database sources for global information about objects and services. Ethiopian Example: A company’s network uses directory services to help employees find shared printers, servers, and colleague contact information across offices in Addis Ababa, Hawassa, and Adama.

Question 11 (True or False with Explanation)

Statement: “TCP is connectionless and does not guarantee delivery of data, while UDP is connection-oriented and provides reliable data transfer.”

FALSE. The statement has it completely backwards. The correct facts are:
TCP (Transmission Control Protocol) is connection-oriented and reliable. It establishes a connection before sending data, provides error checking, flow control, and guarantees delivery. Examples: FTP, Email.
UDP (User Datagram Protocol) is connectionless and unreliable. It simply sends data without establishing a connection, without error checking, and without delivery guarantees. Examples: SNMP, live video streaming.

Memory trick: TCP = Trustworthy Confirmed Protocol (reliable). UDP = Unreliable Data Protocol (no guarantees).

Question 12 (MCQ)

A Network Virtual Terminal (NVT) is best described as:
A) A hardware device that connects a computer to a network
B) A software emulation of a physical terminal that allows remote login
C) A protocol used to transfer files between computers
D) A type of encryption used in the presentation layer

Answer: B) A software emulation of a physical terminal that allows remote login
Detailed Explanation: NVT is specifically a software (not hardware, so A is wrong) that emulates a physical terminal. It creates a virtual terminal at the remote host, making the host believe it is communicating with one of its own local terminals. This allows the user to log on remotely. FTP (C) is a separate protocol. Encryption (D) is a presentation layer function, not related to NVT. NVT is an application layer service.

Question 13 (Fill in the Blanks)

DNS names are registered and organized on the Internet within specific high-level groups called ___. Examples include .com for ___, .edu for ___, and .net for ___. In Ethiopia, the country-specific domain is ___. A DNS server contains a ___ that associates ___ with corresponding ___.

DNS names are registered and organized on the Internet within specific high-level groups called domains. Examples include .com for commercial organizations, .edu for educational institutions, and .net for network providers. In Ethiopia, the country-specific domain is .et. A DNS server contains a table that associates hostnames with corresponding IP addresses.

Question 14 (Short Answer)

Explain the complete process that happens when a user opens a browser and types “www.google.com”. Include the roles of DNS, HTTP, port numbers, and HTML in your answer.

Step 1 – DNS Resolution: The browser needs the IP address of www.google.com. It sends a DNS query to the configured DNS server. The DNS server looks up its table, finds that www.google.com maps to an IP address (e.g., 142.250.80.46), and returns this IP to the browser.

Step 2 – HTTP Connection: The browser now uses this IP address to connect to Google’s web server. It uses the HTTP protocol and connects on port 80 (or port 443 if using HTTPS).

Step 3 – HTTP Request: The browser sends an HTTP request message to the server, essentially asking “Please send me the homepage.”

Step 4 – HTTP Response: Google’s server processes the request and sends back an HTTP response containing the web page content encoded in HTML (HyperText Markup Language).

Step 5 – Rendering: The browser reads the HTML code and renders (displays) the Google homepage on the user’s screen.

Key protocols involved: DNS (name resolution) and HTTP (web communication), both working at the application layer. HTML is the markup language used to format the content, not a protocol itself.

Question 15 (MCQ)

Which of the following statements about the session layer is TRUE?
A) The session layer is always required for all network communications
B) The session layer provides dialogue discipline but NOT checkpointing
C) In many cases, there is little or no need for session layer services
D) The session layer handles translation between different encoding systems

Answer: C) In many cases, there is little or no need for session layer services
Detailed Explanation: This is directly stated in the PDF: “In many cases, there will be little or no need for session-layer services, but for some applications, such services are used.” The session layer is optional – not all applications need dialogue control, grouping, or checkpointing. Option A is wrong because it says “always required.” Option B is wrong because the session layer provides BOTH dialogue discipline AND checkpointing (and grouping). Option D is wrong because translation is a presentation layer function, not session layer.

Question 16 (List and Explain)

Explain the difference between full duplex and half duplex communication as controlled by the session layer. Give one practical network example for each type.

Full Duplex (Two-way simultaneous): Both communicating devices can send and receive data at the same time. Neither side needs to wait for the other to finish. Example: A VoIP (Voice over IP) phone call – both people can speak and hear each other simultaneously, just like a regular phone call. The session layer allows this two-way simultaneous dialogue.

Half Duplex (Two-way alternate): Only one device can send at a time. The other must wait until the sender finishes before it can transmit. Example: A telnet/SSH session where a user sends a command to a remote server and must wait for the server’s response before sending the next command. The session layer enforces the turn-taking between user and server.

Key difference: Full duplex = both at same time (like phone). Half duplex = take turns (like walkie-talkie). The session layer’s dialogue discipline function determines which mode is used for a particular application.

Question 17 (Fill in the Blanks)

When data is encrypted, the sender transforms the original information (called ___) into another unreadable form (called ___). The process of converting it back at the receiver side is called ___. This function is performed by the ___ layer of the OSI model. A real-world use of this is in ___ protocol for secure web browsing.

When data is encrypted, the sender transforms the original information (called plaintext) into another unreadable form (called ciphertext). The process of converting it back at the receiver side is called decryption. This function is performed by the Presentation layer of the OSI model. A real-world use of this is in HTTPS protocol for secure web browsing.

Question 18 (MCQ – Multiple Select)

Which of the following protocols operate at the Application layer of the OSI model? (Select ALL that apply)
A) DNS
B) HTTP
C) TCP
D) FTP
E) IP

Answers: A) DNS, B) HTTP, D) FTP
Detailed Explanation: DNS, HTTP, and FTP are all application layer protocols (Layer 7). They provide direct services to user applications. TCP (C) operates at the Transport layer (Layer 4) – it provides reliable data delivery. IP (E) operates at the Network layer (Layer 3) – it handles routing and addressing. Remember: application layer protocols are the ones users directly interact with (web browsing, file transfer, name resolution), while TCP and IP work behind the scenes.

Question 19 (Short Answer)

Why was the session layer created as a separate layer in the OSI model instead of embedding its functions into individual applications at the application layer?

The session layer was created as a separate layer because its functions – dialogue control, grouping, and checkpointing – have widespread applicability across many different applications. Instead of every application developer having to implement these features independently (which would cause duplication, inconsistency, and extra work), the OSI model organized these common dialogue-structuring tools into a single reusable layer. This way, any application that needs half-duplex control, data grouping, or checkpointing can simply use the session layer’s services without reinventing the wheel. It follows the principle of modularity – put commonly needed functions in one place so all applications can benefit.

Question 20 (MCQ)

An Ethiopian university student uses both a smartphone and a desktop computer to check email. She wants to see the same emails on both devices and wants emails she read on the phone to appear as “read” on the desktop too. Which email receiving protocol should she use?
A) SMTP
B) POP3
C) IMAP4
D) FTP

Answer: C) IMAP4
Detailed Explanation: IMAP4 is the correct choice because it keeps emails on the server after downloading and synchronizes state across devices. When she reads an email on her phone, IMAP4 updates the server to mark it as “read.” When she checks from the desktop, the server tells it that the email is already “read.” With POP3 (B), emails would be downloaded and deleted from the server – once she checks from the phone, the emails would disappear from the server and not be available on the desktop. SMTP (A) is for sending, not receiving. FTP (D) is for file transfer. The key requirement in the question is “same emails on both devices” and “read status synchronized” – only IMAP4 provides this.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top