2082

BIT254 · TU past paper

Network and Data Communications 2082 question paper

The complete TU 2082 exam paper for Network and Data Communications (BIT254), all 12 questions with solved model answers written to the mark scheme.

Tap a question to open its answer.

  1. 110 marksNumericalShannon capacity calculationAnswer

    What are the services provided by Data Link Layer?A channel has a bandwidth of 5 MHz and a signal-to-noise ratio of 1000. Calculate the Shannon Capacity.[6+4]

    Data Link Layer Services & Shannon Capacity


    The Data Link Layer (Layer 2 of the OSI model) provides reliable transit of data across a physical link. Its main services are:

    1. Framing

    The bit stream received from the Network Layer is divided into manageable units called frames. A header and trailer are added to mark the start and end of each frame.

    2. Physical (MAC) Addressing

    A header containing the MAC addresses of the sender and receiver is added, enabling frame delivery between devices on the same network.

    3. Flow Control

    When the sender transmits faster than the receiver can absorb, the layer applies a flow-control mechanism to prevent receiver buffer overflow.

    4. Error Control

    Mechanisms to detect and retransmit damaged or lost frames are provided, along with prevention of duplicate frames. Techniques include CRC, parity, and checksums.

    5. Access Control

    On a shared medium, protocols decide which device controls the link at a given moment, avoiding collisions (e.g., CSMA/CD, Token passing).

    6. Reliable (Node-to-Node) Delivery

    Uses acknowledgements (ACK) and retransmission schemes such as ARQ to ensure error-free node-to-node delivery.


    Part B: Shannon Capacity Calculation [4 Marks]

    Given data

    ParameterValue
    Bandwidth $B$$5\ \text{MHz} = 5 \times 10^6\ \text{Hz}$
    Signal-to-Noise Ratio (SNR)$1000$

    Formula

    $$C = B \times \log_2(1 + \text{SNR})$$

    Step 1: Substitute

    $$C = 5 \times 10^6 \times \log_2(1 + 1000) = 5 \times 10^6 \times \log_2(1001)$$

    Step 2: Evaluate the logarithm

    $$\log_2(1001) = \frac{\log_{10}(1001)}{\log_{10}(2)} = \frac{3.00043}{0.30103} \approx 9.9672$$

    Step 3: Compute capacity

    $$C = 5 \times 10^6 \times 9.9672 \approx 49.836 \times 10^6\ \text{bps}$$

    $$\boxed{C \approx 49.84\ \text{Mbps} \approx 50\ \text{Mbps}}$$

    Interpretation

    This is the theoretical maximum data rate of the channel. No transmission scheme, regardless of the number of signal levels, can exceed this limit.

  2. 210 marksCircuit switching advantages and disadvantAnswer

    Differentiate between packet and circuit switched network.Explain the layers of OSI Reference Model in brief.[4+6]

    --- (a) Difference Between Packet Switched and Circuit Switched Network Feature Circuit Switched Network Packet Switched Network --------- Connection A dedicated physical path is established before communication begins No dedicated path;...

  3. 310 marksNumericalTCP reliability mechanismsAnswer

    Why TCP is known as reliable protocol? Explain.Divide the network 192.168.1.0/24 into 8 subnets and find its subnet ID, subnet mask, broadcast address and network ranges of each.[2+8]

    TCP as a Reliable Protocol & Subnetting

    STEP 1: Given Data

    • Network: 192.168.1.0/24
    • Original subnet mask: 255.255.255.0
    • Required number of subnets: 8

    STEP 2: Solution

    (a) Why TCP is a Reliable Protocol?

    TCP (Transmission Control Protocol) is called reliable because it guarantees accurate, ordered, and complete delivery of data through the following mechanisms:

    1. Connection-Oriented: Establishes a connection via a 3-way handshake (SYN, SYN-ACK, ACK) before data transfer.
    2. Acknowledgement (ACK): Receiver acknowledges received segments; unacknowledged segments are retransmitted after timeout.
    3. Error Detection (Checksum): Corrupted segments are detected and discarded, then retransmitted.
    4. Sequencing: Sequence numbers allow reordering of out-of-order segments and detection of lost data.
    5. Flow Control: A sliding window prevents overwhelming the receiver.
    6. Congestion Control: Adjusts transmission rate to avoid network congestion and packet loss.

    Hence, TCP ensures no data is lost, duplicated, or delivered out of order.


    (b) Subnetting 192.168.1.0/24 into 8 Subnets

    Step 1 - Subnet bits needed: $$2^n \geq 8 \implies 2^3 = 8 \implies n = 3 \text{ bits}$$

    Step 2 - New prefix and mask: $$/24 + 3 = /27$$

    4th octet: $11100000_2 = 224$

    $$\text{Subnet Mask} = 255.255.255.224$$

    Step 3 - Block size: $$256 - 224 = 32 \text{ addresses per subnet (30 usable hosts)}$$

    Step 4 - Subnet Table:

    SubnetSubnet IDSubnet MaskFirst HostLast HostBroadcast
    1192.168.1.0255.255.255.224192.168.1.1192.168.1.30192.168.1.31
    2192.168.1.32255.255.255.224192.168.1.33192.168.1.62192.168.1.63
    3192.168.1.64255.255.255.224192.168.1.65192.168.1.94192.168.1.95
    4192.168.1.96255.255.255.224192.168.1.97192.168.1.126192.168.1.127
    5192.168.1.128255.255.255.224192.168.1.129192.168.1.158192.168.1.159
    6192.168.1.160255.255.255.224192.168.1.161192.168.1.190192.168.1.191
    7192.168.1.192255.255.255.224192.168.1.193192.168.1.222192.168.1.223
    8192.168.1.224255.255.255.224192.168.1.225192.168.1.254192.168.1.255

    Summary:

    ParameterValue
    Original Network192.168.1.0/24
    Subnets8
    Bits Borrowed3
    New Prefix/27
    Subnet Mask255.255.255.224
    Block Size32 addresses
    Usable Hosts30 per subnet
  4. 45 marksIPv4 vs IPv6 differencesAnswer

    Write down the major difference between IPv4 and IPv6 protocol. [5]

    Note: Reference notes were not available for this topic. The following answer is based on standard networking curriculum covered in BSc CSIT. --- Feature IPv4 IPv6 --------- Address Length 32-bit address 128-bit address Address Notation ...

  5. 55 marksLink State routing protocol featuresAnswer

    Explain Link State Routing with suitable example. [5]

    Link State Routing is a dynamic routing algorithm where each router has complete knowledge of the entire network topology. Every router broadcasts information about its directly connected links (neighbors and link costs) to all other rou...

  6. 65 marksDNS domain name resolutionAnswer

    What is DHCP? Explain DNS name resolution process with suitable example. [1+4]

    DHCP and DNS Name Resolution


    What is DHCP? [1 Mark]

    DHCP (Dynamic Host Configuration Protocol) is a network management protocol used to automatically assign IP addresses and other network configuration parameters (such as subnet mask, default gateway, and DNS server address) to devices on a network, so they can communicate on an IP network without manual configuration.


    DNS Name Resolution Process [4 Marks]

    DNS (Domain Name System) is a hierarchical, distributed naming system that translates human-readable domain names (e.g., www.example.com) into machine-readable IP addresses (e.g., 93.184.216.34).


    Components Involved

    ComponentRole
    DNS ResolverClient-side component that initiates the query
    Root Name ServerTop of the DNS hierarchy; knows TLD servers
    TLD Name ServerHandles top-level domains (.com, .org, .np, etc.)
    Authoritative Name ServerHolds the actual DNS records for the domain
    Local DNS ServerFirst server contacted; may have cached results

    Step-by-Step Name Resolution Process

    Example: A user types www.example.com in a browser.

    User's PC --> Local DNS --> Root Server --> TLD Server --> Authoritative Server
    

    Step 1: Browser Cache Check

    • The browser first checks its local cache to see if the IP for www.example.com is already stored.
    • If not found, the query is passed to the OS resolver.

    Step 2: Query to Local DNS Server (Recursive Resolver)

    • The client sends a recursive query to the Local DNS Server (configured via DHCP or manually).
    • The local DNS server checks its own cache.
    • If not cached, it begins the resolution process on behalf of the client.

    Step 3: Query to Root Name Server

    • The local DNS server sends a query to one of the 13 Root Name Servers.
    • The root server does not know the IP of www.example.com, but it knows the address of the .com TLD Name Server.
    • Root server replies: "Ask the .com TLD server at IP X.X.X.X"

    Step 4: Query to TLD Name Server

    • The local DNS server queries the .com TLD Name Server.
    • The TLD server does not know the exact IP, but knows the Authoritative Name Server for example.com.
    • TLD server replies: "Ask the authoritative server for example.com at IP Y.Y.Y.Y"

    Step 5: Query to Authoritative Name Server

    • The local DNS server queries the Authoritative Name Server for example.com.
    • This server has the actual A record (Address record) for www.example.com.
    • It replies: "www.example.com has IP address 93.184.216.34"

    Step 6: Response to Client

    • The local DNS server caches the result (for future queries) and sends the IP address back to the client.
    • The browser can now connect to 93.184.216.34 to load the website.

    Diagram

    Client
      |
      | (1) Query: www.example.com?
      v
    Local DNS Server
      |
      | (2) Query to Root Server
      v
    Root Name Server --> "Try .com TLD Server"
      |
      | (3) Query to TLD Server
      v
    .com TLD Server --> "Try example.com Authoritative Server"
      |
      | (4) Query to Authoritative Server
      v
    Authoritative Server --> "IP = 93.184.216.34"
      |
      | (5) Final Answer returned to Client
      v
    Client connects to 93.184.216.34
    

    Types of DNS Queries

    Query TypeDescription
    Recursive QueryClient asks resolver to get the full answer
    Iterative QueryServer returns the best answer it knows (referral)

    Note: The query from client to local DNS is typically recursive; queries from local DNS to other servers are typically iterative.


    Summary

    The DNS name resolution process converts www.example.com into an IP address through a hierarchical chain: Local DNS Server → Root Server → TLD Server → Authoritative Server, ultimately returning the IP address to the requesting client.

  7. 75 marksUnguided transmission mediaAnswer

    Discuss different unguided transmission medium in brief. [5]

    Definition: Unguided (wireless) transmission media transmit electromagnetic signals through free space (air) without using any physical conductor. The signal is broadcast and can travel in multiple directions. --- - Frequency range: 3 KH...

  8. 85 marksNumericalDigital signal encoding NRZ-LAnswer

    Encode the bit stream 111001011 with: (i) Manchester (ii) NRZ-I and (iii) NRZ-L scheme. [5]

    • Bit stream to encode: $1\ 1\ 1\ 0\ 0\ 1\ 0\ 1\ 1$ (9 bits) - Schemes required: (i) Manchester, (ii) NRZ-I, (iii) NRZ-L Note: These are standard line-coding schemes. I follow the conventions used in Forouzan (TU curriculum standard). An...
  9. 95 marksNumericalCRC transmitted frame encodingAnswer

    A bit stream 11011001 is transmitted using a standard CRC method. The generator polynomial is $x^3 + x - 1$. Show the actual bit string transmitted and show the error checking on the receiver side. [5]

    CRC (Cyclic Redundancy Check) - Worked Solution

    Step 1 - EXTRACT: Given Data

    • Message bit stream (M): 11011001 (8 bits)
    • Generator polynomial: $x^3 + x - 1$
    • In modulo-2 (GF(2)) arithmetic, $-1 \equiv +1$, so $x^3 + x - 1 = x^3 + x + 1$
    • Generator (G): 1011 (4 bits, degree $r = 3$)

    Step 2 - SOLVE

    Step 2.1: Append $r = 3$ zeros to the message

    $$M' = 11011001 ,|, 000 = 11011001000$$

    Step 2.2: Sender-side XOR division of 11011001000 by 1011

            10000101   <-- quotient
          ______________
    1011 ) 11011001000
           1011
           ----
            1101
            1011
            ----
             01100
              1011
              ----
               01110
                1011
                ----
                 01011
                  1011
                  ----
                   00000
                     000  <-- remainder (CRC)
    

    Step trace (leading-bit alignment, XOR when leading bit = 1):

    Working segmentXOR withResultBring down
    110110110110+1 → 1101
    110110110110+0 → 1100
    110010110111+0 → 1110
    111010110101+1 → 1011
    101110110000+0 → 0000
    0000(leading 0, no XOR)000end

    Remainder (CRC) = 000

    Step 2.3: Actual transmitted bit string

    $$\text{Transmitted} = M ,|, \text{CRC} = 11011001 ,|, 000$$

    $$\boxed{11011001000}$$

    Step 2.4: Receiver-side error checking

    Receiver divides the received frame 11011001000 by the same generator 1011:

    1011 ) 11011001000
           ... (identical division) ...
                     000  <-- remainder
    

    Remainder = 000

    Step 2.5: Decision

    RemainderDecision
    000No error - accept the frame
    non-zeroError detected - reject / retransmit

    Since the remainder is 000, the receiver concludes the frame was received without error.


    Summary

    ParameterValue
    Message11011001
    Generator ($x^3+x+1$)1011
    Appended message11011001000
    CRC (remainder)000
    Transmitted frame11011001000
    Receiver remainder000 → No error
  10. 105 marksAttenuation distortion and noiseAnswer

    What are the major differences between noise, distortion and attenuation? [5]

    Differences Between Noise, Distortion, and Attenuation


    Definitions and Key Differences

    FeatureNoiseDistortionAttenuation
    DefinitionUnwanted random signals added to the original signal during transmissionChange in the shape/form of the signal due to different propagation speeds of signal componentsGradual loss of signal strength/energy as it travels through a medium
    CauseExternal interference (thermal, electromagnetic, crosstalk)Different frequency components arriving at different timesResistance of the transmission medium
    Effect on SignalAdds foreign/random components to the signalAlters the waveform shapeReduces the amplitude/power of the signal
    NatureAdditive and randomDeterministic (related to medium properties)Predictable and progressive
    ReversibilityDifficult to reversePartially correctable with equalizersCan be corrected using amplifiers or repeaters
    ExampleStatic/hiss on a telephone lineSignal spreading in a coaxial cableSignal weakening over long fiber optic cable

    Brief Explanations

    1. Noise

    • Noise is any unwanted energy that gets mixed with the transmitted signal.
    • It is random and unpredictable.
    • Types include: thermal noise, impulse noise, crosstalk, and intermodulation noise.
    • It degrades the signal-to-noise ratio (SNR).

    2. Distortion

    • Distortion occurs when the shape of the signal changes during transmission.
    • It is common in composite signals where each frequency component travels at a different speed.
    • The signal arrives with components out of phase, altering the original waveform.
    • It is a deterministic problem related to medium characteristics.

    3. Attenuation

    • Attenuation is the loss of signal energy as the signal propagates through a medium.
    • It increases with distance and frequency.
    • Measured in decibels (dB).
    • It can be compensated by using amplifiers (analog) or repeaters (digital).

    Summary

    Noise adds unwanted signals, distortion changes the signal shape, and attenuation reduces the signal strength. All three are major impairments in data communication but differ in their cause, nature, and remedy.

  11. 115 marksPure ALOHA protocol procedureAnswer

    Briefly explain ALOHA and Slotted ALOHA protocol with suitable diagram. [5]

    Note: Reference notes were not available for this topic; the following answer is based on standard networking curriculum covered in TU BSc CSIT. --- ALOHA is one of the earliest random access protocols developed at the University of Hawa...

  12. 125 marksSliding Window ProtocolAnswer

    Write Short notes on: Sliding Window Protocol HTTP Protocol [0+2.5+2.5]

    Short Notes

    1. Sliding Window Protocol

    The Sliding Window Protocol is a flow control and error control mechanism used in data link layer and transport layer protocols to allow efficient transmission of multiple frames before requiring acknowledgment.

    Key Concepts

    • Instead of sending one frame and waiting for an ACK (as in Stop-and-Wait), the sender can transmit multiple frames up to a window size W without waiting for acknowledgment.
    • The window represents the number of frames that can be outstanding (sent but not yet acknowledged) at any time.
    • Both sender and receiver maintain a window of sequence numbers.

    Working Principle

    Sender Window (W=4):
    [0][1][2][3] --> can send these without ACK
         ^--- as ACKs arrive, window slides forward
    
    • When an ACK is received for a frame, the window slides forward, allowing new frames to be sent.
    • Sequence numbers are used cyclically; for a window size W, sequence numbers range from 0 to 2^n - 1 (where n is the number of bits).

    Types

    TypeDescription
    Go-Back-NOn error, retransmit the erroneous frame and all subsequent frames
    Selective RepeatOnly the erroneous frame is retransmitted

    Advantages

    • Increases link utilization and throughput
    • Reduces idle time compared to Stop-and-Wait
    • Efficiency = W / (1 + 2a), where a = propagation delay / transmission time

    2. HTTP Protocol (HyperText Transfer Protocol)

    HTTP is an application layer protocol used for transferring hypermedia documents (HTML, images, etc.) on the World Wide Web. It follows a client-server model.

    Key Features

    • Stateless Protocol: Each request is independent; the server does not retain session information between requests.
    • Default Port: 80 (HTTP), 443 (HTTPS)
    • Connection Types:
      • Non-persistent HTTP: A new TCP connection is established for each object/request.
      • Persistent HTTP: Multiple objects can be sent over a single TCP connection.

    HTTP Request Methods

    MethodPurpose
    GETRetrieve a resource
    POSTSubmit data to the server
    PUTUpdate a resource
    DELETEDelete a resource
    HEADRetrieve headers only

    HTTP Message Format

    Request:

    GET /index.html HTTP/1.1
    Host: www.example.com
    Connection: keep-alive
    

    Response:

    HTTP/1.1 200 OK
    Content-Type: text/html
    Content-Length: 1024
    
    <html>...</html>
    

    HTTP Status Codes

    CodeMeaning
    200OK (Success)
    301Moved Permanently
    404Not Found
    500Internal Server Error

    HTTP Versions

    • HTTP/1.0: Non-persistent by default
    • HTTP/1.1: Persistent connections, pipelining supported
    • HTTP/2: Multiplexing, header compression, faster performance

    Advantages

    • Simple and human-readable
    • Platform independent
    • Widely supported across all browsers and servers