Network Layer MCQs for NSCT

By the NSCT Exam Editorial Team · Updated 2026-11-24 · Facts checked against official sources on 2026-11-24

The network layer moves packets from a source host to a destination host across many networks, using logical (IP) addresses and routers. It is topic 4 of the Computer Networks and Cloud Computing area, which carries 10% of the NSCT according to HEC's Areas of Competencies. Networks was one of the weakest areas in 2026, at 39.6% accuracy, per the HEC NSCT report and APP, and subnetting arithmetic is a big reason to practise this topic.

The layer sits above the data link layer, which only delivers frames across one link, and below the transport layer, which delivers data to processes.

IPv4

IPv4 (Internet Protocol version 4) is the connectionless, best-effort protocol that carries most Internet traffic. An address is 32 bits, written as four decimal octets such as 192.168.10.77. The header is 20 to 60 bytes and includes TTL (time to live), protocol, checksum, and the fields used for fragmentation.

Field What it does
TTL Decremented by 1 at each router; the packet is dropped at 0
Header checksum Covers the header only, so routers recompute it after changing TTL
Identification, flags, fragment offset Let the destination reassemble fragments

Private ranges (RFC 1918) are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Exam angle: fragment offsets count 8-byte units, not bytes.

Subnetting

Subnetting splits one network into smaller ones by borrowing host bits for the network part. With h host bits, a subnet has 2^h addresses and 2^h − 2 usable hosts, because the all-zeros (network) and all-ones (broadcast) addresses are reserved.

Example: 192.168.1.0/26 has 6 host bits, so 64 addresses and 62 usable hosts. Its mask is 255.255.255.192 and its broadcast address is 192.168.1.63.

Prefix Mask Addresses Usable hosts
/24 255.255.255.0 256 254
/26 255.255.255.192 64 62
/28 255.255.255.240 16 14
/30 255.255.255.252 4 2

Exam angle: find the block size (256 minus the interesting mask octet), then the multiple of it that contains the host. For full drills, see subnetting practice.

CIDR

CIDR (Classless Inter-Domain Routing) replaced the old Class A, B and C system with a prefix length written after a slash, such as /22. It allows blocks of any size and lets routers advertise one summary instead of many routes.

Example: 200.10.0.0/24, 200.10.1.0/24, 200.10.2.0/24 and 200.10.3.0/24 aggregate exactly to 200.10.0.0/22. Routers forward with longest-prefix match: when several routes contain the destination, the most specific one wins. Exam angle: a summary must not cover blocks you do not own, or it attracts traffic you cannot deliver.

Routing

Routing builds the tables that forwarding uses. Forwarding is the local, per-packet step of choosing an output port; routing is the network-wide process that fills the table.

Distance vector Link state
Knowledge Neighbours' distance estimates Full map of the area
Algorithm Bellman-Ford Dijkstra
Example RIP (16 hops = infinity) OSPF
Known weakness Count-to-infinity Flooding overhead

BGP is a path-vector protocol used between autonomous systems. Example: if A reaches B at cost 2 and B is 5 from D, while A reaches C at cost 4 and C is 1 from D, then A's cost to D is min(2 + 5, 4 + 1) = 5, via C. Exam angle: add your own link cost before comparing neighbours' distances. The routing algorithms page goes deeper.

IPv6

IPv6 uses 128-bit addresses written as eight hexadecimal groups. You may drop leading zeros in each group and replace one run of zero groups with ::. For example, fe80:0000:0000:0000:0202:b3ff:fe1e:8329 becomes fe80::202:b3ff:fe1e:8329.

The base header is a fixed 40 bytes with no checksum. Routers never fragment; only the source does. There is no broadcast, so multicast takes its place. Exam angle: :: may appear only once in an address.

Common traps

Worked examples

Understanding. Which IPv4 header field stops a packet from circling a routing loop forever? Answer: TTL. Each router decrements it and discards the packet at 0, sending an ICMP Time Exceeded message back to the source.

Application. A host is 172.16.45.200/21. What are its network and broadcast addresses, and how many usable hosts does the subnet have? Answer: 172.16.40.0, 172.16.47.255 and 2,046 hosts. A /21 keeps 5 bits of the third octet, so blocks step by 8; 40 to 47 contains 45. There are 11 host bits: 2^11 − 2 = 2,046.

Analysis. A router holds 192.168.0.0/16, 192.168.32.0/19 and 192.168.40.0/21. Which routes do packets to 192.168.47.10 and 192.168.50.1 use? Answer: the /21 and the /19. 192.168.40.0/21 spans 40.0 to 47.255, so it matches 47.10 and is the longest match. 50.1 falls outside the /21 but inside 192.168.32.0/19 (32.0 to 63.255), which beats the /16.

Practise

The quiz below has 99 Network Layer questions, which you can filter by tier and difficulty.

Practise: 99 questions

Interactive quiz loading. The first 10 questions are shown below.

  1. How long is an IPv6 address?

    1. 32 bits
    2. 64 bits
    3. 128 bits
    4. 48 bits
    Show answer

    Answer: C. 128 bits

    An IPv6 address is 128 bits, normally written as eight groups of four hexadecimal digits. IPv4 addresses are 32 bits and Ethernet MAC addresses are 48 bits.

  2. In IPv6, which device is allowed to fragment a packet that is too large for the next link?

    1. Any router on the path
    2. Only the first-hop router
    3. Only the destination host
    4. Only the source host
    Show answer

    Answer: D. Only the source host

    IPv6 routers never fragment. If a packet is too big, the router drops it and sends an ICMPv6 Packet Too Big message, and the source host fragments using a Fragment extension header (path MTU discovery). In IPv4, routers may fragment.

  3. Which of these is NOT a valid IPv6 address?

    1. 2001:db8:0:0:1::5
    2. fe80::1
    3. 2001:db8:0:0:0:0:2:1
    4. 2001:db8::1::5
    Show answer

    Answer: D. 2001:db8::1::5

    The double colon (::) replaces one run of all-zero groups and may appear only once; with two of them the number of zero groups in each gap would be ambiguous. The other three expand to exactly eight groups.

  4. In RIP, which hop count is treated as 'infinity' (unreachable)?

    1. 16
    2. 15
    3. 255
    4. 64
    Show answer

    Answer: A. 16

    RIP uses hop count as its metric and allows a maximum of 15 hops. A metric of 16 means the destination is unreachable, which limits how far count-to-infinity can climb.

  5. OSPF computes its routing table using which approach?

    1. Distance vector with Bellman-Ford
    2. Path vector with AS-path lists
    3. Link state with Dijkstra's shortest-path algorithm
    4. Flooding every data packet to all routers
    Show answer

    Answer: C. Link state with Dijkstra's shortest-path algorithm

    OSPF is a link-state protocol: each router floods link-state advertisements, builds a full map of the area and runs Dijkstra's algorithm. RIP is distance vector (Bellman-Ford) and BGP is path vector.

  6. Which routing protocol is used between autonomous systems on the Internet?

    1. OSPF
    2. BGP
    3. RIP
    4. IS-IS
    Show answer

    Answer: B. BGP

    BGP (Border Gateway Protocol) is the inter-domain, path-vector protocol that exchanges reachability between autonomous systems. OSPF, RIP and IS-IS are interior gateway protocols used inside one AS.

  7. The count-to-infinity problem is a known weakness of which class of routing algorithm?

    1. Link state
    2. Path vector
    3. Distance vector
    4. Static routing
    Show answer

    Answer: C. Distance vector

    In distance-vector routing, routers learn only their neighbours' distance estimates, so after a link failure two routers can keep raising their costs through each other. Split horizon and poisoned reverse reduce the problem. Link-state routers hold the full topology and do not suffer it in this form.

  8. What is the main job of NAT on a home router?

    1. Translate domain names into IP addresses
    2. Assign IP addresses to hosts automatically
    3. Map many private addresses to one public address
    4. Encrypt traffic leaving the network
    Show answer

    Answer: C. Map many private addresses to one public address

    Network Address Translation rewrites private source addresses (and, with PAT, source ports) to the router's public address, so many hosts share one public IPv4 address. Name lookup is DNS, automatic addressing is DHCP and encryption is IPsec or TLS.

  9. Which protocol finds the MAC address that belongs to a known IPv4 address on the local network?

    1. ARP
    2. ICMP
    3. DHCP
    4. RARP
    Show answer

    Answer: A. ARP

    ARP broadcasts 'who has this IP?' and the owner replies with its MAC address. RARP did the reverse (MAC to IP) and is obsolete. Textbooks differ on ARP's layer: Forouzan places it in the network layer, while others describe it as sitting between layers 2 and 3.

  10. How does traceroute discover the routers along a path?

    1. It asks each router for its routing table with RIP requests
    2. It records the route in an IP option on a single packet
    3. It sends packets with increasing TTL values and reads the ICMP Time Exceeded replies
    4. It uses ARP to find each router's MAC address
    Show answer

    Answer: C. It sends packets with increasing TTL values and reads the ICMP Time Exceeded replies

    Traceroute sends probes with TTL 1, 2, 3 and so on. Each router that decrements TTL to 0 discards the probe and returns an ICMP Time Exceeded message, revealing its address. The destination finally answers, for example with Port Unreachable or Echo Reply.

FAQs

How do I find the network address quickly?

Work out the block size in the octet where the mask is not 255 or 0: 256 minus that mask value. The network address is the largest multiple of the block size that does not exceed the host's value in that octet. The broadcast address is the next multiple minus 1. For 10.1.1.77/27, the block is 32, so the network is 10.1.1.64 and the broadcast is 10.1.1.95.

Is ARP part of the network layer?

Textbooks disagree. Forouzan treats ARP as a network-layer helper protocol, while Tanenbaum and others describe it as working between the data link and network layers, because it maps IP addresses to MAC addresses on one link. For an exam, remember what it does: it finds the MAC address for a known IPv4 address on the local network.

Do I still need to learn IP address classes?

Yes, at least briefly. Classful addressing is obsolete and CIDR replaced it, but questions still ask which class an address belongs to. Class A first octets run from 0 to 127, Class B from 128 to 191, Class C from 192 to 223, Class D (multicast) from 224 to 239 and Class E from 240 to 255.

Why can't IPv6 routers fragment packets?

IPv6 moved fragmentation to the source to make routers simpler and faster. If a packet is too big for the next link, the router drops it and returns an ICMPv6 Packet Too Big message. The source then sends smaller packets, using path MTU discovery and, if needed, a Fragment extension header.

Next step

Continue with Transport Layer MCQs, go back to the Networks & Cloud hub, or test yourself under time pressure in an NSCT mock test.