2017 question paper
Computer Networks
23 questions
Q1a. Write any two functions of the session layer in OSI model.20172m
Module 1: Physical Layer & Data Communication
View this question on its own page →Write any two functions of the session layer in OSI model.
Worked SolutionTwo functions of the OSI Session layer:
Session establishment, maintenance and termination — sets up, manages, and gracefully closes a logical connection (session) between two communicating applications, coordinating dialogue in simplex, half-duplex, or full-duplex mode.
Synchronization (checkpointing) — inserts checkpoints into a long stream of data so that, if a failure occurs, transmission can resume from the last checkpoint instead of restarting from scratch.
Q1b. What is Hamming code?20172m
Module 2: Data Link Layer & MAC Sublayer
View this question on its own page →What is Hamming code?
Worked SolutionHamming code is a forward error-correcting code that adds multiple parity bits to a data word, positioned at specific bit locations (powers of 2: 1, 2, 4, 8, ...), such that the pattern of which parity checks fail directly points to the exact bit position of a single-bit error — allowing the receiver not just to detect, but to locate and correct a single-bit error without retransmission.
Each parity bit covers a specific subset of data bit positions (determined by the binary representation of the position numbers). If an error occurs, the XOR of the failed parity checks gives the binary position number of the erroneous bit directly, which can then simply be flipped to correct it.
A Hamming code with r parity bits can correct 1-bit errors and detect 2-bit errors in a block of up to
2^r - 1total bits (data + parity), provided2^r - r - 1 >= (number of data bits).Q1c. What is the significance of the twisting in twisted-pair cable?20172m
Module 1: Physical Layer & Data Communication
View this question on its own page →What is the significance of the twisting in twisted-pair cable?
Worked SolutionTwisting the two wires of a pair causes each wire to be, on average, the same distance from any external noise source over the length of the cable. Any electromagnetic interference (EMI) or crosstalk from a nearby wire pair therefore induces nearly equal noise voltage on both wires.
Since the receiver measures the difference in voltage between the two wires (differential signaling), noise that affects both wires equally gets cancelled out. The tighter the twist (more twists per unit length), the better the noise cancellation — this is why Cat 5e/Cat 6 cables have progressively tighter twist rates than older cabling.
Q1d. What do you mean by piggybacking?20172m
Module 2: Data Link Layer & MAC Sublayer
View this question on its own page →What do you mean by piggybacking?
Worked SolutionPiggybacking is the technique of attaching ("riding along with") an acknowledgement to an outgoing data frame, instead of sending the ACK as a separate, standalone frame.
In a full-duplex or bidirectional connection, both sides are typically sending data to each other. Rather than wasting a whole frame just to carry an ACK, the ACK field is embedded within the header of the next data frame that station happens to be sending anyway, so a single frame carries both new data and the acknowledgement for previously received data.
Benefit: it reduces the number of frames transmitted (and hence the overhead) needed to keep both directions of communication flowing reliably.
Q1e. What is the purpose of the jam signal in CSMA/CD?20172m
Module 2: Data Link Layer & MAC Sublayer
View this question on its own page →What is the purpose of the jam signal in CSMA/CD?
Worked SolutionWhen a station transmitting in CSMA/CD detects a collision, it doesn't just stop silently — it immediately sends a short jam signal (typically 32–48 bits) onto the channel.
Purpose of the jam signal:
- To ensure that all other stations on the shared medium become aware that a collision has occurred, even those that may not have detected the collision themselves (e.g. due to their position on the cable).
- This guarantees the collision lasts long enough to be reliably detected by every transmitting station involved, so none of them mistakenly believe their frame was sent successfully.
- It prompts all colliding stations to stop transmitting and enter the random backoff (exponential backoff) phase before attempting retransmission, avoiding repeated immediate re-collision.
Q1f. What are the advantages of dividing an Ethernet LAN with a bridge?20172m
Module 2: Data Link Layer & MAC Sublayer
View this question on its own page →What are the advantages of dividing an Ethernet LAN with a bridge?
Worked SolutionDividing a large Ethernet LAN into smaller segments using a bridge offers several advantages:
- Smaller collision domains — each segment becomes its own collision domain, so collisions on one segment don't affect stations on another, improving overall performance.
- Reduced traffic congestion — the bridge forwards a frame to the other segment only if the destination actually lies there, filtering out traffic that doesn't need to cross, keeping local traffic local.
- Increased total bandwidth — since each segment operates somewhat independently, the aggregate usable bandwidth across the whole LAN increases compared to one large shared segment.
- Fault isolation — a problem (e.g. excessive collisions, a faulty NIC) on one segment is contained and doesn't necessarily degrade the entire network.
- Extended physical distance/size — bridging lets a LAN span a larger physical area or more stations than a single segment's physical/electrical limits would allow, since it regenerates/forwards frames rather than just repeating raw signal.
Q1g. What does the term 'best effort' mean in context with IP?20172m
Module 3: Network Layer & Routing
View this question on its own page →What does the term 'best effort' mean in context with IP?
Worked SolutionBest effort means IP makes no guarantees about delivery — it will try its utmost to deliver each datagram, but if something goes wrong (congestion, no route, TTL expiry, corruption) the packet is silently dropped, with no notification to the sender and no retransmission by IP itself.
- IP provides: connectionless, unordered, unreliable delivery with no duplicate protection, no flow/congestion control and no error recovery — only header checksum for basic corruption detection.
- Any required reliability (retransmission, ordering, flow control) must be added by upper layers (TCP/UDP at the transport layer, or the application).
- This keeps the network core simple and scalable ("smart edges, dumb core"), which is the fundamental design philosophy of the Internet.
Q1h. Why is there no need of CSMA/CD in a full-duplex switched Ethernet?20172m
Module 2: Data Link Layer & MAC Sublayer
View this question on its own page →Why is there no need of CSMA/CD in a full-duplex switched Ethernet?
Worked SolutionCSMA/CD exists specifically to detect and handle collisions that occur when two stations transmit simultaneously on a shared (half-duplex) medium.
In a full-duplex switched Ethernet, each device has a dedicated, point-to-point link to the switch, with separate physical send and receive paths (e.g. separate wire pairs). Because:
- Each link is used by only one device (not shared among multiple stations), collisions between different devices cannot occur on that link.
- Since the send and receive channels are physically separate, a device can transmit and receive at the same time without its own outgoing signal interfering with incoming data.
Since the fundamental precondition for a collision (multiple stations contending for the same shared channel at the same time) simply doesn't exist in this topology, CSMA/CD's collision detection and backoff mechanism becomes unnecessary and is disabled in full-duplex mode.
Q1i. How does redundancy facilitate error detection?20172m
Module 2: Data Link Layer & MAC Sublayer
View this question on its own page →How does redundancy facilitate error detection?
Worked SolutionRedundancy means sending extra bits along with the actual data — bits that are mathematically derived from the data itself (e.g. parity bits, checksum, CRC remainder) but carry no new information on their own.
How it enables error detection:
- The sender computes these redundant bits from the original data using an agreed-upon algorithm (e.g. XOR-based parity, polynomial division for CRC) and appends them to the message before transmission.
- The receiver, upon receiving the message, independently recomputes the same redundant bits from the received data using the identical algorithm.
- It then compares its freshly computed redundant bits against the redundant bits that were actually received (sent by the sender).
- If they match, the data is assumed to have arrived without errors (the check is consistent). If they don't match, it means the data was altered in transit — an error is detected.
The key idea: since the redundant bits are a deterministic function of the correct data, any change to the data bits during transmission (that isn't precisely compensated for) will very likely cause a mismatch, revealing the presence of an error without needing to know the original data independently.
Q2a. Describe the architecture and working of ring topology. What are its advantages and disadvantages?20177m
Module 1: Physical Layer & Data Communication
View this question on its own page →Describe the architecture and working of ring topology. What are its advantages and disadvantages?
Worked SolutionArchitecture
In a ring topology, each device connects to exactly two neighboring devices, forming a closed loop:
A --- B / \ E C \ / D-----'Working
- Data travels around the ring in one direction (unidirectional) or both (bidirectional/dual-ring).
- Each node acts as a repeater: it receives a frame, checks the destination address, and either passes it along unchanged (if not the destination) or copies it (if it is the destination) before also forwarding it onward to remove it from the ring.
- Access to the ring is commonly controlled with a token (Token Ring): a special frame circulates; a node may transmit only when it holds the token, preventing collisions.
Advantages
- No collisions — orderly, predictable access via token passing.
- Equal access opportunity for all nodes (fair, no central bottleneck).
- Relatively simple to install and reconfigure by adding nodes at any point in the loop.
- Performance degrades more gracefully under heavy load than contention-based systems (like plain Ethernet/CSMA).
Disadvantages
- A single link or node failure can break the entire ring (in a simple, non-redundant ring), disrupting the whole network — mitigated by dual-ring designs.
- Adding or removing a node typically requires briefly bringing the ring down.
- Total network delay increases with the number of nodes, since each node adds processing/repeat delay.
- Troubleshooting can be harder than in a star topology, since there's no central point to monitor from.
- Install PocketlyBudget App•POCKETLY
Pocketly on Android
Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.
Q2b. Compare and contrast between the OSI model and the TCP/IP model.20177m
Module 1: Physical Layer & Data Communication
View this question on its own page →Compare and contrast between the OSI model and the TCP/IP model.
Worked SolutionAspect OSI Model TCP/IP Model Number of layers 7 (Physical, Data Link, Network, Transport, Session, Presentation, Application) 4 (Network Access, Internet, Transport, Application) Development Theoretical reference model, developed by ISO before the protocols existed Developed based on protocols (TCP, IP) that already existed and were in use Session/Presentation Explicit, separate layers Merged into the Application layer Usage Used as a conceptual/teaching reference; rarely implemented directly Actually implemented and used in real-world networks, including the internet Protocol dependence Generic — not tied to specific protocols Tightly tied to its own suite (TCP, UDP, IP) Approach Layer-first: layers defined, then protocols fitted in Protocol-first: protocols existed, model described them afterward Reliability guarantee Both connection-oriented and connectionless service supported at Network layer Only Internet layer is connectionless (IP); reliability is optional and handled at Transport (TCP vs UDP) Similarities
- Both are layered architectures based on the concept of independent, stacked protocol layers.
- Both provide comparable Transport and Network layer functionality (delivery and routing).
- Both use encapsulation/decapsulation as data passes between layers.
Key contrast: OSI is a conceptual model used mainly for teaching and standardization discussions, while TCP/IP is the practical model that the actual internet runs on.
Q3a. Describe the working of fiber-optic cables. Briefly explain different propagation modes used in fiber-optic cables.20177m
Module 1: Physical Layer & Data Communication
View this question on its own page →Describe the working of fiber-optic cables. Briefly explain different propagation modes used in fiber-optic cables.
Worked SolutionStructure of fiber-optic cable
A fiber-optic cable consists of a glass or plastic core, surrounded by cladding with a lower refractive index. Light injected into the core at an angle greater than the critical angle undergoes total internal reflection, repeatedly bouncing off the core-cladding boundary and traveling down the fiber with minimal loss. An outer jacket provides physical protection.
+---------------------------------------+ | Jacket | | +-----------------------------------+ | | | Cladding | | | | +---------------------------+ | | | | | Core | | | <- light travels here | | +---------------------------+ | | | | | | | +-----------------------------------+ | +---------------------------------------+Propagation modes
Multimode, step-index — core has uniform refractive index; light rays take multiple different paths ("modes") bouncing at different angles, causing modal dispersion (rays arrive at slightly different times), limiting distance/bandwidth. Larger core diameter (~50–62.5 µm), cheaper LEDs as light source.
Multimode, graded-index — core's refractive index decreases gradually from center to edge, causing light to travel in curved paths. Rays taking longer geometric paths travel faster (lower refractive index near the edge), which reduces modal dispersion compared to step-index multimode.
Single-mode — very narrow core (~8–10 µm), allowing only one straight-line mode of light to propagate. Eliminates modal dispersion almost entirely, supporting the highest bandwidth and longest distances, but requires a precise, more expensive laser light source.
Single-mode is used for long-haul/backbone links; multimode is used for shorter, cheaper LAN/building-scale runs.
Q3b. Explain Go-Back-N ARQ as a sliding window mechanism for error control.20177m
Module 2: Data Link Layer & MAC Sublayer
View this question on its own page →Explain Go-Back-N ARQ as a sliding window mechanism for error control.
Worked SolutionGo-Back-N ARQ is a sliding-window protocol used for error and flow control, where a sender can transmit multiple frames before needing an acknowledgment — up to a window size N — but the receiver only accepts frames in strict order.
How it works
- The sender maintains a window of size N, allowing up to N unacknowledged frames to be in transit at once.
- Frames are numbered using sequence numbers modulo
2^m(m = bits used for numbering), and the window size must satisfyN <= 2^m - 1. - The receiver uses a single variable to track the next expected frame. It discards any out-of-order frame — even if it arrived correctly — and re-sends an ACK for the last correctly received in-order frame (cumulative ACK).
- If the sender's timer for the oldest unacknowledged frame expires, it retransmits every frame from that point onward — not just the lost one. This is the "go back N" behavior.
Example
Sender window (N=4): frames 0,1,2,3 sent Frame 1 is lost in transit Receiver gets: 0 (accept, ACK1) -> 2 (discard, out of order) -> 3 (discard, out of order) Sender's timer for frame 1 expires -> resends frames 1,2,3Trade-off
Go-Back-N is simple to implement (receiver needs no buffering for out-of-order frames) but wastes bandwidth on retransmission, since even correctly-received frames after a lost one get discarded and re-sent. This is what Selective Repeat improves on, at the cost of a more complex receiver.
Q4a. Describe how the two-dimensional parity check is able to detect errors. Consider '1100101100110000110100101101' as the data that is to be sent over the network.20177m
Module 2: Data Link Layer & MAC Sublayer
View this question on its own page →Describe how the two-dimensional parity check is able to detect errors. Consider '1100101100110000110100101101' as the data that is to be sent over the network.
Worked SolutionHow Two-Dimensional Parity Check works
Instead of computing a single parity bit for the entire message (simple/1D parity, which misses many multi-bit error patterns), the data is arranged into a grid (rows x columns). A parity bit is computed for every row (across its columns) and for every column (down its rows), and one extra corner bit is computed as the parity of all the row (or column) parity bits, for cross-checking.
This lets the receiver not only detect more error patterns than 1D parity (in particular, it can detect any combination of up to 3 bit errors reliably, and catches many burst errors) but often locate a single-bit error precisely: if exactly one row parity and one column parity mismatch, the error must be at the intersection of that row and column, so it can even be corrected.
Worked example
Data (28 bits):
1100101100110000110100101101Arranged as a 4 x 7 grid:
Row1: 1 1 0 0 1 0 1 Row2: 1 0 0 1 1 0 0 Row3: 0 0 1 1 0 1 0 Row4: 0 1 0 1 1 0 1Row parities (even parity — XOR of all bits in that row):
Row1: 1^1^0^0^1^0^1 = 0 Row2: 1^0^0^1^1^0^0 = 1 Row3: 0^0^1^1^0^1^0 = 1 Row4: 0^1^0^1^1^0^1 = 0Column parities (XOR down each column):
Col1: 1^1^0^0 = 0 Col5: 1^1^0^1 = 1 Col2: 1^0^0^1 = 0 Col6: 0^0^1^0 = 1 Col3: 0^0^1^0 = 1 Col7: 1^0^0^1 = 0 Col4: 0^1^1^1 = 1Corner bit = parity of the column-parity row
0011110= 0 (also cross-checks with parity of row-parity column0110= 0 — consistent)Full transmitted block (with parity row and column added):
1 1 0 0 1 0 1 | 0 <- Row1 + its parity 1 0 0 1 1 0 0 | 1 <- Row2 + its parity 0 0 1 1 0 1 0 | 1 <- Row3 + its parity 0 1 0 1 1 0 1 | 0 <- Row4 + its parity --------------------- 0 0 1 1 1 1 0 | 0 <- Column parities + corner bitError detection in action: Suppose during transmission the bit at Row2, Col3 flips (0 -> 1). At the receiver:
- Recomputing Row2's parity now mismatches the received Row2 parity bit.
- Recomputing Col3's parity now mismatches the received Col3 parity bit.
Since exactly one row and one column disagree, the receiver can pinpoint the error at their intersection — Row2, Col3 — and even correct it by flipping that bit back.
Q4b. Draw a flowchart and explain the working procedure of the pure ALOHA protocol.20177m
Module 2: Data Link Layer & MAC Sublayer
View this question on its own page →Draw a flowchart and explain the working procedure of the pure ALOHA protocol.
Worked SolutionWorking procedure of Pure ALOHA
+-------------------+ | Station has a | | frame ready? | +-------------------+ | Yes v +-------------------+ | Transmit the | | frame immediately | +-------------------+ | v +-------------------+ | Wait for ACK | | (for max RTT + | | processing time) | +-------------------+ | +-----------+-----------+ | | ACK received No ACK / timeout | | v v +------------------+ +------------------------+ | Transmission | | Collision assumed. | | successful. Done. | | Wait a RANDOM backoff | +------------------+ | time (to avoid repeated | | collisions) | +------------------------+ | v +------------------------+ | Retransmit the frame | +------------------------+ | (loop back to "Wait for ACK")Explanation
- Whenever a station has a frame ready, it transmits immediately, without checking if the channel is busy and without waiting for any time slot (unlike slotted ALOHA).
- After transmitting, the station waits for an acknowledgement from the receiver, allowing enough time for the frame to arrive and an ACK to return (round-trip time).
- If the ACK is received within this window, the transmission is considered successful.
- If no ACK arrives (implying the frame likely collided with another station's simultaneous transmission), the station assumes a collision occurred.
- To avoid the colliding stations repeatedly retransmitting at the same moment (which would cause an infinite collision loop), each station waits a random backoff period before retransmitting.
- The frame is then retransmitted, and the process repeats from the "wait for ACK" step until it eventually succeeds.
Because stations transmit with no coordination whatsoever, a collision can occur if another station starts transmitting anywhere within one frame-time before or after this station's own transmission — giving pure ALOHA its characteristic 2 x Tfr vulnerable time and correspondingly low maximum throughput (~18.4%).
Q5a. Explain in detail Fast Ethernet. Describe the structure of the physical layer and various implementation types at this layer.201714m
Module 1: Physical Layer & Data Communication
View this question on its own page →Explain in detail Fast Ethernet. Describe the structure of the physical layer and various implementation types at this layer.
Worked SolutionFast Ethernet (IEEE 802.3u) raised standard Ethernet's speed from 10 Mbps to 100 Mbps while preserving the original Ethernet frame format, MAC addressing, and (originally) CSMA/CD access method, making it backward-compatible and easy to migrate to.
Structure of the Physical layer in Fast Ethernet
The Fast Ethernet physical layer is split into sub-layers to support multiple media types under one MAC layer:
+---------------------------+ | MAC Sublayer | (common across all implementations) +---------------------------+ | Reconciliation Sublayer | +---------------------------+ | MII (Media Independent | <- allows the MAC to work with | Interface) | different physical media +---------------------------+ | PCS | PMA | PMD | (Physical Coding, Medium | (media-specific) | Attachment, Medium Dependent) +---------------------------+ | Physical MediumThe MII (Media Independent Interface) decouples the MAC sublayer from the specific physical medium, letting the same MAC logic run over copper or fiber implementations.
Implementation types
Standard Medium Max segment length 100BASE-TX 2-pair Cat 5 UTP/STP 100 m 100BASE-FX 2-strand multimode fiber ~400 m (half-duplex) / 2 km (full-duplex) 100BASE-T4 4-pair Cat 3/4/5 UTP (legacy, rarely used) 100 m Each implementation adapts the electrical/optical signaling for its medium while presenting the same 100 Mbps MAC-layer service upward.
Q6a. With the help of a neat and labelled diagram, explain the message format of ICMP. Explain various types of ICMP error messages and query messages.201714m
Module 3: Network Layer & Routing
View this question on its own page →With the help of a neat and labelled diagram, explain the message format of ICMP. Explain various types of ICMP error messages and query messages.
Worked SolutionICMP — Message Format and Message Types
ICMP (Internet Control Message Protocol) is a network-layer companion protocol to IP, used for error reporting and query/diagnostic functions. ICMP messages are encapsulated inside IP datagrams (protocol field = 1), so they are delivered like ordinary packets — but ICMP never carries user data.
1. ICMP Message Format
Every ICMP message begins with a common 4-byte header, followed by type-dependent data:
+--------+--------+-----------------+ | Type | Code | Checksum | +--------+--------+-----------------+ | Rest of Header (4 bytes) | | (depends on Type/Code) | +-----------------------------------+ | Data (variable length) | | (first 8 bytes = IP header + | | first 8 bytes of the data that | | caused the error) | +-----------------------------------+- Type (1 byte): identifies the general message type (e.g., 3 = Destination Unreachable, 8 = Echo Request).
- Code (1 byte): refines the Type (e.g., for Type 3: 0 = network unreachable, 3 = port unreachable).
- Checksum (2 bytes): 16-bit one's-complement checksum over the whole ICMP message (calculated exactly like the IP header checksum).
- Rest of Header (4 bytes): meaning depends on type — e.g., unused/zero, pointer for Type 12, gateway address for Type 5, identifier + sequence number for Echo.
- Data: for error messages, ICMP embeds the IP header plus the first 8 bytes of the payload of the original datagram that caused the error, so the source can identify the offending process/port (since the first 8 bytes of TCP/UDP header contain source/destination ports).
2. Error Messages
Type Code Message Meaning 3 0 Destination Unreachable — network Router cannot find the network route 3 1 Destination Unreachable — host Network reachable but host not found 3 2 Protocol unreachable Destination host does not support the upper-layer protocol 3 3 Port unreachable No process listening at the destination port (used by UDP) 3 4 Fragmentation needed & DF set Router must fragment but Don't-Fragment bit is 1 4 0 Source Quench Congestion — sender should slow down (deprecated) 5 0/1 Redirect (network/host) Router tells the source a better first-hop route 11 0 Time Exceeded — TTL expired Hop count exceeded (used by traceroute) 11 1 Time Exceeded — reassembly timeout Fragments not all arrived within the reassembly window 12 0 Parameter Problem Error in the IP header; pointer field gives offending byte Rules: ICMP errors are never sent for ICMP error messages (prevents infinite loops), not for fragmented datagrams (except Type 3 Code 4), and never for multicast/broadcast destination addresses.
3. Query Messages (request–reply pairs)
Type (Req/Rep) Message Purpose 8 / 0 Echo Request / Echo Reply ping — check host reachability and round-trip time 13 / 14 Timestamp Request / Reply Measure RTT and synchronise clocks (carry originate, receive, transmit times) 17 / 18 Address Mask Request / Reply A host obtains its subnet mask from a router 9 / 10 Router Advertisement / Solicitation Host discovers active routers on its local network 4. Summary
- Format: Type–Code–Checksum (4 bytes) + Rest-of-Header + Data; checksum covers the entire ICMP message.
- Error messages (Types 3, 4, 5, 11, 12) report failures back to the source — they are one-way and always include part of the offending packet.
- Query messages (Echo, Timestamp, Mask, Router discovery) are request–reply pairs used for diagnostics and configuration.
- ICMP does not correct errors or retransmit data — it only informs; recovery is left to TCP or the application.
Q7a. What do you mean by layer 2 switching? Explain in detail the functioning of layer 2 switches.20177m
Module 2: Data Link Layer & MAC Sublayer
View this question on its own page →What do you mean by layer 2 switching? Explain in detail the functioning of layer 2 switches.
Worked SolutionLayer 2 switching refers to forwarding data frames based on information found at the Data Link layer (Layer 2 of the OSI model) — specifically, the destination MAC address — rather than on IP addresses (Layer 3, used by routers).
A Layer 2 switch is essentially a multi-port bridge: it connects multiple devices within a LAN and intelligently forwards each incoming frame only out the port leading to its actual destination, instead of broadcasting it out every port like a hub.
Functioning of a Layer 2 switch
Learning — for every frame that arrives, the switch inspects the source MAC address and the port it came in on, and records this pairing in its MAC address table (also called a CAM table — Content Addressable Memory table). Over time it "learns" which devices sit behind which ports.
Forwarding/Filtering — for the frame's destination MAC address, the switch looks it up in its MAC address table:
- If found, the frame is forwarded only out the specific port associated with that address (unicast forwarding) — not out every port.
- If not found (an "unknown unicast"), the switch floods the frame out every port except the one it arrived on, since it doesn't yet know where that address lives.
Aging — entries in the MAC address table are automatically removed after a period of inactivity, keeping the table current as devices move or disconnect.
Broadcast/Multicast handling — broadcast frames (destination FF:FF:FF:FF:FF:FF) and unknown-destination frames are flooded to all ports (except the source), ensuring they reach every device, since these inherently need wide delivery.
Collision domain segmentation — each switch port is its own separate collision domain (unlike a hub, where all ports share one collision domain), allowing full-duplex, essentially collision-free communication on each link and letting multiple conversations happen simultaneously across different port pairs.
Benefit: by making per-frame forwarding decisions based on learned MAC addresses, a Layer 2 switch dramatically reduces unnecessary traffic compared to a hub, increases effective bandwidth (since unrelated conversations don't interfere with each other), and eliminates most collisions — all while remaining transparent to higher-layer protocols, since it never inspects IP addresses or routing information.
Q7b. Discuss the functions and the design issues of the network layer in the OSI model.20177m
Module 3: Network Layer & Routing
View this question on its own page →Discuss the functions and the design issues of the network layer in the OSI model.
Worked SolutionNetwork Layer — Functions and Design Issues
The network layer (Layer 3) is responsible for host-to-host delivery of packets across possibly heterogeneous networks, i.e., moving packets from the source host to the destination host through intermediate routers, independent of the underlying physical/link technologies.
Functions of the Network Layer
- Inter-networking / packet delivery: Transfers data from source to destination across multiple networks using routers; each packet is forwarded hop-by-hop.
- Addressing: Uses a hierarchical logical address (IP address) that identifies the host irrespective of physical (MAC) addresses; supports subnetting and CIDR for scalable address allocation.
- Routing: Determines the best path for each packet using routing protocols (RIP, OSPF, BGP) and the routing table built by the forwarding process.
- Forwarding: At each router, moves the packet from the correct input interface to the appropriate output interface based on the destination address.
- Fragmentation and Reassembly: Splits a packet that exceeds the MTU of the outgoing link into fragments (sets offset, MF flag, ID) and reassembles them at the destination.
- Error control, flow control and congestion control: Signalled through ICMP; congestion handling via source quench/RED (IP itself is best-effort).
- Datagram services: Connectionless (datagram) or connection-oriented (virtual circuit) delivery, plus quality-of-service support (TOS field, diffserv).
Design Issues of the Network Layer
Design issue What must be decided 1. Services provided to the transport layer Should the network offer connection-oriented (guaranteed, ordered) or connectionless (datagram) service to the transport layer — and should that choice be visible to the sender? (IP chose connectionless; TCP/UDP add reliability above.) 2. Addressing & service model How hosts and interfaces are named (hierarchical IP addressing) so packets can be located anywhere; how addressing interacts with subnetting/CIDR/NAT. 3. Packet delivery semantics Datagrams vs virtual circuits: independent routing of each packet vs a pre-established path; implications for ordering, duplicate control and QoS. 4. Fragmentation & MTU handling How to handle packets larger than a link's MTU — fragmentation and reassembly, and the per-hop overhead it creates. 5. Routing algorithms & forwarding Choosing shortest/best paths (optimality, correctness, robustness, simplicity, stability, fairness, efficiency) and building forwarding tables. 6. Congestion control Detecting and relieving congestion — buffering vs pacing (leaky bucket), credit schemes, choke packets; where control should sit (network vs hosts). 7. Inter-networking & heterogeneity How to hide differences among networks (addressing, MTU, frame size, maximum packet size) and connect them via routers/gateways. 8. Security & service differentiation Authentication, confidentiality (IPsec), and providing differentiated services (TOS/DiffServ) over a best-effort core. Summary: The network layer must (i) define what service it gives to transport, (ii) how packets are identified and addressed, (iii) how the best path is chosen and packets forwarded, (iv) how large packets are fragmented, and (v) how congestion, heterogeneity and inter-networking are handled — these are the classic design issues, with IP choosing connectionless datagram service and best-effort delivery.
Q8a. Describe bridge in terms of networking device. What are different types of network bridge?20177m
Module 2: Data Link Layer & MAC Sublayer
View this question on its own page →Describe bridge in terms of networking device. What are different types of network bridge?
Worked SolutionA bridge is a Data Link layer networking device that connects two or more LAN segments, forwarding frames selectively based on destination MAC address, rather than blindly repeating traffic like a hub (Physical layer) or routing by IP like a router (Network layer). It builds a forwarding table by learning source addresses from frames it observes, reducing collisions and filtering unnecessary cross-segment traffic.
Types of network bridges
1. Transparent Bridge
Operates invisibly to the rest of the network — end stations are completely unaware of its presence. It builds its forwarding table automatically through a learning process (observing source addresses of incoming frames) rather than requiring manual configuration. This is the most common bridge type in Ethernet LANs, and typically runs the Spanning Tree Protocol to avoid loops when multiple bridges/redundant links exist.2. Source Routing Bridge
Used historically in Token Ring networks. Here, the sending station itself determines and includes the complete path (sequence of bridges/rings) the frame should take, embedded within the frame header. The bridge simply follows the specified route rather than making its own independent forwarding decision.3. Translational Bridge
Connects two LAN segments using different Data Link layer technologies (e.g. Ethernet to Token Ring), translating frame formats between the two so that stations on each side can communicate despite using different framing/addressing conventions.4. Local Bridge
Connects two LAN segments that are directly, physically close together (e.g. within the same building), typically over a single hop with minimal latency concerns.5. Remote Bridge
Connects two LAN segments that are geographically distant, typically over a WAN link (leased line, etc.), effectively extending a LAN across a wide-area connection.Among these, the transparent bridge is by far the most widely used in modern Ethernet networks, since it requires no manual configuration and integrates seamlessly into existing LANs.
- Install PocketlyBudget App•POCKETLY
Pocketly on Android
Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.
Q8b. Differentiate between Static Routing and Dynamic Routing.20177m
Module 3: Network Layer & Routing
View this question on its own page →Differentiate between Static Routing and Dynamic Routing.
Worked SolutionStatic Routing vs Dynamic Routing
Static routing uses routes that are manually configured by a network administrator and do not change unless edited by hand. Dynamic routing uses routing protocols that automatically discover routes and update the routing table whenever the topology changes.
Parameter Static Routing Dynamic Routing Configuration Entries entered manually by the administrator Learned automatically via routing protocols (RIP, OSPF, EIGRP, BGP) Route updates No automatic update; change only by manual edit Continuous/triggered periodic updates; table rebuilt as topology changes Adaptability to failure Cannot adapt — traffic must be manually re-routed after a link failure Automatically detects failures and recomputes alternate paths Topology changes Needs human intervention Self-adjusting, converges to new state Implementation complexity Simple to configure for small/stable networks Complex — requires protocol tuning, metric/area design, troubleshooting Overhead / resources No bandwidth or CPU overhead for protocols Consumes CPU and link bandwidth for hellos, LSAs, updates Scalability Poor — one entry per destination, unmanageable in large networks Excellent — scales with summarisation, areas, hierarchical design Security More secure (no routing advertisements exchanged) Vulnerable to rogue updates unless authenticated (OSPF MD5, etc.) Convergence Immediate (static), but only if correct Depends on protocol — fast for link-state, slower for distance-vector Suitability Small, stub/leaf networks, default routes, lab setups, cost-sensitive links Large, complex, multi-path, frequently changing networks Loop possibility None (single fixed path) Possible during convergence; controlled by split horizon, holddown, SPF Metric used None — preference is administrative Cost, bandwidth, delay, hop count, load, reliability Key discussion points
- Static is deterministic: the administrator fully controls the path, which is useful for security-sensitive or backup routes (e.g., a default route to an ISP), but it is labour-intensive and fails silently on link failure.
- Dynamic protocols exchange reachability information: distance-vector (RIP) shares neighbour distance vectors with count-to-infinity issues, while link-state (OSPF) floods the whole topology and each router runs Dijkstra independently, converging quickly and loop-free.
- Hybrid designs are common: dynamic routing inside the enterprise with static/default routes at the edge, and static redistribution where appropriate.
Conclusion: Static routing trades flexibility for simplicity/low overhead and suits small stable networks; dynamic routing trades protocol overhead and complexity for automatic adaptation and scalability — essential for large, changing networks.
Q9a. Explain the following terms: (a) Border Gateway Protocol20177m
Module 3: Network Layer & Routing
View this question on its own page →Explain the following terms: (a) Border Gateway Protocol
Worked SolutionBorder Gateway Protocol (BGP)
BGP (Border Gateway Protocol) is the exterior gateway routing protocol of the Internet, used to exchange reachability (routing) information between Autonomous Systems (AS) — the current standard is BGP-4 (RFC 4271), a path-vector protocol.
Key characteristics
- Classless and path-vector: each BGP update advertises the complete AS-PATH to a destination network, so the receiver can detect and reject routing loops by checking whether its own AS already appears in the path.
- Policy-based: unlike interior protocols that optimise a metric, BGP lets an AS choose routes based on administrative policy (commercial relationships, traffic engineering, filtering) rather than shortest path.
- Runs over TCP (port 179): TCP provides reliable, ordered delivery, so BGP needs no own retransmission/sequencing; neighbours establish a TCP connection first, then open a BGP session.
Operation
- Peering: Two BGP routers (peers) form a TCP connection and complete an OPEN handshake (version, AS number, hold timer, BGP ID).
- Keep-alive: Periodic KEEPALIVE messages maintain the session; if none arrive within the hold time, the session drops.
- Update: Only incremental, changed information is advertised (network layer reachability info + path attributes such as ORIGIN, AS_PATH, NEXT_HOP, LOCAL_PREF, MED, communities).
- Notification: On errors, a NOTIFICATION message is sent and the session is closed.
Path attributes & route selection (simplified)
Attribute Role ORIGIN (IGP/EGP/incomplete) How the route was learned AS_PATH Sequence of ASes traversed — loop prevention & policy NEXT_HOP IP address of the next router on the path to the destination LOCAL_PREF Preference for exit points within an AS (higher preferred) MED Suggestion to neighbouring AS which of several entry points to use (lower preferred) The decision order is roughly: highest LOCAL_PREF → shortest AS_PATH → lowest origin type → lowest MED → lowest router ID.
iBGP vs eBGP
- eBGP: between routers in different ASes (external peers).
- iBGP: within the same AS — distributes externally learned routes to internal routers; iBGP routes are not re-advertised to other iBGP peers (hence the need for full-mesh or route reflectors).
Significance: BGP is the glue of the global Internet (~1 million+ routes in the default-free zone) — every packet crossing the Internet relies on the AS paths that BGP exchanges, and its policy control is what allows inter-domain business relationships to be enforced.
Q9b. Explain the following terms: (b) User Datagram Protocol20177m
Module 4: Transport Layer & Congestion Control
View this question on its own page →Explain the following terms: (b) User Datagram Protocol
Worked SolutionUser Datagram Protocol (UDP)
UDP (User Datagram Protocol) is a connectionless, unreliable transport-layer protocol of the TCP/IP suite that provides a minimal, low-overhead process-to-process communication service using datagrams.
UDP Header (only 8 bytes)
0 16 31 +--------+--------+----------------+ | Source | Destination | | | Port | Port | | +--------+--------+----------------+ | Length | Checksum | | +--------+--------+----------------+- Source/Destination Port (2 bytes each): process (socket) addressing / multiplexing.
- Length (2 bytes): header + data (minimum 8).
- Checksum (2 bytes): optional in IPv4 (mandatory in IPv6); covers UDP header, data and a pseudo-header (source & dest IP, protocol, UDP length).
Key characteristics
Feature Behaviour Connection No connection setup — no handshake, no session state Reliability None — no ACK, no retransmission, no ordering, duplicates possible Flow control None; congestion control left to the application/upper layers Error control Only an optional checksum; lost/corrupt datagrams are silently discarded Segmentation Each message = one datagram (no byte stream, no fragmentation at transport layer) Overhead 8 bytes (vs 20 for TCP) → fast, efficient Delivery Best-effort; one-to-one (datagram socket) or one-to-many (broadcast/multicast) Why UDP is still used
- Real-time apps (VoIP, video streaming, online gaming) where timeliness matters more than perfect delivery — a late packet is useless anyway, and retransmitted data would add jitter.
- Request–reply protocols with small exchanges (DNS, DHCP, SNMP, TFTP, RIP) where a 3-way handshake would cost more than the query itself.
- Multicast/broadcast applications — TCP is strictly point-to-point.
- Encapsulation of other protocols (tunnelling, e.g., IPsec NAT traversal, VXLAN).
- Applications that need reliability add it themselves in the application layer, keeping the core protocol simple.
Summary: UDP is a thin layer over IP offering port-based multiplexing and an optional checksum with minimal delay and overhead — reliability, ordering and flow control are deliberately left to the application, trading correctness for speed.
Pocketly on Android
Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.