Repeater, Hub, Bridge, and Switch Explained: Layers, Domains, and Worked Examples

Learn what each Ethernet device examines and forwards, then derive collision and broadcast domain counts through MAC-learning traces and mixed topologies.

KnowledgeGate Team

Exam prep & CS education

Updated 22 Nov 20266 min read
Repeater, Hub, Bridge, and Switch Explained: Layers, Domains, and Worked Examples

Memorising that a hub is Layer 1 and a switch is Layer 2 is easy. The trouble begins when a mixed-topology question asks what gets forwarded and how many collision or broadcast domains remain. Signals become frames, source MAC addresses are learned, and collision and broadcast domains are counted in four six-host networks. Unless stated otherwise, assume ordinary Ethernet, no router, no VLAN, and every shown link active. Use CS Fundamentals for Exams & Placements to place this topic within Computer Networks.

Repeater, hub, bridge, and switch at a glance

Device

OSI layer

Unit examined

Address awareness

Forwarding behaviour

Domain effect

Repeater

Physical Layer

Bits

None

Regenerates onto the other segment

Does not split collision or broadcast domains

Hub

Physical Layer

Bits

None

Repeats to every other port

One shared collision and broadcast domain

Bridge

Data Link Layer

Frames

Learns source MAC addresses

Filters or forwards between segments

One collision domain per bridge port but one broadcast domain

Switch

Data Link Layer

Frames

Learns source MAC addresses

Forwards to the selected port when known

One collision domain per active port but one broadcast domain by default

A hub is a multiport repeater. A switch applies the learning and filtering logic of a multiport bridge, but they are not identical in construction or performance. The broader Computer Networks overview connects routing, transport, addressing, and application-layer context. Holding the host count constant and changing only the interconnection device exposes the boundary rule. With no router or VLAN, all four preserve one broadcast domain.

Repeater: regenerate the signal without separating traffic

A repeater is a two-port Physical Layer device. It regenerates an impaired bit signal and sends the recovered stream onto the next segment. It does not read destination MAC addresses, decide whether a frame should cross, or create another LAN.

Suppose H1 is on segment A, H2 is on segment B, and a repeater joins them. When H1 sends a 64-byte Ethernet frame, the repeater handles it as bits and regenerates those bits on segment B. A transmission or collision on either side propagates across the repeater. Therefore the topology has 1 collision domain and 1 broadcast domain.

The trap is to equate greater physical reach with traffic separation. Replace the repeater with a bridge and the collision count changes from 1 to 2, because the bridge terminates and forwards frames between two segments.

Hub: every port remains in one shared collision domain

Connect H1, H2, H3, and H4 to a four-port hub. If H1 sends a frame addressed to H3, the hub repeats the incoming bits to H2, H3, and H4. H3 accepts the frame. The other NICs inspect the destination and reject it. The hub made no address-based decision.

If H1 and H2 transmit at nearly the same time, their signals collide on the shared medium. The disturbance reaches the whole hub, and H3 and H4 cannot transmit successfully then. The result is 1 collision domain and 1 broadcast domain.

Hubs model shared half-duplex Ethernet. They do not provide one collision domain per port. Adding more hubs or repeaters extends the same shared collision domain instead of isolating it.

Bridge: MAC learning separates two collision domains

Take a two-port transparent bridge B. P1 connects shared segment A with hosts A and B. P2 connects shared segment B with C and D. The empty table does not age during this trace.

  1. A -> C arrives on P1. The bridge learns A -> P1. C is unknown, so it floods the frame only to P2.

  2. C -> A arrives on P2. It learns C -> P2. A is known on P1, so it forwards only to P1.

  3. B -> A arrives on P1. It learns B -> P1. A is also on P1, so it filters the frame and sends nothing to P2.

The final table is A -> P1, B -> P1, and C -> P2. Segment A is one collision domain and segment B is another, for 2 collision domains. A broadcast from A is still forwarded to P2, so all four hosts remain in 1 broadcast domain.

Bridge diagram of two Ethernet segments, three frame-forwarding traces, final MAC entries A:P1, B:P1, C:P2, and collision and broadcast domains.

Now use a five-port switch S. H1 to H4 connect to P1 to P4. P5 connects to a four-port hub holding H5, H6, and H7. The five active switch links form 5 collision domains. The hub and its hosts share the P5 domain. With no router or VLAN, all seven hosts remain in 1 broadcast domain.

Start with an empty table. H1 sends to H6, so S learns H1 -> P1 and floods the unknown destination out P2 to P5. The hub repeats its P5 copy to H5, H6, and H7; only H6 accepts it. When H6 replies, S learns H6 -> P5 and forwards only to P1. H5, H6, and H7 are all eventually learned behind P5 because the switch sees the hub as one attached segment.

A direct modern switch link can run full duplex, so actual collisions do not occur there. Textbook counting still treats every active switch port as a separate collision-domain boundary. The hub segment remains shared and collision-prone.

Worked collision-domain and broadcast-domain comparison

Use the same six hosts in each panel. Derive each result from where bits propagate or frames terminate.

Panel

Boundary reasoning

Collision domains

Broadcast domains

A: six hosts on one eight-port hub

Every bit shares the hub

1

1

B: two three-host hubs joined by a repeater

Hub and repeater links propagate the same bits

1

1

C: two three-host hubs joined by a bridge

The bridge terminates frames between two shared segments

2

1

D: six hosts on six active ports of an eight-port switch

Each active host link has its own boundary

6

1

Panel D has two unused ports, but unused ports are outside the connected-topology count. The invariant is clear: repeaters and hubs do not split collision domains; bridges and switches do. None of the four splits the default broadcast domain.

Four-panel comparison of hubs, bridged hubs, and a switch, showing 1, 2, and 6 collision domains with one broadcast domain in each configuration.

Repeater, hub, bridge, and switch exam patterns and traps

Recurring questions ask you to identify the OSI layer, trace an unknown unicast, known unicast, or broadcast, complete a MAC table, or count domains in a mixed topology. Use Computer Networks MCQs to practise device identification and domain counting without assuming any particular exam weightage.

Misconception

Consequence

Correction

A switch broadcasts every frame

Known unicasts appear to reach every port

It floods broadcasts and unknown unicasts, but selectively forwards known unicasts

A bridge creates two broadcast domains

The broadcast count is doubled

A bridge forwards broadcasts by default

A hub has one collision domain per port

A shared medium is counted as separate links

All hub ports share one collision domain

A switch knows destinations before learning

Initial traffic is incorrectly filtered

It learns source addresses and floods an unknown destination

A full-duplex switch link has collisions

Boundary counting is confused with real contention

It is a separate collision-domain boundary, but full duplex removes actual contention

Three rapid checks confirm the rule. Two hub segments linked by a bridge give 2 collision domains, 1 broadcast domain. Replace the bridge with a repeater and the answer becomes 1, 1. Connect twelve hosts, one per port, to a fully occupied twelve-port switch with no VLAN or router and the count is 12, 1, with no actual collisions on the full-duplex links.

Repeater, hub, bridge, and switch in the short version

Use this retrieval chain: a repeater regenerates bits between two segments; a hub repeats bits across many ports; a bridge learns and filters frames between a few segments; a switch applies bridge logic across many ports. Repeaters and hubs preserve one collision domain, bridges and switches divide it per port or segment, and all four preserve one broadcast domain when no router or VLAN creates another boundary.

Redraw panels A to D without their labels, then recover 1/1, 1/1, 2/1, and 6/1 for collision and broadcast domains. If an answer feels memorised rather than derived, replay the A-to-C bridge trace.

For your next step, choose GATE Guidance by Sanchit Sir for sequenced GATE-level Computer Networks study, or CS Fundamentals for Placements by Sanchit Sir for interview-focused core-subject revision.