Skip to content

Get the app

Study guide · Domain 2.0

Switching and Network Access

25% of the exam · 5 exam topics

Domain 2 is how switches connect to each other, to routers and to the devices at the edge: physical and routed interfaces, 802.1Q trunks, EtherChannel with LACP and SVIs; port settings for PCs, printers, IoT, access points, phones, virtual hosts and appliances; checking documentation with CDP and LLDP; finding faults with show commands, logs, ping, traceroute and captures; and running Rapid PVST+ with its roles, states, PortFast and guard features.

A study feature written by ExamDragon, not part of the real exam. Each heading is one of this domain's 5 exam topics, as Cisco states it in the 200-301 CCNA v2.0 exam topics.

2.1Configure network infrastructure connectivity (switch-to-switch and switch-to-router)

  • A switch port is Layer 2 by default. On a multilayer switch, no switchport makes it a routed (Layer 3) port that takes an IP address directly, belongs to no VLAN and runs no spanning tree; ip routing must be on for the switch to route.
  • An 802.1Q trunk carries many VLANs on one link by inserting a 4-byte tag; frames in the native VLAN (VLAN 1 unless changed) cross untagged. Configure it with switchport mode trunk, and set switchport trunk native vlan to the same value on both ends.
  • switchport trunk allowed vlan 10,20 replaces the allowed list; switchport trunk allowed vlan add 30 and remove 30 change it. show interfaces trunk lists allowed VLANs, those that also exist and are active, and those forwarding in spanning tree.
  • EtherChannel bundles 2 to 8 active links into one logical port-channel. LACP (IEEE 802.3ad, now 802.1AX) uses active and passive: at least one end must be active. PAgP (Cisco) uses desirable and auto. Mode on is a static bundle with no negotiation and must face mode on.
  • Member ports must match in speed, duplex, mode, native VLAN and allowed VLANs; configure Layer 2 settings on the port-channel interface. A Layer 3 EtherChannel uses no switchport on the port-channel and its members, with the IP address on the port-channel.
  • In show etherchannel summary, SU is a Layer 2 channel in use, RU a Layer 3 one in use, SD down; members show P bundled, I stand-alone, s suspended.
  • An SVI (interface vlan 20) is a routed interface for a whole VLAN, used as the hosts' default gateway or for management. It comes up only when the VLAN exists, at least one port in that VLAN is up and forwarding, and the SVI is not shut down.
  1. The situationHosts in VLAN 40 on SW2 cannot reach the gateway, an SVI on distribution switch DS1, across Port-channel1. VLAN 40 exists on SW2.
  2. Step 1Run show interfaces trunk on both switches: the trunk is up, but on DS1 VLAN 40 is allowed yet missing from the allowed and active list.
  3. Step 2That means VLAN 40 does not exist on DS1, so the SVI Vlan40 shows up and down.
  4. Step 3Create it with vlan 40 on DS1; the trunk then forwards VLAN 40 and the SVI comes up.
  5. Where questions turnTyping switchport trunk allowed vlan 30 when the intent was to add VLAN 30: without add, the command replaces the whole list and cuts off every other VLAN on the trunk.
  6. The takeawayRead the three VLAN lists of show interfaces trunk in order: a VLAN that drops out between allowed and active is missing from that switch's VLAN database.
Practise 2.1

2.2Configure Layer 2 switch port attributes for edge-host connectivity (VLAN, PoE, port channel, and LACP)

  • Desktops, printers and IoT devices go on access ports: switchport mode access, switchport access vlan <id>, and spanning-tree portfast with spanning-tree bpduguard enable. IoT devices are often placed in their own VLAN to limit what they can reach.
  • PoE: power inline auto (the default) detects a powered device and supplies power; power inline never turns PoE off; show power inline shows each port's admin and operational state, the power drawn and the device class.
  • An IP phone port is an access port with a data VLAN and switchport voice vlan <id>. The switch tells the phone the voice VLAN through CDP or LLDP-MED; the phone tags its voice traffic and passes the PC's untagged frames to the access VLAN.
  • Access points: a controller-based AP in local mode tunnels client traffic to the WLC in CAPWAP, so it needs only an access port in its management VLAN. A standalone (autonomous) AP, or a FlexConnect AP switching locally, puts each SSID in its own VLAN and needs a trunk, usually with the management VLAN native. Most APs are powered by PoE.
  • Virtualized hosts tag VM traffic in their virtual switch, so their uplinks are trunks carrying the VMs' VLANs, often bundled into an LACP port-channel with the host's NIC team.
  • Network appliances (firewalls, load balancers, servers with several roles) use trunks or EtherChannels to match their interfaces: LACP when the appliance supports it, mode on when it supports only static aggregation.
  1. The situationA new desk needs a phone in voice VLAN 110 with a PC behind it in VLAN 10, on Gi1/0/12. The phone stays dark.
  2. Step 1Check show power inline Gi1/0/12: Admin off means power inline never is configured; set power inline auto.
  3. Step 2Configure switchport mode access, switchport access vlan 10 and switchport voice vlan 110.
  4. Step 3Add spanning-tree portfast and spanning-tree bpduguard enable, then confirm the phone and PC with show cdp neighbors or show lldp neighbors and show mac address-table interface Gi1/0/12.
  5. Where questions turnGiving every access point a trunk, or every AP an access port. The deciding fact is where client traffic is switched: tunnelled to a controller needs one VLAN; switched locally by the AP needs a trunk.
  6. The takeawayA phone port is still an access port: one data VLAN, one voice VLAN, PoE on, and edge protection.
Practise 2.2

2.3Validate the accuracy of network documentation using CDP and LLDP

  • CDP is Cisco proprietary and runs by default on Cisco IOS XE devices. LLDP is the IEEE 802.1AB vendor-neutral standard and is disabled by default on Cisco IOS XE switches until lldp run is entered.
  • Both are Layer 2 protocols sent to a multicast address and heard only by directly connected neighbors; they are not forwarded across switches, and the neighbor does not need an IP address.
  • show cdp neighbors and show lldp neighbors list each neighbor's name, the local interface, the hold time, its capabilities, the platform (CDP) and the neighbor's port ID. Add detail for addresses, software version, native VLAN and duplex.
  • Default timers: CDP sends every 60 seconds with a 180 second hold time; LLDP every 30 seconds with a 120 second hold time.
  • Global switches: cdp run and lldp run. Per interface: cdp enable, and lldp transmit and lldp receive. Turn discovery off toward the internet or untrusted networks, because it reveals platform and software details.
  • To validate documentation, compare each documented link with the local interface and the neighbor's port ID. A missing entry may mean the neighbor runs neither protocol (many PCs), so confirm with the MAC address table before changing the drawing.
  1. The situationThe diagram says SW1 Gi1/0/1 connects to R1 Gi0/0/0, and a third-party firewall sits on Gi1/0/20.
  2. Step 1show cdp neighbors on SW1 shows R1 on local Gig 1/0/1 with Port ID Gig 0/0/1, so the diagram's R1 port is wrong.
  3. Step 2The firewall does not appear in CDP; show lldp neighbors returns LLDP is not enabled, so enter lldp run.
  4. Step 3show lldp neighbors now lists the firewall on Gi1/0/20 with its port ID; update the diagram for R1's port.
  5. Where questions turnReading Port ID as a port on the local switch. It is always the neighbor's interface; the local one is in the Local Intrfce column.
  6. The takeawayLocal interface is your side, Port ID is theirs; use CDP for Cisco neighbors and LLDP for everyone, remembering LLDP must be turned on first.
Practise 2.3

2.4Troubleshoot basic Layer 2/Layer 3 connectivity and device operations using show commands (including show logs), ping, extended ping, trace route, and packet capture output

  • show interfaces gives status (up and up, down and down, administratively down, err-disabled), speed and duplex, and counters: CRC and input errors suggest cabling or interference; late collisions on a short link suggest a duplex mismatch.
  • show ip interface brief, show vlan brief, show interfaces trunk, show interfaces switchport, show mac address-table and show etherchannel summary find most Layer 2 faults; show logging shows events such as %CDP-4-NATIVE_VLAN_MISMATCH, %PM-4-ERR_DISABLE and %LINK-3-UPDOWN.
  • ping: ! is a reply, . is a timeout, U is a destination unreachable message. An extended ping (ping with no target, or ping <ip> source <interface>) sets the source address, size, count and DF bit, so it tests the return path to a particular network.
  • traceroute lists each router that returns an ICMP time exceeded message; lines of * * * after the last answer show where to start looking, though some devices simply do not answer probes.
  • Embedded packet capture on IOS XE (monitor capture) records frames on an interface; show monitor capture <name> buffer brief lists them, which shows for example whether ARP requests get replies or a DHCP exchange completes.
  • Work in layers: physical (link and counters), data link (VLAN, trunk, MAC table, spanning tree), then network (addresses, gateway, routes), using the output to justify each step.
  1. The situationLAN users behind R1 cannot reach 198.51.100.10, but a plain ping from R1 to the server succeeds.
  2. Step 1The plain ping uses the outgoing interface's address as its source, so it proves only R1's own path.
  3. Step 2Run an extended ping sourced from the LAN interface 10.10.10.1: it fails with timeouts.
  4. Step 3Conclude that replies to 10.10.10.0/24 do not return: check the routes for that network on the far routers and any filter on the way.
  5. Where questions turnStopping at a successful ping from the router itself. It sources from the exit interface, so it hides return path problems that only affect the users' subnet.
  6. The takeawayChange one thing at a time: if only the source address changed and the result changed, the return path for that source is the fault.
Practise 2.4

2.5Configure operations of the Rapid Per VLAN Spanning Tree Protocol (Rapid PVST+)

  • Rapid PVST+ (Cisco's default on current Catalyst switches: spanning-tree mode rapid-pvst) runs one IEEE 802.1w RSTP instance per VLAN. The lowest bridge ID (priority, in steps of 4096, plus VLAN ID as the extended system ID, then MAC address) wins the root election.
  • spanning-tree vlan 10 root primary sets priority 24576, or lower than the current root if needed; root secondary sets 28672. spanning-tree vlan 10 priority <value> sets it directly.
  • Port roles: the root port is each non-root switch's best path to the root; a designated port forwards onto each segment; an alternate port is a discarding backup path to the root through another switch; a backup port is a discarding second port on a shared segment to the same switch. A disabled port is shut down.
  • Port states: discarding, learning and forwarding. Cisco output shows discarding as BLK. RSTP moves point-to-point links to forwarding quickly with proposal and agreement; a port that gets no agreement waits two forward delays (about 30 seconds).
  • PortFast (spanning-tree portfast, or spanning-tree portfast default for all access ports) makes a host port an edge port that forwards at once. It belongs only on ports to end devices.
  • BPDU guard (spanning-tree bpduguard enable) err-disables an edge port that receives any BPDU. Root guard (spanning-tree guard root) puts a designated port in root-inconsistent state while superior BPDUs arrive. Loop guard (spanning-tree guard loop) puts a root or alternate port in loop-inconsistent state if its BPDUs stop, stopping loops caused by one-way links.
  1. The situationYou must make DS1 the root for VLANs 10 and 20, DS2 the backup root, and protect the edge.
  2. Step 1On DS1: spanning-tree vlan 10,20 root primary. On DS2: spanning-tree vlan 10,20 root secondary.
  3. Step 2On DS1 and DS2 downlinks to access switches: spanning-tree guard root.
  4. Step 3On access ports: spanning-tree portfast and spanning-tree bpduguard enable; check with show spanning-tree vlan 10 that access uplinks show Root FWD and Altn BLK.
  5. Where questions turnConfusing the guards: BPDU guard err-disables and needs a manual or timed recovery, root guard and loop guard block the port and recover by themselves when the condition clears.
  6. The takeawayPlace the root on purpose, then protect it: root guard toward the edge, PortFast and BPDU guard on host ports, loop guard on uplinks that could see one-way faults.
Practise 2.5

Key terms

SVI
Switch virtual interface
LACP
Link Aggregation Control Protocol
PAgP
Port Aggregation Protocol
PoE
Power over Ethernet
CDP
Cisco Discovery Protocol
LLDP
Link Layer Discovery Protocol
LLDP-MED
Link Layer Discovery Protocol, Media Endpoint Discovery
RSTP
Rapid Spanning Tree Protocol
Rapid PVST+
Rapid Per VLAN Spanning Tree Plus
BPDU
Bridge protocol data unit
After this guide: An access switch uplink shows Altn BLK in show spanning-tree, and the link toward the root is fibre. Which port role and state is that, and which guard feature belongs on it?
Show the answer

It is an alternate port in the discarding state, a backup path to the root. Loop guard belongs on it, so that it does not start forwarding if its BPDUs stop because of a one-way fault.

Practise Switching and Network Access

Built to Cisco's 200-301 CCNA v2.0 exam topics. The explanations, worked examples and traps are ExamDragon's own. Every source this path is built on.