Understanding Switches and Addressing
A switch is the quiet workhorse of every LAN. It does not need an IP address to do its job — it builds its own map of who is where and forwards frames accordingly. This lesson shows exactly how that map is built, how a switch decides where to send a frame, and the three addresses that ride inside every single communication.
Why switches replaced hubs
The first Ethernet networks used a hub (also called a repeater). A hub is a Layer 1 device: it takes every bit that arrives on one port and repeats it out of every other port. It makes no decisions and reads no addresses. The consequence is severe — all devices attached to a hub share one collision domain and one pool of bandwidth, so when two devices transmit at once their signals collide and both must be retransmitted.
A switch is a Layer 2 device that fixes all of this. It reads the Ethernet header, records which device is on which port, and forwards a frame only toward the port where the destination lives. Each switch port becomes its own collision domain — a technique called microsegmentation.
| Property | Hub | Switch |
|---|---|---|
| OSI layer | Layer 1 (Physical) | Layer 2 (Data Link) |
| Decisions | None — repeats signals | Forwards by destination MAC address |
| Collision domains | One shared by all ports | One per port |
| Duplex | Half-duplex | Full-duplex per port |
| Bandwidth | Shared by all devices | Dedicated per port |
| Efficiency | Degrades as devices are added | Scales well |
Switch fundamentals
A switch forwards Ethernet frames based on the destination MAC address inside the frame. To do that it maintains a MAC address table (also called the CAM table or forwarding table) that maps each known MAC address to the port on which it was seen, within a VLAN. A frame that arrives on a port is called ingress; the port it leaves by is egress.
Every Ethernet MAC address is 48 bits long, written as 12 hexadecimal digits. The first 24 bits are the Organizationally Unique Identifier (OUI), assigned by the IEEE Registration Authority to a manufacturer; the remaining 24 bits identify the individual interface. Cisco writes the address in dotted notation — 001a.2b3c.4d5e — while other systems use colons or hyphens: 00:1a:2b:3c:4d:5e.
ff:ff:ff:ff:ff:ff (written ffff.ffff.ffff by Cisco) is the broadcast address, addressed to every device.Two special cases matter for the switch: an address whose Individual/Group (I/G) bit is 0 is a unicast (one destination); if that bit is 1 it is a multicast/group address. Switches treat broadcasts and most multicasts as traffic that must be sent to many ports.
Building the MAC address table
A switch starts with an empty table and fills it automatically as traffic flows. The behaviour for every frame is decided by four actions.
- Learning. The switch reads the source MAC address of the frame and records it together with the ingress port (and VLAN). If that MAC was already known, the port is updated. This is how the table is populated without any administrator involvement.
- Forwarding (known unicast). If the destination MAC is already in the table and the entry points to a different port, the switch sends the frame out that one port only.
- Flooding. If the destination is unknown (not in the table), or the frame is a broadcast (
ffff.ffff.ffff) or a multicast, the switch sends it out of every port in the same VLAN except the port it arrived on. - Filtering. If the destination MAC is on the same port as the frame's ingress port, the switch drops the frame — there is no reason to send it back out the way it came.
Entries are not permanent. Every learned address is given an aging timer; if no frame from that address is seen again before the timer expires, the entry is removed. On Cisco Catalyst switches the default aging time is 300 seconds (5 minutes). Aging keeps the table accurate when a device is unplugged and moved to a different port.
Three switching behaviours
How much of a frame the switch buffers before it forwards depends on its switching method. There are three, and the exam expects you to weigh latency against error checking.
| Method | What it waits for | Error checking | Latency |
|---|---|---|---|
| Store-and-forward | The whole frame | Full — computes the CRC and drops bad frames | Highest (grows with frame size) |
| Cut-through | Only the destination MAC (first 6 bytes) | None — can forward corrupted frames | Lowest |
| Fragment-free | The first 64 bytes | Detects collision fragments (runts) | Medium |
Store-and-forward is Cisco's primary LAN switching method. The switch receives the entire frame, checks the Frame Check Sequence (FCS/CRC), discards it if it is corrupt, then forwards it. It is the most reliable but adds the most latency. Cut-through (Cisco calls the common variant fast-forward) reads only the destination address and immediately begins forwarding — very fast, but it propagates errors because the checksum at the end of the frame has not been read yet. Fragment-free is the compromise: it stores the first 64 bytes, the window in which nearly all collisions occur, before forwarding.
The three addresses in every communication
Every exchange between two applications carries three different kinds of address. Each lives at a different layer and answers a different question.
| Layer | Address | Size | Answers the question |
|---|---|---|---|
| Layer 2 | MAC address | 48 bits | Which device on this local link? |
| Layer 3 | IP address | IPv4: 32 bits / IPv6: 128 bits | Which host on the end-to-end path? |
| Layer 4 | Port number | 16 bits (0–65535) | Which application on that host? |
Take a browser opening https://example.com. The frame that leaves your PC carries:
- Layer 4: a source port from the dynamic range (for example
49152) and the destination port443for HTTPS. - Layer 3: your source IP (for example
192.168.1.10) and the server's IP (for example203.0.113.10, a documentation range reserved by RFC 5737). - Layer 2: your NIC's MAC as source and, because the server is on another network, your default gateway's MAC as destination.
Duplex and reading the MAC address table
Duplex describes whether a link can send and receive at the same time.
- Half-duplex — a device can transmit or receive, but not both at once. Used on shared media such as a hub. It relies on CSMA/CD to detect collisions and retransmit.
- Full-duplex — a device can transmit and receive simultaneously. There are no collisions, so CSMA/CD is disabled. It requires a point-to-point link (switch to host, or switch to switch), and both ends must agree.
auto; if you must configure it manually, set both ends identically.Reading the MAC address table
A Cisco IOS switch displays learned addresses with show mac address-table. Each row lists the VLAN, the MAC address, whether the entry is static or dynamic, and the port it was learned on.
switch# show mac address-table
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
1 001a.2b3c.4d5e DYNAMIC Gi1/0/1
1 001a.2b3c.4d5f DYNAMIC Gi1/0/2
1 001a.2b3c.4d60 DYNAMIC Gi1/0/3
1 001a.2b3c.4d61 DYNAMIC Gi1/0/4
1 ffff.ffff.ffff STATIC CPU
Total Mac Addresses for this criterion: 5
Useful variations include show mac address-table dynamic to see only learned entries, show mac address-table interface Gi1/0/1 to list addresses on one port, and clear mac address-table dynamic to remove all dynamic entries (for example, after moving a device). The DYNAMIC type means the switch learned the address from traffic; STATIC entries are configured by an administrator or added automatically for reserved addresses.
Review
Check what you have learned with these review questions.
Sources & references
- IEEE. IEEE Std 802.3™ — Ethernet (MAC frame format, 48-bit address fields, minimum 64-byte and maximum 1518-byte frame sizes). standards.ieee.org/ieee/802.3.
- IEEE Registration Authority. MAC Addresses / OUI assignments. standards.ieee.org/products-programs/regauth.
- Braden, R. RFC 1122: Requirements for Internet Hosts — Communication Layers (1989). rfc-editor.org/rfc/rfc1122.
- Socolofsky, T. & Kale, C. RFC 1180: A TCP/IP Tutorial (1991), Sections 2–3 (MAC vs IP addressing and switching). rfc-editor.org/rfc/rfc1180.
- IANA. Service Name and Transport Protocol Port Number Registry (port ranges). iana.org/assignments/service-names-port-numbers.
- Cisco. CCNA (200-301) Exam Topics, Network Fundamentals. cisco.com.
Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.