Introduction
On an Ethernet LAN, a bridge can learn where a station sits simply by receiving a frame from it. A switch uses that observation and the destination on the next frame to decide which ports should carry a copy.
Learn on ingress
Suppose a frame arrives on port 2 in VLAN 20 with source MAC A. A learning bridge associates A with port 2 in the applicable filtering database. The observation says where a frame came from. It does not yet establish where the destination lives.
Dynamic entries age out and are relearned. When a workstation moves, its next transmitted frame can update its location. A switch may also have static entries or security policy that affects learning.
Choose eligible egress ports
For a known unicast destination, the switch consults its forwarding database and VLAN membership. If the destination is on a different forwarding port in the same VLAN, it transmits there. If the destination is already on the ingress port, it can filter the frame.
An unknown unicast typically floods to eligible forwarding ports in that VLAN, excluding the ingress port. Broadcast traffic uses a similar domain. Multicast forwarding can additionally depend on group membership learned through snooping or configured policy.
Bound the broadcast domain
An access link can assign untagged traffic to a configured VLAN. A trunk can carry several VLANs using tags and a policy for any untagged traffic. Both ends need compatible membership and tagging settings.
Redundant physical paths between bridges need a loop-control design. Spanning Tree can block selected paths for a logical topology and unblock one after a failure. Without loop prevention, a flooded frame can return through another port and be replicated again.
Diagram
- Port 2 · A transmits
- Learn A on port 2
- B initially unknown
- Flood within VLAN 20
- B replies on port 5
Worked examples
Predict three forwarding decisions
- Give ports 2, 5 and 7 membership in VLAN 20. Give port 9 only VLAN 30. Assume normal forwarding with unknown-unicast flooding enabled.
- A on port 2 sends to unknown B. The switch learns A on 2 and sends copies to 5 and 7. Port 9 is outside the VLAN.
- B replies through port 5. The switch learns B on 5 and delivers the reply to known A on 2. A’s next frame to B goes only to 5.
MAC Address Format Converter: Move an address from a switch table into an inventory
- Start with 0200.005e.1001. Joining the three groups gives the twelve digits 0200005e1001.
- Split those digits into octets: 02, 00, 00, 5e, 10 and 01. The colon form is 02:00:00:5e:10:01.
- Inspect the first octet, 02 = 00000010. Its least significant bit is zero (individual address). The next bit is one (locally administered).
Reference table
| Destination condition | Typical forwarding decision |
|---|---|
| Known unicast on another eligible port | Forward only through that port |
| Known unicast behind ingress port | Filter at this bridge |
| Unknown unicast | Flood to eligible ports in the VLAN other than ingress |
| Broadcast | Replicate within the VLAN under forwarding policy |
Configuration example
- For two access switches serving VLAN 20, put workstation ports in VLAN 20 and permit that VLAN on the inter-switch link. Document whether VLAN 20 is tagged at each end.
- With two physical uplinks, choose the intended redundancy mechanism and verify the forwarding topology in the design. Two independent links and one logical aggregated link have different control behavior.
Common mistakes
- Learning a station’s location from the destination field. Learning uses the received source MAC.
- Assuming a switch port carrying VLAN 20 automatically carries every VLAN configured on the switch.
Frequently asked questions
Will a switch learn a silent printer’s location?
Normal dynamic learning needs a frame sourced by the printer. Before that, an unknown-unicast frame for the printer may be flooded.
How do stations in different VLANs communicate?
A router or a switch performing layer-three forwarding can connect the IP subnets. Membership in two VLANs alone does not create a routed path.
How does a switch learn where to send a frame?
It records the source MAC address and ingress port of observed frames. A known destination can be forwarded to its learned port; an unknown unicast is commonly flooded within the VLAN.
What does a VLAN change?
A VLAN creates a separate Layer 2 broadcast domain on shared switching infrastructure. Routing is needed for ordinary communication between VLANs.
Can a loop exist in a switched topology?
Redundant paths can create a Layer 2 loop. Spanning-tree mechanisms or other controlled designs prevent frames from circulating indefinitely through redundant links.
Does a switch use IP routing to forward every frame?
A Layer 2 switch forwards within a VLAN using link-layer information. A multilayer switch can also route at Layer 3 when configured to do so.
What is the difference between an access port and a trunk?
An access port commonly carries one assigned VLAN for an endpoint. A trunk carries multiple VLANs using tagging conventions between network devices.
Does a switch flood every unknown frame to every VLAN?
An unknown unicast is generally flooded only within the frame's VLAN and subject to switch policy. VLAN boundaries keep separate Layer 2 domains isolated.
Why do switches age MAC table entries?
Aging removes stale source-to-port associations after a period without observed traffic, allowing the table to adapt when devices move or links change.
Does a VLAN provide encryption?
No. VLANs separate Layer 2 broadcast domains but do not encrypt frames. Use appropriate link or application security when confidentiality is needed.
What is a broadcast domain?
It is the set of interfaces that receive a Layer 2 broadcast within a VLAN or equivalent link domain. Routers normally separate broadcast domains.
Why does Spanning Tree block a redundant link?
It prevents Layer 2 forwarding loops by selecting a loop-free active topology while retaining eligible paths as backups. Port roles can change after topology events.
What happens when a switch receives a frame for an unknown MAC?
It commonly floods the frame to eligible ports in the same VLAN, excluding the ingress port. When it later learns the destination, it can forward more selectively.
Can a trunk carry untagged traffic?
Some trunk configurations assign untagged frames to a native or default VLAN. The behavior must be consistent at both ends to avoid misclassification or security issues.
Does a VLAN boundary replace a firewall?
No. VLANs create Layer 2 separation, but inter-VLAN routing or shared services can still allow communication. Firewall rules may be needed to enforce access policy.

