2021 question paper

Computer Networks

24 questions

  1. Q1a. What layer in the TCP/IP stack is equivalent to the transport layer of the OSI model? (i) Application (ii) Host-to-host (iii) Internet (iv) Network access20212m

    Module 1: Physical Layer & Data Communication

    What layer in the TCP/IP stack is equivalent to the transport layer of the OSI model?

    (i) Application
    (ii) Host-to-host
    (iii) Internet
    (iv) Network access

    View this question on its own page →
    Worked Solution

    (ii) Host-to-host

    The TCP/IP model's Host-to-Host (Transport) layer maps directly onto the OSI Transport layer — both provide end-to-end, process-to-process delivery via protocols like TCP and UDP. Application maps to OSI's top three layers combined; Internet maps to OSI's Network layer; Network access maps to OSI's Data Link + Physical layers.

  2. Q1b. Which topology covers security, robust and eliminating traffic factor? (i) Mesh (ii) Ring (iii) Star (iv) Bus20212m

    Module 1: Physical Layer & Data Communication

    Which topology covers security, robust and eliminating traffic factor?

    (i) Mesh
    (ii) Ring
    (iii) Star
    (iv) Bus

    View this question on its own page →
    Worked Solution

    (i) Mesh

    In a mesh topology every device has a dedicated point-to-point link to every other device.

    • Security: data travels along a private link, not a shared medium, so other nodes can't eavesdrop.
    • Robustness: failure of one link doesn't isolate any node — alternate paths always exist.
    • No traffic/collision problem: since links aren't shared, there's no contention or traffic congestion between unrelated device pairs.

    Star, Ring, and Bus all rely on a shared medium or central point, so they don't offer all three properties simultaneously.

  3. Q1c. Internetworking protocol is known as (i) TCP (ii) IP (iii) ISP (iv) TCP/IP20212m

    Module 3: Network Layer & Routing

    Internetworking protocol is known as

    (i) TCP
    (ii) IP
    (iii) ISP
    (iv) TCP/IP

    View this question on its own page →
    Worked Solution

    Answer: (ii) IP

    Why: IP (Internet Protocol) is the network-layer protocol that delivers packets hop-by-hop across interconnected networks using logical addresses — that is exactly what "internetworking" means. TCP is only a transport-layer protocol, an ISP is an organisation that provides connectivity (not a protocol), and TCP/IP is the name of the entire protocol suite rather than one single protocol.

  4. Q1d. Which device uses logical addressing system? (i) Hub (ii) Switch (iii) Bridge (iv) Router20212m

    Module 3: Network Layer & Routing

    Which device uses logical addressing system?

    (i) Hub
    (ii) Switch
    (iii) Bridge
    (iv) Router

    View this question on its own page →
    Worked Solution

    Answer: (iv) Router

    Why: A router works at the network layer and forwards packets using logical (IP) addresses, which are hierarchical and routable across networks. A hub is a Layer-1 repeater that simply broadcasts signals and performs no addressing, while a switch and a bridge are Layer-2 devices that forward frames using physical (MAC) addresses — so none of them uses logical addressing.

  5. Q1e. 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 time-out occurs during the fifth transmission. Find the congestion window size at the end of the tenth transmission. (i) 8 MSS (ii) 14 MSS (iii) 7 MSS (iv) 12 MSS20212m

    Module 4: Transport Layer & Congestion Control

    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 time-out occurs during the fifth transmission. Find the congestion window size at the end of the tenth transmission.

    (i) 8 MSS
    (ii) 14 MSS
    (iii) 7 MSS
    (iv) 12 MSS

    View this question on its own page →
    Worked Solution

    Answer: (iii) 7 MSS

    Working: Slow start doubles the window each transmission until the threshold is reached; after that congestion avoidance adds 1 MSS per transmission. On a time-out, ssthresh = cwnd / 2 and slow start resumes from the initial window.

    Transmission Window at start Phase Result
    1st 2 MSS Slow start doubles → 4 MSS
    2nd 4 MSS Slow start doubles → 8 MSS
    3rd 8 MSS Threshold (8 MSS) reached → congestion avoidance +1 → 9 MSS
    4th 9 MSS Congestion avoidance +1 → 10 MSS
    5th 10 MSS Congestion avoidance time-out occurs
    6th 2 MSS Slow start restarts (new threshold = 10/2 = 5 MSS) doubles → 4 MSS
    7th 4 MSS Slow start would double to 8, but not permitted (8 > 5) → capped at 5 MSS
    8th 5 MSS Congestion avoidance +1 → 6 MSS
    9th 6 MSS Congestion avoidance +1 → 7 MSS
    10th 7 MSS Congestion avoidance +1 → 8 MSS

    So the congestion window at the tenth transmission is 7 MSS.

    Why not the others: 14 MSS assumes the time-out was ignored and growth stayed linear (10 → 11 → … → 14); 12 MSS likewise ignores the multiplicative decrease; 8 MSS would require doubling past the new 5 MSS threshold, which congestion avoidance forbids.

  6. Q1f. Which transmission media has the highest transmission speed in a network? (i) Coaxial cable (ii) Twisted pair cable (iii) Optical fiber (iv) Electrical cable20212m

    Module 1: Physical Layer & Data Communication

    Which transmission media has the highest transmission speed in a network?

    (i) Coaxial cable
    (ii) Twisted pair cable
    (iii) Optical fiber
    (iv) Electrical cable

    View this question on its own page →
    Worked Solution

    (iii) Optical fiber

    Optical fiber transmits data as light pulses through glass/plastic strands, offering the highest bandwidth and speed (multi-Gbps to Tbps range) among common media — far exceeding coaxial cable and twisted pair, which are limited by electrical signal attenuation and interference.

  7. Q1g. What is the maximum size of data that the application layer can pass onto the TCP layer below? (i) Any size (ii) 2^16 bytes-size of TCP header (iii) 2^16 bytes (iv) 1500 bytes20212m

    Module 5: Application Layer & Security

    What is the maximum size of data that the application layer can pass onto the TCP layer below?

    (i) Any size
    (ii) 2^16 bytes-size of TCP header
    (iii) 2^16 bytes
    (iv) 1500 bytes

    View this question on its own page →
    Worked Solution

    Answer: (ii) 2^16 bytes - size of TCP header

    Why: A TCP segment (header + data) becomes the payload of an IP datagram, and IP's 16-bit Total Length field caps the whole packet at 2^16 = 65536 bytes — so the data the application hands down must fit into that space after the TCP header is added, i.e. 2^16 − TCP header size (65536 − 20 = 65516 bytes). Option (i) is wrong because the length is strictly bounded by that 16-bit field; option (iii) forgets that the TCP header occupies part of the same space; option (iv) 1500 bytes is only the Ethernet MTU (a link-layer limit), not the TCP/IP limit.

  8. Q1h. The maximum window size for data transmission using the selective reject protocol with n-bit frame sequence numbers is (i) 2^n (ii) 2^(n-1) (iii) 2^n - 1 (iv) 2^(n-2)20212m

    Module 2: Data Link Layer & MAC Sublayer

    The maximum window size for data transmission using the selective reject protocol with n-bit frame sequence numbers is

    (i) 2^n
    (ii) 2^(n-1)
    (iii) 2^n - 1
    (iv) 2^(n-2)

    View this question on its own page →
    Worked Solution

    (ii) 2^(n-1)

    For Selective Repeat with n-bit sequence numbers (giving 2^n distinct sequence numbers in total), the maximum window size is limited to half of the total sequence number space: 2^(n-1).

    Why it must be half (not 2^n − 1 like Go-Back-N): Selective Repeat receivers must distinguish between a retransmitted OLD frame and a NEW frame carrying the same sequence number (after wraparound). If sender and receiver windows were each allowed to be larger than half the sequence space, their windows could overlap in a way that makes an old, already-received frame indistinguishable from a new one with the same sequence number — causing the receiver to accept a duplicate as if it were new data. Capping both windows at 2^(n-1) guarantees the sender's and receiver's windows never overlap incorrectly.

  9. Q1i. Station A needs to send a message consisting of 9 packets to Station B using a sliding window (window size 3) and go-back-n error control strategy. All packets are ready and immediately available for transmission. If every 5th packet that A transmits gets lost (but no packets from B ever get lost), then what is the number of packets that A will transmit for sending the message to B? (i) 12 (ii) 14 (iii) 16 (iv) 1820212m

    Module 2: Data Link Layer & MAC Sublayer

    Station A needs to send a message consisting of 9 packets to Station B using a sliding window (window size 3) and go-back-n error control strategy. All packets are ready and immediately available for transmission. If every 5th packet that A transmits gets lost (but no packets from B ever get lost), then what is the number of packets that A will transmit for sending the message to B?

    (i) 12
    (ii) 14
    (iii) 16
    (iv) 18

    View this question on its own page →
    Worked Solution

    (iii) 16

    Since Go-Back-N is used, whenever a packet is lost, every packet sent after it in that window also has to be resent (even if those later packets were themselves successfully transmitted), because the receiver discards any out-of-order arrival and only cumulatively acknowledges up to the last correctly received in-order packet.

    Tracking every transmission A makes (numbering them 1st, 2nd, 3rd... in the order sent, including retransmissions), and marking every 5th one as lost:

    Phase 1 (initial send, window=3):
      Send: 1, 2, 3, 4, 5(LOST— 5th transmission), 6, 7
      -> 7 transmissions so far. Timeout on packet 5.
    
    Phase 2 (go back to 5, resend + continue):
      Send: 5, 6, 7(LOST — 10th transmission overall), 8, 9
      -> 5 more transmissions (total 12). Timeout on packet 7.
    
    Phase 3 (go back to 7, resend + continue):
      Send: 7, 8, 9(LOST — 15th transmission overall)
      -> 3 more transmissions (total 15). Timeout on packet 9.
    
    Phase 4 (go back to 9, resend):
      Send: 9 — succeeds (16th transmission, not a multiple of 5)
      -> 1 more transmission (total 16). All 9 packets now delivered.
    

    Total transmissions = 7 + 5 + 3 + 1 = 16

    Notice the pattern: each time, the packet landing on a multiple of 5 (5th, 10th, 15th transmission) is exactly the one lost, forcing a fresh Go-Back-N retransmission cycle from that point.

  10. Q1j. The message 11001001 is to be transmitted using the CRC polynomial x^3 + 1 to protect it from errors. The message that should be transmitted is (i) 11001001000 (ii) 11001001011 (iii) 11001010 (iv) 11001001001120212m

    Module 2: Data Link Layer & MAC Sublayer

    The message 11001001 is to be transmitted using the CRC polynomial x^3 + 1 to protect it from errors. The message that should be transmitted is

    (i) 11001001000
    (ii) 11001001011
    (iii) 11001010
    (iv) 110010010011

    View this question on its own page →
    Worked Solution

    (ii) 11001001011

    The generator polynomial x^3 + 1 corresponds to the bit pattern 1001 (degree 3 → 4-bit divisor, coefficients of x^3,x^2,x^1,x^0 = 1,0,0,1). The number of CRC bits to append = degree of generator = 3 bits.

    Step 1: Append 3 zero bits to the message: 11001001 → 11001001000

    Step 2: Divide this by the generator 1001 using XOR (mod-2 division), tracking the remainder:

    11001001000  ÷  1001  (mod-2 division)
    
    1100  XOR 1001 = 0101
    bring down 1 → 1011  XOR 1001 = 0010
    bring down 0 → 0100  (leading 0, no XOR)
    bring down 0 → 1000  XOR 1001 = 0001
    bring down 1 → 0011  (leading 0, no XOR)
    bring down 0 → 0110  (leading 0, no XOR)
    bring down 0 → 1100  XOR 1001 = 0101
    bring down 0 → 1010  XOR 1001 = 0011
    
    Remainder (last 3 bits) = 011
    

    Step 3: Replace the appended zeros with this remainder:

    Transmitted message = 11001001 + 011 = 11001001011
    

    This matches option (ii).

  11. Budget 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.

    Install Pocketly
  12. Q2a. What are the duties of physical layer? Differentiate between fiber optic cable and twisted pair cable.20217m

    Module 1: Physical Layer & Data Communication

    What are the duties of physical layer? Differentiate between fiber optic cable and twisted pair cable.

    View this question on its own page →
    Worked Solution

    Duties of the Physical Layer

    • Converts data bits into signals (electrical, optical, or radio) suitable for the transmission medium, and vice versa on receipt.
    • Defines mechanical and electrical specs of connectors and cables (pin layout, voltage levels).
    • Specifies data rate (bits/sec) and bit duration.
    • Handles synchronization between sender and receiver clocks.
    • Defines line configuration (point-to-point vs multipoint) and transmission mode (simplex/half-duplex/full-duplex).
    • Determines physical topology (bus, star, ring, mesh).

    Fiber Optic vs Twisted Pair

    Aspect Fiber Optic Cable Twisted Pair Cable
    Signal type Light pulses Electrical signals
    Bandwidth/Speed Very high (Gbps–Tbps range) Lower (up to ~10 Gbps for Cat6a)
    Attenuation Very low — supports long distances without repeaters Higher — needs repeaters more often over distance
    EMI immunity Immune to electromagnetic interference Susceptible to EMI and crosstalk
    Cost More expensive, harder to install/splice Cheaper, easier to install
    Security Hard to tap without detection Easier to tap/eavesdrop
    Typical use Backbone links, long-haul, high-speed networks LANs, short-to-medium distance connections
  13. Q2b. Explain how sliding window protocol works at transport layer.20217m

    Module 4: Transport Layer & Congestion Control

    Explain how sliding window protocol works at transport layer.

    View this question on its own page →
    Worked Solution

    Sliding Window Protocol at the Transport Layer

    The sliding window protocol combines pipelined transmission with reliability and flow control. Instead of waiting for an ACK after every segment (stop-and-wait), both sender and receiver maintain a window — a contiguous range of sequence numbers that may be outstanding at any instant.

    Sender side

    • The send window covers [SND.UNA … SND.NXT + usable space]: every sequence number inside it may be transmitted immediately, without waiting for an acknowledgement, so the link stays busy (pipelining).
    • The window slides right only when a cumulative ACK arrives, which frees sequence space for new data.
    • The usable window is min(cwnd, rwnd) — the congestion window (network congestion control) and the receiver's advertised window (flow control) — so the sender can overflow neither the network nor the receiver's buffer.
    • On a time-out or 3 duplicate ACKs, the unacknowledged part of the window is retransmitted (Go-Back-N retransmits the whole window; Selective Repeat / TCP retransmits only the missing segments, optionally with SACK).

    Receiver side

    • The receive window is the set of sequence numbers it is currently willing to accept, decided by its free buffer space.
    • This size is advertised to the sender in every segment (TCP Window field, 16 bits) — this is TCP's flow-control mechanism.
    • The receiver returns cumulative ACKs; out-of-order segments are buffered (TCP, Selective Repeat) or discarded (Go-Back-N).

    Example — window size = 4

    Sender:   [ 1  2  3  4 ]                 initial window: 4 unacked segments
                send 1,2,3,4  ---------------------------->   Receiver accepts 1-4
    ACK for 1 arrives ->  [ 2  3  4  5 ]      window slides, slot freed
    ACK for 1,2,3 arrives ->       [ 4  5  6  7 ]
    (ACK lost / time-out)  ->  retransmit from SND.UNA onward
    

    Comparison of window-based protocols

    Aspect Go-Back-N Selective Repeat TCP
    Out-of-order frame Discarded Buffered & accepted Buffered & accepted
    What is retransmitted Entire window Only lost frames Only lost segments (SACK)
    Sender window ≤ 2ⁿ − 1 ≤ 2ⁿ⁻¹ min(cwnd, rwnd)
    Receiver window 1 > 1 > 1
    Error control Time-out / dup ACK Time-out per frame Time-out + fast retransmit

    Advantages: high link utilisation, natural place for flow control and error recovery, and it bounds the number of unacknowledged bytes. Limitation: the window must never exceed the sequence-number space (hence the 2ⁿ⁻¹ / 2ⁿ − 1 limits), or duplicate sequence numbers would be ambiguous.

  14. Q3a. Consider the delay of pure ALOHA versus slotted ALOHA at low load. Which one is less? Explain your answer.20217m

    Module 2: Data Link Layer & MAC Sublayer

    Consider the delay of pure ALOHA versus slotted ALOHA at low load. Which one is less? Explain your answer.

    View this question on its own page →
    Worked Solution

    Pure ALOHA has less delay than Slotted ALOHA at low load.

    Reasoning:

    In pure ALOHA, a station transmits a frame the instant it becomes ready, with no waiting for any external timing signal.

    In slotted ALOHA, time is divided into discrete slots (equal to one frame transmission time), and a station must wait until the start of the next slot boundary before it's allowed to transmit — even if the frame was ready earlier.

    At low load, collisions are rare in both schemes (few stations contending), so the throughput/success-rate difference between the two barely matters. What dominates delay at low load is simply how long a station has to wait before it's permitted to send:

    • Pure ALOHA: transmits immediately upon readiness — zero extra waiting time.
    • Slotted ALOHA: must wait, on average, half a slot time (frame transmission time) for the next slot boundary to arrive, even when there's no contention at all.

    So at low load, pure ALOHA's average access delay is lower simply because it doesn't impose the slot-alignment waiting overhead that slotted ALOHA requires — the throughput advantage of slotted ALOHA (from fewer collisions) only becomes the dominant factor at higher loads, where collision avoidance matters more than the small alignment delay.

  15. Q3b. A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is the throughput, if the system (all stations together) produces (i) 1000 frames per second and (ii) 500 frames per second?20217m

    Module 2: Data Link Layer & MAC Sublayer

    A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is the throughput, if the system (all stations together) produces (i) 1000 frames per second and (ii) 500 frames per second?

    View this question on its own page →
    Worked Solution

    For pure ALOHA, throughput is given by:

    S = G x e^(-2G)
    

    where G is the offered load (average number of frames generated per frame-transmission-time).

    Step 1: Frame transmission time

    Frame size = 200 bits
    Bandwidth  = 200 kbps = 200,000 bits/sec
    
    Tfr = Frame size / Bandwidth = 200 / 200,000 = 0.001 sec = 1 ms
    

    Case (i): 1000 frames/sec

    G = (frames/sec) x Tfr = 1000 x 0.001 = 1
    
    S = G x e^(-2G) = 1 x e^(-2) = 1 x 0.1353 = 0.1353  (13.53%)
    
    Throughput = S x (frames/sec) = 0.1353 x 1000 ≈ 135 frames/sec successfully delivered
    

    Case (ii): 500 frames/sec

    G = 500 x 0.001 = 0.5
    
    S = G x e^(-2G) = 0.5 x e^(-1) = 0.5 x 0.3679 = 0.1839  (18.39%)
    
    Throughput = 0.1839 x 1000 ≈ 184 frames/sec successfully delivered
    

    Observation: G = 0.5 gives the maximum possible throughput for pure ALOHA (~18.4%), which is exactly what case (ii) hits. Case (i)'s higher offered load (G=1) actually results in a lower successful throughput (13.53%) than case (ii), because more collisions occur as load increases beyond the optimal point — illustrating pure ALOHA's low ceiling on maximum achievable throughput.

  16. Q4a. A client uses TCP to send data to a server. The data are 16 bytes. Calculate the efficiency of this transmission at the TCP level (ratio of useful bytes to total bytes). Calculate the efficiency of transmission at the IP level. Assume no options for the IP header. Calculate the efficiency of transmission at the data link layer. Assume no options for the IP header and use Ethernet at the data link layer.20217m

    Module 4: Transport Layer & Congestion Control

    A client uses TCP to send data to a server. The data are 16 bytes. Calculate the efficiency of this transmission at the TCP level (ratio of useful bytes to total bytes). Calculate the efficiency of transmission at the IP level. Assume no options for the IP header. Calculate the efficiency of transmission at the data link layer. Assume no options for the IP header and use Ethernet at the data link layer.

    View this question on its own page →
    Worked Solution

    Efficiency of a 16-Byte TCP Transmission

    Given: useful data = 16 bytes; TCP header = 20 bytes (no options); IP header = 20 bytes (no options); Ethernet header = 6 (destination MAC) + 6 (source MAC) + 2 (type) = 14 bytes and trailer (FCS) = 4 bytes.

    Efficiency = useful data ÷ total bytes transmitted on that layer.

    1. Efficiency at the TCP level

    ηTCP=1616+20=1636=0.4444\eta_{TCP} = \frac{16}{16 + 20} = \frac{16}{36} = 0.4444

    η_TCP = 44.4 % (overhead 20 bytes of TCP header).

    2. Efficiency at the IP level

    The IP packet carries the TCP header + data:

    ηIP=1616+20+20=1656=0.2857\eta_{IP} = \frac{16}{16 + 20 + 20} = \frac{16}{56} = 0.2857

    η_IP = 28.6 % (overhead = 20-byte IP header + 20-byte TCP header = 40 bytes).

    3. Efficiency at the data link level (Ethernet)

    The Ethernet frame = 14-byte header + (IP packet = 56 bytes) + 4-byte FCS:

    ηDLL=1616+20+20+14+4=1674=0.2162\eta_{DLL} = \frac{16}{16 + 20 + 20 + 14 + 4} = \frac{16}{74} = 0.2162

    η_DLL = 21.6 %

    Note: the frame payload is 16 + 20 + 20 = 56 bytes, which is above Ethernet's 46-byte minimum payload, so no padding is added — 74 bytes is the true frame size.

    If the 8-byte preamble and the 12-byte interframe gap on the wire are also counted: η=1674+20=1694=17.0%\eta = \frac{16}{74+20} = \frac{16}{94} = 17.0\%.

    Summary

    Level Useful bytes Total bytes Efficiency
    TCP 16 36 44.4 %
    IP 16 56 28.6 %
    Data link (Ethernet) 16 74 21.6 %

    As expected, efficiency falls monotonically as each layer adds its own header to the same 16 bytes of useful data.

  17. Q4b. Describe the services provided by network layer. Explain ICMP.20217m

    Module 3: Network Layer & Routing

    Describe the services provided by network layer. Explain ICMP.

    View this question on its own page →
    Worked Solution

    Services of the Network Layer and ICMP

    The network layer (Layer 3) is responsible for host-to-host delivery of packets across possibly heterogeneous networks with different topologies, technologies and MTUs.

    Services provided by the network layer

    1. Packet delivery — the essential service: a packet created at the source must be delivered correctly to the destination host. IPv4 gives a best-effort (unreliable, no guarantee of order/duplication-free) service.
    2. Addressing — a hierarchical, technology-independent logical (IP) address identifies every host, so interconnection is possible even when the underlying LANs differ.
    3. Forwarding and routing — each router forwards a packet to the next hop by looking up its forwarding table, while routing algorithms (distance vector, link state, path vector) compute the end-to-end paths that populate those tables.
    4. Packetization & fragmentation — the layer breaks the transport data into datagrams and, when a datagram must cross a link with a smaller MTU, fragments and reassembles it at the destination.
    5. Error reporting, congestion control and QoS — reporting via ICMP, congestion indication/notification, and services such as precedence, delay, throughput and reliability guarantees where the network supports them.
    6. Connectionless datagram service — each packet is routed independently, which keeps routers simple and the network robust to failures.

    ICMP (Internet Control Message Protocol)

    • Purpose: the control and error-reporting companion to IP (RFC 792). It carries diagnostics and network problems back to the sending host; it is not a higher layer above IP — ICMP messages are carried inside ordinary IP datagrams with protocol number 1 (2 for IGMP, 58 for ICMPv6).
    • Format: 1-byte Type, 1-byte Code, 2-byte Checksum, 4-byte type-specific "rest of header", followed by as much of the original IP header + first 8 bytes of data as fits — enough for the source to identify the offending packet.
    • Common messages:
    Type / Code Meaning
    3 / 0,1,3,4 Destination unreachable (net, host, port, protocol)
    4 Source quench (congestion, deprecated)
    5 Redirect — host told a better route to the destination
    8 / 0 Echo request → ping
    0 Echo reply
    11 Time exceeded — TTL expired (used by traceroute)
    12 Parameter problem
    • Key points: ICMP reports errors, it never corrects them — recovery (retransmission, congestion control) is the job of TCP/the application. ICMP traffic is rate-limited so that a fault cannot trigger an infinite echo/error storm, and ICMP errors are never generated for ICMP error messages.
  18. Q5a. Discuss link state routing with an example.20217m

    Module 3: Network Layer & Routing

    Discuss link state routing with an example.

    View this question on its own page →
    Worked Solution

    Link State Routing

    In link state routing every router has a complete map of the network (the whole topology and all link costs) and computes the shortest path itself, instead of trusting the partial, second-hand information passed hop-by-hop as in distance vector routing. It is a global algorithm implemented by OSPF and IS-IS.

    How it works

    1. Link discovery — each router finds its neighbours and the cost of each link (hello packets).
    2. Link-state advertisement (LSA) — the router creates an LSA containing its ID, every neighbour ID and the cost of each link.
    3. Reliable flooding — the LSA is flooded to every router in the autonomous system. Each router re-broadcasts it on all links except the one it arrived on, using sequence numbers and an age (lifetime) field so duplicates are discarded and stale LSAs expire. Flooding repeats periodically (e.g. every 30 min in OSPF) to keep the database fresh.
    4. Link-state database (LSDB) — after convergence every router holds an identical copy of all LSAs, i.e. an identical graph of the network.
    5. SPF computation — each router runs Dijkstra's shortest-path algorithm with itself as the root, producing a shortest-path tree and hence a forwarding table (destination → next hop).

    Example

               4                5
         A --------- B ---------------- D
          \         /
           \       /
        3   \     /  2
             \   /
               C
    

    Dijkstra's SPF run at A (cost from A):

    Step Visited set Newly updated neighbours
    Init {A} D(B) = 4 via A, D(C) = 3 via A, D(D) = ∞
    1 pick min → C (3) B: min(4, 3+2=5) = 4 (unchanged, via A)
    2 pick min → B (4) D: 4 + 5 = 9 via B
    3 pick min → D (9) —

    Resulting forwarding table at A:

    Destination Cost Next hop
    A 0 —
    B 4 B
    C 3 C
    D 9 B

    Every other router runs the same algorithm with itself as root, so each has its own tree but shares the same LSDB.

    Evaluation

    Aspect Link state Distance vector
    Knowledge Full global topology Only neighbours' vectors
    Computation Dijkstra at each router Bellman-Ford, distributed
    Convergence Fast Slow
    Loops No count-to-infinity Count-to-infinity, transient loops
    Overhead High (flooding of LSAs) Low (periodic small vectors)
    Resources More memory & CPU Minimal

    Merits: loop-free, fast convergence, each router is independent. Demerits: flooding cost grows with network size, every router must store the whole topology, and SPF must be re-run on every change.

  19. Q5b. An ISP is granted a block of addresses starting with 120.60.4.0/22. The ISP wants to distribute these blocks to 100 organizations with each organization receiving just eight addresses. Design the sub-blocks and give the slash notation for each sub-block. Find out how many addresses are still available after these allocations.20217m

    Module 3: Network Layer & Routing

    An ISP is granted a block of addresses starting with 120.60.4.0/22. The ISP wants to distribute these blocks to 100 organizations with each organization receiving just eight addresses. Design the sub-blocks and give the slash notation for each sub-block. Find out how many addresses are still available after these allocations.

    View this question on its own page →
    Worked Solution

    CIDR Sub-block Design — 120.60.4.0/22

    Given: ISP block = 120.60.4.0/22; 100 organisations; 8 addresses each.

    Step 1 — Size of the ISP block

    A /22 prefix leaves 32 − 22 = 10 host bits:

    210=1024 addresses2^{10} = 1024 \text{ addresses}

    Mask = 255.255.252.0, so the block spans 120.60.4.0 → 120.60.7.255 (third octet 4…7).

    Step 2 — Size of each sub-block

    Each organisation gets 8 = 2³ addresses → 3 host bits, hence the prefix length is

    32−3=29  ⇒  /29 per organisation32 - 3 = 29 \;\Rightarrow\; \textbf{/29 per organisation}

    A /29 block has a block size of 8 addresses, exactly what is required.

    Step 3 — Design of the sub-blocks

    Total requirement = 100 × 8 = 800 ≤ 1024 ✓, so all organisations fit. The /29 sub-blocks are carved consecutively from the beginning of the ISP block:

    Organisation Sub-block (CIDR) Address range
    Org 1 120.60.4.0/29 120.60.4.0 – 120.60.4.7
    Org 2 120.60.4.8/29 120.60.4.8 – 120.60.4.15
    Org 3 120.60.4.16/29 120.60.4.16 – 120.60.4.23
    … … (+8 each time) …
    Org 100 120.60.7.24/29 120.60.7.24 – 120.60.7.31

    Position of Org 100: offset = (100 − 1) × 8 = 792 addresses from the start. 792 = 3 × 256 + 24, so the third octet advances by 3 (4 + 3 = 7) and the fourth octet is 24 → 120.60.7.24/29.

    General form of the n-th sub-block (n = 1…100):
    120.60.(4 + ⌊8(n−1)/256⌋).(8(n−1) mod 256)/29

    Step 4 — Addresses still available

    1024−800=224 addresses still available1024 - 800 = \textbf{224 addresses still available}

    These are 120.60.7.32 → 120.60.7.255 (255 − 32 + 1 = 224 ✓). They remain with the ISP and can be given out later — e.g. as three more /29s plus a /27, a /26 and a /25 (32 + 64 + 128 = 224) — or used for the ISP's own infrastructure (routers, DNS, web servers).

    Final answer

    Item Result
    ISP block size /22 = 1024 addresses (120.60.4.0 – 120.60.7.255)
    Organisation sub-block /29 (8 addresses)
    Org 1 / Org 100 120.60.4.0/29 / 120.60.7.24/29
    Allocated 800 addresses
    Remaining 224 addresses (120.60.7.32 – 120.60.7.255)
  20. Q6a. Explain in detail about TCP/IP protocol suite with neat diagram.20217m

    Module 1: Physical Layer & Data Communication

    Explain in detail about TCP/IP protocol suite with neat diagram.

    View this question on its own page →
    Worked Solution

    TCP/IP Protocol Suite

    +-----------------------------------------------------+
    |                Application Layer                     |
    |   HTTP | FTP | SMTP | DNS | Telnet                    |
    +-----------------------------------------------------+
    |                Transport Layer                        |
    |              TCP            |          UDP             |
    +-----------------------------------------------------+
    |                 Internet Layer                        |
    |          IP  |  ICMP  |  ARP  |  IGMP                  |
    +-----------------------------------------------------+
    |              Network Access Layer                     |
    |      Ethernet | Wi-Fi (802.11) | PPP                   |
    +-----------------------------------------------------+
    

    Network Access Layer — combines OSI's Physical and Data Link layers. Handles physical transmission of bits, framing, MAC addressing, and media access control (e.g. CSMA/CD in Ethernet).

    Internet Layer — handles logical (IP) addressing and routing. IP is connectionless and best-effort; it doesn't guarantee delivery, order, or error correction on its own. ICMP reports errors (e.g. "destination unreachable"), ARP resolves IP addresses to MAC addresses, and IGMP manages multicast group membership.

    Transport Layer — provides process-to-process delivery via port numbers.

    • TCP: connection-oriented (3-way handshake), reliable (ACKs + retransmission), ordered, with flow control (sliding window) and congestion control.
    • UDP: connectionless, no delivery guarantee, minimal overhead — used where speed matters more than reliability (e.g. video streaming, DNS queries).

    Application Layer — the layer applications interact with directly. Absorbs OSI's Session and Presentation layer duties (session management, data formatting/encryption). Protocols include HTTP (web), SMTP (email), FTP (file transfer), and DNS (name resolution).

    Each layer encapsulates the data from the layer above by prepending its own header, forming: [App data] -> [+TCP hdr] -> [+IP hdr] -> [+Frame hdr] -> bits on wire.

  21. Q6b. Differentiate between forwarding and routing.20217m

    Module 3: Network Layer & Routing

    Differentiate between forwarding and routing.

    View this question on its own page →
    Worked Solution

    Forwarding vs Routing

    Both are network-layer functions, but they belong to different planes and work at completely different timescales.

    Aspect Forwarding Routing
    Meaning Move a packet from an input link interface to the correct output link interface Determine the end-to-end path (route) a packet must take from source to destination
    Scope Local — decided by a single router Global — decided collectively by all routers in the network
    Plane Data plane (packet forwarding) Control plane (routing algorithms)
    Timescale Per packet — nanoseconds to microseconds Per connection / periodically — milliseconds to minutes
    Inputs Destination IP address + forwarding table Topology, link costs, metrics, policies, traffic load
    Mechanism Match (address lookup) + action (switch to output port), using ASICs / switching fabric / TCAM Routing protocols exchange information (DV, LS, path vector) and compute paths
    Table used Forwarding table: dest prefix → output port Routing table / RIB from which the forwarding table is derived
    Examples IP longest-prefix match OSPF, RIP, BGP
    Analogy The signpost at a junction telling you which exit to take Planning the whole trip on the map before leaving

    Relationship between the two

    Routing computes the paths; forwarding uses them. The routing algorithms run in the control plane, place the resulting routes in each router's routing table, and the data plane then installs only the necessary forwarding entries. If a link fails, routing re-computes and the new forwarding table takes effect — forwarding itself never "thinks", it only looks up.

    Extra points worth mentioning

    • Forwarding is data plane: it happens at every router for every packet and must be hardware-accelerated because line rates are very high.
    • Routing is control plane: it runs in software (routing protocols) and runs much less often — on topology changes, periodically, or on policy updates.
    • The two can be physically co-located in a traditional router, or separated as in SDN, where a central controller computes routes and pushes forwarding rules to dumb switches (control plane centralised, data plane distributed).
    • Both rely on a common view of the network, so a wrong routing decision eventually produces wrong forwarding decisions for every packet on that path.
  22. Budget 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.

    Install Pocketly
  23. Q7a. Compare and contrast the protocol field at the network layer with the port numbers at the transport layer. What is their common purpose? Why do we need two port-number fields but only one protocol field? Why is the size of the protocol field only half the size of each port number?20217m

    Module 4: Transport Layer & Congestion Control

    Compare and contrast the protocol field at the network layer with the port numbers at the transport layer. What is their common purpose? Why do we need two port-number fields but only one protocol field? Why is the size of the protocol field only half the size of each port number?

    View this question on its own page →
    Worked Solution

    Protocol Field (Network Layer) vs Port Numbers (Transport Layer)

    Common purpose

    Both fields are demultiplexing identifiers. Many protocols / many applications share the same physical network and the same IP address, so at the receiver something must say which upper-layer entity should get the payload. Both fields answer exactly that question — they let several users of a channel coexist (multiplexing at the sender, demultiplexing at the receiver).

    Comparison

    Feature Protocol field (IP header) Port numbers (TCP/UDP header)
    Layer Network layer (Layer 3) Transport layer (Layer 4)
    Size 8 bits 16 bits each
    Number of fields One Two (source + destination)
    Identifies The next-layer protocol to which the payload is handed (TCP = 6, UDP = 17, ICMP = 1, IPv6 = 41) The sending/receiving process (application socket)
    Value assigned by The sending host's IP layer The OS/application — well-known ports 0–1023, ephemeral 49152–65535
    Demultiplexing done by Receiver's IP layer → protocol module Receiver's transport layer → process
    Namespace Small, closed set of registered protocols Very large, dynamic set of concurrent applications

    Why two port fields but only one protocol field?

    A received IP datagram contains the payload of exactly one protocol — IP delivers it to one and only one next layer — so a single "next protocol" field completely identifies the destination; there is no "sender protocol" to represent, since IP itself is always the sender at that layer. A transport segment, however, is part of a two-way conversation: the receiver must know which remote process it came from (so it can reply) and which local process it is for. Without a source port the reply could not be routed back to the right socket at the original host — hence, exactly as with source and destination IP addresses, two port fields (source and destination) are required.

    Why is the protocol field only half the size of a port number?

    • The protocol field is 8 bits = 256 values, which is ample because only a few dozen protocols are registered at the network layer; it merely has to point to a subsystem (TCP, UDP, ICMP, …) inside the host — a small, essentially fixed, closed set.
    • A port number is 16 bits = 65 536 values because it must name individual processes/sockets on one machine: every concurrent web, mail, DNS, SSH, streaming … connection needs its own port, and both well-known and dynamically assigned (ephemeral) ports share that range. Two 16-bit fields also yield 2³² distinct (source, destination) socket pairs per IP address pair, which is necessary for many simultaneous connections between the same two hosts.
    • So the difference in size simply reflects the difference in the size of the two namespaces: protocol identification is coarse-grained, process identification is fine-grained.
  24. Q7b. With a neat diagram, explain distance vector routing protocol.20217m

    Module 3: Network Layer & Routing

    With a neat diagram, explain distance vector routing protocol.

    View this question on its own page →
    Worked Solution

    Distance Vector Routing

    Distance vector routing is a distributed, iterative, asynchronous algorithm based on the Bellman-Ford equation. Each router maintains a table (a "vector") giving the best-known distance to every destination and the next hop towards it, and exchanges this vector only with its immediate neighbours. No router ever learns the full topology. Example protocol: RIP (uses hop count, max 15 hops).

    Principle

    Dx(y)=min⁡v{c(x,v)+Dv(y)}D_x(y) = \min_v \left\{ c(x,v) + D_v(y) \right\}

    The least cost from x to y is the cheapest of: the direct cost to a neighbour v plus v's currently known least cost to y. Each router repeatedly advertises its vector, applies the equation to the neighbours' advertisements, and updates its table until no entry changes (convergence).

    Network diagram

               2                3
          A --------- B --------------- C
           \                       /
            \                     /
             4                   5
              \                 /
               \               /
                 ------ D ----
    
       (A-B = 2, B-C = 3, A-D = 4, D-C = 5)
    

    Operation at router A

    1. Initialisation (only direct links): A knows A = 0, B = 2 (via B), D = 4 (via D), C = ∞.
    2. First exchange: A receives vectors from neighbours B and D.
      • B advertises: "I can reach C in 3 hops, D in ∞, myself 0."
      • D advertises: "I can reach C in 5 hops, B in ∞, myself 0."
    3. Apply Bellman-Ford:
      • C: min(∞, 2 + 3, 4 + 5) = 5 via B
      • B: min(2, 4 + ∞) = 2 (unchanged) — D: min(4, 2 + ∞) = 4 (unchanged)
    4. Table now stable (converged).

    Final distance table at A:

    Destination Cost Next hop
    A 0 —
    B 2 B
    C 5 B
    D 4 D

    The same computation runs simultaneously in every router, each building its own table from its neighbours' vectors.

    Properties

    Aspect Detail
    Knowledge Local — only neighbours' vectors, no global topology
    Communication Periodic (RIP: every 30 s) and on-change updates to neighbours only
    Advantages Simple, minimal computation, very low overhead, little memory
    Disadvantages Count-to-infinity problem, transient routing loops, slow convergence after a failure
    Remedies Split horizon, poison reverse, triggered updates, hold-down timers
    Cost metric Must be additive (hop count, delay) — unlike link state, which can use any metric

    Summary: each router "believes" its neighbours about destinations it does not know directly, so a bad or stale advertisement propagates slowly and can drive the cost to infinity during a failure — the main weakness compared with link state routing.

  25. Q8. Draw and describe the TCP header. Assume that a host receives a UDP segment with 01011101 11110010 (we separated the values of each byte with a space for clarity) as the checksum. The host adds the 16-bit words over all necessary fields excluding the checksum and obtains the value 00110010 00001101. Is the segment considered correctly received or not? What does the receiver do?202114m

    Module 4: Transport Layer & Congestion Control

    Draw and describe the TCP header. Assume that a host receives a UDP segment with 01011101 11110010 (we separated the values of each byte with a space for clarity) as the checksum. The host adds the 16-bit words over all necessary fields excluding the checksum and obtains the value 00110010 00001101. Is the segment considered correctly received or not? What does the receiver do?

    View this question on its own page →
    Worked Solution

    TCP Header and UDP Checksum Verification

    Part A — TCP header

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |          Source Port          |       Destination Port        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        Sequence Number                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                    Acknowledgment Number                      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Data Offset | Reserved  |C|E|U|A|P|R|S|F|      Window         |
    |     (4)      |    (4)    |W|C|R|C|S|Y|I|N|N|    (16 bits)      |
    |              |           |R|E|G|K|H|T|N|N|                    |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |           Checksum            |       Urgent Pointer          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |              Options (variable, 0–40 bytes)     |    Padding   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    

    Field description

    Field Bits Purpose
    Source / Destination Port 16 + 16 Identify the sending and receiving processes (sockets) for demultiplexing
    Sequence Number 32 Number of the first data byte of this segment (SYN/FIN each consume one number)
    Acknowledgment Number 32 Next byte the receiver expects — valid only when ACK = 1
    Data Offset 4 Header length in 32-bit words: 5 words = 20 bytes min., 15 words = 60 bytes max.
    Reserved 4 Must be zero (future use)
    Flags 8 CWR, ECE (ECN), URG (urgent pointer valid), ACK (ack # valid), PSH (push to app now), RST (reset), SYN (open connection), FIN (close connection)
    Window 16 Flow control — number of bytes the receiver can still accept (rwnd); sender may transmit min(cwnd, rwnd)
    Checksum 16 One's-complement sum of a pseudo-header (src IP, dst IP, zero, protocol = 6, TCP length) + TCP header + data — detects corruption on any link
    Urgent Pointer 16 Offset from the sequence number to the end of urgent data (valid if URG = 1)
    Options 0–40 MSS, Window Scale, SACK permitted / selective ACK blocks, timestamps, NOP, End-of-Option

    Fixed part = 20 bytes; with options up to 60 bytes. Ports give process-to-process delivery, sequence/ack numbers give byte-stream reliability, the window gives flow control, and the checksum (with pseudo-header) guarantees end-to-end integrity across IP.


    Part B — UDP checksum verification

    Given

    • Sum of all 16-bit words excluding the checksum = 00110010 00001101 = 0x320D
    • Received checksum field = 01011101 11110010 = 0x5DF2

    Test: the receiver adds all 16-bit words including the checksum field (folding any end-around carry). The segment is correct only if the result is 11111111 11111111 = 0xFFFF.

    Computation

          00110010 00001101   (sum of all other fields)   0x320D
        + 01011101 11110010   (checksum field)            0x5DF2
        ------------------------------------------
          10001111 11111111                              0x8FFF
    

    There is no carry out of bit 15, so no end-around carry is added, and

    0x320D+0x5DF2=0x8FFFeq0xFFFF0x320D + 0x5DF2 = 0x8FFF eq 0xFFFF

    Cross-check: the expected checksum is the one's complement of the sum of the other fields:
    ~00110010 00001101 = 11001101 11110010 = 0xCDF2, which is not the received value 0x5DF2.

    Conclusion: the sum is not 0xFFFF ⇒ the segment is NOT correctly received (at least one bit has been corrupted).

    What the receiver does

    1. Silently discards the UDP segment. UDP is connectionless and unreliable: it sends no NAK, no error ICMP and no request for retransmission — recovery, if any, is left to the application.
    2. The missing data must be re-sent by the application after its own timeout (or the transfer simply fails).
    3. Had this been a TCP segment, the receiver would likewise discard it but would send no ACK; TCP's retransmission timer would then retransmit the segment, so the error would be repaired end-to-end.
    4. (Note: in IPv4 the UDP checksum is optional and may be sent as 0 = "not computed"; in IPv6 it is mandatory. If the calculated checksum is 0 it is transmitted as all 1s.)
  26. Q9. Differentiate between POP3 and IMAP4. Suppose Alice, with a Web-based e-mail account (such as Hotmail or Gmail), sends a message to Bob, who accesses his mail from his mail server using POP3. Discuss how the message gets from Alice's host to Bob's host. Be sure to list the series of application-layer protocols that are used to move the message between the two hosts.202114m

    Module 5: Application Layer & Security

    Differentiate between POP3 and IMAP4. Suppose Alice, with a Web-based e-mail account (such as Hotmail or Gmail), sends a message to Bob, who accesses his mail from his mail server using POP3. Discuss how the message gets from Alice's host to Bob's host. Be sure to list the series of application-layer protocols that are used to move the message between the two hosts.

    View this question on its own page →
    Worked Solution

    POP3 vs IMAP4 and Delivery of E-mail

    Part A — POP3 vs IMAP4

    Aspect POP3 (RFC 1939) IMAP4 (RFC 3501)
    Full form Post Office Protocol version 3 Internet Message Access Protocol version 4
    Basic model Download-and-delete (default) or download-and-keep Messages remain on the server; the client manipulates the server's copy
    Server-side storage Mailbox is emptied after retrieval → mail stored on one machine All mail retained on the server; folders, flags and read state kept server-side
    Client access Effectively one client at a time (mailbox is locked) Many clients/devices can access the same mailbox simultaneously
    Operations Simple: USER, PASS, LIST, RETR, DELE, STAT, QUIT Rich: LOGIN, SELECT, FETCH, STORE, SEARCH, CREATE/DELETE, EXPUNGE, NOOP
    Folders Not supported (flat mailbox) Multiple folders supported, created/deleted on the server
    Partial download No — a whole message must be fetched Yes — headers only, byte ranges, individual MIME parts
    Server-side search No Yes (SEARCH)
    Default ports 110 (cleartext), 995 (TLS) 143 (cleartext), 993 (TLS)
    Typical use Simple offline reading, low server load Webmail, smartphones, sync across devices
    Authentication USER/PASS (cleartext unless TLS) LOGIN or SASL (CRAM-MD5, OAuth2, …)

    Both protocols are used only to retrieve mail from the user's own mailbox; moving a message between hosts is always done by SMTP.

    Part B — How Alice's message reaches Bob

    Application-layer protocols used, in order: HTTPS (HTTP) → DNS → SMTP (possibly several hops) → POP3 or IMAP4.

    1. Alice composes the message in her web-based account (Gmail/Hotmail). Since she uses a browser, the message is uploaded to her provider's web server using HTTP over TLS (HTTPS), port 443. (With an installed mail client she would instead submit it with SMTP on port 587.)
    2. Alice's mail server (originating MTA) takes the message. Before sending, it queries DNS for Bob's domain MX record (then an A/AAAA record) to learn the address of Bob's mail exchanger — mail cannot be delivered without this lookup.
    3. SMTP transfer: Alice's server opens a TCP connection to Bob's mail server on port 25 and runs SMTP — HELO/EHLO → MAIL FROM → RCPT TO → DATA → QUIT — handing over the envelope and the message. If Bob's server is down, the message is queued and retried.
    4. Possible relays: the message may pass through one or more intermediate mail servers, each forwarding it with SMTP, until it reaches Bob's mail server (destination MTA), which accepts it and appends the message to Bob's mailbox.
    5. Bob retrieves the mail with a mail client that logs into his own server using POP3 (110/995) or IMAP4 (143/993): USER/PASS (or LOGIN), LIST, then RETR (POP3) or FETCH (IMAP4), followed by QUIT. Under POP3 the message is normally deleted from the server after download; under IMAP4 it stays on the server.
     Alice's host        Alice's mail server      DNS server        Bob's mail server     Bob's host
     (web browser)       (webmail provider)                          (Bob's domain)        (mail client)
          |                      |                     |                     |                   |
          | 1 HTTPS (443)        |                     |                     |                   |
          |   compose + send     |                     |                     |                   |
          |--------------------->|                     |                     |                   |
          |                      | 2 DNS query: MX for bob.com              |                   |
          |                      |-------------------->|                     |                   |
          |                      | 3 MX answer: mail.bob.com                |                   |
          |                      |<--------------------|                     |                   |
          |                      | 4 SMTP (25): EHLO / MAIL FROM / RCPT TO / DATA               |
          |                      |---------------------------------------->|                   |
          |                      |                     |                     | 5 message stored  |
          |                      |                     |                     |   in Bob's mailbox|
          |                      |                     |                     |                   |
          |                      |                     |                     | 6 POP3 (110/995)  |
          |                      |                     |                     | or IMAP4 (143/993)|
          |                      |                     |                     |<------------------|
    

    Series of application-layer protocols: HTTP/HTTPS (Alice → her provider), DNS (MX lookup), SMTP (Alice's server → Bob's server, possibly several relays), and POP3 or IMAP4 (Bob's server → Bob's client) — all carried over TCP/IP beneath them.

Official AppAndroid App

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.