Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Switching

Direct answer

Switching is how a Layer 2 switch forwards Ethernet frames: it learns source MAC addresses per VLAN, forwards known destinations out one port, floods unknown ones within the VLAN, and relies on spanning tree to keep the topology loop-free.

When to use this

Use it as the entry point when two devices on the same subnet cannot talk, or traffic between switches is lost, looping or taking the wrong path.

First 30 seconds

1. show interfaces status — port connected, expected VLAN, no err-disabled?

2. show vlan brief — VLAN exists and port is in it.

3. show interfaces trunk — VLAN forwarding on the uplinks.

4. show spanning-tree vlan <id> — uplinks forwarding, root where expected.

5. show mac address-table address <mac> — host learned on the expected port.

Operational verification

port up → correct VLAN → trunks forward the VLAN → spanning tree forwards → MAC learned on the right port → frame forwarded to the destination

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE
Scope / prerequisiteUse it as the entry point when two devices on the same subnet cannot talk, or traffic between switches is lost, looping…
What next?3 suggested next steps
Child topics (this level)7
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Known-good and broken paths Narrow the fault

Field map: Correlate interface/logical scope, protocol or policy state, selected next hop/adjacency, counters/errors/drops and the exact source/destination/protocol tuple used by the workload.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Key points

Check the boundaries in order: port up, VLAN membership, trunk allowed and forwarding VLANs, spanning-tree state, MAC learning. EtherChannel and Layer 2 security features (port security, DHCP snooping, DAI) can block traffic on a port that otherwise looks fine.

Key checks
  • show interfaces status — port state, VLAN, speed and duplex at a glance.
  • show vlan brief — VLANs and access ports.
  • show interfaces trunk — trunks and forwarding VLANs.
  • show spanning-tree vlan <id> — root and port roles per VLAN.
  • show mac address-table address <mac> — where a host is learned.
  • show etherchannel summary — bundles and member state.
ReferenceWhy it matters1 section · depth on demand

What this area covers

TopicAnswers
Ethernet SwitchingHow MAC learning, flooding and filtering work
VLANAccess ports, voice VLAN, SVIs and inter-VLAN routing
802.1Q TrunkingTagging, native VLAN, allowed lists, DTP
Layer 2 DiscoveryCDP and LLDP neighbours
EtherChannelBundling links with LACP, PAgP or static
STPLoop prevention, root election, RSTP, MST, guards
Layer 2 SecurityPort security, DHCP snooping, DAI

Typical order when a host cannot reach its gateway: interface status → VLAN on the access port → VLAN allowed and forwarding on the trunk (show interfaces trunk, show spanning-tree vlan) → MAC learned (show mac address-table).

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

Switching in the campus

Switching is the Layer 2 part of a network: learning where hosts are, forwarding frames inside VLANs, preventing loops and bundling links. Cisco's campus LAN and WLAN design guide (CVD) explains why its design matters. In a traditional Layer 2 multilayer design, spanning tree blocks redundant links and the gateway needs an FHRP. With a simplified distribution layer, a stack or StackWise Virtual pair acts as one logical switch with dual-homed EtherChannel uplinks, so no FHRP is needed and convergence is fast. The guide recommends keeping each VLAN to a single switch where possible, to avoid loops.

Switching topics in this reference

AreaQuestions it answers
Ethernet switchingHow MAC learning, forwarding, flooding and filtering work
VLANs and trunksHow traffic is separated and carried between switches
Spanning treeHow loops are prevented, and which port blocks
EtherChannelHow links are bundled, and why members get suspended
Layer 2 discoveryWhich device is on the other end of a cable (CDP, LLDP)
Layer 2 securityPort security, DHCP snooping, DAI, storm control

Where switching ends (CVD)

DesignLayer 2 domainLayer 2/Layer 3 boundary
Traditional multilayerSpans the access and distribution layersDistribution SVIs with FHRP
Simplified distributionAccess to the logical distribution pairDistribution, with no FHRP needed
Routed accessOne access switchAccess switch SVIs
acc1# show interfaces status | include connected
acc1# show vlan brief
acc1# show spanning-tree summary | include Root bridge|Name|VLAN
acc1# show etherchannel summary | include Po
acc1# show mac address-table count
acc1# show cdp neighbors

These six commands give a quick first picture of any switch: ports, VLANs, loop prevention, bundles, learned hosts and neighbours.

Design guidance for Layer 2 (CVD)

RecommendationReason
Keep VLANs local where possibleSmaller failure domains, fewer loops
Dual-homed EtherChannel to a logical distribution pairEvery uplink forwards and STP doesn't block
Spread uplinks across stack membersOne member failure doesn't isolate the stack
Keep STP enabled even without loopsProtection against cabling mistakes

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

Switching covers everything that happens inside a Layer 2 network: how switches learn addresses and forward frames, how VLANs separate traffic, how spanning tree prevents loops, how links are bundled and how ports are secured. Most everyday campus troubleshooting happens in this area, so it is worth knowing well.

Switching topics overview: VLANs and trunking, MAC learning and forwarding, STP/RSTP/MST, EtherChannel/LACP, Layer 2 security (port security, DHCP snooping, DAI, storm control), inter-VLAN routing and Layer 3 switching, and discovery protocols.

Troubleshooting order for L2: physical (link, errors) → VLAN membership/trunks → STP state → MAC table → ARP/gateway.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

Authoritative/upstream documentation reviewed for bounded claims in Switching. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%
Confirmation

Confirm action

Continue?