2016 question paper
Computer Networks
26 questions
Q1a. In the following pairs of OSI protocol layer/sub-layer and its Functionality, the INCORRECT pair is (i) Network layer and Routing (ii) Data Link Layer and Bit synchronization (iii) Transport layer and End-to-end process communication (iv) Medium Access Control sub-layer and Channel sharing20162m
Module 1: Physical Layer & Data Communication
View this question on its own page →In the following pairs of OSI protocol layer/sub-layer and its Functionality, the INCORRECT pair is
(i) Network layer and Routing
(ii) Data Link Layer and Bit synchronization
(iii) Transport layer and End-to-end process communication
(iv) Medium Access Control sub-layer and Channel sharingWorked Solution(ii) Data Link Layer and Bit synchronization
Bit synchronization (ensuring sender and receiver clocks agree on bit timing/boundaries) is a Physical layer function, not a Data Link layer function. The Data Link layer's actual jobs are framing, error control, flow control, and media access control — not raw bit-level timing.
The other pairs are correct: Network layer does routing; Transport layer does end-to-end communication; the MAC sub-layer handles channel sharing.
Q1b. Which of the following is NOT true with respect to a transparent bridge and a router? (i) Both bridge and router selectively forward data packets (ii) A bridge uses IP addresses while a router uses MAC addresses (iii) A bridge builds up its routing table by inspecting incoming packets (iv) A router can connect between a LAN and WAN20162m
Module 2: Data Link Layer & MAC Sublayer
View this question on its own page →Which of the following is NOT true with respect to a transparent bridge and a router?
(i) Both bridge and router selectively forward data packets
(ii) A bridge uses IP addresses while a router uses MAC addresses
(iii) A bridge builds up its routing table by inspecting incoming packets
(iv) A router can connect between a LAN and WANWorked Solution(ii) A bridge uses IP addresses while a router uses MAC addresses — this statement is NOT true (it has the roles reversed).
The correct relationship is the opposite: a bridge operates at the Data Link layer and forwards frames using MAC addresses; a router operates at the Network layer and forwards packets using IP addresses.
The other statements are all true: both devices selectively forward traffic (rather than broadcasting everything); a transparent bridge does build its forwarding table by inspecting (learning from) the source addresses of incoming frames; and a router, working at the Network layer, is capable of connecting a LAN to a WAN (crossing different network technologies), unlike a bridge which stays within the same LAN/broadcast domain type.
Q1c. Which one of the following statements is FALSE? (i) TCP guarantees a minimum communication rate (ii) TCP ensures in-order delivery (iii) TCP reacts to congestion by reducing sender window size (iv) TCP employs retransmission to compensate for packet loss20162m
Module 4: Transport Layer & Congestion Control
View this question on its own page →Which one of the following statements is FALSE?
(i) TCP guarantees a minimum communication rate
(ii) TCP ensures in-order delivery
(iii) TCP reacts to congestion by reducing sender window size
(iv) TCP employs retransmission to compensate for packet lossWorked SolutionAnswer: (i) TCP guarantees a minimum communication rate
Why: TCP provides reliable, in-order, congestion-controlled byte-stream delivery, but it never reserves bandwidth or guarantees any minimum data rate — the achievable rate depends on network conditions and the congestion window. Options (ii), (iii) and (iv) are all standard TCP services (in-order delivery via sequence numbers, window reduction on congestion, and retransmission on loss).
Q1d. Which one of the following statements is FALSE? (i) HTTP runs over TCP (ii) HTTP describes the structure of web pages (iii) HTTP allows information to be stored in a URL (iv) HTTP can be used to test the validity of a hypertext link20162m
Module 5: Application Layer & Security
View this question on its own page →Which one of the following statements is FALSE?
(i) HTTP runs over TCP
(ii) HTTP describes the structure of web pages
(iii) HTTP allows information to be stored in a URL
(iv) HTTP can be used to test the validity of a hypertext linkWorked SolutionAnswer: (ii) HTTP describes the structure of web pages
Why: HTTP is only a request/response transfer protocol; the structure (markup) of web pages is described by HTML, not by HTTP. The other statements are true — HTTP runs over TCP (port 80/443), it can carry data inside the URL/query string (iii), and status codes such as
404 Not Foundcan be used to test whether a hypertext link is valid (iv).Q1e. In a sliding window ARQ scheme, the transmitter's window size is N and the receiver's window size is M. The minimum number of distinct sequence numbers required to ensure correct operation of the ARQ scheme is (i) min(M, N) (ii) max(M, N) (iii) M + N (iv) M × N20162m
Module 2: Data Link Layer & MAC Sublayer
View this question on its own page →In a sliding window ARQ scheme, the transmitter's window size is N and the receiver's window size is M. The minimum number of distinct sequence numbers required to ensure correct operation of the ARQ scheme is
(i) min(M, N)
(ii) max(M, N)
(iii) M + N
(iv) M × NWorked Solution(iii) M + N
In a sliding window ARQ scheme with sender window size N and receiver window size M, the minimum number of distinct sequence numbers required is N + M.
Why: Sequence numbers must be large enough that the sender's window and the receiver's window can never simultaneously refer to overlapping sequence numbers in a way that causes ambiguity between old and new frames. If the total range of usable sequence numbers were smaller than N + M, it would become possible for a frame from a previous window cycle to be mistaken for a frame in the current cycle, since the sender's and receiver's windows could "wrap around" and overlap incorrectly.
This is a well-known general result (a classic GATE-style question) that applies to any generic sliding window ARQ with independent sender/receiver window sizes — note that this differs from the more commonly quoted Go-Back-N-specific rule (sequence numbers ≥ N+1) because that assumes a receiver window of size 1 (M=1), giving N+M = N+1, consistent with the general formula.
Q1f. Which one of the following protocols is NOT used to resolve one form of address to another one? (i) DNS (ii) ARP (iii) DHCP (iv) RARP20162m
Module 3: Network Layer & Routing
View this question on its own page →Which one of the following protocols is NOT used to resolve one form of address to another one?
(i) DNS
(ii) ARP
(iii) DHCP
(iv) RARPWorked SolutionAnswer: (iii) DHCP
Why: DNS resolves a domain name to an IP address, ARP resolves an IP address to a MAC address, and RARP resolves a MAC address to an IP address — each maps one address form to another. DHCP instead dynamically assigns/leases an IP address and configuration parameters (subnet mask, default gateway, DNS server) to a host; it does not translate one address form into another.
Q1g. Identify the correct sequence in which the following packets are transmitted on the network by a host when a browser requests a webpage from a remote server, assuming that the host has just been restarted. (i) HTTP GET request, DNS query, TCP SYN (ii) DNS query, HTTP GET request, TCP SYN (iii) DNS query, TCP SYN, HTTP GET request (iv) TCP SYN, DNS query, HTTP GET request20162m
Module 5: Application Layer & Security
View this question on its own page →Identify the correct sequence in which the following packets are transmitted on the network by a host when a browser requests a webpage from a remote server, assuming that the host has just been restarted.
(i) HTTP GET request, DNS query, TCP SYN
(ii) DNS query, HTTP GET request, TCP SYN
(iii) DNS query, TCP SYN, HTTP GET request
(iv) TCP SYN, DNS query, HTTP GET requestWorked SolutionAnswer: (iii) DNS query, TCP SYN, HTTP GET request
Why: The freshly restarted host has an empty DNS cache, so it must first resolve the server's name into an IP address (DNS query). It then opens a TCP connection to the server's port 80 (three-way handshake initiated by the TCP SYN) and only finally sends the HTTP GET request inside that established connection.
Q1h. How many bytes of data can be sent in 15 seconds over a serial link with baud rate of 9600 in asynchronous mode with odd parity and two stop bits in the frame? (i) 10,000 bytes (ii) 12,000 bytes (iii) 15,000 bytes (iv) 27,000 bytes20162m
Module 1: Physical Layer & Data Communication
View this question on its own page →How many bytes of data can be sent in 15 seconds over a serial link with baud rate of 9600 in asynchronous mode with odd parity and two stop bits in the frame?
(i) 10,000 bytes
(ii) 12,000 bytes
(iii) 15,000 bytes
(iv) 27,000 bytesWorked Solution(ii) 12,000 bytes
In asynchronous mode, each character frame = 1 start bit + 8 data bits + 1 parity bit + 2 stop bits = 12 bits per byte.
Baud rate = 9600 bits/sec Bits per byte = 1 (start) + 8 (data) + 1 (parity) + 2 (stop) = 12 Bytes/sec = 9600 / 12 = 800 bytes/sec In 15 sec = 800 × 15 = 12,000 bytesQ1i. Which one of the following is TRUE interior Gateway routing protocols - Routing Information protocol (RIP) and Open Shortest Path First (OSPF)? (i) RIP uses distance vector routing and OSPF uses link state routing (ii) OSPF uses distance vector routing and RIP uses link state routing (iii) Both RIP and OSPF use link state routing (iv) Both RIP and OSPF use distance vector routing20162m
Module 3: Network Layer & Routing
View this question on its own page →Which one of the following is TRUE interior Gateway routing protocols - Routing Information protocol (RIP) and Open Shortest Path First (OSPF)?
(i) RIP uses distance vector routing and OSPF uses link state routing
(ii) OSPF uses distance vector routing and RIP uses link state routing
(iii) Both RIP and OSPF use link state routing
(iv) Both RIP and OSPF use distance vector routingWorked SolutionAnswer: (i) RIP uses distance vector routing and OSPF uses link state routing
Why: RIP periodically exchanges entire routing tables with its neighbours and selects paths by hop count (Bellman-Ford / distance-vector algorithm), whereas OSPF floods link-state advertisements so every router builds a common topology map and runs Dijkstra's SPF algorithm to compute least-cost paths.
Q1j. In the slow start phase of the TCP congestion control algorithm, the size of the congestion window: (i) does not increase (ii) increases linearly (iii) increases quadratically (iv) increases exponentially20162m
Module 4: Transport Layer & Congestion Control
View this question on its own page →In the slow start phase of the TCP congestion control algorithm, the size of the congestion window:
(i) does not increase
(ii) increases linearly
(iii) increases quadratically
(iv) increases exponentiallyWorked SolutionAnswer: (iv) increases exponentially
Why: In slow start the congestion window grows by one MSS for every ACK received, which doubles cwnd every RTT (1 -> 2 -> 4 -> 8 ...), i.e. exponential growth. Linear (additive) increase of +1 MSS per RTT begins only after cwnd reaches ssthresh, in the congestion-avoidance phase.
- Install PocketlyBudget App•POCKETLY
Pocketly on Android
Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.
Q2a. Suppose that the stop-and-wait protocol is used on a link with a bit rate of 64 kilobits per second and 20 milliseconds propagation delay. Assume that the transmission time for the acknowledgment and the processing time at nodes are negligible. What is the minimum frame size in bytes to achieve a link utilization of at least 50%.20167m
Module 4: Transport Layer & Congestion Control
View this question on its own page →Suppose that the stop-and-wait protocol is used on a link with a bit rate of 64 kilobits per second and 20 milliseconds propagation delay. Assume that the transmission time for the acknowledgment and the processing time at nodes are negligible. What is the minimum frame size in bytes to achieve a link utilization of at least 50%.
Worked SolutionMinimum Frame Size for 50% Utilization on a Stop-and-Wait Link
Given: bit rate kbps, one-way propagation delay ms, ACK transmission time and node processing delay are negligible, target utilization .
Step 1: Time for one stop-and-wait cycle
One cycle = transmit the frame + propagate to receiver + propagate the ACK back:
Step 2: Utilization formula
Step 3: Apply the 50% condition
So the frame must occupy the link for at least 40 ms, i.e. .
Step 4: Convert transmission time into frame size
Check
s, so , i.e. exactly 50%.
Final answer: the minimum frame size is 320 bytes. Any frame of 320 bytes or more yields a utilization of at least 50%.
Q2b. Consider an instance of TCP's Additive Increase Multiplicative Decrease (AIMD) algorithm where the window size at the start of the slow start phase is 2 MSS and the threshold at the start of the first transmission is 8 MSS. Assume that a timeout occurs during the fifth transmission. Find the congestion window size at the end of the tenth transmission.20167m
Module 4: Transport Layer & Congestion Control
View this question on its own page →Consider an instance of TCP's Additive Increase Multiplicative Decrease (AIMD) algorithm where the window size at the start of the slow start phase is 2 MSS and the threshold at the start of the first transmission is 8 MSS. Assume that a timeout occurs during the fifth transmission. Find the congestion window size at the end of the tenth transmission.
Worked SolutionTCP AIMD: Congestion Window at the End of the 10th Transmission
Given: MSS at the start of slow start, MSS at the first transmission, a timeout occurs during the 5th transmission.
Rules used:
- Slow start (SS): cwnd doubles each RTT (2 -> 4 -> 8 ...) but stops doubling once it reaches ssthresh.
- Congestion avoidance (CA): cwnd grows additively by 1 MSS per RTT.
- Timeout: , then resets to 1 MSS and slow start restarts.
Step 1: Behaviour up to the timeout
Transmission 1 2 3 4 5 cwnd (MSS) 2 4 8 9 10 Phase SS SS SS, reaches threshold CA CA, timeout occurs At transmission 3 the window hits , so from transmission 4 onward congestion avoidance adds 1 MSS per RTT: .
Step 2: Effect of the timeout in the 5th transmission
Step 3: Behaviour after the timeout
Transmission 6 7 8 9 10 cwnd (MSS) 1 2 4 5 6 Phase SS SS SS, clamped at threshold 5 CA CA cwnd at end of transmission 2 4 5 6 7 Transmission 8 doubles but is capped at the new threshold, MSS; with the connection switches to congestion avoidance, which adds exactly 1 MSS per RTT: .
Final answer: the congestion window size at the end of the 10th transmission is 7 MSS.
Q3a. The address of a class B host is to be split into subnets with a 6-bit subnet number: What is the maximum number of subnets and the maximum number of hosts in each subnet? What is the number of networks allowed under Class B addresses?20167m
Module 3: Network Layer & Routing
View this question on its own page →The address of a class B host is to be split into subnets with a 6-bit subnet number: What is the maximum number of subnets and the maximum number of hosts in each subnet? What is the number of networks allowed under Class B addresses?
Worked SolutionSubnetting a Class B Address with a 6-bit Subnet Field
Given: the address of a Class B host is to be divided into subnets using a 6-bit subnet number.
A classful Class B address has 16 network bits and 16 host bits:
| network id : 16 bits | host id : 16 bits | | network id : 16 bits | subnet : 6 bits | host : 16 - 6 = 10 bits |1. Maximum number of subnets
Subnet bits are borrowed from the host id, so
(If the all-zeros subnet and the all-ones subnet are not usable, as in the old classful rules, only subnets are usable, but the maximum count is .)
2. Maximum number of hosts in each subnet
Host bits left after borrowing 6 bits:
The subtraction of 2 removes the subnet's network address (all host bits 0) and its broadcast address (all host bits 1).
3. Number of networks allowed under Class B addresses
Class B reserves a 2-bit class prefix (
10), leaving a 14-bit network id:Final answers: maximum subnets = 64, maximum hosts per subnet = 1022, number of Class B networks = 16384.
Q3b. Assume that source S and destination D are connected through two intermediate routers labelled R. Determine how many times each packet has to visit the network layer and the data link layer during a transmission from S to D. 20167m
Module 2: Data Link Layer & MAC Sublayer
View this question on its own page →Assume that source S and destination D are connected through two intermediate routers labelled R. Determine how many times each packet has to visit the network layer and the data link layer during a transmission from S to D.
Worked SolutionTopology: Source S and Destination D are connected via two intermediate routers R1 and R2:
S ---- R1 ---- R2 ---- DThere are 3 links (hops) total: S-R1, R1-R2, R2-D.
Layer visit count
Data Link Layer — visited once per link/hop the packet crosses, because a new frame (with fresh MAC addressing) must be created for each physical link:
S -> R1 : 1 visit (frame created at S, processed at R1) R1 -> R2: 1 visit (new frame created at R1, processed at R2) R2 -> D : 1 visit (new frame created at R2, processed at D) Total Data Link layer visits = 3 (once per link)Network Layer — visited once at each node the packet passes through (source, every intermediate router, and destination), since routing/forwarding decisions (or final delivery) happen at the Network layer at every node:
At S : Network layer processes the packet once (originates it) At R1: Network layer processes it once (routing decision) At R2: Network layer processes it once (routing decision) At D : Network layer processes it once (final delivery, passed up to Transport layer) Total Network layer visits = 4 (once per node: S, R1, R2, D)Summary: For a path with k intermediate routers (here k=2), a packet visits the Network layer (k+2) times (source + k routers + destination) and the Data Link layer (k+1) times (once per link). Here: Network layer = 4 times, Data Link layer = 3 times.
Q4a. In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400 and the fragment offset value is 300. Find the position of the datagram, the sequence numbers of the first and the last bytes of the payload respectively.20167m
Module 3: Network Layer & Routing
View this question on its own page →In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400 and the fragment offset value is 300. Find the position of the datagram, the sequence numbers of the first and the last bytes of the payload respectively.
Worked SolutionIPv4 Fragment: Position and Payload Byte Numbers
Given: M bit = 0, HLEN = 10, Total Length = 400, Fragment Offset = 300.
Step 1: Header size
HLEN is counted in 32-bit (4-byte) words:
Step 2: Payload carried by this fragment
Step 3: Position of the fragment in the original datagram
The Fragment Offset field is expressed in units of 8 bytes:
So the payload of this datagram begins at byte 2400 of the original datagram's data field.
Step 4: Interpretation of M = 0
M = 0 (no more fragments) means this is the last fragment of the original datagram.
Step 5: Sequence numbers of the first and last payload bytes
Counting bytes from 0 at the start of the original data field:
Hence the original datagram's payload was bytes long (bytes 0 to 2759), and this fragment covers bytes 2400 to 2759. (If numbered from 1, the answers are 2401 and 2760.)
Final answer: position = last fragment starting at byte offset ; payload sequence numbers: first byte = 2400, last byte = 2759 (0-based).
Q4b. An IP router with a Maximum Transmission Unit (MTU) of 1500 bytes has received an IP packet of size 4404 bytes with an IP header of length 20 bytes. The values of the relevant fields in the header of the third IP fragment generated by the router for this packet are?20167m
Module 3: Network Layer & Routing
View this question on its own page →An IP router with a Maximum Transmission Unit (MTU) of 1500 bytes has received an IP packet of size 4404 bytes with an IP header of length 20 bytes. The values of the relevant fields in the header of the third IP fragment generated by the router for this packet are?
Worked SolutionHeader Fields of the Third IP Fragment (MTU 1500)
Given: MTU = 1500 bytes, received IP packet = 4404 bytes, IP header = 20 bytes.
Step 1: Data that must be fragmented
Step 2: Maximum data per fragment
The offset is counted in 8-byte blocks, so every non-final fragment must carry a multiple of 8 bytes: , so 1480 is legal and is used as the data size of fragments 1 and 2.
Step 3: Fragmentation plan
Fragment Data bytes (original data field) Data size Total length Offset (value = bytes/8) M flag 1st 0 - 1479 1480 1 2nd 1480 - 2959 1480 1 3rd 2960 - 4383 0 Step 4: Fields in the header of the third fragment
Field Value Total Length 1444 bytes (1424 data + 20 header) Header Length (HLEN) 5 (i.e. 20 bytes) Identification same as the original packet Flags MF = 0, DF = 0 (this is the last fragment) Fragment Offset 370 (means bytes of data precede this fragment) Protocol copied unchanged from the original header Final answer: Total Length = 1444 bytes, MF flag = 0, Fragment Offset = 370 (header length stays 20 bytes, identification unchanged).
Q5a. A serial transmission T1 uses 8 information bits, 2 start bits, 1 stop bit and 1 parity bit for each character. A synchronous transmission T2 uses 3 eight bit sync characters followed by 30 eight bit information characters. If the bit rate is 1200 bits/second in both cases, what are the transfer rates of T1 and T2?20167m
Module 1: Physical Layer & Data Communication
View this question on its own page →A serial transmission T1 uses 8 information bits, 2 start bits, 1 stop bit and 1 parity bit for each character. A synchronous transmission T2 uses 3 eight bit sync characters followed by 30 eight bit information characters. If the bit rate is 1200 bits/second in both cases, what are the transfer rates of T1 and T2?
Worked SolutionThe transfer rate (useful information rate) is the fraction of the total bit rate that actually carries information bits, excluding framing/overhead bits.
T1 (Asynchronous transmission)
Each character frame = 2 start bits + 8 information bits + 1 parity bit + 1 stop bit = 12 bits total, of which 8 are useful information bits.
Useful fraction = 8 / 12 Transfer rate (T1) = Bit rate x (useful bits / total bits per frame) = 1200 x (8/12) = 1200 x 0.667 = 800 bits/secT2 (Synchronous transmission)
Each frame = 3 sync characters (8 bits each) + 30 information characters (8 bits each)
Overhead bits = 3 x 8 = 24 bits Information bits = 30 x 8 = 240 bits Total frame size = 24 + 240 = 264 bits Useful fraction = 240 / 264 = 0.9091 Transfer rate (T2) = 1200 x (240/264) = 1200 x 0.9091 ≈ 1090.9 bits/secResult: T1 ≈ 800 bps, T2 ≈ 1090.9 bps. Synchronous transmission (T2) achieves a higher effective transfer rate because its fixed per-frame overhead (3 sync bytes) is amortized over more information bytes (30), unlike asynchronous transmission where every single character carries its own start/stop/parity overhead.
Q5b. Compare and contrast the Go-Back-N ARQ Protocol with Selective-Repeat ARQ.20167m
Module 2: Data Link Layer & MAC Sublayer
View this question on its own page →Compare and contrast the Go-Back-N ARQ Protocol with Selective-Repeat ARQ.
Worked SolutionAspect Go-Back-N (GBN) Selective Repeat (SR) Receiver behavior Accepts only frames arriving strictly in order; discards any out-of-order frame, even if correctly received Accepts and buffers out-of-order frames, filling gaps later as missing frames arrive Acknowledgement type Cumulative ACK — ACK(n) means "all frames up to n-1 received correctly" Individual/selective ACK — each correctly received frame is acknowledged separately, regardless of order Timers Single timer for the oldest unacknowledged frame Multiple timers — one per outstanding frame Retransmission on loss Resends the lost frame and every frame sent after it (even ones already successfully received) Resends only the specific lost/corrupted frame Maximum window size (n-bit sequence numbers) 2^n - 12^(n-1)(must be half the sequence space to avoid ambiguity between old and new frames)Receiver buffering needed None (only tracks "next expected" sequence number) Requires buffer space to hold out-of-order frames until gaps are filled Bandwidth efficiency Lower — wastes bandwidth resending already-correct frames after a loss Higher — minimal wasted retransmission, only the actually lost frame is resent Implementation complexity Simpler (minimal receiver logic/state) More complex (per-frame timers, receiver-side buffering and reordering logic) Best suited for Low-error-rate links, or where simplicity matters more than bandwidth efficiency High-bandwidth or higher-error-rate links, where the retransmission overhead of GBN would be too costly Summary: Go-Back-N trades bandwidth efficiency for simplicity (a "dumb" receiver, minimal state), while Selective Repeat trades implementation complexity for much better bandwidth efficiency (a "smart" receiver that buffers and reorders) — making SR the better choice on links where retransmitting entire windows would be too costly, at the cost of more sender/receiver bookkeeping.
Q6a. What are the advantages of fiber optics over copper as a transmission medium? Is there any downside of using fiber optics over copper?20167m
Module 1: Physical Layer & Data Communication
View this question on its own page →What are the advantages of fiber optics over copper as a transmission medium? Is there any downside of using fiber optics over copper?
Worked SolutionAdvantages of fiber optics over copper
- Much higher bandwidth — supports data rates from Gbps into the Tbps range, far beyond copper's practical limits.
- Lower attenuation — signals travel tens of kilometers before needing regeneration, versus ~100 m for copper Ethernet.
- Immunity to electromagnetic interference and crosstalk — since it carries light, not current, it's unaffected by nearby electrical noise or other cables.
- Better security — tapping a fiber without detection (via measurable signal loss) is far harder than tapping copper.
- Lighter and thinner — easier to route through conduits, especially for high-density cabling.
- No electrical/spark hazard — safe for use in flammable or electrically noisy industrial environments.
Downsides of fiber optics over copper
- Higher cost — both cable and the optical transceivers (transmitters/receivers) are more expensive than copper equivalents.
- Installation complexity — splicing and terminating fiber requires precision tools and trained technicians; copper (especially UTP with RJ-45) is far simpler to terminate.
- Fragility — glass fiber can crack or break if bent too sharply, unlike more flexible copper wire.
- No power delivery — fiber can't carry electrical power (unlike copper, which supports Power over Ethernet for devices like IP cameras or APs).
- Harder/costlier to repair — a break requires specialized fusion splicing equipment, whereas copper can often be re-terminated with basic tools.
Overall, fiber wins decisively on performance and distance, but copper remains preferable for cost-sensitive, short-distance, or power-over-cable scenarios.
Q6b. A computer on a 6-Mbps network is regulated by a token bucket. The token bucket is filled at a rate of 1 Mbps. It is initially filled to capacity with 8 megabits. How long can the computer transmit at the full 6 Mbps?20167m
Module 4: Transport Layer & Congestion Control
View this question on its own page →A computer on a 6-Mbps network is regulated by a token bucket. The token bucket is filled at a rate of 1 Mbps. It is initially filled to capacity with 8 megabits. How long can the computer transmit at the full 6 Mbps?
Worked SolutionToken Bucket: Time the Host Can Transmit at Full Rate
Given: peak transmission rate Mbps, token generation rate Mbps, bucket capacity megabits, bucket initially full.
Reasoning
The host may send at the full 6 Mbps only while the bucket still holds tokens. During transmission the bucket is simultaneously being refilled, so tokens are consumed at the net rate:
The initial 8 Mbit of tokens therefore lasts:
Verification
In s:
- tokens used = Mbit
- tokens available = initial Mbit + refilled Mbit = Mbit
Both match, so the bucket empties exactly at s. After that the host is limited to the sustained rate of 1 Mbps.
Final answer: the computer can transmit at the full 6 Mbps for 1.6 seconds (sending 9.6 Mbit), after which it is throttled to 1 Mbps.
- Install PocketlyBudget App•POCKETLY
Pocketly on Android
Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.
Q7a. DNS uses UDP instead of TCP. If a DNS packet is lost, there is no automatic recovery. Does this cause a problem, and if so, how is it solved?20167m
Module 5: Application Layer & Security
View this question on its own page →DNS uses UDP instead of TCP. If a DNS packet is lost, there is no automatic recovery. Does this cause a problem, and if so, how is it solved?
Worked SolutionDNS over UDP: Does Packet Loss Cause a Problem?
Short answer: Yes, a lost query or reply would stall name resolution if nothing else acted, but DNS deliberately places recovery in the application layer (the stub resolver) instead of in the transport layer, so the loss is handled without ever opening a TCP connection.
Why UDP is preferred anyway
- A lookup is normally one small request/response pair. Setting up TCP first (SYN, SYN-ACK, ACK) would add a full handshake plus teardown, roughly doubling the messages and adding 1-2 extra RTTs to every web access.
- DNS needs no long-lived stream, no ordering across messages, and each message is self-contained.
- UDP lets one name server answer thousands of clients concurrently with no per-client connection state.
How the loss is solved
- Client retransmission with timeout (primary fix): every query is sent with a timer. If no reply arrives, the stub resolver retransmits the same query (typically after 1 s, 2 s, 4 s, ... up to 5 attempts) and finally returns
SERVFAIL/time-out to the application. This is essentially stop-and-wait with timeout implemented by DNS itself. - Transaction ID + source-port matching: each query carries a random 16-bit ID (and is sent from an ephemeral port), so the client can match the eventual reply to the outstanding query and discard stray, duplicate or forged responses. Late duplicates are harmless because replies are idempotent.
- TCP fallback for large responses: if an answer exceeds the message-size limit (512 bytes classically) the server sets the TC (truncation) bit and the resolver retries the same query over TCP; zone transfers (AXFR/IXFR) always use TCP. EDNS0 also allows larger UDP payloads.
- Redundant name servers: each zone is served by at least two authoritative servers (and there are multiple root/TLD servers), so the query can simply be sent to another server.
Conclusion
Loss only costs one retransmission timeout of delay, not correctness. Reliability is recovered by application-level retries and ID matching, and by TCP whenever responses are large - so using UDP costs nothing in accuracy while saving connection setup on the critical path of every request.
Q7b. Explain the responsibility of network and transport layers of OSI model with example.20167m
Module 3: Network Layer & Routing
View this question on its own page →Explain the responsibility of network and transport layers of OSI model with example.
Worked SolutionResponsibilities of the Network and Transport Layers in OSI
Network layer (Layer 3) - packet delivery between hosts
Responsibilities:
- Logical addressing: defines a universal, hierarchical address (IP address) that identifies a host regardless of the underlying LAN technology.
- Forwarding: moves each packet hop-by-hop from the correct input interface to the output interface of every router.
- Routing: computes the path using routing protocols - distance vector (RIP), link state (OSPF), path vector (BGP).
- Packetization and fragmentation/reassembly: encapsulates transport segments into packets and fragments them when a link's MTU is smaller, reassembling only at the destination host.
- Internetworking and diagnostics: routers interconnect dissimilar networks; ARP maps IP to MAC and ICMP reports errors ("destination unreachable", "TTL expired", echo request/reply).
Service: connectionless best-effort datagram service (IP).
Example: a packet from 192.168.1.10 to 8.8.8.8 is handed to the default gateway, routed hop-by-hop using OSPF-derived tables, and if a router's TTL expires it returns an ICMP "Time Exceeded" message.
Transport layer (Layer 4) - end-to-end delivery between processes
Responsibilities:
- Segmentation and reassembly: splits the message into segments and reassembles them in order at the receiver.
- Process multiplexing/demultiplexing: port numbers deliver data to the correct application (80 = web, 53 = DNS, 22 = SSH).
- Connection management: TCP performs the three-way handshake (SYN / SYN-ACK / ACK) and orderly close (FIN/ACK); UDP is connectionless.
- Flow control: the receiver's advertised window prevents the sender from overrunning the receiver's buffer.
- Error control and reliability: sequence and acknowledgment numbers, checksum, ACKs and retransmission on timeout give exactly-once, in-order delivery (TCP).
- Congestion control: slow start, congestion avoidance (AIMD), fast retransmit and fast recovery protect the network itself.
- Low-overhead delivery: UDP provides minimal encapsulation with low delay for real-time applications.
Example: a web page arrives as thousands of TCP segments which may be lost or reordered by IP; TCP numbers, ACKs, retransmits and reorders them so the browser receives one contiguous byte stream.
Comparison
Aspect Network layer Transport layer Addressing unit IP address (host) Port number (process) PDU Packet / datagram Segment (TCP) / datagram (UDP) Scope Host-to-host, hop-by-hop End-to-end, process-to-process Reliability Best effort TCP reliable, UDP unreliable Protocols IP, ICMP, ARP, OSPF, RIP TCP, UDP, SCTP Devices / location Routers, layer-3 switches Implemented in end hosts (OS/kernel) Key idea: the network layer finds and forwards packets between machines, while the transport layer guarantees correct, ordered, congestion-free delivery between applications on those machines.
Q8a. What are the functions of a RIP message? List the RIP shortcomings and their corresponding fixes.20167m
Module 3: Network Layer & Routing
View this question on its own page →What are the functions of a RIP message? List the RIP shortcomings and their corresponding fixes.
Worked SolutionFunctions of a RIP Message, Shortcomings and Their Fixes
Functions of a RIP message
RIP (Routing Information Protocol) is a distance-vector protocol that exchanges routing information in UDP datagrams (port 522) with directly connected neighbours. Its message functions are:
- Request message: asks neighbours to send part or all of their routing tables. Sent at router startup (to discover neighbours) or when a router suspects an inconsistency.
- Response message (update): carries routing entries - address family, IP address, next hop and metric (hop count). Sent
- every 30 s as a periodic full-table update,
- as a triggered (partial) update immediately when a route changes or a link fails,
- as a direct reply to a request message.
- Route lifetime management: an entry becomes invalid after 180 s without an update (enters hold-down) and is flushed after 240 s - this ages out stale routes.
- RIPv2 additions: carries subnet masks (VLSM/CIDR), next-hop address, route tags, multicast updates to 224.0.0.9 and authentication data.
Shortcomings of RIP and their corresponding fixes
Shortcoming Corresponding fix Count-to-infinity - loops and extremely slow convergence when a link fails Split horizon, poison reverse, hold-down timers, triggered updates, and the hard metric cap of 15 hops Metric is only hop count - a 64-kbps link can be preferred over a 1-Gbps link Use a bandwidth/delay-aware metric: OSPF cost (based on bandwidth) or EIGRP's composite metric Periodic full-table flooding every 30 s wastes bandwidth Triggered (event-driven) and partial updates Slow convergence due to periodic updates Triggered updates + hold-down timers; otherwise migrate to link-state routing (OSPF) No authentication - a rogue router can poison routes RIPv2 simple password / MD5 authentication Classful, no subnet mask / VLSM support RIPv2 advertises subnet masks and supports CIDR; uses multicast instead of broadcast Poor scalability (15-hop limit, no route redistribution policy) Move to OSPF/IS-IS (link state) or BGP (path vector) Single path only (no load balancing on unequal paths) Equal-cost multi-path (ECMP) in OSPF, or adaptive routing Summary: RIP's simplicity makes it easy to configure for small networks, but its hop-count metric, periodic updates and count-to-infinity behaviour are fundamental limitations. Split horizon, poison reverse, hold-down and triggered updates mitigate them locally, while OSPF removes the causes by using link-state flooding with a cost metric.
Q8b. Describe the functions of the two FTP connections. What kinds of file types can FTP transfer?20167m
Module 5: Application Layer & Security
View this question on its own page →Describe the functions of the two FTP connections. What kinds of file types can FTP transfer?
Worked SolutionFTP: The Two Connections and the File Types It Can Transfer
FTP is unusual in that it uses two separate TCP connections between client and server: one long-lived control connection and one short-lived data connection.
1. Control connection (well-known port 21)
- Established when the session starts and kept open for the whole session, closed only with
QUIT. - Carries ASCII commands and replies:
USER,PASS,PWD,CWD,LIST,RETR(retrieve),STOR(store),PORT/PASV,TYPE,QUITand the 3-digit replies (220,200,226,550, ...). - Small, interactive, one line at a time, always in ASCII mode; it controls the session, authentication and the state of the data connection.
2. Data connection (port 20 in active mode, negotiated ephemeral port in passive mode)
- Opened only for one transfer (a file, a directory listing) and closed as soon as it finishes - one data connection per
RETR/STOR/LIST. - Carries the actual file bytes or directory listing, in ASCII, EBCDIC or image (binary) mode.
- Two variants:
- Active mode (PORT): the server initiates the connection from its port 20 to the port the client advertised.
- Passive mode (PASV): the server opens an ephemeral port and waits; the client connects to it - preferred today because it works through client-side NAT and firewalls.
- Bulk data flows at full window size, independent of the interactive channel.
Separating the two lets the user stay logged in and issue further commands while (or between) transfers, and lets each transfer be optimised independently.
File types FTP can transfer
TYPEmodePurpose ASCII (A) Text files; default - end-of-line characters are converted to/from the local convention (CRLF <-> LF) EBCDIC (E) Text transfer between EBCDIC mainframes Image / Binary (I) Byte-for-byte copy of any file: executables, images, PDFs, archives, compressed files Local (L n) Machine-dependent byte size between two hosts Conclusion: because image/binary mode transfers every bit unchanged, FTP can move any kind of file; the ASCII and EBCDIC modes exist only for character-set and newline conversion between dissimilar systems.
- Established when the session starts and kept open for the whole session, closed only with
Q9a. Compare the TCP header and the UDP header. List the fields in the TCP header that are missing from UDP header. Give the reason for their absence.20167m
Module 4: Transport Layer & Congestion Control
View this question on its own page →Compare the TCP header and the UDP header. List the fields in the TCP header that are missing from UDP header. Give the reason for their absence.
Worked SolutionTCP Header vs UDP Header
TCP and UDP are both transport-layer protocols running over IP, but TCP's header is built for a reliable, connection-oriented byte stream while UDP's is a minimal 8-byte shim.
Aspect TCP header UDP header Minimum size 20 bytes (up to 60 bytes with options) 8 bytes, always fixed Fields Source port, Dest port, Sequence no, Acknowledgment no, Data offset, Reserved, Flags (URG, ACK, PSH, RST, SYN, FIN), Window, Checksum, Urgent pointer, Options/padding Source port, Dest port, Length, Checksum Reliability Seq/ack numbers, checksum, retransmission, duplicate detection Checksum only (optional in IPv4), no retransmission Flow control Receiver's advertised window None Connection SYN/FIN handshake and teardown Connectionless Multiplexing Ports + connection state Ports only Overhead / use Higher latency; file transfer, web, email Lower latency; DNS, DHCP, RTP streaming, VoIP TCP fields missing from the UDP header, and the reason for their absence
- Sequence number - TCP numbers every byte of the stream so the receiver can reorder segments and detect gaps; UDP datagrams are independent and unordered, so there is nothing to sequence.
- Acknowledgment number - needed for cumulative ACKs and reliable delivery; UDP has no ACK mechanism (an application such as DNS must build its own retry logic).
- Data offset (header length) - TCP can grow to 60 bytes with options, so it must state how long it is; UDP's header is always exactly 8 bytes, so it carries an explicit Length field instead.
- Window size - implements receiver-side flow control; UDP does no flow control and leaves pacing entirely to the application.
- Control flags (SYN, ACK, FIN, RST, PSH, URG) - used for connection setup, orderly release, reset, push and urgent data; a connectionless protocol needs none of them.
- Urgent pointer - points to urgent out-of-band data, which is meaningful only within an ordered byte stream.
- Options (MSS, window scaling, SACK, timestamps) - parameters negotiated during connection setup; there is no connection to negotiate.
Key idea: every field that UDP lacks exists to provide connection, ordering, reliability or flow control - exactly the services UDP deliberately omits in exchange for low overhead and low delay.
Q9b. What is the difference between open-loop congestion control and closed-loop congestion control?20167m
Module 4: Transport Layer & Congestion Control
View this question on its own page →What is the difference between open-loop congestion control and closed-loop congestion control?
Worked SolutionOpen-Loop vs Closed-Loop Congestion Control
Congestion-control policies are classified by when they act. Open-loop policies are decided before traffic is sent and never use feedback from the network; closed-loop policies rely on feedback to detect congestion that has already occurred and then correct it.
Basis Open-loop congestion control Closed-loop congestion control Principle Prevent congestion by design; no feedback is used Detect congestion, feed information back to the sender/routers, then react When applied Before/during policy setup, ahead of transmission Continuously during transmission, once per RTT Feedback None - the policy is blind to current load Implicit (ACK rate, RTT, packet loss) or explicit (router marking, ICMP) Goal Avoid deadlock, starvation and queue overflow a priori Keep the network in the comfortable operating region after congestion appears Typical mechanisms Retransmission policy, acknowledgment policy, error-control policy, admission/flow control at connection setup, packet-discard policy (drop-old vs drop-new), FQ/WFQ scheduling, differentiated service classes, traffic shaping (leaky bucket/token bucket) Slow start, congestion avoidance (AIMD), fast retransmit and fast recovery (TCP), RED/WRED active queue management, ECN marking, adaptive routing Response time Slow - cannot adapt while traffic runs Fast - adapts every RTT Complexity Simple, predictable More complex; needs signalling between routers, receiver and sender Where implemented Mainly in routers and in the sender before sending In the sender, driven by receiver/router feedback Example Shaping traffic at the edge so the core never overloads TCP hearing three duplicate ACKs and cutting cwnd by half Key differences in brief
- Feedback: open-loop is fire-and-forget; closed-loop is a classic control loop (measure -> decide -> act).
- Timing: open-loop acts at policy/setup time; closed-loop acts during the session and re-evaluates each RTT.
- Objective: open-loop prevents bad states (guarantees are made so queues cannot overflow); closed-loop repairs them once loss or delay rises.
- Adaptability: closed-loop can exploit changing conditions (grow the window while ACKs arrive quickly), whereas open-loop must stay conservative to remain safe.
- Cost of failure: open-loop failures are hard to detect (no feedback), while closed-loop can oscillate around the optimum as it reacts to delayed feedback.
Rule of thumb: if a mechanism must hear from the network before it changes behaviour, it is closed-loop; if its behaviour is fixed in advance, it is open-loop.
PYQDeck for Android
Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.