Computer Networks
Difficulty Level: 1 (Recognition — MCQ, Matching, True/False with justification) Time Limit: 20 minutes Total Marks: 30
Section A — Multiple Choice (1 mark each)
Q1. In the OSI model, which PDU (Protocol Data Unit) is associated with the Transport layer? (1) a) Frame b) Packet c) Segment d) Bit
Q2. The TCP/IP model has how many layers? (1) a) 4 b) 5 c) 6 d) 7
Q3. Which encoding scheme guarantees a transition in the middle of every bit period, providing self-clocking? (1) a) NRZ b) Manchester c) NRZI d) Unipolar
Q4. According to the Nyquist theorem, the maximum data rate of a noiseless channel of bandwidth Hz with signal levels is: (1) a) b) c) d)
Q5. Which access method is used by Wi-Fi (IEEE 802.11)? (1) a) CSMA/CD b) CSMA/CA c) Token passing d) TDMA
Q6. The CIDR notation /26 corresponds to how many usable host addresses in an IPv4 subnet? (1)
a) 62 b) 64 c) 30 d) 126
Q7. Which NAT type translates only the source IP address of outgoing packets (many-to-one using ports is a variant)? (1) a) DNAT b) SNAT c) PAT d) Static NAT
Q8. An IPv6 address is how many bits long? (1) a) 32 b) 64 c) 128 d) 256
Q9. ARP resolves which mapping? (1) a) IP → MAC b) MAC → IP c) Domain → IP d) IP → Port
Q10. Which routing protocol uses Dijkstra's shortest-path algorithm? (1) a) RIP b) BGP c) OSPF d) ARP
Q11. How many bytes is the standard UDP header? (1) a) 4 b) 8 c) 12 d) 20
Q12. The TCP connection is established using: (1) a) 2-way handshake b) 3-way handshake c) 4-way handshake d) 1-way handshake
Q13. In TCP congestion control, during slow start the congestion window grows: (1) a) linearly b) exponentially c) constant d) logarithmically
Q14. Which DNS record maps a hostname to an IPv6 address? (1) a) A b) AAAA c) CNAME d) MX
Q15. HTTP/3 runs over which transport protocol via QUIC? (1) a) TCP b) UDP c) SCTP d) ICMP
Section B — Matching (5 marks)
Q16. Match each protocol/term (left) to its layer or category (right). Write pairs e.g. A-3. (5)
| Left | Right |
|---|---|
| A. Ethernet (802.3) | 1. Application layer |
| B. IP | 2. Data Link layer |
| C. TCP | 3. Network layer |
| D. HTTP | 4. Transport layer |
| E. HPACK | 5. HTTP/2 header compression |
Section C — True / False WITH Justification (2 marks each: 1 mark verdict, 1 mark justification)
Q17. "A stateful firewall tracks the state of active connections, whereas a stateless firewall inspects each packet in isolation." True or False? Justify. (2)
Q18. "In distance-vector routing, the count-to-infinity problem arises because routers share their entire link-state database with all neighbors." True or False? Justify. (2)
Q19. "The Shannon–Hartley theorem gives channel capacity considering noise, while Nyquist assumes a noiseless channel." True or False? Justify. (2)
Q20. "In a class C network with default mask, a /24 provides 254 usable host addresses." True or False? Justify. (2)
Answer keyMark scheme & solutions
Section A (1 mark each — correct option only)
Q1. c) Segment — Transport layer PDU is a segment (TCP) / datagram (UDP). Why: PDU naming: L2=frame, L3=packet, L4=segment.
Q2. a) 4 — TCP/IP: Application, Transport, Internet, Network Access.
Q3. b) Manchester — Manchester encoding has a guaranteed mid-bit transition (self-clocking); NRZ has none.
Q4. a) — Nyquist maximum rate for noiseless channel.
Q5. b) CSMA/CA — Wi-Fi cannot detect collisions on wireless medium, so it avoids them.
Q6. a) 62 — /26 → 6 host bits → usable.
Q7. b) SNAT — Source NAT rewrites source IP; PAT is the port-based many-to-one variant.
Q8. c) 128
Q9. a) IP → MAC
Q10. c) OSPF — Link-state protocol using Dijkstra.
Q11. b) 8 — Source port, dest port, length, checksum (2 bytes each).
Q12. b) 3-way handshake — SYN, SYN-ACK, ACK.
Q13. b) exponentially — cwnd doubles each RTT until ssthresh.
Q14. b) AAAA
Q15. b) UDP
Section B
Q16. A-2, B-3, C-4, D-1, E-5. (1 mark each correct pair; total 5)
- Ethernet = Data Link (2)
- IP = Network (3)
- TCP = Transport (4)
- HTTP = Application (1)
- HPACK = HTTP/2 compression (5)
Section C
Q17. TRUE (1). Justification (1): Stateful firewalls maintain a connection/state table (tracking TCP handshake state, established flows) and permit return traffic for known sessions; stateless firewalls apply rules to each packet independently based on headers (IP, port), with no memory of prior packets.
Q18. FALSE (1). Justification (1): Distance-vector routers share only their distance/routing vectors (destinations + hop counts) with neighbors, not a link-state database. Count-to-infinity arises from slow convergence when routers believe outdated route advertisements after a link failure. (Sharing full topology databases is link-state, e.g. OSPF.)
Q19. TRUE (1). Justification (1): Shannon–Hartley: accounts for noise. Nyquist: assumes a noiseless channel with levels.
Q20. TRUE (1). Justification (1): /24 = 24 network bits, 8 host bits → usable addresses (subtracting network and broadcast).
[
{"claim":"/26 gives 62 usable hosts","code":"host_bits=32-26; result=(2**host_bits-2)==62"},
{"claim":"/24 gives 254 usable hosts","code":"host_bits=32-24; result=(2**host_bits-2)==254"},
{"claim":"UDP header is 8 bytes (4 fields x 2 bytes)","code":"result=(4*2)==8"},
{"claim":"IPv6 address is 128 bits","code":"result=(8*16)==128"}
]