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.
Switching
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.
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.
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
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
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.
Subtopics
Go one level deeper into this subject.
Ethernet switching reference for MAC learning, CAM lookup, known/unknown unicast forwarding, flooding boundaries and per-VLAN Layer 2 state.
Subtopic VLANVLAN reference for Layer 2 segmentation, access membership, VLAN identity, SVI boundaries and the separation between local VLAN state and end-to-end carriage.
Subtopic 802.1Q Trunking802.1Q trunking reference for tagged VLAN carriage, native VLAN behavior, allowed VLANs and operational trunk state.
Subtopic Layer 2 DiscoveryLayer 2 discovery protocols advertise local device and interface identity to directly connected neighbors.
Subtopic EtherChannelEtherChannel reference for logical port-channel state, member compatibility, LACP negotiation and per-flow load distribution.
Subtopic STPSpanning Tree reference for root election, path cost, port roles/states, BPDU control state and Layer 2 loop prevention.
Subtopic Layer 2 SecurityLayer 2 Security protects the local switching domain by constraining which endpoint identities, DHCP servers and ARP mappings are trusted at the access edge.
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.
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
| Topic | Answers |
|---|---|
| Ethernet Switching | How MAC learning, flooding and filtering work |
| VLAN | Access ports, voice VLAN, SVIs and inter-VLAN routing |
| 802.1Q Trunking | Tagging, native VLAN, allowed lists, DTP |
| Layer 2 Discovery | CDP and LLDP neighbours |
| EtherChannel | Bundling links with LACP, PAgP or static |
| STP | Loop prevention, root election, RSTP, MST, guards |
| Layer 2 Security | Port 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
| Area | Questions it answers |
|---|---|
| Ethernet switching | How MAC learning, forwarding, flooding and filtering work |
| VLANs and trunks | How traffic is separated and carried between switches |
| Spanning tree | How loops are prevented, and which port blocks |
| EtherChannel | How links are bundled, and why members get suspended |
| Layer 2 discovery | Which device is on the other end of a cable (CDP, LLDP) |
| Layer 2 security | Port security, DHCP snooping, DAI, storm control |
Where switching ends (CVD)
| Design | Layer 2 domain | Layer 2/Layer 3 boundary |
|---|---|---|
| Traditional multilayer | Spans the access and distribution layers | Distribution SVIs with FHRP |
| Simplified distribution | Access to the logical distribution pair | Distribution, with no FHRP needed |
| Routed access | One access switch | Access 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)
| Recommendation | Reason |
|---|---|
| Keep VLANs local where possible | Smaller failure domains, fewer loops |
| Dual-homed EtherChannel to a logical distribution pair | Every uplink forwards and STP doesn't block |
| Spread uplinks across stack members | One member failure doesn't isolate the stack |
| Keep STP enabled even without loops | Protection against cabling mistakes |
Documented example, not captured output.
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.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%