The idea
A hub has no idea what it is repeating. Every frame that arrives on one port goes out every other port, whether the destination is on the next desk or a segment away — and every device sharing that hub shares one collision domain with it.
Everything in this topic is the same problem solved with progressively more intelligence: read the destination address before deciding whether to forward at all. A repeater still forwards blindly, just cleanly. A bridge reads the address and can refuse to forward. A switch does that at the speed and scale of a real LAN. A router does it one layer further up again.
Hub, repeater, active hub
How it works
The physical-layer devices
Hub (passive). A physical-layer device providing connections between communication devices — electrically equivalent to a shared bus, just more convenient to wire up. It broadcasts every incoming frame across its internal bus to every other connected NIC, and is a collision point: everything attached to it shares one collision domain.
Repeater. Connects two segments of a LAN and forwards every frame with no filtering. What it actually does is regenerate the signal — rebuild it from scratch, not just amplify what arrived — which is what eliminates the noise a simple amplifier would carry forward along with the signal.
Active hub. A multipoint repeater: it creates connections between stations wired in a physical star, and several of them can be stacked to build multiple levels of hierarchy — 10BaseT is the lecture’s example.
| Device | Layer | Filters traffic? |
|---|---|---|
| Hub / active hub | Physical | No — broadcasts to every port |
| Repeater | Physical | No — regenerates and forwards everything |
| Bridge | Physical + data link | Yes — reads the MAC address and can discard |
Regeneration is also the answer to “how does a repeater extend the length of a LAN” (Tutorial 3, Q13): a signal that has attenuated too far to be read reliably is rebuilt clean at the repeater, so the usable run is longer than one unrepeated segment would allow. The exact distance a chain of repeaters buys on a real 10BASE5 link is covered with the physical-layer material in Module 2.
Bridge
How it works
Physical-layer repeater plus data-link filtering
A bridge operates at both the physical and data link layers. As a physical-layer device it does what a repeater does. As a data-link device it can go further: it checks the source and destination MAC address in each frame and uses a filtering table to decide what to do with it.
When a bridge is first plugged in, that table is empty. Every incoming frame for a destination it does not yet recognise is flooded — sent out every port except the one it arrived on — exactly like a hub would.
How it works
Learning the table — backward learning
The bridge fills its own table without any configuration, using backward
learning: when a frame from address A arrives on a given port, the
bridge records “A is on this port.” As frames keep arriving from different
sources, the table fills in on its own, and updates automatically if a
device moves to a different port.
Once the table has an entry for a destination, the bridging procedure is a three-way decision:
- Source and destination are on the same LAN — discard the frame. It is already where it needs to be.
- Source and destination are on different LANs — forward it.
- The destination LAN is unknown — flood, same as before the table learned it.
Check yourself
A frame arrives on Port 2 of a bridge, destined for a MAC address the table has never recorded. What does the bridge do — and what does it learn from this frame regardless of the answer?
Answer: it floods the frame out every port except Port 2, since the destination is unknown. Separately, whatever the frame’s source address is, the bridge now records that address as reachable via Port 2 — the flooding decision and the learning update happen on every frame, independent of each other.
Spanning Tree Protocol
How it works
Why it exists
Two or more bridges are often added between the same pair of LANs purely for reliability — if one fails, the other still connects them. That redundancy creates a loop, and a loop is a problem for flooding: a frame flooded onto a looped topology can circulate forever, duplicating itself at every pass.
Spanning Tree’s fix: decide on exactly one path from every LAN to every other LAN, and block whichever links would otherwise close a loop.
A Bridge Protocol Data Unit (BPDU) carries a priority ID and MAC address — a switch can carry multiple MAC addresses — and bridges exchange these to agree on the tree.
Where marks get lost
This unit's path cost is hop count, not the IEEE tables
The lecture’s own worked example is explicit: “the cost here is defined as minimum hops.” Switch 1 to LAN 1 costs 1 hop; LAN 1 back to Switch 1 costs 0 hops. Total cost from the root to any point is the sum of hop counts along the cheapest path.
The real IEEE 802.1D standard defines numeric per-speed cost tables instead — and two different scales at that, since the 1998 and 2004 revisions rescaled the numbers. Neither table is what this unit teaches or what its worked example uses. If an exam question here gives you link costs, they are hop counts; do not reach for a 100 Mbps-equals-19 style number unless a question specifically asks about the real IEEE standard.
Aside
For reference only, since it is not what this unit examines: 802.1D-1998
scores a 10 Mbps link at cost 100 and a 1 Gbps link at cost 4 (lower cost for
faster links); 802.1D-2004 rescaled everything to 20,000,000 ÷ bandwidth-in-Mbps, giving 2,000,000 and 20,000 for the same two speeds. Two
genuinely different real-world tables exist. This unit’s own example uses
neither — it uses hop count.
Root election and bridge priority
How it works
Listening state — deciding the tree
Root selection compares priority ID first: the bridge with the lowest
priority wins. Priority is always a multiple of 4096 — the field only
takes 16 legal values, 0, 4096, 8192, … 61440, with a default of
32768. If priorities tie, the tie breaks on MAC address — and since MAC
addresses are unique, the tie always resolves.
STP moves through four states:
| State | What happens |
|---|---|
| Blocking | No data transmission on this port |
| Listening | Elect the root; decide the tree (root selection, then cost, then which ports forward) |
| Learning | Learn source MAC addresses, same backward-learning process as a transparent bridge |
| Forwarding | Normal data operation |
Step through an election
Each step mirrors the process above in order: elect the root by lowest priority (MAC as tie-break), compute every bridge’s cheapest hop-count path back to root, mark each non-root bridge’s root port — the link giving that cheapest path — then mark the designated port on the other end of each forwarding link, and finally block whatever link is left over, because it would otherwise close a loop.
Switch
How it works
A fast, multi-port bridge
A switch links several separate LANs through multiple ports, each of which can carry a single end station or an entire LAN — Lecture 3 gives the example of an Ethernet switch port supporting a dedicated 10/100 Mbps LAN of stations linked through a 10Base-T hub, or a single high-performance station, e.g. a server, connected directly to its own port.
In general terms a switch is a multi-port bridge: it filters by destination MAC address the same way, but is built to do it fast enough to give each port dedicated bandwidth and support several transmissions happening at once — where a single bridge is typically thought of as connecting just two segments.
Switch types
| Type | What it checks | Trade-off |
|---|---|---|
| Cut-through | Only the first few bytes, enough to read the addresses | Minimal delay, high throughput — but an invalid frame still gets passed on, since the rest of it is never checked |
| Store-and-forward | The entire frame, buffered before forwarding | Can filter out bad frames — at the cost of the delay needed to receive the whole frame first |
Router
The lecture places the router one step further than everything above: a three-layer device, operating at the physical, data link and network layers. The slides reference a router architecture diagram and a processing-flow diagram, but neither was extracted with enough detail to reproduce here — full router operation belongs to Module 5.
In the exam
- Hub vs bridge, repeater vs bridge. Layer (physical only, vs physical and data link) and whether it filters (no, vs yes, by MAC address).
- Bridge vs switch. A switch is a fast multi-port bridge — same filtering principle, built for many simultaneous, dedicated-bandwidth ports.
- Why filtering matters. It stops a bridge or switch from repeating every frame onto every segment, cutting collision-domain size and unnecessary traffic — the entire reason these devices exist over a hub.
- The transparent bridge’s three-way decision. Same LAN — discard. Different LAN — forward. Unknown — flood.
- STP path cost in this unit is hop count. Not the IEEE per-speed tables. State this explicitly if a question gives link costs.
- Bridge priority. Multiple of 4096, default 32768, range 0–61440, lowest wins, MAC address breaks ties.
- Cut-through vs store-and-forward. Speed vs error filtering — cut- through can pass on an invalid frame; store-and-forward cannot, but is slower.
- Router. Three-layer device: physical, data link, network.