How Ethernet Switches Learn and Forward

This episode uses How Ethernet Switches Learn and Forward to build practical networking judgment. The key ideas are: switches learn source MAC locations; known unicast and unknown unicast are handled differently; and learning and forwarding occur within the relevant VLAN. The di…

Today's lesson is How Ethernet Switches Learn and Forward. This lesson keeps durable reasoning in the narration and exact notation in the companion reference. Begin with one principle: Switches learn source MAC locations. Connect that principle to evidence, then use the reference or a lab to verify the detailed implementation.

Build the episode around three ideas: switches learn source MAC locations, known unicast and unknown unicast are handled differently, and learning and forwarding occur within the relevant VLAN. At each stage, ask what should be true, what observation would represent that state, and what a mismatch would justify changing. Build the foundation first. Imagine three computers connected to one Ethernet switch.

Computer A is on port one, Computer B is on port two, and Computer C is on port three. Computer A sends an Ethernet frame to Computer B. Before that frame arrives, the switch’s address table is empty. What should you expect the switch to learn, and where should you expect it to send the frame? The answer depends on two different addresses in that frame.

One tells the switch where the frame came from. The other tells it where the frame is going. Keeping those roles separate is the foundation for understanding Ethernet switching. An Ethernet switch makes forwarding decisions using Media Access Control addresses, usually called MAC addresses.

A MAC address identifies an Ethernet interface at Layer Two. The switch maintains a MAC address table that associates learned addresses with VLAN and port information. You can think of each dynamic entry as the switch’s current evidence that a particular source address is reachable through a particular port in a particular Layer Two domain. The table isn’t created from a permanent diagram of the network.

The switch builds much of it by watching traffic arrive. When the frame from Computer A enters port one, the switch examines the source MAC address. That source address identifies Computer A’s interface. The switch can therefore learn that Computer A’s MAC address is reachable through port one.

This is source learning. The incoming frame itself provides the evidence. The switch doesn’t need to wait for a frame addressed to Computer A, and it doesn’t learn Computer B’s location merely because Computer B appears as the destination. That distinction corrects a common misunderstanding.

Some learners picture the destination field as an instruction that teaches the switch where the destination lives. It doesn’t. The destination address tells the switch which address it needs to look up. The source address tells the switch where the sender was observed.

If Computer A sends a frame to Computer B, the switch can learn A from that frame. It can’t learn B’s location from the destination field because the frame’s arrival on port one says nothing about which switch port leads to B. After considering the source, the switch looks up the destination MAC address. If the table already contains a usable entry for that destination, this is a known unicast destination.

The switch can forward the frame toward the port associated with that entry. If B’s MAC address is associated with port two, a frame addressed to B can be sent toward port two rather than copied everywhere. Learning and forwarding are related, but they’re separate decisions. Source learning updates knowledge about the sender.

Destination lookup determines what the switch does with this frame. Suppose the table is still empty when A sends the first frame to B. The switch learns A on port one, but its destination lookup for B finds no matching entry. B is an unknown unicast destination from this switch’s current point of view. The switch floods the frame within the relevant Layer Two domain.

Flooding means replicating the frame to multiple eligible ports according to the switching rules. It doesn’t mean that the switch has forgotten how Ethernet works. It means the switch lacks a specific destination entry that would justify selecting one outgoing port. Exact visual detail related to MAC address table examples and frame-flow diagrams is preserved in the episode reference.

The audio teaches the relationships and decisions. The reference supplies the characters, rows, fields, and examples needed for deliberate practice. Move from the concept to the observable path. Now B responds to A. B’s reply arrives on port two with B’s MAC address as the source and A’s MAC address as the destination.

The switch learns B on port two. It then looks up A. Because A was learned from the original frame on port one, A is now a known destination. The switch can forward B’s reply toward port one. One exchange has supplied evidence for both dynamic entries, but each entry was learned when its owner appeared as the source of an incoming frame.

Consider the next frame from A to B. When it arrives on port one, the switch again observes A as the source. That traffic confirms or refreshes the dynamic association for A. The destination lookup now finds B associated with port two, so the frame can be forwarded toward that one port. The switch has moved from flooding the first unknown destination to making a specific forwarding decision. Nothing about B’s address changed.

What changed was the switch’s operational knowledge. This gives you a reliable order for predicting switch behavior. First, identify the source MAC address and the port where the frame arrives. That tells you what source information the switch can learn or refresh.

Second, identify the destination MAC address and search for it in the correct VLAN’s MAC address table. If the destination is known, expect forwarding toward the associated port. If the destination is unknown, expect flooding among eligible ports within that VLAN. Don’t reverse those steps by using the destination to invent a learned entry.

Dynamic entries can’t remain unquestioned forever. A computer may disconnect, become inactive, or move elsewhere. If the switch preserved every old dynamic association indefinitely, its table could continue representing devices that were no longer active at those locations. Dynamic MAC entries therefore age out after inactivity.

Aging removes stale learned information and allows the table to adapt as devices disappear or their location changes. The important condition is inactivity. An active source continues sending frames, and those arriving frames provide current evidence for its learned association. A silent source doesn’t provide that evidence.

Once an inactive dynamic entry ages out, the switch no longer has that entry available for a later destination lookup. The next frame addressed to that MAC address may therefore be treated as an unknown unicast and flooded within the relevant VLAN. If the device sends traffic again, the switch can learn it again from the source address and ingress port. Return to Computers A and B. Assume both addresses have been learned.

B then becomes silent long enough for its dynamic entry to age out, while A continues producing traffic and its entry remains current. When A later sends another frame to B, the switch refreshes or confirms A from the source address on port one. It then looks up B as the destination. Because B’s old dynamic entry is gone, the switch can’t select port two from that stale knowledge.

It floods the frame to eligible ports in the VLAN. If B responds, the response arrives on port two and allows the switch to learn B there again. Keep the neighboring concepts separate. Notice that flooding in this case isn’t automatically evidence of a fault.

It follows directly from the table state at the moment of the lookup. The destination entry aged out, so the destination is unknown. A single unknown-unicast flood doesn’t, by itself, prove that the network has a loop. You need measured network behavior before reaching that conclusion.

The useful question is not simply, why did I see more than one copy leave the switch? Ask whether the destination had a valid entry in the relevant MAC address table when the forwarding decision was made. A device move can also change what the table needs to represent. Suppose B is no longer connected through port two and later sends a frame through another switch port.

The arriving frame supplies new source information. The switch observes B’s MAC address on that ingress port, allowing its dynamic knowledge to reflect the newly observed location. The combination of source learning and aging lets the table respond to current traffic instead of acting as an unchanging inventory. That’s why a MAC address table is operational state, not merely a list to memorize.

It represents what the switch has learned from frames and what information remains active. When you inspect it, you’re looking for evidence that connects an address, a VLAN, and a port. A table entry can support a known-unicast forwarding decision. A missing entry explains why an otherwise valid unicast frame may be flooded.

An entry associated with an unexpected port tells you that the switch’s observed source traffic doesn’t match your prediction. Suppose you expected A on port one and B on port two, but traffic to B is being flooded. Don’t start by changing several settings. State the expected operational condition first.

You expect an active dynamic entry associating B’s address with port two in the correct VLAN. Then inspect the actual MAC table state. Is B present at all? Is the entry in the expected VLAN?

Is it associated with the expected port? Those observations are closer to the forwarding decision than a general belief that the switch configuration looks correct. Next, test whether source learning is occurring. Generate or observe traffic in which B is actually the source of a frame arriving on port two.

A frame merely destined for B won’t prove that B can be learned there. After source traffic arrives, compare the table with your expected state again. If B now appears on port two and later frames to B are forwarded there, the evidence supports the source-learning model. If B still doesn’t appear, investigate the mismatch involving the ingress path, VLAN membership, or table state rather than guessing at unrelated causes.

The VLAN comparison is important because an address lookup belongs to a Layer Two context. Seeing the expected address somewhere in a table isn’t enough if it isn’t associated with the VLAN relevant to the frame. Likewise, seeing the correct physical port in another context does not demonstrate that this frame’s lookup can use it. You’re comparing the frame’s actual path and VLAN with the address entry that should drive its forwarding decision.

This episode doesn’t require configuring VLANs, but it does require recognizing that flooding and forwarding occur within that boundary. Use the final comparison to justify the next action. A particularly useful troubleshooting test separates what the switch learned from what it looked up. Take one incoming frame and name both fields.

If A is the source and B is the destination, the learning question concerns A and the ingress port. The forwarding question concerns B and the destination lookup. If the table gains an entry for A, that’s expected. If someone claims the switch learned B merely because B was named as the destination, the observed mechanism contradicts that claim.

Wait for B to transmit as a source, then check whether B’s address becomes associated with B’s ingress port. This method also keeps you from treating successful command entry or static configuration text as proof of correct forwarding. The switch’s operational table and the frame’s actual source, destination, VLAN, and ingress path are the evidence that matters here. Predict what the table should contain, observe what it does contain, and isolate the smallest difference.

If you change something, repeat the same check. A disappearing symptom is helpful, but a repeated observation that now matches the prediction gives you a much stronger explanation. Try one complete trace. The table begins without entries for A or B. A frame from A enters port one and is destined for B. The switch learns A on port one.

B isn’t known, so the frame is flooded to eligible ports within the VLAN. B replies through port two. The switch learns B on port two, looks up A, and forwards the reply toward port one. Later traffic from A refreshes A’s entry and can be forwarded toward B on port two.

If B remains inactive and its dynamic entry ages out, a later destination lookup for B becomes unknown again, so flooding can return until source traffic lets the switch relearn B. That trace contains the whole causal chain. Incoming source information builds and refreshes dynamic entries. Inactivity removes stale entries through aging.

Destination lookup uses the table’s current state to choose between specific forwarding and flooding within a VLAN. The CCNA objective places MAC learning and aging, frame switching, frame flooding, and the MAC address table together because they describe one connected behavior. You aren’t dealing with four unrelated definitions. You’re explaining how one frame changes the switch’s knowledge and how that knowledge influences the next forwarding decision.

When you face a switching question, avoid choosing an answer because flooding sounds abnormal or one-port forwarding sounds efficient. Reconstruct the state. Ask where the frame entered, which address is the source, whether that source should be learned or refreshed, and whether the destination has an entry in the correct VLAN. Then predict the result.

Known destination information supports forwarding toward the associated port. Missing destination information supports flooding to eligible ports in the VLAN. Continued source activity keeps dynamic knowledge current, while inactivity allows it to age away. The same reasoning gives you a disciplined response when reality doesn’t match the prediction.

Compare source learning, destination lookup, VLAN membership, and the MAC table before blaming a loop or changing multiple settings. Confirm that the device you expected to learn has actually transmitted as a source. Confirm that the address appears where the forwarding decision can use it. Then repeat the traffic and verify the state again.

That approach turns a vague report that the switch is sending frames incorrectly into a specific, testable difference between expected and observed behavior. End with the practical judgment. A switch’s behavior becomes predictable when you keep learning and forwarding separate. The incoming source MAC address tells the switch what it can learn or refresh.

The destination MAC address is then looked up to decide whether the frame can be forwarded toward an associated port or must be flooded within the VLAN. Because dynamic entries can age out after inactivity, yesterday’s known destination may be unknown when the next frame arrives. If the result seems wrong, compare the actual source traffic, destination lookup, VLAN context, and MAC table state.

That evidence lets you distinguish normal unknown-unicast flooding from a real mismatch and correct the specific cause instead of guessing. Knowledge check: What does a switch learn from the source address of an incoming frame? Answer before continuing.

Explain what you would expect, what you would observe, and how the observation would guide the next action. Thanks for listening. This lesson was produced by Bare Metal Cyber dot com.

How Ethernet Switches Learn and Forward
Broadcast by