Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Lesson 1 of 6 · Concept · 25 min · revision 1

From cable to switch: media, optics, frames, MAC learning and flooding

Select copper or fibre cabling, matching optical transceivers and PoE budgets from link requirements, diagnose physical-layer CRC errors, and explain how switches build MAC tables, flood unknown unicast and isolate broadcast domains.

Contentsand lesson path

What you will learn

  • Explain Ethernet framing, MAC learning, flooding and forwarding, and broadcast domains, and read a switch's forwarding table.
  • Choose copper or fiber media, transceivers and PoE for a link from distance, speed and power needs, and identify physical-layer faults (CRC errors, link flaps, wrong optics) from interface counters and transceiver diagnostics.

01. Why it matters

Suppose two teams deploy new infrastructure in the same week: one strings twisted-pair copper 350 m across a parking lot between two buildings and sees zero link light, while the other plugs a 25 W Wi-Fi access point into an old closet switch and watches it reboot every few minutes with power-denied logs. Meanwhile, a quiet access switch logs 40 different MAC addresses on a single port.

Every switched network starts with Layer 1 physics and Layer 2 framing (reviewed alongside IP delivery in CIDR blocks and default gateways). Choosing the right copper, fibre, optical transceiver, and Power over Ethernet (PoE) budget prevents physical outages before cables are pulled, and understanding how switches learn MAC addresses keeps normal uplinks from being mistaken for attacks.

02. Choosing copper vs fibre media, transceivers and PoE budgets

Every physical Ethernet link must satisfy three constraints: distance, speed, and electrical environment. Walk through the choice in four steps:

  1. Distance and electrical environment (copper vs fibre): Under TIA-568 structured cabling, twisted-pair copper (Cat5e, Cat6, and Cat6a) is limited to 100 metres total (typically up to 90 m of solid horizontal cable terminating at a patch panel plus up to 10 m of patch cords). At 10 Gb/s (10GBASE-T), Cat6 covers up to 55 m in dense bundles while Cat6a covers the full 100 m. Avoid running standard copper between separate buildings: besides the 100 m limit, ground-potential differences and lightning surges can damage switch ports, so optical fibre is the default inter-building medium (outdoor-rated shielded copper with surge protection at both entries is a rare short-span exception).
  2. Fibre core and matching optics: Optical fibre carries light pulses immune to electromagnetic interference. Multimode fibre (MMF) with short-reach 10GBASE-SR optics (850 nm wavelength) reaches 300–400 m on OM3/OM4 glass inside a building, whereas single-mode fibre (SMF) with long-reach 10GBASE-LR optics (1310 nm) reaches up to 10 km across campuses. Both ends must match standard, wavelength, and fibre core type—an SR optic cannot link with an LR optic, and launching one into the wrong glass causes severe signal loss or no carrier. Worked example: connecting a branch closet 280 m away in another building at 10 Gb/s calls for single-mode OS2 fibre and 10GBASE-LR optics at both ends, whereas a 40 m closet-to-desk run inside one building uses Cat6a copper.
  3. Speed, duplex, and auto-negotiation: Twisted-pair interfaces exchange Fast Link Pulses at link-up to agree on speed and duplex. 1000BASE-T and 10GBASE-T in practice run full duplex and rely on auto-negotiation (IEEE 802.3 Clause 40 still defines a 1000BASE-T half-duplex mode, though modern switches leave it unused). On legacy 10/100 Mb/s links, forcing full duplex on one side disables negotiation and leaves the partner in half duplex.
  4. Power over Ethernet (PoE) per-port and chassis budgets: Cat5e and better carry DC power alongside gigabit and multi-gigabit data. IEEE 802.3af (PoE) supplies up to 15.4 W at the switch port (~12.95 W at the device), 802.3at (PoE+) supplies up to 30 W (~25.5 W at the device), and 802.3bt supplies up to 60–90 W. Check both the per-port standard and the switch's total PoE chassis budget: using a simplified actual-draw budget model, a 24-port PoE+ switch with a 195 W chassis budget powers ten 18 W cameras (180 W) and denies the eleventh (198 W > 195 W). Note that many switches budget by PoE class instead (for example reserving 30 W per Class 4 port plus cable loss), admitting fewer devices on the same 195 W chassis.

Diagnosing Layer 1 faults from interface counters and DOM diagnostics: When troubleshooting physical links, compare carrier stability (carrier_changes in Linux /sys/class/net/<iface>/carrier_changes or link-transition syslog entries) against error counters (ip -s link, ethtool -S) and Digital Optical Monitoring (DOM) readings (ethtool -m or switch show interfaces transceiver):

  • Rising CRC/FCS input errors with stable carrier (carrier_changes not increasing): Frames arrive corrupted on an unbroken path—check for damaged copper pairs, dirty or bent fibre patch cords, or a duplex mismatch rather than a VLAN or MAC-table issue.
  • Link flaps (rising carrier_changes and carrier_down_count): The link repeatedly drops and recovers. Common causes include marginal optical rx_power hovering near the receiver sensitivity floor, a loose RJ45 tab or failing copper pair, auto-negotiation instability, PoE brown-outs under load, or switch port err-disable triggers.
  • Receiver overload vs sensitivity floor vs wrong optics: Check rx_power against both limits on the transceiver. An rx_power near or below the sensitivity floor (such as -14.2 dBm against a -14.4 dBm floor) points to dirty connectors, tight bends, or excessive span loss. Conversely, plugging a high-power long-haul optic such as 10GBASE-ER (40 km, 1550 nm) across a 2 m rack patch cord can drive rx_power above the receiver overload ceiling (for example +2.6 dBm vs -1.0 dBm max), saturating the photodiode and causing flaps or packet loss unless you add an attenuator or swap to a lower-power optic such as 10GBASE-LR (or SR over a multimode patch). Finally, installing a wrong optic—such as 10GBASE-SR (850 nm MMF) in OS2 single-mode fibre or SR opposite LR—typically shows NO-CARRIER, near-zero rx_power, and mismatched wavelengths in diagnostics.
Text · Illustrative sample output: Linux link counters and transceiver DOM diagnostics
# Port A (eth1): broken path stays up -> CRC errors climb, carrier stays stable
carrier_changes: 1   rx_crc_errors: 482   (check cable/patch or duplex mismatch)

# Port B (sfp2, 10GBASE-LR): link flapping -> marginal RX near sensitivity floor
carrier_changes: 19   carrier_down_count: 9   tx_power: -2.1 dBm   rx_power: -14.2 dBm
  (sensitivity floor: -14.4 dBm -> clean fibre ends, inspect bend radius/splices)

# Port C (sfp3, 10GBASE-ER on 2 m patch): RX above overload ceiling -> flaps/drops
carrier_changes: 11   tx_power: +3.0 dBm   rx_power: +2.6 dBm
  (max RX overload: -1.0 dBm -> swap to SR/LR or add an attenuator)

03. How switches learn MAC addresses, flood frames and bound broadcasts

Once bits arrive cleanly across Layer 1, an Ethernet switch forwards frames at Layer 2 (IEEE 802.1Q). An Ethernet II frame carries a 6-byte destination MAC, a 6-byte source MAC, a 2-byte EtherType (0x0800 IPv4, 0x86dd IPv6, 0x0806 ARP), the payload, and a 4-byte Frame Check Sequence (FCS) trailer. Each 48-bit MAC address starts with a 3-byte vendor OUI and ends with a 3-byte NIC identifier; bit 0 of the first byte marks unicast (0) vs multicast/broadcast (1, as in ff:ff:ff:ff:ff:ff), and bit 1 marks factory-burned addresses (0) vs locally administered addresses (1, such as 02:00:00:... in lab tests).

Early repeaters and hubs echoed every electrical signal out every port, placing all hosts in one shared collision domain. Modern full-duplex switches give every port its own point-to-point collision domain—eliminating CSMA/CD collisions—and maintain a MAC address table (Forwarding Database, or FDB) in three deterministic steps:

  1. Learn on ingress only: When a frame enters port P, the switch records (source MAC, VLAN, port P) and resets that entry's aging timer (typically 300 seconds). Switches never learn from destination MACs or transmitted frames.
  2. Forward known unicast: If the destination MAC is already mapped to port Q in the same VLAN, the switch forwards the frame only out port Q (or drops it if Q == P).
  3. Flood unknown unicast and broadcasts: If the destination MAC is absent—after boot, or after a silent host's entry ages out—or is ff:ff:ff:ff:ff:ff, the switch floods the frame out every other port in that VLAN. As soon as the target sends a frame back, the switch learns its port and stops flooding. Notice a classic consequence of aging: routers often keep ARP entries far longer than a switch keeps MAC entries (minutes to hours, against a typical 300-second MAC aging time). If asymmetric routing sends frames to a host through Switch S1 while frames from that host take another path, S1 rarely sees the host's source MAC, so its entry expires after 300 seconds even though the router still holds the ARP mapping—forcing S1 to flood every unicast frame toward that host until either symmetry is restored or FDB aging exceeds the ARP timeout.

Why 40 MAC addresses on one port is usually normal: An uplink port to another switch, a wireless access point, or a VM hypervisor carries frames sourced by dozens of downstream hosts, so seeing 40 MACs on that uplink reflects normal aggregation rather than a MAC-flooding attack.

Broadcast domains follow VLANs, not switches: Each VLAN is one isolated Layer 2 broadcast domain, and routers never forward Layer 2 broadcasts between subnets. Two 24-port switches each hosting two distinct local VLANs (four VLANs total) create four separate broadcast domains, because broadcast scope follows VLAN boundaries rather than physical chassis or port counts.

Text · Switch forwarding flow: learn source MAC on ingress, flood only if unknown
Frame arrives on Port 1: [Dst: MAC_B | Src: MAC_A | ...]
  1) Learn: FDB[MAC_A] = Port 1 (reset aging timer)
  2) Lookup MAC_B in FDB (within same VLAN):
       +-- Found on Port 5  --> Forward ONLY out Port 5
       +-- Unknown or bcast --> Flood out all OTHER ports in VLAN

When not to keep a flat Layer 2 domain: Leaving an entire site in one switch broadcast domain works in a small lab, but fails as headcount grows: every ARP and mDNS broadcast wakes every host, and one misbehaving NIC or loop saturates every closet. Segment networks into VLANs and routed subnets once host counts, broadcast noise, or trust boundaries require isolation.

04. Check your understanding

Practice check · 3 questions

PoE budgets, optical DOM diagnostics and MAC aging

Apply physical-layer limits, DOM counters and switch aging rules to each scenario.

Q1. A 24-port 802.3at (PoE+) switch advertises a 195 W total PoE budget (using simplified actual-draw accounting rather than per-class reservation). Nine 18 W cameras already draw 162 W on ports 1–9. You plug in a tenth and eleventh 18 W camera on ports 10–11, and port 11 stays dark with a budget-exceeded log. Why?
Q2. A newly installed `10GBASE-ER` (1550 nm, 40 km) link over a 2-metre rack patch cord flaps repeatedly (`carrier_changes` climbing). `ethtool -m` reports `tx_power +3.0 dBm`, `rx_power +2.6 dBm`, and receiver overload threshold `-1.0 dBm`. What is the fault?
Q3. Due to asymmetric routing, frames *to* Host A cross Switch S1, but frames *from* Host A take another path, so S1 sees a frame from Host A only once every 10 minutes. S1's MAC aging timer is 300 s, whereas the router's ARP cache holds Host A's MAC for 20 minutes. What happens on S1, and what fixes it?
Practice only: not graded, not saved, not evidence.

05. Apply it

You must link a branch switch 280 m away in a separate building at 10 Gb/s and power six 22 W PoE+ access points inside that branch switch. Specify the inter-building medium and optic type, pick the PoE standard and minimum total PoE budget with 20% headroom (and note how class-based 30 W reservation changes the chassis calculation), and explain how you would separate rising rx_crc_errors, climbing carrier_changes, and rx_power overload in ethtool diagnostics.

Next, build a real software switch in the Linux bridge lab to observe MAC learning and unknown-unicast flooding directly on the wire.

06. Review prompt

Explain why standard copper fails between buildings even below 100 m, how carrier_changes, rx_crc_errors, and DOM rx_power distinguish dirty connectors from link flaps and receiver overload, why asymmetric routing causes unicast flooding when FDB aging is shorter than ARP lifetimes, and why broadcast domains follow VLAN boundaries.

References

Your progress

Reading state

Sign in to save that you finished reading this lesson.

Sign in to mark reading complete

Prove this skill

10 questions · about 8 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.
Take the skill check