⚡ CCSU Meerut · BCA 5th Semester · Exam Preparation
Computer Network BCA-503 Most Important Questions & Solved Exam Notebook
Master solved question bank of recurring CCSU examination questions (2014–2023) for Computer Network (BCA-503) with OSI 7 layers, TCP/IP, sliding window protocols, CSMA/CD, subnetting engineering, Dijkstra routing, RSA cryptography, and vector SVG diagrams.
Very Short Answer Questions & Telecommunication Fundamentals
CCSU Examination Blueprint: 5 Questions Compulsory • Total 15 Marks (75 Words Limit)
Q1. Differentiate between Simplex, Half-Duplex, and Full-Duplex transmission modes with real-world examples.
| Transmission Mode | Directionality of Data Flow | Channel Capacity Sharing | Real-World Example |
|---|---|---|---|
| Simplex | Strictly unidirectional (one-way). One device transmits only; the other receives only. | Entire bandwidth dedicated to single direction. | Keyboard to CPU, Television broadcast, FM radio. |
| Half-Duplex | Bidirectional, but only one direction at a time. Both can transmit and receive, but not simultaneously. | Bandwidth shared in time slices. | Walkie-Talkie (user presses PTT button to speak: "Over"). |
| Full-Duplex | Simultaneous bidirectional transmission. Both parties can send and receive at the exact same instant. | Channel divided into two independent transmission paths. | Mobile telephone call, Ethernet network switches. |
Q2. Compare Guided Transmission Media and Unguided Transmission Media.
| Feature | Guided Media (Bounded / Wired) | Unguided Media (Unbounded / Wireless) |
|---|---|---|
| Physical Carrier | Signals are guided along a physical solid metallic wire or glass conductor. | Electromagnetic waves propagate through open air, vacuum, or seawater. |
| Types & Examples | Twisted Pair (Cat6 Ethernet), Coaxial Cable (Cable TV), Optical Fiber (Glass core). | Radio Waves (Wi-Fi, Bluetooth), Microwaves (Satellite, 5G towers), Infrared (TV Remote). |
| Noise Immunity & Speed | High noise immunity, minimal attenuation, extremely high bandwidth (Gigabits/sec in Fiber). | Vulnerable to atmospheric interference, multipath fading, and lower transmission security. |
Q3. Differentiate between LAN, MAN, and WAN based on geographical span, ownership, and error rates.
| Parameter | LAN (Local Area Network) | MAN (Metropolitan Area Network) | WAN (Wide Area Network) |
|---|---|---|---|
| Geographic Span | Confined to a single room, building, or college campus ($< 1 ext{ to }2 ext{ km}$). | Spans an entire city or large municipal territory ($10 ext{ to }50 ext{ km}$). | Spans entire countries, continents, or the entire globe (worldwide). |
| Ownership | Privately owned and managed by a single organization/individual. | Owned by consortia of organizations or regional telecom operators. | Multiple public and private telecommunication service providers. |
| Data Rate & Error Rate | Very high speed ($100 ext{ Mbps to }10 ext{ Gbps}$); lowest bit error rate. | Moderate speed ($44 ext{ to }155 ext{ Mbps}$); moderate error rate. | Variable speeds; highest bit error rates due to lengthy terrestrial hops. |
Q4. Contrast Star Topology and Mesh Topology. What is the formula for physical links in a fully connected Mesh topology?
- Star Topology: All network host nodes are connected directly to a central hub/switch via point-to-point links. Requires $N$ physical links for $N$ devices. If a single node cable fails, only that node goes down; but if the central hub fails, the entire network collapses.
- Fully Connected Mesh Topology: Every node has a dedicated point-to-point link to every other node in the network. Provides absolute fault tolerance and zero traffic congestion.
• Total physical duplex links required: $rac{N(N - 1)}{2}$
• Total I/O ports required per device: $N - 1$
Example: For a 10-computer fully connected mesh network, links required = $rac{10 imes 9}{2} = 45$ cables!
Q5. List all 7 Layers of the ISO-OSI Reference Model in sequence from Layer 1 to Layer 7 with their Protocol Data Units (PDUs).
- Layer 1 - Physical Layer: Transmits raw unstructured bitstreams over physical transmission medium. (PDU: Bits).
- Layer 2 - Data Link Layer: Provides node-to-node error-free framing, MAC addressing, and flow control. (PDU: Frames).
- Layer 3 - Network Layer: Handles end-to-end logical IP addressing and packet routing across intermediate subnets. (PDU: Packets).
- Layer 4 - Transport Layer: Manages end-to-end process-to-process communication, port numbers, reliability, and segmentation. (PDU: Segments / Datagrams).
- Layer 5 - Session Layer: Establishes, manages, synchronizes, and terminates inter-application dialog sessions. (PDU: Data).
- Layer 6 - Presentation Layer: Handles character code translation (ASCII/EBCDIC), data compression, and TLS/SSL encryption. (PDU: Data).
- Layer 7 - Application Layer: Provides network services directly to end-user software applications (HTTP, FTP, DNS, SMTP). (PDU: Data).
Q6. What is Framing in Data Link Layer? Explain Bit Stuffing with a concrete example.
Framing is the process of dividing the physical layer's incoming bitstream into discrete, manageable data units called Frames by inserting recognizable boundary delimiters.
Bit Stuffing (HDLC Standard): Frames begin and end with a reserved flag byte 01111110 (six consecutive 1s). Whenever the transmitting hardware detects five consecutive '1' bits in the user payload data, it automatically injects ("stuffs") an extra '0' bit immediately after them. The receiver hardware strips every '0' appearing immediately after five consecutive '1's, guaranteeing the flag pattern never occurs inside payload data.
User Data:
011111101111110Stuffed Stream:
01111101011111010
Q7. Explain the principle of Cyclic Redundancy Check (CRC) for error detection.
Cyclic Redundancy Check (CRC) is a powerful polynomial division-based error detection code operating on binary bitstrings using Modulo-2 arithmetic (XOR addition without carries):
- A predefined generator polynomial $G(x)$ of degree $r$ is agreed upon by both sender and receiver.
- Sender appends $r$ zero bits to the original data bitstream $D$ and divides it by $G(x)$ using modulo-2 division.
- The remainder of this division (the $r$-bit CRC Checksum) replaces the appended zeros, creating the transmitted frame.
- The receiver divides the incoming frame by the identical $G(x)$. If the remainder is strictly zero, the frame is accepted as uncorrupted; otherwise, it is discarded.
Q8. Contrast Pure ALOHA and Slotted ALOHA with their maximum theoretical throughput formulas.
| Feature | Pure ALOHA | Slotted ALOHA |
|---|---|---|
| Transmission Timing | Continuous. Any station transmits whenever it has data ready (uncoordinated). | Discrete. Time is divided into synchronized slots. Stations can only transmit at the beginning of a time slot. |
| Vulnerable Collision Period | $2 imes T_{ ext{fr}}$ (Two complete frame transmission times). | $1 imes T_{ ext{fr}}$ (Reduced by half). |
| Throughput Formula | $S = G \cdot e^{-2G}$ | $S = G \cdot e^{-G}$ |
| Maximum Throughput ($S_{\max}$) | $18.4\%$ (occurs at load $G = 0.5$). | $36.8\%$ (occurs at load $G = 1.0$). Exactly twice Pure ALOHA! |
Q9. What is CSMA/CD? Why is there a minimum frame size restriction in Ethernet networks?
CSMA/CD (Carrier Sense Multiple Access with Collision Detection) is the media access control mechanism used in classic shared Ethernet (IEEE 802.3). A station listens to the channel before transmitting ("Listen Before Talk"). If the medium is busy, it waits; if idle, it transmits while continuously listening for collisions ("Listen While Talking"). If a collision occurs, it aborts transmission immediately, broadcasts a 32-bit jam signal, and executes Exponential Backoff.
Minimum Frame Size Rule: For a sender to reliably detect that its own frame collided at the furthest end of the cable, the sender must still be actively transmitting when the reflected collision signal arrives back. Hence, Frame Transmission Time ($T_{ ext{trans}}$) must be at least twice the maximum Propagation Delay ($T_{ ext{prop}}$):
$$rac{ ext{Frame Size}}{ ext{Bandwidth}} \ge 2 imes T_{ ext{prop}} \implies ext{Min Frame Size} = 2 imes T_{ ext{prop}} imes ext{Bandwidth}$$In standard 10 Mbps Ethernet, this calculates to exactly 64 bytes (512 bits).
Q10. Differentiate between IPv4 and IPv6 addressing architectures.
| Feature | IPv4 (Internet Protocol v4) | IPv6 (Internet Protocol v6) |
|---|---|---|
| Address Length | 32 bits (4 bytes). Yields $pprox 4.3 imes 10^9$ addresses ($2^{32}$). | 128 bits (16 bytes). Yields $pprox 3.4 imes 10^{38}$ addresses ($2^{128}$). |
| Address Representation | Dotted decimal notation: 192.168.1.1 |
Hexadecimal colon notation: 2001:0db8:85a3::8a2e:0370:7334 |
| Header Size | Variable (20 to 60 bytes including options). | Fixed 40-byte base header (faster hardware routing). |
| Security & Configuration | IPsec is optional; relies heavily on DHCP and NAT. | IPsec is natively mandated; supports Stateless Address Autoconfiguration (SLAAC). |
Q11. Explain the role of a Subnet Mask and Default Gateway in IP networking.
- Subnet Mask: A 32-bit bitmask of contiguous 1s followed by 0s that a host uses to perform a bitwise logical
ANDoperation with its IP address. This partitions the IP address into two components: the Network ID (bits set to 1) and the Host ID (bits set to 0). It informs the host whether a destination IP is on the local subnet or an outside remote network. - Default Gateway: The local IP address of the router interface connected to the host's subnet. When a host determines that a destination IP is outside its local subnet, it encapsulates the packet in a frame addressed to the Default Gateway's MAC address for external routing.
Q12. Differentiate between ARP (Address Resolution Protocol) and RARP (Reverse ARP).
| Protocol | Known Input | Resolved Output | Operational Mechanism |
|---|---|---|---|
| ARP | Logical IP Address (e.g. 192.168.1.50) |
Physical MAC Address (e.g. 00:1A:2B:3C:4D:5E) |
Broadcasts an ARP Request frame to local subnet: "Who has IP X? Tell MAC Y." Target replies with unicast ARP Reply. |
| RARP | Physical MAC Address | Logical IP Address | Used by diskless workstations during boot to discover their own assigned IP address from a centralized RARP/BOOTP/DHCP server. |
Q13. Contrast TCP and UDP transport layer protocols in a structured comparison table.
| Feature | TCP (Transmission Control Protocol) | UDP (User Datagram Protocol) |
|---|---|---|
| Connection Type | Connection-oriented (Requires 3-way handshake prior to data transfer). | Connectionless (Packets sent immediately without handshake). |
| Reliability | Guaranteed delivery with positive ACKs, checksums, sequencing, and automatic retransmissions. | Unreliable (Best-effort delivery). No ACKs; lost packets are not retransmitted. |
| Header Size | 20 bytes minimum (up to 60 bytes with options). | Fixed lightweight 8 bytes header. |
| Flow & Congestion Control | Supports Sliding Window flow control and AIMD congestion control. | No flow control and no congestion control. |
| Applications | HTTP/HTTPS (Web), FTP (File transfer), SMTP (Email), SSH. | DNS queries, VoIP calls, Video streaming, Online gaming. |
Q14. Describe the three steps of the TCP Three-Way Handshake for connection establishment.
- Step 1 (SYN): Client sends a TCP segment with the
SYNflag set to 1 and an initial sequence number $ISN_c = x$ to the server:SYN(Seq=x). Client entersSYN-SENTstate. - Step 2 (SYN-ACK): Server acknowledges the client's request with
ACK = x + 1, sets its own sequence number $ISN_s = y$, and sets bothSYNandACKflags:SYN-ACK(Seq=y, Ack=x+1). Server entersSYN-RECEIVEDstate. - Step 3 (ACK): Client responds with an acknowledgment
ACK = y + 1withSeq = x + 1:ACK(Seq=x+1, Ack=y+1). Both client and server enter theESTABLISHEDstate, ready for full-duplex data transfer.
Q15. Differentiate between Symmetric Key and Asymmetric Key Cryptography.
| Feature | Symmetric Key (Secret Key) | Asymmetric Key (Public Key) |
|---|---|---|
| Number of Keys | 1 shared secret key used for both encryption and decryption. | 2 mathematically paired keys: A Public Key (known to everyone) and a Private Key (kept secret). |
| Computation Speed | Extremely fast. Optimized for encrypting gigabytes of streaming data. | Computationally slow (requires modular exponentiation of large primes). |
| Key Distribution Problem | Severe challenge: How to securely transmit the secret key between parties over an insecure network? | Zero key distribution risk: Public key can be freely shared on public directories. |
| Standard Algorithms | AES (Advanced Encryption Standard), DES, 3DES, Blowfish. | RSA, Diffie-Hellman Key Exchange, ECC (Elliptic Curve). |
Analytical Protocols, CRC Math & Cryptographic Algorithms
CCSU Examination Blueprint: Attempt Any 2 of 3 Questions • Total 15 Marks (~200 Words + Derivations/Calculations)
Q16. Compare the ISO-OSI 7-Layer Reference Model with the TCP/IP 4-Layer Reference Model with an architectural mapping diagram.
The OSI Model was developed by the International Organization for Standardization (ISO) as a theoretical 7-layer framework, while the TCP/IP Model is the pragmatic 4-layer protocol suite powering the global Internet.
Key Differences:
- OSI clearly distinguishes between services, interfaces, and protocols; TCP/IP originally did not clearly separate these concepts.
- OSI supports both connectionless and connection-oriented communication in the network layer, but only connection-oriented in the transport layer. TCP/IP has only connectionless service in the Internet layer (IP), but supports both (TCP/UDP) in the transport layer.
Q17. Explain the Sliding Window Flow Control Protocol. Compare Go-Back-N ARQ and Selective Repeat ARQ with sender/receiver window sizes and retransmission strategies.
In Sliding Window Protocols, multiple frames can be in transit simultaneously without waiting for an immediate individual acknowledgment for each frame, keeping the high-bandwidth link fully utilized.
| Feature | Go-Back-N (GBN) ARQ | Selective Repeat (SR) ARQ |
|---|---|---|
| Sender Window Size ($W_s$) | $W_s = 2^m - 1$ (where $m$ is the sequence number bits). | $W_s = 2^{m-1}$ (Half the sequence number space). |
| Receiver Window Size ($W_r$) | Strictly $W_r = 1$ (Accepts only the single expected frame in exact sequence). | $W_r = 2^{m-1}$ ($W_s = W_r$). Out-of-order frames within the window are buffered. |
| Damaged / Lost Frame Reaction | Discards all subsequent frames even if received correctly. Sender must retransmit the damaged frame plus all $N$ frames sent after it! | Receiver buffers out-of-order frames and sends Negative Acknowledgment (NACK). Sender retransmits ONLY the specific damaged frame. |
| Acknowledgment Type | Cumulative ACKs ($ACK(n)$ confirms all frames up to $n-1$). | Individual / Selective ACKs. |
| Buffer Complexity | Minimal. Receiver requires only 1 frame buffer. | High. Receiver requires sorting and buffering logic. |
Q18. Given a user data bitstream $D = 1010001101$ and the Generator Polynomial $G(x) = x^4 + x^2 + 1$. Show the complete binary polynomial division to generate the CRC checksum and state the final transmitted codeword.
1. Setup:
- Data bitstream $D = 1010001101$ ($10$ bits).
- Generator polynomial: $G(x) = x^4 + x^2 + 1 \implies 1\cdot x^4 + 0\cdot x^3 + 1\cdot x^2 + 0\cdot x^1 + 1\cdot x^0$.
- Divisor in binary: $10101$ (Degree $r = 4$).
- Append $r = 4$ zeros to data: $10100011010000$.
2. Binary Modulo-2 Division (XOR Addition):
1000100110 <-- Quotient
10101 ) 10100011010000
10101
-----
000010110
10101
-----
00011100
10101
-----
010010
10101
-----
001110
10101
-----
01001 <-- Remainder (4-bit CRC: 1001)
3. Result:
- CRC Checksum: $R = 1001$
- Transmitted Codeword ($T$): Append $R$ to original data: $$\mathbf{T = 10100011011001}$$
- Verification: If receiver divides $10100011011001$ by $10101$, the final remainder will be strictly $0000$, confirming zero transmission bit errors.
Q19. Explain IPv4 Classful Addressing (Classes A, B, C, D, E) detailing leading bit patterns, default subnet masks, and network/host boundary ranges.
In original IPv4 architecture, the 32-bit address space ($2^{32} = 4,294,967,296$) was partitioned into five classes based on the high-order bits of the first octet:
| Class | Leading Bits | First Octet Range | NetID / HostID Partition | Default Subnet Mask | Max Networks / Hosts per Net |
|---|---|---|---|---|---|
| Class A | 0... |
$1 - 126$ | 8 bits NetID / 24 bits HostID | 255.0.0.0 (/8) |
126 networks / $16,777,214$ hosts |
| Class B | 10.. |
$128 - 191$ | 16 bits NetID / 16 bits HostID | 255.255.0.0 (/16) |
16,384 networks / $65,534$ hosts |
| Class C | 110. |
$192 - 223$ | 24 bits NetID / 8 bits HostID | 255.255.255.0 (/24) |
$2,097,152$ networks / 254 hosts |
| Class D | 1110 |
$224 - 239$ | N/A (Multicast Group ID) | None (Multicasting) | Reserved for Multicast Groups |
| Class E | 1111 |
$240 - 255$ | N/A | None (Experimental) | Reserved for Research / Future Use |
127.0.0.1 to 127.255.255.255 is reserved for Loopback testing (Host localhost). Host ID with all 0s = Network Address; Host ID with all 1s = Directed Broadcast Address.
Q20. Discuss the Distance Vector Routing Algorithm. What is the Count-to-Infinity Problem? Explain how Split Horizon and Poison Reverse resolve it.
Distance Vector Routing (RIP Protocol): An iterative, asynchronous routing algorithm based on the Bellman-Ford equation. Each router maintains a routing table containing the estimated shortest distance to every destination network and the next-hop router. Periodically, every router broadcasts its entire routing table only to its immediate direct neighbors.
$$D_x(y) = \min_v \{ c(x, v) + D_v(y) \}$$The Count-to-Infinity Problem:
While good news (link cost reductions) travels fast, bad news (link failures) propagates very slowly. Consider a linear topology $A - B - C$. If the link between $B$ and $C$ fails, $B$ detects the failure. However, $A$ had previously advertised that it can reach $C$ with cost 2 (via $B$). $B$ mistakenly thinks $A$ has an alternative path to $C$, so $B$ updates its cost to $C$ as $2 + 1 = 3$ via $A$. In the next round, $A$ updates its cost to $3 + 1 = 4$ via $B$. The metric increments indefinitely ($16 = \infty$ in RIP) in a slow routing loop.
Mitigation Techniques:
- Split Horizon: A router does not advertise routes back over the same interface from which it learned them. (If $A$ learns the route to $C$ through $B$, $A$ will never advertise a route to $C$ back to $B$).
- Poison Reverse: $A$ advertises the route back to $B$, but explicitly sets the metric to $\infty$ (16): "I can reach $C$ via you, so to me, reaching $C$ through anyone else is impossible." This immediately terminates the circular dependency.
Q21. Explain Link State Routing (OSPF). Describe Dijkstra's Shortest Path Algorithm steps with a network graph.
In Link State Routing (e.g. OSPF), every router discovers its direct neighbors, learns their link costs, constructs a Link State Packet (LSP), and floods it reliably to all routers in the entire autonomous system. Every router builds an identical global topology map of the network and independently runs Dijkstra's Shortest Path Algorithm with itself as the root to build its routing table.
Dijkstra's Algorithm Steps:
- Initialize set $N' = \{u\}$ (source node). For all other nodes $v$, set $D(v) = c(u, v)$ if directly connected, else $\infty$.
- Find node $w otin N'$ such that $D(w)$ is a minimum. Add $w$ to $N'$.
- Update $D(v)$ for all neighbors $v otin N'$ of $w$: $$D(v) = \min(D(v), D(w) + c(w, v))$$
- Repeat steps 2 and 3 until all nodes are included in $N'$.
Q22. Explain Congestion Control in TCP. Detail the four operational phases: Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery.
TCP modulates its transmission rate using a dynamic variable called the Congestion Window (cwnd). The actual window sent is $\min( ext{cwnd}, ext{rwnd})$.
- Slow Start Phase: Starts with $ ext{cwnd} = 1 ext{ MSS}$. For each ACK received, $ ext{cwnd}$ doubles every Round Trip Time (RTT) (exponential growth: $1 o 2 o 4 o 8 \dots$) until reaching the Slow Start Threshold (
ssthresh). - Congestion Avoidance (AIMD): When $ ext{cwnd} \ge ext{ssthresh}$, growth switches to linear: $ ext{cwnd}$ increases by exactly $1 ext{ MSS}$ per RTT (Additive Increase) to gently probe for available link bandwidth.
- Fast Retransmit: If the sender receives 3 duplicate ACKs for a missing packet, it infers packet loss immediately without waiting for the retransmission timer to expire, and retransmits the missing segment at once.
- Fast Recovery (TCP Reno): After 3 duplicate ACKs, $ ext{ssthresh}$ is halved ($ ext{ssthresh} = ext{cwnd} / 2$) and $ ext{cwnd}$ is set to $ ext{ssthresh} + 3 ext{ MSS}$ (Multiplicative Decrease). It stays in Congestion Avoidance rather than collapsing back to 1 MSS.
Q23. Explain the RSA Public-Key Cryptosystem. Given prime numbers $p = 3$ and $q = 11$, and encryption exponent $e = 7$. Compute the private decryption key $d$. Encrypt plaintext message $M = 5$ and verify decryption.
Step 1: Compute Modulus $n$ and Euler's Totient $\phi(n)$:
- $n = p imes q = 3 imes 11 = \mathbf{33}$
- $\phi(n) = (p - 1)(q - 1) = (3 - 1)(11 - 1) = 2 imes 10 = \mathbf{20}$
Step 2: Verify Encryption Key $e$ and Compute Decryption Key $d$:
- Given $e = 7$. Check $\gcd(e, \phi(n)) = \gcd(7, 20) = 1$ (Valid).
- Calculate private key $d$ such that $(d imes e) \equiv 1 \pmod{\phi(n)}$: $$(d imes 7) \equiv 1 \pmod{20} \implies 7d = 20k + 1$$ For $k = 1$: $7d = 21 \implies d = \mathbf{3}$.
- Public Key: $\{e, n\} = \{7, 33\}$ • Private Key: $\{d, n\} = \{3, 33\}$.
Step 3: Encryption of Plaintext $M = 5$:
$$C = M^e \pmod n = 5^7 \pmod{33}$$- $5^2 = 25 \equiv -8 \pmod{33}$
- $5^4 = (-8)^2 = 64 \equiv 31 \equiv -2 \pmod{33}$
- $5^6 = 5^4 imes 5^2 \equiv (-2) imes (-8) = 16 \pmod{33}$
- $C = 5^7 = 5^6 imes 5 \equiv 16 imes 5 = 80 \pmod{33}$
- $80 = (2 imes 33) + 14 \implies \mathbf{C = 14}$ (Ciphertext).
Step 4: Decryption of Ciphertext $C = 14$:
$$M = C^d \pmod n = 14^3 \pmod{33}$$- $14^2 = 196 = (5 imes 33) + 31 \equiv 31 \equiv -2 \pmod{33}$
- $14^3 = 14^2 imes 14 \equiv (-2) imes 14 = -28 \equiv \mathbf{5} \pmod{33}$
- Original Message Restored: $M = 5$. Proof verified!
Master Long Answer Questions, Architectural Blueprints & SVG Diagrams
CCSU Examination Blueprint: Attempt Any 3 of 5 Questions • Total 45 Marks (~500+ Words + Protocol Schemas + Diagrams)
Q24. Explain the ISO-OSI 7-Layer Reference Model in exhaustive detail. Discuss the primary functions, protocols, and Protocol Data Units (PDUs) of each layer. Draw an architectural diagram illustrating Data Encapsulation and Decapsulation as a packet travels between sender and receiver.
1. Principles of OSI Layering:
The Open Systems Interconnection (OSI) model was created by ISO to provide an open, standardized framework for multi-vendor telecommunications without modifying underlying hardware architectures. Each layer performs a specialized set of functions, communicating only with its immediate peer layer via Protocol Data Units (PDUs).
2. Detailed Layer-by-Layer Functionality:
- Layer 1 - Physical: Voltage levels, pinouts, timing, Manchester encoding, bit synchronization (RJ-45, Cat6, Fiber).
- Layer 2 - Data Link: Framing, physical 48-bit MAC addressing, error detection (CRC), flow control, media access (CSMA/CD). Divided into LLC (802.2) and MAC (802.3).
- Layer 3 - Network: Logical 32-bit IPv4/128-bit IPv6 addressing, routing (Dijkstra, Bellman-Ford), fragmentation & reassembly, traffic accounting.
- Layer 4 - Transport: Process-to-process communication via 16-bit Port numbers, segmentation, multiplexing, reliable delivery (TCP with 3-way handshake) or fast delivery (UDP).
- Layer 5 - Session: Checkpointing and token management for lengthy transactions, recovery synchronization points.
- Layer 6 - Presentation: Syntax and semantics of transmitted data, data compression (JPEG, MP3), character conversions (EBCDIC to ASCII), cryptography (TLS/SSL).
- Layer 7 - Application: Network virtual terminal, distributed database access, HTTP, HTTPS, SMTP, DNS, DHCP.
Q25. Detail the Sliding Window Flow Control Protocols (Stop-and-Wait, Go-Back-N, and Selective Repeat). Derive the mathematical channel utilization formula $\eta = rac{N}{1 + 2a}$. Solve a numerical problem calculating optimal sender window size for a high-bandwidth satellite link.
1. Derivation of Channel Utilization ($\eta$):
Let:
- $T_t = rac{L}{B} =$ Transmission time of a frame ($L$ bits, Bandwidth $B$).
- $T_p = rac{D}{V} =$ One-way propagation delay ($D$ distance, $V$ velocity of light in medium).
- Total time elapsed for 1 frame in Stop-and-Wait: $T_{ ext{total}} = T_t + 2 imes T_p$ (ignoring ACK transmission time and processing time).
- Let parameter $a = rac{T_p}{T_t}$. Then $T_{ ext{total}} = T_t(1 + 2a)$.
Efficiency ($\eta$) of Stop-and-Wait:
$$\eta_{ ext{Stop-and-Wait}} = rac{ ext{Useful Time}}{ ext{Total Time}} = rac{T_t}{T_t + 2T_p} = rac{1}{1 + 2a}$$Efficiency ($\eta$) of Pipelined Sliding Window (Window Size $N$):
$$\eta = rac{N imes T_t}{T_t + 2T_p} = rac{N}{1 + 2a} \quad ( ext{subject to } \eta \le 100\%)$$To achieve $100\%$ maximum channel utilization ($\eta = 1$), the optimal sender window size must be:
$$\mathbf{N_{ ext{optimal}} = 1 + 2a = 1 + 2\left(rac{T_p}{T_t} ight)}$$2. High-Yield University Numerical Problem:
Problem Statement: A satellite channel has a bandwidth of $B = 10 ext{ Mbps}$ and a one-way propagation delay of $T_p = 250 ext{ ms}$. Frame size is $L = 10,000 ext{ bits}$ (1.25 KB). Calculate: (a) Efficiency of Stop-and-Wait, (b) Optimal window size $N$ for $100\%$ efficiency, and (c) Minimum sequence number bits required for Selective Repeat ARQ.
Step-by-Step Solution:
- Compute Transmission Time ($T_t$): $$T_t = rac{L}{B} = rac{10,000 ext{ bits}}{10 imes 10^6 ext{ bps}} = 10^{-3} ext{ seconds} = 1 ext{ ms}$$
- Compute Parameter $a$: $$a = rac{T_p}{T_t} = rac{250 ext{ ms}}{1 ext{ ms}} = 250$$
- (a) Efficiency of Stop-and-Wait: $$\eta = rac{1}{1 + 2a} = rac{1}{1 + 2(250)} = rac{1}{501} pprox 0.00199 = \mathbf{0.2\%} \quad ( ext{Extremely poor utilization!})$$
- (b) Optimal Window Size for $100\%$ Utilization: $$N_{ ext{optimal}} = 1 + 2a = 1 + 2(250) = \mathbf{501 ext{ frames}}$$
- (c) Sequence Number Bits for Selective Repeat:
In Selective Repeat, sender window $W_s \le 2^{m-1} \implies 2^{m-1} \ge 501 \implies m - 1 \ge \lceil \log_2(501) ceil = 9 \implies \mathbf{m = 10 ext{ bits}}$.
Q26. Discuss the Medium Access Control (MAC) protocols. Derive the throughput formulas for Pure ALOHA and Slotted ALOHA. Explain the CSMA/CD mechanism with Binary Exponential Backoff and prove why Ethernet requires a minimum frame size of 64 bytes.
1. Derivation of ALOHA Throughput:
Assume frame arrival follows a Poisson distribution with average arrival rate $G$ frames per frame-time $T_{ ext{fr}}$:
$$P(k) = rac{G^k e^{-G}}{k!}$$- Pure ALOHA: A frame vulnerable period spans from $t_0 - T_{ ext{fr}}$ to $t_0 + T_{ ext{fr}}$, an interval of length $2 T_{ ext{fr}}$. The probability of zero other frames generated in this window is $P(0) = e^{-2G}$. $$ ext{Throughput } S = G \cdot P(0) = \mathbf{G \cdot e^{-2G}}$$ Differentiating with respect to $G$ and setting to 0 ($rac{dS}{dG} = e^{-2G}(1 - 2G) = 0$) gives maximum at $G = 0.5$: $$S_{\max} = 0.5 \cdot e^{-1} = rac{0.5}{2.718} pprox \mathbf{18.4\%}$$
- Slotted ALOHA: Transmission occurs only at discrete slot boundaries. Vulnerable period is halved to $1 T_{ ext{fr}}$. $$ ext{Throughput } S = G \cdot e^{-G}$$ Maximum occurs at $G = 1.0$: $$S_{\max} = 1.0 \cdot e^{-1} = rac{1}{2.718} pprox \mathbf{36.8\%}$$
2. Binary Exponential Backoff Algorithm:
- After collision $n$ ($1 \le n \le 16$), set $k = \min(n, 10)$.
- Choose a random integer $R$ uniformly from the range $[0, 2^k - 1]$.
- Wait $R imes ext{Slot Time}$ ($512 ext{ bit times} = 51.2 ext{ }\mu ext{s}$ in 10 Mbps Ethernet) before attempting retransmission.
- If $n = 16$ collisions occur consecutively, the sender aborts transmission and reports a severe network error.
Q27. Given the Class C network block 192.168.10.0/24. An enterprise requires 4 distinct subnets for Administration, Faculty, Labs, and Library, with up to 30 usable host IP addresses per subnet. Perform complete subnetting engineering, specifying Subnet Mask, Subnet IDs, Usable IP Ranges, and Broadcast Addresses in an exhaustive master table.
1. Mathematical Subnetting Formulation:
- Original Network:
192.168.10.0/24(Class C default mask:255.255.255.0). - Total host bits available originally = $32 - 24 = 8 ext{ bits}$ ($2^8 = 256$ total IPs).
- Required subnets = 4. Number of subnet bits borrowed from host field: $$2^s \ge 4 \implies s = \mathbf{2 ext{ bits}}$$
- Remaining host bits: $h = 8 - 2 = \mathbf{6 ext{ bits}}$.
- Usable hosts per subnet: $2^h - 2 = 2^6 - 2 = 64 - 2 = \mathbf{62 ext{ hosts}}$ (Easily satisfies the 30-host requirement!).
- New CIDR Prefix: $/24 + 2 = \mathbf{/26}$.
- New Custom Subnet Mask: $$ ext{Binary: } 11111111.11111111.11111111.\mathbf{11000000}_2$$ $$ ext{Decimal: } 255.255.255.(128 + 64) = \mathbf{255.255.255.192}$$
- Block Size (Hop Interval): $256 - 192 = \mathbf{64}$.
2. Enterprise Subnet Allocation Master Table:
| Subnet Name & Dept | Subnet ID (Network Address) | First Usable Host IP | Last Usable Host IP | Directed Broadcast Address | Custom Subnet Mask |
|---|---|---|---|---|---|
| Subnet 1: Administration | 192.168.10.0 |
192.168.10.1 |
192.168.10.62 |
192.168.10.63 |
255.255.255.192 |
| Subnet 2: Faculty | 192.168.10.64 |
192.168.10.65 |
192.168.10.126 |
192.168.10.127 |
255.255.255.192 |
| Subnet 3: Computer Labs | 192.168.10.128 |
192.168.10.129 |
192.168.10.190 |
192.168.10.191 |
255.255.255.192 |
| Subnet 4: Central Library | 192.168.10.192 |
192.168.10.193 |
192.168.10.254 |
192.168.10.255 |
255.255.255.192 |
Q28. Trace Dijkstra's Shortest Path Algorithm on a 6-node network graph with Source node A. Compute shortest path costs and the complete Routing Table for Node A.
1. Network Graph Edge Cost Definitions:
Consider 6 routers $\{A, B, C, D, E, F\}$ with undirected link weights:
$c(A, B) = 4, \quad c(A, C) = 2$
$c(B, C) = 1, \quad c(B, D) = 5$
$c(C, D) = 8, \quad c(C, E) = 10$
$c(D, E) = 2, \quad c(D, F) = 6$
$c(E, F) = 3$
2. Step-by-Step Dijkstra Algorithm Iteration Trace:
| Step # | Set $N'$ (Visited) | $D(B), p(B)$ | $D(C), p(C)$ | $D(D), p(D)$ | $D(E), p(E)$ | $D(F), p(F)$ |
|---|---|---|---|---|---|---|
| 0 | $\{A\}$ | $4, A$ | 2, A ← Min | $\infty$ | $\infty$ | $\infty$ |
| 1 | $\{A, C\}$ | 3, C ← Min | $2, A$ | $10, C$ | $12, C$ | $\infty$ |
| 2 | $\{A, C, B\}$ | $3, C$ | $2, A$ | 8, B ← Min | $12, C$ | $\infty$ |
| 3 | $\{A, C, B, D\}$ | $3, C$ | $2, A$ | $8, B$ | 10, D ← Min | $14, D$ |
| 4 | $\{A, C, B, D, E\}$ | $3, C$ | $2, A$ | $8, B$ | $10, D$ | 13, E ← Min |
| 5 | $\{A, C, B, D, E, F\}$ | $3, C$ | $2, A$ | $8, B$ | $10, D$ | $13, E$ |
3. Final Shortest Paths & Node A Routing Table:
| Destination Node | Shortest Path from A | Total Minimum Path Cost | Next Hop Router from A |
|---|---|---|---|
| B | $A o C o B$ | $2 + 1 = \mathbf{3}$ | C |
| C | $A o C$ | $\mathbf{2}$ | C |
| D | $A o C o B o D$ | $2 + 1 + 5 = \mathbf{8}$ | C |
| E | $A o C o B o D o E$ | $2 + 1 + 5 + 2 = \mathbf{10}$ | C |
| F | $A o C o B o D o E o F$ | $2 + 1 + 5 + 2 + 3 = \mathbf{13}$ | C |
Q29. Explain the TCP Segment Header layout. Detail the TCP 3-Way Handshake and 4-Way Teardown. Graph and explain the dynamics of TCP Congestion Window (Slow Start, Additive Increase, Multiplicative Decrease, and Fast Recovery).
1. TCP Handshake & Teardown Blueprint:
2. TCP Congestion Window Dynamics (AIMD):
| Event / Trigger | Congestion Window (cwnd) Reaction |
Threshold (ssthresh) Reaction |
|---|---|---|
| Connection Start | $ ext{cwnd} = 1 ext{ MSS}$ | $ ext{ssthresh} = 64 ext{ KB}$ (Initial default) |
| Each ACK in Slow Start | $ ext{cwnd} \leftarrow ext{cwnd} + 1 ext{ MSS}$ (Doubles every RTT) | Unchanged |
| $ ext{cwnd} \ge ext{ssthresh}$ | $ ext{cwnd} \leftarrow ext{cwnd} + rac{1}{ ext{cwnd}}$ per ACK ($+1 ext{ MSS}$ per RTT linear increase) | Unchanged |
| 3 Duplicate ACKs (Mild Congestion) | Set to $ ext{ssthresh} + 3 ext{ MSS}$ (Fast Recovery in Reno) | $ ext{ssthresh} \leftarrow rac{ ext{cwnd}}{2}$ (Halved) |
| Timeout (Severe Congestion) | Drops to $1 ext{ MSS}$ immediately! (Restarts Slow Start) | $ ext{ssthresh} \leftarrow rac{ ext{cwnd}}{2}$ |
Q30. Discuss Network Security Principles (Confidentiality, Integrity, Authentication, and Non-repudiation). Explain how Digital Signatures guarantee Authenticity and Non-Repudiation with an architectural diagram. Contrast Packet-Filtering, Application-Gateway, and Stateful-Inspection Firewalls.
1. The Four Pillars of Network Security:
- Confidentiality: Only authorized sender and receiver should understand the contents of the transmitted message (achieved via Encryption).
- Message Integrity: Ensures the message has not been altered, injected, or tampered with in transit (achieved via Cryptographic Hash Functions like SHA-256).
- Authentication: Sender and receiver can verify each other's legal identity (achieved via Digital Certificates and PKI).
- Non-Repudiation: The sender cannot falsely deny having sent the message once transmitted (achieved via Digital Signatures).
2. Comparison of Firewall Technologies:
| Firewall Type | OSI Layer | Inspection Criteria | Performance & Security Level |
|---|---|---|---|
| Packet-Filtering Firewall | Network / Transport (L3/L4) | Inspects packet headers only: Source/Dest IP, Source/Dest Port, Protocol (TCP/UDP). | Extremely fast wire-speed filtering; low security (vulnerable to IP spoofing, cannot inspect payload). |
| Stateful Inspection Firewall | Network through Session (L3–L5) | Tracks the state of active TCP connections in a dynamic state table; ensures incoming packets match established sessions. | Industry standard enterprise boundary defense; robust against unauthorized unsolicited connections. |
| Application-Gateway (Proxy) | Application Layer (L7) | Acts as an intermediary; reconstructs application commands (HTTP GET, FTP commands) and inspects payload for viruses. | Highest level of security; computationally resource-heavy, introduces slight latency. |