ITM 253

Computer Networking

TU BITM · Semester 4 · BITM curriculum and programme regulation

Requirement
required
Credits
3
Practice sets
5 sets

Practice sets and model questions

5 complete syllabus-aligned practice examinations with model-style questions and step-by-step solutions. Independently prepared by Paper Khoj, not issued by TU.

practice sets loaded.

Practice Set 1

Report problem

PAPER KHOJ

Practice Examination — Set 1

For BITM · Semester 4

Based on the prescribed TU Faculty of Management syllabus and examination structure

Independently prepared by Paper Khoj. This is not an official Tribhuvan University or Dean's Office question paper.

Course: ITM 253 · Computer Networking

Level: Bachelor of Information Technology Management (BITM) · Semester 4

Full Marks: 60

Time: 3 hrs.

Candidates are required to give their answers in their own words as far as practicable. The figures in the margin indicate full marks.

Group 'A'

Brief Answer Questions. Attempt all questions.

[5 × 2 = 10]
  1. [2]

    Compare the OSI 7-Layer Model with the TCP/IP 4-Layer Model in a comparative mapping diagram.

    View model answerHide model answer

    OSI vs. TCP/IP Model Mapping:

    OSI Reference Model (7 Layers) TCP/IP Protocol Architecture (4 Layers) Primary Protocols
    7. Application Layer <br> 6. Presentation Layer <br> 5. Session Layer Application Layer HTTP/HTTPS, DNS, SMTP, FTP, SSH, DHCP
    4. Transport Layer Transport Layer (Host-to-Host) TCP (Connection-oriented), UDP (Connectionless)
    3. Network Layer Internet Layer IPv4, IPv6, ICMP, ARP, OSPF, BGP
    2. Data Link Layer <br> 1. Physical Layer Network Access Layer (Link Layer) Ethernet (802.3), Wi-Fi (802.11), PPP, Fiber
  2. [2]

    Distinguish between Single-Mode and Multi-Mode Fiber Optic cables in terms of core diameter and transmission distance.

    View model answerHide model answer

    Single-Mode vs. Multi-Mode Fiber Optic Cables:

    • Single-Mode Fiber (SMF): Features an extremely narrow core diameter (8−10 μm8 - 10\ \mu\text{m}). Emits a single wavelength beam of laser light without modal dispersion, enabling long-haul telecommunication distances (>40−100 km> 40 - 100\text{ km}).
    • Multi-Mode Fiber (MMF): Features a much wider core diameter (50−62.5 μm50 - 62.5\ \mu\text{m}). Allows multiple light rays (modes) from LED sources to propagate simultaneously with modal dispersion, suitable for short-range campus LAN backbones (<550 m< 550\text{ m}).
  3. [2]

    What is the role of the Address Resolution Protocol (ARP) and what is ARP Cache Poisoning?

    View model answerHide model answer

    ARP & ARP Cache Poisoning:

    • Role: Maps a known 32-bit Logical IP address to a physical 48-bit Media Access Control (MAC) hardware address on a local broadcast network link.
    • ARP Poisoning (Spoofing): A malicious attack where an adversary broadcasts forged gratuitous ARP reply packets associating the attacker’s MAC address with the default gateway’s IP address, intercepting all outbound subnet traffic (Man-In-The-Middle attack).
  4. [2]

    Define the Bandwidth-Delay Product (BDP) of a network link and state its significance for TCP window sizing.

    View model answerHide model answer

    Bandwidth-Delay Product (BDP):

    BDP=Link Bandwidth (bits/sec)×Round-Trip Time (seconds)\mathbf{\text{BDP} = \text{Link Bandwidth (bits/sec)} \times \text{Round-Trip Time (seconds)}}
    • Significance: Measures the maximum volume of unacknowledged data “in flight” that can fill the network pipe at any instant. For maximum throughput, TCP’s receive window size (RWINRWIN) must be configured at least equal to the BDP.
  5. [2]

    What are the Private IPv4 Address ranges reserved under RFC 1918 for Class A, B, and C networks?

    View model answerHide model answer

    RFC 1918 Private IPv4 Address Ranges:

    1. Class A: 10.0.0.0 to 10.255.255.255 (10.0.0.0/8, 16,777,21616,777,216 addresses).
    2. Class B: 172.16.0.0 to 172.31.255.255 (172.16.0.0/12, 1,048,5761,048,576 addresses).
    3. Class C: 192.168.0.0 to 192.168.255.255 (192.168.0.0/16, 65,53665,536 addresses).

Group 'B'

Descriptive Answer Questions. Attempt any SIX questions.

[6 × 5 = 30]
  1. [5]

    Given the bit sequence 1101011011 and the generator polynomial G(x) = x^4 + x + 1, calculate the Cyclic Redundancy Check (CRC) checksum bits and determine the final transmitted codeword.

    View model answerHide model answer

    Cyclic Redundancy Check (CRC) Polynomial Division

    1. Formulate Generator and Appended Message:

    • Generator Polynomial: G(x)=x4+x1+x0  ⟹  100112G(x) = x^4 + x^1 + x^0 \implies \mathbf{10011_2} (Degree r=4r = 4).
    • Data message M=11010110112M = \mathbf{1101011011_2}.
    • Append r=4r = 4 zeros: M′=110101101100002M' = \mathbf{11010110110000_2}.

    2. Modulo-2 Binary Polynomial Division (XOR):

              1100001010  (Quotient)
            -------------------------
    10011 ) 11010110110000
            10011
            -----
             10011
             10011
             -----
              000010110
                  10011
                  -----
                   010100
                    10011
                    -----
                     01110 (Remainder)
    
    • Remainder after final division step: 11102\mathbf{1110_2} (4 bits).
    • CRC Checksum: 11102\mathbf{1110_2}.

    3. Transmitted Codeword:

    Transmitted Frame=M+Remainder=110101101111102\mathbf{\text{Transmitted Frame}} = M + \text{Remainder} = \mathbf{11010110111110_2}
  2. [5]

    Explain the CSMA/CD protocol used in legacy Ethernet networks. Detail the 1-persistent sensing, collision detection window, and binary exponential backoff algorithm.

    View model answerHide model answer

    CSMA/CD (Carrier Sense Multiple Access with Collision Detection)

    Protocol Workflow:

    1. Carrier Sense: Station listens to shared medium before transmitting. If idle, it transmits immediately (1-persistent). If busy, it waits until line becomes idle.
    2. Collision Detection: While transmitting, station monitors line voltage. If signal voltage exceeds collision threshold, transmission collides.
    3. Jamming Signal: Station immediately halts packet transmission and broadcasts a 32-to-48 bit Jamming Signal alerting all stations on the cable.
    4. Binary Exponential Backoff:
      • Station increments collision counter k=min⁡(attempt,10)k = \min(attempt, 10).
      • Chooses random delay slot r∈{0,1,2,…,2k−1}r \in \{0, 1, 2, \dots, 2^k - 1\}.
      • Waits backoff time Tbackoff=r×51.2 μsT_{\text{backoff}} = r \times 51.2\ \mu\text{s} (slot time) before re-attempting.
  3. [5]

    Explain the TCP 3-Way Handshake connection establishment and 4-Way Handshake connection termination with sequence/acknowledgment numbers and state transition diagrams.

    View model answerHide model answer

    TCP Connection Establishment and Teardown

    1. Three-Way Handshake (Connection Establishment):

    Client (SYN-SENT)                           Server (LISTEN -> SYN-RCVD)
          |                                              |
          | --- 1. SYN=1, Seq=1000 --------------------> |
          | <--- 2. SYN=1, ACK=1, Seq=5000, Ack=1001 --- |
          |                                              |
    (ESTABLISHED)                                  (ESTABLISHED)
          | --- 3. ACK=1, Seq=1001, Ack=5001 ----------> |
    
    • Step 1: Client initiates by sending SYN with initial sequence number (ISNc=1000ISN_c = 1000).
    • Step 2: Server acknowledges (Ack=1001Ack = 1001) and responds with its own ISNs=5000ISN_s = 5000 (SYN-ACK).
    • Step 3: Client acknowledges (Ack=5001Ack = 5001). Connection established!

    2. Four-Way Teardown (Connection Termination):

    1. Client sends FIN →\to Server replies ACK (Client enters FIN-WAIT-2).
    2. Server finishes sending remaining data and sends FIN.
    3. Client replies ACK and enters TIME-WAIT state (2×MSL2 \times MSL) to guarantee packet drain before port reuse.
  4. [5]

    Compare Distance Vector Routing (RIP) and Link State Routing (OSPF) across convergence speed, metric used, routing updates, and loop prevention mechanisms.

    View model answerHide model answer

    Distance Vector (RIP) vs. Link State (OSPF)

    Parameter Distance Vector (RIP) Link State (OSPF)
    Routing Algorithm Bellman-Ford algorithm. Dijkstra’s Shortest Path First (SPF) algorithm.
    Topology View “Routing by rumor”; router only knows distances reported by direct neighbors. Every router possesses a complete topological map of the entire autonomous area.
    Metric Simple Hop Count (Maximum 15 hops; 16 = infinity/unreachable). Cost based on interface bandwidth: Cost=108Bandwidth (bps)\text{Cost} = \frac{10^8}{\text{Bandwidth (bps)}}.
    Updates Broadcasts entire routing table periodically every 30 seconds. Event-driven Link State Advertisements (LSAs) flooded only on topology change.
    Convergence Slow convergence; susceptible to Count-to-Infinity problem. Very Fast; zero routing loops (Dijkstra tree).
  5. [5]

    Explain the Domain Name System (DNS) resolution process. Contrast Recursive DNS Query with Iterative DNS Query with a resolution flow diagram.

    View model answerHide model answer

    DNS Resolution Process: Recursive vs. Iterative

    DNS maps human-friendly hostnames (e.g., tu.edu.np) to machine routable IP addresses.

    Client Browser ---> (Recursive) ---> Local DNS Resolver (ISP / 8.8.8.8)
                                            |  ^
                    1. Iterative: Where is .np? |  | 2. Root Nameserver (.root)
                                            |  v
                    3. Iterative: Where is edu.np?|  | 4. TLD Nameserver (.np)
                                            |  v
                    5. Iterative: Where is tu.edu.np? 6. Authoritative Nameserver (tu.edu.np)
    
    • Recursive Query: Client offloads full burden of resolution onto the Local DNS Resolver. The resolver must return either the resolved IP address or a hard failure error.
    • Iterative Query: Resolver queries nameservers sequentially (Root →\to TLD →\to Authoritative). If a nameserver cannot answer, it refers the resolver to the next authoritative server down the tree.
  6. [5]

    What is Network Address Translation (NAT) and Port Address Translation (PAT)? Explain how PAT allows 500 private hosts to share a single public IP address.

    View model answerHide model answer

    Network Address Translation (NAT) & Port Address Translation (PAT)

    PAT (NAT Overload): Maps thousands of internal private IP addresses to a single public IP address by translating and tracking unique Layer 4 TCP/UDP port numbers.

    Private LAN (192.168.1.0/24)             PAT Router (Public IP: 202.70.64.1)       Internet
    Host A: 192.168.1.10:49152 --------> NAT Translation Table:
    Host B: 192.168.1.25:52114 --------> [ 192.168.1.10:49152 <-> 202.70.64.1:10001 ] ---> Web Server
                                         [ 192.168.1.25:52114 <-> 202.70.64.1:10002 ]
    

    How 500 Hosts Share One IP:

    1. TCP/UDP ports provide a 16-bit address space (216=65,5352^{16} = 65,535 ports).
    2. The router assigns each outbound internal connection a unique ephemeral public source port (10,000−65,00010,000 - 65,000).
    3. When response packets return, the router inspects destination port, consults its active NAT translation state table, and rewrites the header back to the corresponding private IP and port.

Group 'C'

Comprehensive / Extended Problem Questions. Attempt all questions.

[2 × 10 = 20]
  1. [10]

    An enterprise is allocated the IPv4 network block 192.168.10.0/24. Design a Variable Length Subnet Mask (VLSM) addressing scheme to satisfy the following departmental host requirements:

    • Department A (Engineering): 60 hosts
    • Department B (Administration): 28 hosts
    • Department C (Support): 14 hosts
    • WAN Point-to-Point Link: 2 hosts For each subnet, determine: Subnet Address, Subnet Mask (in slash and dotted decimal), First Usable Host, Last Usable Host, Broadcast Address, and Number of Unused Host Addresses.
    View model answerHide model answer

    Comprehensive VLSM Subnet Design: 192.168.10.0/24

    Order Departments by Decreasing Host Requirements:

    1. Dept A (60 hosts): Needs 2h−2≥60  ⟹  h=62^h - 2 \ge 60 \implies h = 6 host bits (26−2=622^6 - 2 = 62). Mask =32−6=/26= 32 - 6 = \mathbf{/26}.
    2. Dept B (28 hosts): Needs 2h−2≥28  ⟹  h=52^h - 2 \ge 28 \implies h = 5 host bits (25−2=302^5 - 2 = 30). Mask =32−5=/27= 32 - 5 = \mathbf{/27}.
    3. Dept C (14 hosts): Needs 2h−2≥14  ⟹  h=42^h - 2 \ge 14 \implies h = 4 host bits (24−2=142^4 - 2 = 14). Mask =32−4=/28= 32 - 4 = \mathbf{/28}.
    4. WAN Link (2 hosts): Needs 2h−2≥2  ⟹  h=22^h - 2 \ge 2 \implies h = 2 host bits (22−2=22^2 - 2 = 2). Mask =32−2=/30= 32 - 2 = \mathbf{/30}.

    VLSM Subnet Allocation Table:

    Department / Network Required Hosts Allocated Subnet Address & Mask Subnet Mask (Dotted Decimal) First Usable Host Last Usable Host Broadcast Address Wasted / Unused Hosts
    Dept A (Engineering) 60 192.168.10.0/26 255.255.255.192 192.168.10.1 192.168.10.62 192.168.10.63 2
    Dept B (Administration) 28 192.168.10.64/27 255.255.255.224 192.168.10.65 192.168.10.94 192.168.10.95 2
    Dept C (Support) 14 192.168.10.96/28 255.255.255.240 192.168.10.97 192.168.10.110 192.168.10.111 0
    WAN Link 2 192.168.10.112/30 255.255.255.252 192.168.10.113 192.168.10.114 192.168.10.115 0

    Address Space Efficiency:

    • Total Addresses Used =64+32+16+4=116= 64 + 32 + 16 + 4 = 116 addresses.
    • Remaining Unallocated Space =192.168.10.116= 192.168.10.116 to 192.168.10.255192.168.10.255 (140140 contiguous addresses available for future enterprise branch expansions).
  2. [10]

    Explain TCP Congestion Control mechanisms in detail. Contrast Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery. Draw the Congestion Window (cwnd) size trajectory curve over 20 transmission rounds demonstrating slow start threshold (ssthresh) transitions, triple duplicate ACKs, and timeout packet loss events.

    View model answerHide model answer

    TCP Congestion Control Architecture & Window Trajectory

    TCP prevents network collapse through four tightly coupled algorithms:

    cwnd (MSS)
      ^
    16|                   (ssthresh = 16)
      |                       /-----------\  (Triple Duplicate ACK at Round 12)
    12|                      /             \  --> Fast Recovery: ssthresh = 7, cwnd = 7
      |                     / (Congestion   \___________
     8|                    /   Avoidance:                \
      |                   /    +1 MSS/RTT)                \  (Timeout Loss at Round 16)
     4|       /----------/                                 \
      |      / (Slow Start:                                 \
     1|_____/   Doubles each RTT)                            \_____ (Restart Slow Start: cwnd=1)
      +------------------------------------------------------------------> Transmission Rounds
      0     2     4     6     8     10    12    14    16    18    20
    

    1. Detailed Phase Explanations:

    1. Slow Start (cwnd<ssthreshcwnd < ssthresh):
      • Starts with cwnd=1 MSScwnd = 1\text{ MSS} (or 2−4 MSS2 - 4\text{ MSS}).
      • For every received ACK, cwndcwnd increases by 1 MSS1\text{ MSS}   ⟹  \implies Doubles exponentially every RTT:
        cwndt+1=2×cwndtcwnd_{t+1} = 2 \times cwnd_t
    2. Congestion Avoidance (cwnd≥ssthreshcwnd \ge ssthresh):
      • Growth throttles to an Additive Increase: cwndcwnd increases by 1 MSS1\text{ MSS} per full RTT:
        cwndt+1=cwndt+1cwndtcwnd_{t+1} = cwnd_t + \frac{1}{cwnd_t}
    3. Fast Retransmit & Fast Recovery (Triple Duplicate ACKs):
      • Arrival of 3 identical duplicate ACKs indicates packet loss while network still has packet flow capacity.
      • Fast Retransmit: Re-transmits missing segment immediately without waiting for retransmission timer to expire.
      • Fast Recovery (TCP Reno):
        ssthresh=cwnd2=142=7 MSSssthresh = \frac{cwnd}{2} = \frac{14}{2} = 7\text{ MSS}
        cwnd=ssthresh+3 MSS=10 MSScwnd = ssthresh + 3\text{ MSS} = 10\text{ MSS}
        Resumes Additive Increase from 7 MSS without resetting to 1 MSS!
    4. Timeout Event (Catastrophic Congestion):
      • If a retransmission timer expires (timeout loss):
        ssthresh=cwnd2ssthresh = \frac{cwnd}{2}
        cwnd=1 MSS(Full reset to Slow Start)cwnd = 1\text{ MSS} \quad \text{(Full reset to Slow Start)}