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.
- 110 marksNumericalShannon capacity calculationHideAnswer
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
Part A: Services Provided by Data Link Layer [6 Marks]
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
Parameter Value 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.
- 210 marksCircuit switching advantages and disadvantHideAnswer
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;...
- 310 marksNumericalTCP reliability mechanismsHideAnswer
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:
- Connection-Oriented: Establishes a connection via a 3-way handshake (SYN, SYN-ACK, ACK) before data transfer.
- Acknowledgement (ACK): Receiver acknowledges received segments; unacknowledged segments are retransmitted after timeout.
- Error Detection (Checksum): Corrupted segments are detected and discarded, then retransmitted.
- Sequencing: Sequence numbers allow reordering of out-of-order segments and detection of lost data.
- Flow Control: A sliding window prevents overwhelming the receiver.
- 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:
Subnet Subnet ID Subnet Mask First Host Last Host Broadcast 1 192.168.1.0 255.255.255.224 192.168.1.1 192.168.1.30 192.168.1.31 2 192.168.1.32 255.255.255.224 192.168.1.33 192.168.1.62 192.168.1.63 3 192.168.1.64 255.255.255.224 192.168.1.65 192.168.1.94 192.168.1.95 4 192.168.1.96 255.255.255.224 192.168.1.97 192.168.1.126 192.168.1.127 5 192.168.1.128 255.255.255.224 192.168.1.129 192.168.1.158 192.168.1.159 6 192.168.1.160 255.255.255.224 192.168.1.161 192.168.1.190 192.168.1.191 7 192.168.1.192 255.255.255.224 192.168.1.193 192.168.1.222 192.168.1.223 8 192.168.1.224 255.255.255.224 192.168.1.225 192.168.1.254 192.168.1.255 Summary:
Parameter Value Original Network 192.168.1.0/24 Subnets 8 Bits Borrowed 3 New Prefix /27 Subnet Mask 255.255.255.224 Block Size 32 addresses Usable Hosts 30 per subnet - 45 marksIPv4 vs IPv6 differencesHideAnswer
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 ...
- 55 marksLink State routing protocol featuresHideAnswer
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...
- 65 marksDNS domain name resolutionHideAnswer
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
Component Role DNS Resolver Client-side component that initiates the query Root Name Server Top of the DNS hierarchy; knows TLD servers TLD Name Server Handles top-level domains (.com, .org, .np, etc.) Authoritative Name Server Holds the actual DNS records for the domain Local DNS Server First server contacted; may have cached results
Step-by-Step Name Resolution Process
Example: A user types
www.example.comin a browser.User's PC --> Local DNS --> Root Server --> TLD Server --> Authoritative ServerStep 1: Browser Cache Check
- The browser first checks its local cache to see if the IP for
www.example.comis 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.comTLD 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
.comTLD 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.comhas IP address93.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.34to 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 Type Description Recursive Query Client asks resolver to get the full answer Iterative Query Server 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.cominto 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. - The browser first checks its local cache to see if the IP for
- 75 marksUnguided transmission mediaHideAnswer
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...
- 85 marksNumericalDigital signal encoding NRZ-LHideAnswer
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...
- 95 marksNumericalCRC transmitted frame encodingHideAnswer
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
11011001000by101110000101 <-- 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 segment XOR with Result Bring down 110110110110+1 → 1101110110110110+0 → 1100110010110111+0 → 1110111010110101+1 → 1011101110110000+0 → 00000000(leading 0, no XOR) 000end Remainder (CRC) =
000Step 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
11011001000by the same generator1011:1011 ) 11011001000 ... (identical division) ... 000 <-- remainderRemainder =
000Step 2.5: Decision
Remainder Decision 000No error - accept the frame non-zero Error detected - reject / retransmit Since the remainder is
000, the receiver concludes the frame was received without error.
Summary
Parameter Value Message 11011001Generator ($x^3+x+1$) 1011Appended message 11011001000CRC (remainder) 000Transmitted frame 11011001000Receiver remainder 000→ No error - Message bit stream (M):
- 105 marksAttenuation distortion and noiseHideAnswer
What are the major differences between noise, distortion and attenuation? [5]
Differences Between Noise, Distortion, and Attenuation
Definitions and Key Differences
Feature Noise Distortion Attenuation Definition Unwanted random signals added to the original signal during transmission Change in the shape/form of the signal due to different propagation speeds of signal components Gradual loss of signal strength/energy as it travels through a medium Cause External interference (thermal, electromagnetic, crosstalk) Different frequency components arriving at different times Resistance of the transmission medium Effect on Signal Adds foreign/random components to the signal Alters the waveform shape Reduces the amplitude/power of the signal Nature Additive and random Deterministic (related to medium properties) Predictable and progressive Reversibility Difficult to reverse Partially correctable with equalizers Can be corrected using amplifiers or repeaters Example Static/hiss on a telephone line Signal spreading in a coaxial cable Signal 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.
- 115 marksPure ALOHA protocol procedureHideAnswer
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...
- 125 marksSliding Window ProtocolHideAnswer
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
Type Description Go-Back-N On error, retransmit the erroneous frame and all subsequent frames Selective Repeat Only 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
Method Purpose GET Retrieve a resource POST Submit data to the server PUT Update a resource DELETE Delete a resource HEAD Retrieve headers only HTTP Message Format
Request:
GET /index.html HTTP/1.1 Host: www.example.com Connection: keep-aliveResponse:
HTTP/1.1 200 OK Content-Type: text/html Content-Length: 1024 <html>...</html>HTTP Status Codes
Code Meaning 200 OK (Success) 301 Moved Permanently 404 Not Found 500 Internal 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