2015 question paper

Computer Networks

25 questions

  1. Q1a. Network layer of OSI model does not establish any relationship among different packets of same message. (Write True or False)20152m

    Module 3: Network Layer & Routing

    Network layer of OSI model does not establish any relationship among different packets of same message. (Write True or False)

    View this question on its own page →
    Worked Solution

    True.

    Why: The network layer provides connectionless (datagram) service in IP — each packet is routed independently and carries no binding to other packets of the same message. Relationships among segments of one message (ordering, sequencing, reassembly) are maintained by the transport layer (e.g., TCP), not by the network layer. (Only connection-oriented network layers such as ATM/legacy X.25 establish such relationships.)

  2. Q1b. What is repeater?20152m

    Module 1: Physical Layer & Data Communication

    What is repeater?

    View this question on its own page →
    Worked Solution

    A repeater is a Physical-layer device that receives an incoming signal, regenerates (reshapes and re-times) it to its original strength and quality, and retransmits it onward. It extends the maximum distance a signal can travel over a medium by compensating for attenuation, without altering the data content. Repeaters operate purely on the electrical/optical signal and have no awareness of frames, addresses, or higher-layer data.

  3. Q1c. What is baud rate?20152m

    Module 1: Physical Layer & Data Communication

    What is baud rate?

    View this question on its own page →
    Worked Solution

    Baud rate is the number of signal units (symbol changes) transmitted per second over a communication channel. It measures the rate of change of the physical signal, not the number of bits transferred.

    Baud rate equals bit rate only when each signal unit carries exactly 1 bit (binary signaling). In general:

    Bit rate = Baud rate × log₂(L)
    

    where L is the number of distinct signal levels used per symbol. With more levels per symbol (e.g. QAM), the bit rate can exceed the baud rate.

  4. Q1d. What is switch?20152m

    Module 2: Data Link Layer & MAC Sublayer

    What is switch?

    View this question on its own page →
    Worked Solution

    A switch is a Data Link layer networking device that connects multiple devices within a LAN and forwards frames selectively — only out the specific port leading to the destination MAC address — rather than broadcasting to every port like a hub does.

    It builds and maintains a MAC address table by learning the source address and incoming port of every frame it sees, allowing it to make intelligent per-frame forwarding decisions. This reduces unnecessary traffic, eliminates collisions (each port is its own collision domain), and allows multiple simultaneous conversations on different port pairs at once (full-duplex operation).

  5. Q1e. What is flooding in routing?20152m

    Module 3: Network Layer & Routing

    What is flooding in routing?

    View this question on its own page →
    Worked Solution

    Flooding is a simple routing/forwarding technique in which every router, on receiving a packet, sends a copy of it out on every outgoing line except the one on which it arrived.

    • The packet spreads through the entire network like a wave, so if any path exists between source and destination, the packet is guaranteed to be delivered — it is highly robust against link/router failures.
    • To stop infinite circulation, a hop counter (sequence number) is decremented at each hop, and duplicate packets are discarded by remembering (packet id, port).
    • Drawbacks: heavy traffic congestion and duplicate packets; used mainly for broadcast, for broadcasting management/trap messages, or as a fallback during network failures.
  6. Q1f. What is TCP?20152m

    Module 4: Transport Layer & Congestion Control

    What is TCP?

    View this question on its own page →
    Worked Solution

    TCP (Transmission Control Protocol) is a connection-oriented, reliable transport-layer protocol of the TCP/IP suite that provides process-to-process (end-to-end) communication between applications on hosts.

    • Establishes a logical connection first using the three-way handshake before data transfer.
    • Provides reliability by sequencing, acknowledgement, retransmission of lost/duplicate segments, and error detection.
    • Offers flow control (sliding window) and congestion control (slow start, congestion avoidance).
    • Delivers a byte-stream service to the application; uses 20-byte headers and ports for multiplexing.
  7. Q1g. What is the role of a bridge?20152m

    Module 2: Data Link Layer & MAC Sublayer

    What is the role of a bridge?

    View this question on its own page →
    Worked Solution

    A bridge is a Data Link layer device that connects two or more LAN segments and forwards frames between them selectively, based on the destination MAC address — rather than blindly repeating everything (like a hub/repeater) or routing based on IP (like a router).

    Key roles:

    1. Filtering — examines each frame's destination MAC address and forwards it only to the segment where that address actually resides, keeping traffic local to its own segment when the destination is nearby.
    2. Learning — builds a forwarding/MAC address table automatically by observing the source addresses of incoming frames, associating each address with the port it arrived on.
    3. Segmenting collision domains — by splitting one large shared LAN into smaller segments, it reduces collisions and increases effective usable bandwidth.
    4. Extending the LAN — links physically separate LAN segments (possibly using different media) into a single logical network, transparently to the higher layers.
  8. Q1h. What do you mean by connectionless service?20152m

    Module 5: Application Layer & Security

    What do you mean by connectionless service?

    View this question on its own page →
    Worked Solution

    Connectionless service is a service in which no logical connection is set up between sender and receiver before data is transferred — each packet (datagram) carries the full destination address and is routed independently of other packets.

    • Packets may follow different paths and arrive out of order; ordering/reassembly is left to higher layers.
    • No handshake, no reserved resources → faster, cheaper, and robust, but no guarantee of delivery, ordering or error-free transfer (e.g., IP, UDP).
    • Analogous to the postal system: each letter is independently addressed and delivered.
    • Contrasted with connection-oriented service, where a connection is established, data follows the same path, and the connection is released (e.g., TCP).
  9. Q1i. List two protocols in channelization category.20152m

    Module 1: Physical Layer & Data Communication

    List two protocols in channelization category.

    View this question on its own page →
    Worked Solution

    Two protocols in the channelization category of multiple access protocols:

    1. FDMA (Frequency Division Multiple Access) — divides the available bandwidth into fixed non-overlapping frequency bands, permanently allocating one band per station.

    2. TDMA (Time Division Multiple Access) — divides channel access into fixed time slots, with each station allowed to transmit only during its assigned slot.

    (CDMA, Code Division Multiple Access, is also acceptable — it separates stations using distinct orthogonal codes rather than frequency or time.)

  10. Q1j. What is byte-oriented protocol?20152m

    Module 2: Data Link Layer & MAC Sublayer

    What is byte-oriented protocol?

    View this question on its own page →
    Worked Solution

    A byte-oriented protocol treats the frame being transmitted as a sequence of bytes (characters) rather than as a raw stream of individual bits. Framing and control information are defined in terms of whole bytes — e.g. special reserved control bytes (like flag or escape bytes) mark the start/end of a frame, and byte-stuffing is used to escape any byte pattern within the data that would otherwise be misinterpreted as a control byte.

    Examples: PPP (Point-to-Point Protocol), older protocols like BISYNC (Binary Synchronous Communication).

    This contrasts with bit-oriented protocols (e.g. HDLC), which treat the frame as a raw sequence of bits and use bit-stuffing (inserting a single extra bit) to prevent a specific bit pattern from appearing accidentally within the data.

  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. Explain the responsibilities of first four layers of OSI model.20158m

    Module 1: Physical Layer & Data Communication

    Explain the responsibilities of first four layers of OSI model.

    View this question on its own page →
    Worked Solution

    The first four layers of the OSI model (bottom-up) handle everything from raw bit transmission up to end-to-end delivery:

    1. Physical Layer

    • Transmits raw bits over a physical medium (copper, fiber, wireless).
    • Defines mechanical/electrical specs: voltage levels, cable/connector types, pin layouts.
    • Handles bit synchronization, line coding, and data rate (bits/sec).
    • Defines transmission mode: simplex, half-duplex, full-duplex.

    2. Data Link Layer

    • Organizes raw bits into frames for transmission.
    • Physical (MAC) addressing — attaches sender/receiver hardware addresses to frames.
    • Flow control — prevents a fast sender from overwhelming a slow receiver.
    • Error control — detects (and sometimes corrects) bit errors using checksums/CRC.
    • Access control — determines which device gets to use the shared medium at a given time (via MAC sub-layer protocols like CSMA/CD).

    3. Network Layer

    • Logical addressing — assigns and uses IP addresses, independent of physical hardware.
    • Routing — determines the best path for packets across multiple interconnected networks.
    • Packet forwarding — moves packets from source to destination, hop by hop, through routers.
    • Fragmentation — splits packets to fit within a network segment's Maximum Transfer Unit (MTU), reassembling at the destination.

    4. Transport Layer

    • Process-to-process delivery — uses port numbers to deliver data to the correct application/process on the destination host, not just the correct host.
    • Segmentation and reassembly — splits data into segments at the sender, reassembles in order at the receiver.
    • Connection control — connection-oriented (TCP) or connectionless (UDP) service.
    • Flow and congestion control — manages the rate of data transfer to avoid overwhelming the receiver or the network.
  13. Q2b. Compare between TCP/IP and OSI models.20156m

    Module 1: Physical Layer & Data Communication

    Compare between TCP/IP and OSI models.

    View this question on its own page →
    Worked Solution
    Aspect TCP/IP Model OSI Model
    Layers 4 layers 7 layers
    Origin Built from real, existing protocols (TCP, IP) Built as a theoretical standard before matching protocols existed
    Session/Presentation layers Not separate — merged into Application layer Exist as distinct layers
    Practical use Actually used to run the internet Mainly used as a teaching/reference framework
    Layer boundaries Looser, layers sometimes overlap in function Strict, well-defined boundaries between layers
      OSI (7 layers)              TCP/IP (4 layers)
      ---------------             ------------------
      Application     \
      Presentation      >---------  Application
      Session          /
      Transport        ----------  Transport
      Network          ----------  Internet
      Data Link         \
      Physical            >-------  Network Access
    

    In short, TCP/IP is a condensed, practically-driven model, while OSI is a more granular, standards-first model that's mostly used today as a conceptual reference for discussing network layers.

  14. Q3a. Explain the transmission characteristics of twisted pair.20157m

    Module 1: Physical Layer & Data Communication

    Explain the transmission characteristics of twisted pair.

    View this question on its own page →
    Worked Solution

    Twisted-pair cable consists of two insulated copper wires twisted together in a helical pattern. Its key transmission characteristics are:

    1. Signal type — carries analog or digital electrical signals.

    2. Bandwidth — limited compared to coaxial or fiber; UTP Cat 5e/6 supports up to a few hundred MHz to ~500 MHz of usable bandwidth, enough for 1–10 Gbps over short distances.

    3. Attenuation — signal strength decreases with distance and increases with frequency; requires repeaters/amplifiers over long runs (typically limited to ~100 m for Ethernet UTP before needing a repeater).

    4. Noise susceptibility — vulnerable to electromagnetic interference (EMI) and crosstalk from adjacent pairs/cables, since the copper conductors are exposed to external fields. Twisting reduces (but doesn't eliminate) this by promoting equal noise pickup on both wires, which cancels out under differential signaling.

    5. Two variants:

      • UTP (Unshielded Twisted Pair) — no extra shielding, cheaper, more prone to interference.
      • STP (Shielded Twisted Pair) — has metallic foil/braid shielding around the pairs, better noise immunity, but more expensive and harder to install.
    6. Cost and ease of installation — the cheapest and easiest guided medium to install and terminate, which is why it dominates LAN cabling despite its bandwidth/distance limitations relative to fiber.

  15. Q3b. Compare and contrast between byte-oriented and bit-oriented protocols. Also compare between byte-stuffing and bit-stuffing.20157m

    Module 2: Data Link Layer & MAC Sublayer

    Compare and contrast between byte-oriented and bit-oriented protocols. Also compare between byte-stuffing and bit-stuffing.

    View this question on its own page →
    Worked Solution

    Byte-oriented vs Bit-oriented protocols

    Aspect Byte-oriented protocol Bit-oriented protocol
    Unit of framing Treats the frame as a sequence of bytes/characters Treats the frame as a raw sequence of individual bits
    Delimiters Uses special reserved control bytes (e.g. flag byte, escape byte) to mark frame boundaries Uses a specific bit pattern (e.g. 01111110) as the flag to mark frame boundaries
    Data transparency technique Byte stuffing Bit stuffing
    Examples PPP, BISYNC HDLC, SDLC
    Overhead granularity Overhead added/removed at byte level Overhead added/removed at bit level, more flexible/fine-grained

    Byte-stuffing vs Bit-stuffing

    Aspect Byte-stuffing Bit-stuffing
    What it protects against Accidental occurrence of the flag byte (e.g. specific 8-bit pattern) inside the actual data payload Accidental occurrence of the flag bit pattern (e.g. six consecutive 1s: 011111 10) inside the actual data payload
    Mechanism Whenever the flag byte (or the designated ESC byte itself) appears in the data, an extra ESC (escape) byte is inserted immediately before it. The receiver removes any ESC byte it finds and treats the following byte as literal data. Whenever five consecutive 1s appear in the data, the sender inserts an extra 0 immediately after them. The receiver, upon seeing five consecutive 1s followed by a 0, removes that inserted 0.
    Example Data containing byte 01111110 (same as flag) → sender inserts ESC before it: ESC 01111110 Data 011111 1 (contains five 1s in a row) → sender inserts a 0: 0111110 1
    Granularity Operates at byte level (coarser) Operates at bit level (finer, more precise, no wasted stuffing when only a few bits match)
    Used with Byte-oriented protocols Bit-oriented protocols

    In essence, both techniques serve the same purpose — preventing an accidental appearance of the frame delimiter pattern from being mistaken for an actual frame boundary — but operate at different granularities matching their respective protocol style.

  16. Q4a. Explain the reasons for moving from stop-and-wait ARQ protocol to Go-back-N ARQ protocol.20157m

    Module 2: Data Link Layer & MAC Sublayer

    Explain the reasons for moving from stop-and-wait ARQ protocol to Go-back-N ARQ protocol.

    View this question on its own page →
    Worked Solution

    Stop-and-Wait ARQ requires the sender to transmit exactly one frame, then wait idle until an ACK for that frame arrives before sending the next one. This is simple but very inefficient on links with significant propagation delay or high bandwidth, motivating the move to Go-Back-N:

    1. Poor channel utilization on high-delay/high-bandwidth links — the sender sits idle for the entire round-trip time (RTT) after every single frame, even though the link is physically capable of carrying much more data during that idle period. On a long-distance or high-speed link, this wasted idle time can dominate total transfer time, driving utilization down toward zero as bandwidth-delay product grows.

    2. Underutilizes available bandwidth — since only one frame is ever "in flight" at a time, the link's full capacity is never actually exploited; a link capable of carrying many frames simultaneously is used as if it could only carry one.

    3. Throughput doesn't scale with bandwidth — simply upgrading to a faster link doesn't meaningfully improve throughput under Stop-and-Wait, since the RTT-bound idle time remains the dominant factor, not the transmission time itself.

    Go-Back-N's fix: by introducing a sliding window that allows multiple frames (up to window size N) to be transmitted and outstanding (unacknowledged) simultaneously, the sender can keep pushing new frames onto the link while still waiting for earlier ACKs, keeping the pipe continuously full instead of idling after each frame. This dramatically improves throughput on links where the bandwidth-delay product is large, at the modest cost of needing sequence numbers, a window mechanism, and (in the event of a lost frame) potentially retransmitting more than the single lost frame.

  17. Q4b. Define framing and discuss the reasons for its need. What are fixed-size and variable-size framings?20157m

    Module 2: Data Link Layer & MAC Sublayer

    Define framing and discuss the reasons for its need. What are fixed-size and variable-size framings?

    View this question on its own page →
    Worked Solution

    Framing is the Data Link layer function of dividing a stream of bits received from the Physical layer into distinct, manageable units called frames, each with clear start and end boundaries, before passing them up (or preparing them for transmission down).

    Why framing is needed

    1. Error control at a manageable granularity — error detection/correction (checksums, CRC) is applied per-frame; without framing, a single bit error anywhere in an endless bitstream would be very costly to isolate and recover from.
    2. Flow control — frames give a natural unit for ACKs and window-based flow control between sender and receiver.
    3. Addressing — each frame carries header information (like source/destination MAC addresses) needed for the Data Link layer to deliver it correctly within a local network.
    4. Synchronization — clear frame boundaries let the receiver know exactly where one unit of data ends and the next begins, essential for correctly interpreting the bitstream.

    Fixed-size framing

    Every frame has the same, predetermined length. The receiver simply counts off that many bits/bytes to identify frame boundaries — no explicit delimiter is needed. This is simple but can waste bandwidth if the actual data doesn't neatly fill a frame (requiring padding), and is inflexible for variable-length data. Example: ATM cells, which are always a fixed 53 bytes.

    Variable-size framing

    Frames can have different lengths, and the receiver needs an explicit way to determine where a frame starts and ends. Two common approaches:

    • Character/byte-oriented: uses special flag bytes (with byte-stuffing to handle their accidental appearance in data).
    • Bit-oriented: uses a specific bit pattern flag (with bit-stuffing).

    This is more flexible and avoids the padding waste of fixed framing, but requires more complex boundary-detection logic (stuffing/destuffing) at both ends. Examples: Ethernet, HDLC, PPP.

  18. Q5a. Draw the flow diagram for the CSMA/CD and explain. Also compare CSMA/CD with ALOHA.201514m

    Module 2: Data Link Layer & MAC Sublayer

    Draw the flow diagram for the CSMA/CD and explain. Also compare CSMA/CD with ALOHA.

    View this question on its own page →
    Worked Solution

    CSMA/CD Flow Diagram

                  +---------------------+
                  |  Station ready to    |
                  |  transmit a frame    |
                  +---------------------+
                            |
                            v
                  +---------------------+
             +--->|  Sense the channel   |
             |    +---------------------+
             |              |
             |         Channel busy?
             |         /          \
             |       Yes            No
             |        |              |
             |  (wait, keep          v
             |   sensing)   +----------------------+
             |              | Begin transmitting    |
             |              | the frame              |
             |              +----------------------+
             |                        |
             |                        v
             |              +----------------------+
             |              | Continue listening    |
             |              | WHILE transmitting     |
             |              +----------------------+
             |                        |
             |              Collision detected?
             |               /              \
             |             Yes               No
             |              |                 |
             |              v                 v
             |    +-------------------+  +-------------------+
             |    | Send jam signal;   |  | Finish transmitting|
             |    | abort transmission |  | frame successfully |
             |    +-------------------+  +-------------------+
             |              |
             |              v
             |    +-------------------+
             +----| Wait RANDOM backoff|
                  | time, then retry   |
                  +-------------------+
    

    Explanation: A station first senses the channel ("listen before talk"). If busy, it waits; if idle, it begins transmitting while continuing to listen for a collision (unlike ALOHA, which doesn't sense at all). If a collision is detected mid-transmission, it immediately stops, sends a jam signal to ensure all colliding parties notice, and backs off for a random time before retrying — saving bandwidth by aborting early instead of completing a doomed transmission.

    Comparison: CSMA/CD vs ALOHA

    Aspect ALOHA CSMA/CD
    Channel sensing before transmit None — transmits blindly whenever ready Senses channel first; only transmits if idle
    Collision detection during transmission No — only inferred later via missing ACK Yes — detects collision while still transmitting and aborts early
    Vulnerable time 2 x Tfr (pure) or 1 x Tfr (slotted) Much smaller — limited to the propagation-delay window before carrier sense takes effect
    Maximum throughput ~18.4% (pure) / ~36.8% (slotted) Significantly higher — CSMA/CD on a well-designed LAN can approach 80–90%+ under moderate load
    Wasted transmission time on collision Full frame time wasted (no early detection) Only a fraction of frame time wasted, since transmission is aborted as soon as collision is detected

    In short, CSMA/CD's "listen before and during transmission" strategy is a substantial improvement over ALOHA's completely uncoordinated transmission approach, both reducing collision frequency and limiting the cost of the collisions that do occur.

  19. Q6a. What is bridge? Explain about spanning tree.20158m

    Module 2: Data Link Layer & MAC Sublayer

    What is bridge? Explain about spanning tree.

    View this question on its own page →
    Worked Solution

    Bridge

    A bridge is a Data Link layer device that connects two or more LAN segments and forwards frames selectively, based on destination MAC address, rather than blindly repeating everything like a hub. It learns which MAC addresses live on which port by observing the source address of incoming frames, building a forwarding table automatically. This reduces collisions (by segmenting collision domains) and filters unnecessary traffic from crossing into segments where it isn't needed.

    Spanning Tree Protocol (STP)

    When bridges (or switches) are interconnected with redundant links (for fault tolerance), this can accidentally create loops in the network topology. Loops are dangerous at the Data Link layer because:

    • Frames (especially broadcast frames) can circulate endlessly, since Ethernet frames have no "hop count" / TTL field to expire them.
    • This causes a broadcast storm, exponentially multiplying traffic and quickly overwhelming the network.
    • The bridging/MAC address table can also become unstable, as the same source address appears to arrive from multiple different ports in rapid succession.

    The Spanning Tree Protocol solves this by having bridges cooperatively compute a loop-free logical topology (a spanning tree) that still uses every bridge, but disables (blocks) redundant links that would otherwise create a loop — while keeping them on standby.

    How it works, briefly:

    1. Bridges exchange special messages called BPDUs (Bridge Protocol Data Units) to share topology information.
    2. One bridge is elected as the root bridge (typically the one with the lowest bridge ID).
    3. Every other bridge computes the shortest path (least cost) to the root bridge, designating one port as its root port.
    4. For each network segment, one bridge is chosen as the designated bridge, and its port toward that segment is put in forwarding state; all other redundant ports on that segment are put into blocking state (not forwarding data, but still listening for topology changes).
    5. If an active link fails, STP automatically recalculates and activates a previously blocked (backup) link to restore connectivity — providing both loop prevention and fault tolerance.
  20. Q6b. What are the common Gigabit Ethernet implementations?20156m

    Module 1: Physical Layer & Data Communication

    What are the common Gigabit Ethernet implementations?

    View this question on its own page →
    Worked Solution

    Gigabit Ethernet (IEEE 802.3z / 802.3ab) delivers 1000 Mbps (1 Gbps) and comes in several physical-layer implementations, differing by medium:

    Implementation Medium Max distance Notes
    1000BASE-T Cat 5e/Cat 6 UTP copper (4 pairs) 100 m Most common for desktop/office LAN cabling
    1000BASE-SX Multimode fiber (short wavelength, ~850 nm) ~550 m Cost-effective fiber option for shorter runs
    1000BASE-LX Single-mode or multimode fiber (long wavelength, ~1300 nm) Up to ~5 km (single-mode) Used for longer backbone links
    1000BASE-CX Shielded copper (twinax), short-haul ~25 m Used for very short connections, e.g. within a server rack

    All variants present the same 1 Gbps MAC-layer interface upward, differing only in the Physical layer signaling and medium used — allowing network designers to pick the right implementation based on distance, cost, and existing cabling infrastructure.

  21. Q7a. Explain the procedure for checksum and verification in the IPv4 protocol. What part of an IPv4 packet is covered in the checksum calculation and why? Are options, if present, included in the calculation?20158m

    Module 3: Network Layer & Routing

    Explain the procedure for checksum and verification in the IPv4 protocol. What part of an IPv4 packet is covered in the checksum calculation and why? Are options, if present, included in the calculation?

    View this question on its own page →
    Worked Solution

    IPv4 Header Checksum — Computation and Verification

    The IPv4 checksum is a simple 16-bit one's-complement checksum used to detect corruption of the IP header only. It is computed by both the sender (to fill the Checksum field) and every receiver/router (to validate the packet).

    What part of the packet is covered?

    Only the IPv4 header (including the Checksum field itself, the Options field if present, and the Source/Destination addresses) is covered — the data/payload is NOT included.

    Why only the header?

    • The payload is already protected by the data-link layer FCS (e.g., CRC-32 in Ethernet) and, end-to-end, by the transport layer checksum (TCP/UDP). IP itself is connectionless and need only guarantee that the packet is routed to the correct destination with an intact header.
    • Checking the whole packet at every router hop would be far too expensive; instead each hop re-validates the header (and the router must recompute the checksum anyway because the TTL field changes at every hop).

    Sender procedure (checksum generation)

    1. Set the Checksum field to 0 in the header.
    2. Split the header into 16-bit words (if the header length is odd, pad the last byte with a zero byte).
    3. Add all the 16-bit words using one's-complement (end-around carry) addition: whenever there is a carry out of bit 15, add it back into bit 0.
    4. Take the one's complement (invert all bits) of the sum → this value is written into the Checksum field.

    Checksum=∼(∑i=1nwi)\text{Checksum} = \sim\left(\sum_{i=1}^{n} w_i\right)

    where wiw_i are the 16-bit words and ∼\sim denotes one's complement, with end-around carries.

    Receiver procedure (verification)

    1. Split the received header (Checksum field now included) into 16-bit words.
    2. Add them all with one's-complement addition.
    3. If the result is 0xFFFF\texttt{0xFFFF} (all ones), the header is accepted as error-free; any other value → the packet is silently discarded (IP reports errors only via ICMP, and never for the source host of a bad header).

    Key property: because the checksum is one's-complement, any single-bit error (and any odd number of bit errors in many patterns) is detected; the one's-complement arithmetic is chosen so the computation is order-independent and can be done incrementally.

    Are options included?

    Yes. The IPv4 header length (IHL) field is variable (5 to 15 32-bit words), and the checksum covers the entire header, including any options — because the Options field lies inside the header, before the payload. Only the payload is excluded. (If options were not covered, an error in options such as the source-route or timestamp fields would go undetected.)

    Note: if an image/numerical header is attached to the question, the general procedure above applies — pad to an even number of bytes, zero the checksum field, sum the 16-bit words with end-around carry, and complement.

  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. Q7b. Discuss the types of ICMP messages.20156m

    Module 3: Network Layer & Routing

    Discuss the types of ICMP messages.

    View this question on its own page →
    Worked Solution

    ICMP Message Types

    ICMP (Internet Control Message Protocol) is a network-layer (IP) companion protocol used to report errors and send operational/query messages (e.g., ping) between hosts and routers. ICMP messages are carried inside IP datagrams; the ICMP header starts with 1 byte Type, 1 byte Code, 2 bytes Checksum, followed by type-dependent data.

    1. Error Messages (destination-unreachable / informational)

    Type Message Typical Code values & meaning
    3 Destination Unreachable 0 network, 1 host, 2 protocol, 3 port unreachable; 4 fragmentation needed & DF set
    4 Source Quench Congestion — sender should slow down (obsolete, deprecated)
    5 Redirect 0 redirect for network, 1 for host, 2 for TOS+network, 3 TOS+host — used by a router to tell the source a better first hop
    11 Time Exceeded 0 TTL expired in transit (traceroute), 1 fragment reassembly time exceeded
    12 Parameter Problem Error in the IP header field (pointer gives the offending byte)
    3, 4, 5 (Type 3/9/10/13/14) Fragmentation / Filtering problems 4 fragmentation needed, 9/10 admin prohibited (firewall filtering)

    Error messages are never generated for ICMP error messages themselves (to avoid infinite loops). The IP header + 8 bytes of the original datagram that caused the error are included so the source can identify the offending packet.

    2. Query Messages (informational / request–reply pairs)

    Type Message Purpose
    0 / 8 Echo Reply / Echo Request ping — test reachability and RTT of a host
    13 / 14 Timestamp Request / Reply Measure round-trip time and synchronize clocks
    17 / 18 Address Mask Request / Reply Host asks subnet mask from a router
    9 / 10 Router Advertisement / Solicitation A host discovers available routers on a link

    Summary: Error messages report problems (types 3, 4, 5, 11, 12), while query messages are request–reply pairs used for diagnostics (echo, timestamp, mask, router discovery). ICMP handles only error/control reporting, never delivery of user data.

  24. Q8a. Discuss four types of link defined by OSPF. What is the basis of classification for the four types of link defined by OSPF?20158m

    Module 3: Network Layer & Routing

    Discuss four types of link defined by OSPF. What is the basis of classification for the four types of link defined by OSPF?

    View this question on its own page →
    Worked Solution

    OSPF Link Types

    OSPF (Open Shortest Path First) is a link-state interior gateway protocol. In its topology database, OSPF does not model just point-to-point connections — every adjacency is classified as one of four link types.

    Basis of classification

    The classification is based on (a) how the two endpoints (routers) are connected — i.e., the nature of the connection between the routers, and (b) whether each endpoint has a neighbour on that link / whether both ends belong to the same routing domain (area). In practice OSPF decides the type from the configured interface type and whether the far end is another router, a network segment, or an AS boundary.

    The four link types

    Link type Description
    Point-to-point link Connects exactly two routers directly (e.g., a serial line / leased line). No other host or router is on the link, so no addressing/broadcast issue arises. Both routers become adjacent and exchange LSAs directly.
    Transit link (broadcast network) A network (e.g., Ethernet, Token Ring) that can support multiple (three or more) routers and broadcast/multicast. A Designated Router (DR) and Backup DR (BDR) are elected to limit the number of adjacencies (full mesh avoided) and to flood LSAs to all attached routers.
    Stub link A network that connects to exactly one router (a "dead end"). Hosts on such a link reach the rest of the internetwork only through that single router. OSPF advertises it as a stub network (LS type 3) — it is not used to reach other routers.
    Virtual link A logical, configured link through a non-backbone area to connect an area that is physically disconnected from area 0 (backbone). It acts like a point-to-point link, but is really a tunnel through one or more intermediate routers; must run within a single area.

    Why the classification matters

    • Point-to-point vs transit determines whether OSPF forms adjacencies with every neighbour or only with the DR/BDR — this controls LSA flooding overhead.
    • Stub links are simply advertised as reachable networks, avoiding unnecessary router-to-router routing.
    • Virtual links keep the rule "all areas must be physically connected to area 0" satisfied even in poorly planned topologies.

    In short, OSPF classifies links by the number/kind of endpoints attached to the segment and the connectivity role of the link in the OSPF hierarchy.

  25. Q8b. List RIP shortcomings and their corresponding fixes.20156m

    Module 3: Network Layer & Routing

    List RIP shortcomings and their corresponding fixes.

    View this question on its own page →
    Worked Solution

    RIP — Shortcomings and Their Fixes

    RIP (Routing Information Protocol) is a distance-vector IGP that uses hop count as its metric with a maximum of 15 hops (16 = unreachable) and exchanges full routing tables every 30 s.

    # Shortcoming of RIP Consequence Corresponding fix / remedy
    1 Metric is only hop count (max 15) — ignores bandwidth, delay, congestion A 2-hop low-speed link may be preferred over a 1-hop high-speed link; large networks unreachable Use a richer metric: OSPF/EIGRP use cost/bandwidth+delay; RIP has no real fix (limitation of the protocol)
    2 Count-to-infinity problem on link failure Routers keep incrementing an unreachable metric, taking minutes to converge Split horizon with poison reverse, hold-down timers, triggered updates; alternatively use LS routing (OSPF) which does not suffer from it
    3 Convergence is slow (30 s periodic updates + timers) Transient black holes and routing loops during topology change Triggered (flash) updates on change, shorter timers; or switch to link-state protocols that flood changes immediately
    4 Full routing table advertised every 30 s regardless of change Wasteful bandwidth, especially on slow/wireless links Triggered updates (send only on change); route redistribution/filtering; VLSM support via RIPv2
    5 No VLSM / classful routing (RIPv1) Cannot summarise or support variable-length masks, poor address utilisation RIPv2 — carries subnet masks in updates, supports CIDR summarisation, authentication, and multicast (224.0.0.9)
    6 No authentication of updates (RIPv1) Susceptible to rogue/malicious routing advertisements RIPv2 authentication (plain/md5) of routing updates
    7 No support for multiple metrics / equal-cost paths; simple Bellman–Ford only; loop-free property weak Sub-optimal routes Use OSPF/IS-IS/EIGRP for large or multi-vendor networks

    Summary: RIP's core weaknesses — hop-count metric, slow periodic convergence, and count-to-infinity — are addressed within the RIP family by triggered updates, split horizon/poison reverse, hold-down timers, RIPv2 (VLSM/CIDR/authentication); the complete engineering fix is to migrate to a link-state protocol (OSPF) for larger networks.

  26. Q9a. TCP is sending data at 2 Mbytes/sec. If the sequence number starts with 7000, how long does it take before the sequence number goes back to zero?20157m

    Module 4: Transport Layer & Congestion Control

    TCP is sending data at 2 Mbytes/sec. If the sequence number starts with 7000, how long does it take before the sequence number goes back to zero?

    View this question on its own page →
    Worked Solution

    TCP Sequence Number Wrap-Around Time

    Given:

    • Data rate = 2 Mbytes/sec
    • Initial sequence number = 7000
    • TCP sequence numbers are 32 bits, so the sequence number space is 232=4,294,967,2962^{32} = 4{,}294{,}967{,}296 bytes.

    Step 1 — Bytes that must be sent before the number returns to 0

    The sequence number wraps to 0 only after the entire 32-bit space is exhausted. Starting at 7000, the bytes still to be sent are:

    N=232−7000=4,294,967,296−7000=4,294,960,296 bytesN = 2^{32} - 7000 = 4{,}294{,}967{,}296 - 7000 = \mathbf{4{,}294{,}960{,}296 \text{ bytes}}

    Step 2 — Convert the data rate to bytes/sec

    Taking 1 Mbyte = 2202^{20} bytes = 1,048,576 bytes:

    R=2×1,048,576=2,097,152 bytes/secR = 2 \times 1{,}048{,}576 = 2{,}097{,}152 \text{ bytes/sec}

    Step 3 — Time = Data / Rate

    T=4,294,960,2962,097,152≈2047.997 sT = \frac{4{,}294{,}960{,}296}{2{,}097{,}152} \approx 2047.997 \text{ s}

    T≈2048 s≈34 min 8 s\boxed{T \approx 2048 \text{ s} \approx 34 \text{ min } 8 \text{ s}}

    (Sanity check: 232/221=211=20482^{32} / 2^{21} = 2^{11} = 2048 s exactly; the initial 7000 bytes shave off only ~0.003 s, so the answer is essentially 2048 s.)

    Alternative convention: if "Mbyte" is read as 10610^6 bytes, then R=2,000,000R = 2{,}000{,}000 B/s and

    T=4,294,960,2962,000,000≈2147.5 s≈35.8 minT = \frac{4{,}294{,}960{,}296}{2{,}000{,}000} \approx 2147.5 \text{ s} \approx 35.8 \text{ min}

    Final answer: ≈ 2048 seconds (about 34 minutes) for 1 Mbyte = 2202^{20} bytes (≈ 2147.5 s if 1 Mbyte = 10610^6 bytes).

    Note: this long wrap time is exactly why TCP may safely use a reduced window (e.g., window scaling / TCP timestamps) to disambiguate old from new segments — with wrap taking ~34 minutes, no segment can survive that long.

  27. Q9b. Explain connection establishment in TCP using three-way handshaking.20157m

    Module 4: Transport Layer & Congestion Control

    Explain connection establishment in TCP using three-way handshaking.

    View this question on its own page →
    Worked Solution

    TCP Connection Establishment — Three-Way Handshake

    TCP is connection-oriented, so a logical connection must be established before data transfer. Connection establishment uses a three-way handshake in which both sides exchange SYN and ACK segments and agree on initial sequence numbers (ISNs).

    Message exchange

            Client                                  Server
         (first)                                   (second)
            |                                         |
            | ---- (1) SYN, seq = x ---------------> |   SYN bit = 1
            |                                         |   ISN = x chosen by client
            | <--- (2) SYN+ACK, seq = y, ack = x+1 -- |   SYN bit = 1, ACK bit = 1
            |                                         |   ISN = y chosen by server
            | ---- (3) ACK, seq = x+1, ack = y+1 --> |   ACK bit = 1
            |                                         |
            |        ===== CONNECTION ESTABLISHED === |   both in ESTABLISHED state
    

    Description of each step

    1. Step 1 — Connection request (SYN): The client picks an initial sequence number x and sends a segment with SYN = 1 and no data (SYN segments consume one sequence number). The client enters SYN-SENT state.
    2. Step 2 — Connection accepted (SYN + ACK): The server acknowledges by sending SYN = 1, ACK = 1, its own ISN y, and ack = x + 1 (acknowledging the client's SYN). The server enters SYN-RECEIVED state.
    3. Step 3 — Acknowledgement (ACK): The client sends ACK = 1, seq = x + 1, ack = y + 1, acknowledging the server's SYN. Both sides now enter ESTABLISHED and normal data transfer begins.

    Why three segments?

    • It lets both sides agree on and acknowledge each other's initial sequence numbers (needed for reliability and flow control).
    • It guarantees that both ends are ready to receive — a two-way handshake cannot resolve the problem of old duplicate connection requests still roaming the network (the classic two-way handshake failure case); with three-way handshake, the server replies with a SYN-ACK containing a new ISN, and stale duplicates cannot be accepted.
    • It also synchronises timing parameters (maximum segment size, window scale, timestamps) exchanged in the SYN options.

    Note on simultaneous open

    TCP also supports simultaneous connection establishment: if both sides send SYN at the same time, both move to SYN-SENT and then answer each other's SYN with SYN+ACK — still converging in three segments to ESTABLISHED.

    Result: After exactly three segments (SYN → SYN+ACK → ACK) the connection is established, and only then is application data exchanged.

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.