Computer Networks MCQs for NSCT
A computer network is a set of devices (nodes) connected by links so they can share data and resources. This topic covers how networks are organised: the OSI and TCP/IP layered models, physical topologies, network types by size, and the devices that join them. It is the second topic in the Computer Networks and Cloud Computing area, which carries 10% of the NSCT according to HEC's Areas of Competencies. The area had the second-lowest 2026 accuracy, 39.6%, per the HEC NSCT report and APP.
OSI vs TCP/IP
A layered model splits networking into jobs, each layer using the services of the one below. The OSI model is a seven-layer reference model. TCP/IP is the model the internet actually runs on.
| OSI layer | Job | PDU | Example | TCP/IP layer |
|---|---|---|---|---|
| 7 Application | Services to the user | Message | HTTP, DNS | Application |
| 6 Presentation | Translation, encryption, compression | TLS, JPEG | Application | |
| 5 Session | Dialogue control, checkpoints | RPC | Application | |
| 4 Transport | Process-to-process delivery (ports) | Segment | TCP, UDP | Transport |
| 3 Network | Host-to-host delivery, routing (IP addresses) | Packet | IP, ICMP | Internet / network |
| 2 Data link | Node-to-node delivery, framing (MAC addresses) | Frame | Ethernet | Link |
| 1 Physical | Bits on the medium | Bits | Cables, hubs | Link |
Textbooks differ on TCP/IP's layer count. RFC 1122 and many courses use four layers (link, internet, transport, application). Forouzan and Kurose-Ross use five, splitting the link layer into data link and physical. Both agree that TCP/IP has no separate session or presentation layer.
Exam angle: learn the PDU, address type and one protocol per layer. Questions like "which layer handles X" are common.
Topologies
A topology is the physical or logical layout of links.
| Topology | Links for n devices | Strength | Weakness |
|---|---|---|---|
| Mesh (full) | n(n - 1)/2, with n - 1 ports each | Robust, private, no traffic sharing | Cabling grows quadratically |
| Star | n (each to a hub or switch) | Easy to install and isolate faults | Central device is a single point of failure |
| Bus | 1 backbone plus drop lines | Cheap, little cable | Backbone break stops everything |
| Ring | n (each to two neighbours) | Simple to add one device | One break can disrupt the ring |
A full mesh of 8 devices needs 8 x 7 / 2 = 28 links, and each device needs 7 ports. Most real LANs are switched stars; hybrid topologies combine several types.
Exam angle: "n(n - 1)/2 links" and "n - 1 ports" are the two mesh numericals; do not mix them up.
Network types and devices
Networks are grouped by the area they cover:
- PAN: a few metres around one person, such as Bluetooth.
- LAN: a building or campus, usually Ethernet and Wi-Fi.
- MAN: a city.
- WAN: countries or continents, often leased lines; the internet is a network of networks.
Devices sit at different layers, and this decides how they split traffic.
| Device | Layer | Collision domains | Broadcast domains |
|---|---|---|---|
| Hub / repeater | Physical | One for all ports | One |
| Switch / bridge | Data link | One per port | One |
| Router | Network | One per port | One per interface |
Networks also differ by role: client-server (dedicated servers) versus peer-to-peer (each node both serves and requests).
Exam angle: a switch splits collision domains; only a router (or a VLAN) splits broadcast domains.
Common traps
- Saying a switch creates separate broadcast domains. It floods broadcasts to every port.
- Using n(n - 1) for mesh links, which counts each link twice.
- Placing encryption at the session layer instead of the presentation layer.
- Thinking IP addresses change at every router. MAC addresses change per hop; IP addresses stay the same unless NAT is used.
- Treating "TCP/IP has four layers" as the only right answer. Check whether the question follows the five-layer textbook view.
Worked examples
1. Understanding. Which layer uses port numbers to deliver data to the correct application? Answer: the transport layer. Ports identify processes, which gives process-to-process delivery. The network layer delivers only to the host.
2. Application. How many links and ports per device does a full mesh of 8 devices need? Answer: 28 links, 7 ports each. Links = 8 x 7 / 2 = 28. Each device connects to the 7 others.
3. Analysis. A router has two interfaces. Interface 1 goes to switch S1, which has three hubs attached. Interface 2 goes to switch S2, which has four hosts attached. Counting the switch-to-router links too, how many collision and broadcast domains are there? Answer: 9 collision domains, 2 broadcast domains. Every switch port is a collision domain: S1 has 3 hub ports plus its uplink (4), and S2 has 4 host ports plus its uplink (5). The router's two interfaces give two broadcast domains.
Practise
The quiz below has 100 questions on this topic, filterable by tier and difficulty.
Practise: 100 questions
FAQs
Why does the OSI model have 7 layers but TCP/IP only 4 or 5?
TCP/IP merges OSI's session and presentation jobs into its application layer, because real applications handle their own encoding and dialogue. The four-layer version also merges physical and data link into one link layer. OSI was designed as a general reference model; TCP/IP describes the protocols the internet actually uses.
What is the difference between a hub, a switch and a router?
A hub works at the physical layer and repeats every signal to every port. A switch works at the data link layer, learns MAC addresses and forwards each frame only to the right port. A router works at the network layer, forwards packets between networks using IP addresses, and blocks broadcasts.
Which topology is most reliable?
A full mesh, because every pair of devices has its own link, so one failed link does not isolate anyone. The cost is n(n - 1)/2 links, which becomes impractical for large networks. That is why mesh is used for small backbones, while LANs use switched stars.
Next step
Continue with the Data Link Layer MCQs (framing, CRC and Ethernet). For a deeper layer comparison, see OSI vs TCP/IP. Browse all topics on the Networks & Cloud hub, then take an NSCT mock test.