Cisco Switch Commands
Step 5 of 863%

Neighbors, Trunks & Loops

The earlier pages focused on endpoint ports and VLAN placement on SW2. This page asks the next beginner troubleshooting question: can the printer network leave SW2 and reach the switch or router above it?

After this page, you should be able to:

  • Find the SW2 port that points toward the rest of the lab network
  • Use trunk output to see whether VLAN traffic can leave the switch
  • Use Cisco Discovery Protocol output to identify a directly connected Cisco device
  • Read loop-prevention output without needing to master spanning tree
  • Recognize whether multiple switch links are bundled together

Start with the upstream path

Open SW2 and get to SW2#. This page stays on SW2 unless a step specifically tells you otherwise.

The word upstream means "toward the next switch, router, firewall, or the rest of the network." In this lab, endpoint devices plug into SW2, and traffic that needs another network has to leave SW2 toward SW1 and R1.

show interfaces status

Use the Name column to find the port labeled Uplink to SW1. Use the Status column to confirm that cable is physically connected. A connected cable only proves the physical path exists; it does not prove the port is carrying the right VLANs.

Port      Name               Status       Vlan
Fa0/1     Uplink to SW1      connected    trunk

This example means port Fa0/1 is the row labeled Uplink to SW1, the link is physically up because the status is connected, and the VLAN column is showing trunkbecause this is a switch-to-switch link.

show interfaces trunk

A is a device-to-device link that can carry more than one . On this page, the important question is: does SW2 have a trunk that can carry VLAN 10 and VLAN 20 toward SW1?

show interfaces trunk

This command answers two beginner questions: which ports are acting as trunks, and which VLAN numbers are allowed across those trunks. In the output, start with the Port column. Then scan for lines that mention VLANs allowed or active on the trunk.

Port        Mode         Encapsulation  Status        Native vlan
Fa0/1       on           802.1q         trunking      1

Port        Vlans allowed on trunk
Fa0/1       10,20

This is an example of healthy trunk output shape. The important clues are the port name, trunking status, and whether the VLAN list includes the VLAN you care about. If you are troubleshooting PRINTER1, VLAN 20 is the VLAN you care about. Do not worry about Encapsulation or Native vlan yet.

If show interfaces status showed a connected upstream cable but show interfaces trunk shows no trunk for that same port, record that as evidence. It means the cable exists, but the switch is not treating the link as a multi-VLAN trunk.

In the known-good SW2 config, the connected upstream cable is on Fa0/1. That same port should appear as a trunk and allow VLANs 10 and 20.

show cdp neighbors detail

Stay on SW2#. means Cisco Discovery Protocol. It is a Cisco feature that can tell you which Cisco device is directly connected on the other end of a link.

In this Packet Tracer lab, use CDP to answer a simple cabling question: what Cisco device does SW2 see on the other end of a directly connected link?

show cdp neighbors detail
Device ID: SW1
Interface: FastEthernet0/1, Port ID (outgoing port): FastEthernet0/2
Platform: cisco 2960

In this example, Device ID is the neighbor device name. Interface is the local SW2 port where SW2 sees that neighbor. Port ID is the port name on the neighbor side.

CDP is Cisco-specific. means Link Layer Discovery Protocol, which is the open standard. Both are neighbor discovery protocols. Neighbor means directly connected, not "somewhere else on the network." These protocols can show the neighbor device name, the local SW2 port, the neighbor port, the platform, and sometimes a management IP address.

Packet Tracer note

LLDP is common on real networks, especially mixed-vendor ones, but it may not be available on this Packet Tracer switch. Do not run show lldp neighbors detail for this lab unless your Packet Tracer device supports it.

Empty CDP output does not automatically prove the cable is missing. CDP may be disabled or unsupported on a device. Treat CDP as one clue and compare it with show interfaces status.

show spanning-tree

Stay on SW2#. Spanning Tree Protocol is a switch safety protocol. It protects a network from loops, which can happen when switches have more than one switching path between the same places.

A loop is dangerous because switches forward Ethernet frames, the Layer 2 units of traffic that switches move. If a frame keeps circling between switches, the network can flood itself. Spanning tree prevents that by choosing which ports forward traffic and which extra paths should block.

Start with VLAN 20 because VLAN 20 is the printer network from the earlier pages.

show spanning-tree vlan 20

This command answers: for VLAN 20, which switch is the reference point, and which SW2 ports are forwarding or blocking? You do not need to master every field yet. For this lab, scan the port rows and look for FWD or Forwarding versus BLK or Blocking.

Interface           Role Sts Cost      Prio.Nbr Type
Fa0/1               Root FWD 19        128.1    P2p
Fa0/3               Desg FWD 19        128.3    P2p

This example is not asking you to memorize Role, Cost, orType. For this page, use the Interface column to find the port and the Sts column to see whether it is forwarding traffic with FWD or blocking with BLK.

The root bridge is the switch spanning tree uses as its reference point for a VLAN. In beginner troubleshooting, you mostly care whether the port you expected to carry VLAN 20 is forwarding or blocked.

show etherchannel summary

Stay on SW2#. EtherChannel combines multiple physical links into one logical. If you had two or more cables between the same switches, EtherChannel could make those cables act like one bigger link. The logical link often appears as Po1, short for Port-channel 1.

This starter topology does not use EtherChannel, so this command should mostly prove that no bundles are expected.

show etherchannel summary
Number of channel-groups in use: 0
Number of aggregators:           0

If this command shows no groups, that is expected for this lab. If the output says there are zero channel groups, that also means no EtherChannel bundle is present. If you do see Po1 or another Port-channel on a real network, treat it as the interface carrying traffic and be careful before judging the individual member cables by themselves.

Do not experiment with trunks or spanning tree in production: these settings affect shared paths between switches. Changing trunk VLANs, spanning tree behavior, or Port-channel settings without a plan can break many users at once.

Checkpoint

  • You can find the SW2 port that points toward SW1.
  • You can explain whether that port is physically connected and whether it is trunking.
  • You can use CDP as one clue for a directly connected Cisco neighbor.
  • You can read spanning tree output for a basic forwarding or blocking state.
  • You can recognize that no EtherChannel bundle is expected in this starter lab.

Hands-On Practice

Check whether PRINTER1's VLAN has a usable upstream path from SW2 toward SW1 and R1.

Your checklist and answers are saved locally in this browser.

Find The Upstream Path

Run show interfaces status on SW2, find the row with Name Uplink to SW1, and enter the Port value from the left column.

Page 1 defined VLAN 20 as the printer network, and PRINTER1 uses a 192.168.20.x address.

Check The Neighbor

Loop And Bundle Checks