optional · CSS study notes
Network Devices
🧭
On this page — click any heading below to jump straight to it. ⬅️ Back to P-II.II. Computer Communications & Networks
OSI Layer: Cross-Layer (L1–L3) — device classification spans layers
Definition
Network devices are the physical hardware that connect, extend, filter, translate, or direct traffic between hosts and networks. Each device is classified by the highest OSI layer at which it makes forwarding decisions — a recurring exam trap is confusing a Layer-2 device (switch) with a Layer-3 device (router).
Types of Network Devices (by OSI Layer)
1. Repeater — Physical Layer (L1)
- Regenerates and re-times a weakening/distorted digital signal so it can travel further without attenuation-induced errors.
- Purely electrical — has no addressing intelligence and cannot filter traffic.
- Used to extend cable segments beyond their maximum specified run (e.g., beyond 100 m for UTP).
2. Hub — Physical Layer (L1)
- A multiport repeater: whatever arrives on one port is regenerated and broadcast out to every other port.
- Passive hub: simply splits signal, no regeneration. Active hub: regenerates/amplifies the signal before repeating it.
- No MAC-address awareness — all connected devices share one collision domain, so throughput degrades quickly as more devices are added and collisions increase.
- Now obsolete in practice, fully displaced by switches.
3. Bridge — Data Link Layer (L2)
- Connects two LAN segments and filters traffic using MAC addresses, forwarding a frame only onto the segment where the destination actually lives.
- Learns MAC-to-port mapping by inspecting source addresses of frames it sees (transparent bridging).
- Splits a network into multiple smaller collision domains, reducing collisions, but all bridged segments remain one broadcast domain.
4. Switch — Data Link Layer (L2)
- Essentially a multiport bridge: builds and maintains a MAC-address table, forwarding each frame only to the specific port of the destination device instead of broadcasting to all.
- Unmanaged switch: plug-and-play, no configuration, fixed behaviour. Managed switch: supports VLANs, port mirroring, spanning-tree, QoS prioritisation, and remote monitoring (SNMP).
- Layer-3 switch: a switch with added routing capability, able to make some forwarding decisions using IP addresses — blurs the classic L2/L3 boundary and is common in modern enterprise cores.
- Each port is its own collision domain — dramatically reduces collisions versus a hub.
5. Router — Network Layer (L3)
- Connects different networks (not just segments of the same LAN) and forwards packets between them based on destination IP address, consulting a routing table built by static configuration or dynamic routing protocols (RIP, OSPF, BGP).
- Each router interface is a separate broadcast domain — routers stop broadcast traffic from crossing networks, unlike switches.
- Performs fragmentation when a packet exceeds the next network's MTU, and commonly integrates NAT and basic firewall filtering.
- The fundamental backbone device of internetworking — without routers, the Internet as a network-of-networks could not exist.
6. Gateway — All Layers / Application Layer
- A more general term for any device that translates between entirely different protocol stacks or data formats, potentially operating up to the Application layer.
- Examples: an email gateway converting between SMTP and a proprietary mail format; a VoIP gateway converting between the PSTN telephone network and SIP/RTP-based IP telephony.
- Distinguished from a router by scope: a router moves packets between IP networks using the same protocol family; a gateway bridges fundamentally different systems.
Comparison Table
| Device | OSI Layer | Addressing Used | Collision Domain | Broadcast Domain | Intelligence |
|---|---|---|---|---|---|
| Repeater | Physical (L1) | None | Single (extends it) | Single | None |
| Hub | Physical (L1) | None | Single (shared) | Single | None |
| Bridge | Data Link (L2) | MAC | Per segment | Single | Basic (MAC learning) |
| Switch | Data Link (L2) | MAC | Per port | Single (or per VLAN) | Moderate–High |
| Router | Network (L3) | IP | Per port | Per port | High (routing tables/protocols) |
| Gateway | Any / Application | Protocol-specific | N/A | N/A | Highest (full protocol translation) |
CSS Exam Angle
- Map each device to its OSI layer explicitly in table form: Device | OSI Layer | Function — this is close to a guaranteed question format.
- The classic trap: candidates say switch and router "do the same thing." State clearly that a switch forwards by MAC within one network, a router forwards by IP across networks.
- Mention collision domain vs broadcast domain — a switch breaks up collision domains but not broadcast domains (unless VLANs are used); a router breaks up both.
- Layer-3 switches are a good "advanced knowledge" addition that separates a strong answer from an average one.
Example
A home Wi-Fi router is actually a composite device: an internal switch (for wired LAN ports), a wireless access point, a router (connecting the LAN to the ISP/WAN), a NAT translator, and often a basic firewall — a good real-world example that ties several device types together in one exam answer.
Likely Questions
- Differentiate between a switch and a router, stating the OSI layer at which each operates.
- Explain the function of a repeater, hub, bridge, switch, router, and gateway with the OSI layer of each.
- What is the difference between a collision domain and a broadcast domain? Which devices affect each?
📜 Past-Paper Questions & Structured Answers
Questions are paraphrased; answer focus is suggested guidance, not an official marking scheme.
2018 · Paper-II · Q3(A) · 8 marks
Question (paraphrased): Distinguish hubs, bridges, switches and routers.
Answer focus: Compare layer, addressing, forwarding, domains and use.
| Feature | Hub | Bridge | Layer-2 switch | Router |
|---|---|---|---|---|
| Layer / unit | L1 / bits | L2 / frames | L2 / frames | L3 / IP packets |
| Address use | None | MAC | MAC | IP prefix |
| Forwarding | Repeats signals to other ports | Learns source MACs; filters/forwards across segments | Multiport bridging; forwards known unicast to its port | Uses routing/forwarding table and next hop |
| Collision domain | Shared by all ports | Separated by segment | Per port; full duplex has no collisions | Ethernet interfaces are separate |
| Broadcast domain | One | Normally one | One per VLAN | Separates IP broadcast domains |
| Typical use | Legacy shared LAN | Joining LAN segments | Connecting devices within a LAN/VLAN | Connecting different IP networks |
Example: a campus switch delivers a frame between two computers in the same VLAN; a router is required when their traffic must cross into a different subnet. A hub would repeat their signal to all attached devices.
Precision: a switch floods broadcasts and unknown-unicast frames within the VLAN; it does not send every frame to only one port. Some switches also provide layer-3 routing. The comparison above concerns the basic devices specified by the question.
2023 · Paper-II · Q3(a) · 7 marks
Question (paraphrased): Ten router CPUs each serve 2 million packets/s and receive 1.5 million/s. Find total queuing plus service time.
Answer focus: Declare queue model, calculate per-router time, then total; distinguish waiting from service.
Assumption: identical stable M/M/1 queues (Poisson arrivals, exponential service), using the usual mean-delay model. Rates alone do not determine a unique delay without a queueing assumption.
Given per router: μ=2×10⁶ packets/s; λ=1.5×10⁶ packets/s. Utilisation ρ=λ/μ=0.75, so λ<μ.
Total time in one router: W=1/(μ−λ)=1/500,000 s = 2 μs.
Separate components: service time =1/μ=0.5 μs; waiting time Wq=W−1/μ=1.5 μs.
For ten routers: 10×2 μs = 20 μs, comprising 15 μs queuing plus 5 μs CPU service.
This excludes link transmission and propagation delay. Using 10/μ would count service only and miss the waiting time; using 1/(μ−λ) twice would double-count service.
2025 · Paper-II · Q3(a)(iii) · 3 marks
Question (paraphrased): A 1,500-byte packet arrives behind half a packet in transmission and four queued packets on a 2 Mbps FIFO link. Find its queueing delay.
Answer focus: Transmission time → remaining work ahead → queue delay.
One packet: T = (1,500×8)/(2×10⁶) = 0.006 s = 6 ms.
Work ahead: half a packet takes 3 ms; four complete packets take 4×6=24 ms.
Queueing delay = 3+24 = 27 ms. Do not add the arriving packet’s own 6 ms transmission time when asked only for queueing delay. Including that transmission would give 33 ms.