Engineering, Management, Agriculture and Veterinary MCQs are now live. FPSC, PPSC, EPE, IELTS & GRE coming soon.

Computer Networks: OSI and TCP/IP Models

Electrical Engineering · Computer Networks

27 questions, each with the answer and a worked solution.

Practice interactively and track your score →
Question 1

How many layers does the OSI reference model have?

  1. Three
  2. Four
  3. Seven
  4. Five
Show answer & solution

Answer: (C) Seven

It was developed by the ISO.

Question 2

Which layer of the OSI model is responsible for reliable end-to-end data delivery?

  1. Transport layer
  2. Physical layer
  3. Network layer
  4. Session layer
Show answer & solution

Answer: (A) Transport layer

TCP operates at this layer.

Question 3

Which OSI layer is responsible for routing packets between networks using logical addresses?

  1. Data link layer
  2. Network layer
  3. Transport layer
  4. Physical layer
Show answer & solution

Answer: (B) Network layer

IP operates at the network layer.

Question 4

Which OSI layer uses MAC addresses and organises bits into frames?

  1. Application layer
  2. Network layer
  3. Physical layer
  4. Data link layer
Show answer & solution

Answer: (D) Data link layer

Switches operate at this layer.

Question 5

Which OSI layer deals with the transmission of raw bits over the physical medium?

  1. Data link layer
  2. Network layer
  3. Physical layer
  4. Session layer
Show answer & solution

Answer: (C) Physical layer

It defines voltages, cables and connectors.

Question 6

Which OSI layer handles data encryption, compression and format translation?

  1. Presentation layer
  2. Session layer
  3. Transport layer
  4. Network layer
Show answer & solution

Answer: (A) Presentation layer

It ensures data is readable by the receiving application.

Question 7

Which OSI layer establishes, manages and terminates communication sessions?

  1. Transport layer
  2. Presentation layer
  3. Data link layer
  4. Session layer
Show answer & solution

Answer: (D) Session layer

It provides dialogue control and synchronisation.

Question 8

Which OSI layer provides network services directly to user applications?

  1. Network layer
  2. Application layer
  3. Session layer
  4. Physical layer
Show answer & solution

Answer: (B) Application layer

HTTP, FTP and SMTP are application-layer protocols.

Question 9

What is the correct order of OSI layers from bottom to top?

  1. Physical, Network, Data Link, Transport, Session, Application, Presentation
  2. Network, Physical, Transport, Data Link, Session, Presentation, Application
  3. Physical, Data Link, Network, Transport, Session, Presentation, Application
  4. Application, Presentation, Session, Transport, Network, Data Link, Physical
Show answer & solution

Answer: (C) Physical, Data Link, Network, Transport, Session, Presentation, Application

A common mnemonic is "Please Do Not Throw Sausage Pizza Away".

Question 10

How many layers does the TCP/IP model have?

  1. Four
  2. Five
  3. Seven
  4. Two
Show answer & solution

Answer: (A) Four

They are Network Access, Internet, Transport and Application.

Question 11

Which TCP/IP layer corresponds to the OSI network layer?

  1. Transport layer
  2. Network access layer
  3. Application layer
  4. Internet layer
Show answer & solution

Answer: (D) Internet layer

IP and ICMP operate here.

Question 12

What is the protocol data unit at the transport layer called when using TCP?

  1. Packet
  2. Segment
  3. Frame
  4. Bit
Show answer & solution

Answer: (B) Segment

UDP data units are often called datagrams.

Question 13

What is the protocol data unit at the network layer called?

  1. Frame
  2. Bit
  3. Segment
  4. Packet
Show answer & solution

Answer: (D) Packet

Routers forward packets.

Question 14

What is the protocol data unit at the data link layer called?

  1. Packet
  2. Segment
  3. Frame
  4. Message
Show answer & solution

Answer: (C) Frame

Frames carry MAC addresses and error checks.

Question 15

What is encapsulation in networking?

  1. Adding headers (and trailers) to data as it passes down the protocol layers
  2. Removing headers
  3. Compressing data only
  4. Encrypting data only
Show answer & solution

Answer: (A) Adding headers (and trailers) to data as it passes down the protocol layers

Decapsulation occurs at the receiver.

Question 16

Which organisation developed the OSI reference model?

  1. IETF
  2. ISO
  3. ITU only
  4. IEEE
Show answer & solution

Answer: (B) ISO

The IETF develops Internet protocols.

Question 17

Which two sublayers make up the data link layer in IEEE LAN standards?

  1. Session and Presentation
  2. Logical Link Control (LLC) and Media Access Control (MAC)
  3. Transport and Application
  4. Physical and Network
Show answer & solution

Answer: (B) Logical Link Control (LLC) and Media Access Control (MAC)

The MAC sublayer controls access to the medium.

Question 18

At which OSI layer does a router mainly operate?

  1. Physical layer
  2. Data link layer
  3. Network layer
  4. Application layer
Show answer & solution

Answer: (C) Network layer

It uses IP addresses to forward packets.

Question 19

At which OSI layer does a hub operate?

  1. Physical layer
  2. Transport layer
  3. Network layer
  4. Data link layer
Show answer & solution

Answer: (A) Physical layer

It repeats signals to all ports.

Question 20

What is the main purpose of a layered network model?

  1. To make networks slower
  2. To remove protocols
  3. To increase cost
  4. To divide complex communication into manageable functions with standard interfaces
Show answer & solution

Answer: (D) To divide complex communication into manageable functions with standard interfaces

Layers allow equipment from different vendors to work together.

Question 21

Which OSI layer is responsible for flow control and segmentation of data?

  1. Presentation layer
  2. Transport layer
  3. Physical layer
  4. Network layer
Show answer & solution

Answer: (B) Transport layer

It breaks data into segments and reassembles them.

Question 22

Which OSI layer is responsible for error detection using frame check sequences?

  1. Application layer
  2. Physical layer
  3. Data link layer
  4. Session layer
Show answer & solution

Answer: (C) Data link layer

A CRC is included in each Ethernet frame.

Question 23

At which OSI layer does a switch normally operate?

  1. Physical layer
  2. Network layer
  3. Data link layer
  4. Application layer
Show answer & solution

Answer: (C) Data link layer

It forwards frames using MAC addresses.

Question 24

Which layer in the TCP/IP model corresponds to the OSI physical and data link layers?

  1. Transport layer
  2. Internet layer
  3. Application layer
  4. Network access (link) layer
Show answer & solution

Answer: (D) Network access (link) layer

Ethernet and Wi-Fi operate here.

Question 25

At which OSI layer do protocols such as HTTP, FTP and DNS operate?

  1. Transport layer
  2. Application layer
  3. Network layer
  4. Physical layer
Show answer & solution

Answer: (B) Application layer

They provide services directly to user applications.

Question 26

At which OSI layer does encryption such as SSL/TLS conceptually operate?

  1. Presentation layer
  2. Physical layer
  3. Data link layer
  4. Network layer
Show answer & solution

Answer: (A) Presentation layer

In practice TLS sits between transport and application.

Question 27

What is the main role of port numbers at the transport layer?

  1. Identifying the cable
  2. Identifying the network
  3. Identifying the application or service on a host
  4. Identifying the MAC address
Show answer & solution

Answer: (C) Identifying the application or service on a host

IP addresses identify hosts; ports identify processes.

Practice these 27 questions interactively →