Using Local SPAN to Troubleshoot and Resolve Problems

A Switched Port Analyzer, or SPAN, is a way that you can monitor traffic. Back when networks used hubs, all traffic was visible because a hub just repeated the traffic out every port except the one it came in on. When switches were introduced, SPAN functionality was introduced to accommodate.

It is common to set a SPAN port up to a device with Wireshark to analyze network traffic. If you are going to monitor the traffic from a single management workstation, you will need two network interfaces cards (NIC) since SPAN traffic is not able traverse the same line as data. If you are only using the management station to monitor the traffic, you can use the single NIC. SPAN actually copies the data from one port to another that you specify. You can monitor egress traffic, ingress traffic, or a combination of the two.

Configure

When you configure a SPAN session, your source and destination ports cannot be the same. You will configure the source, what you want to monitor, to a destination interface, where you will monitor. The following is an example of the syntax you would use to configure a SPAN session.

Switch#configure terminal
Switch(config)#monitor session session-id source interface-id
Switch(config)#monitor session session-id destination interface-id

Verify

Switch#show monitor

ICMP Echo-Based IP SLA

Internet Control Message Protocol (ICMP) is a commonly used utility to test Layer 3 connectivity between devices. A Service Level Agreement (SLA) is a target that must be met; there is no set criteria for an SLA. ICMP echo-based IP SLA is a way to monitor end-to-end response time between Cisco devices using IPv4 or IPv6. According to Cisco, “Response time is computed by measuring the time taken between sending an ICMP Echo request message to the destination and receiving an ICMP Echo reply.” Using IP SLA ICMP echo to test far-end devices is much more practical than pinging manually.

Configure

Router#configure terminal
Router(config)#ip sla operation-number
Router(config-ip-sla)#icmp-echo {destination-ip-address | destination-hostname} [source-ip {ip-address | hostname} | source-interface interface-name
Router(config-ip-sla-echo)#frequency 300
Router(config-ip-sla-echo)#end

The ‘ip sla operation-number’ begins configuration for an IP SLA operation and enters IP SLA configuration mode. Icmp-echo defines an ICMP Echo operation and enters IP SLA ICMP Echo configuration mode.  The frequesncy sets the rate at which a specified IP SLAs operation repeats.

Verify

You can verify the IP SLA configuration with the following show commands.

show ip sla configuration
show ip sla statistics

Reference


https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipsla/configuration/15-mt/sla-15-mt-book/sla_icmp_echo.html

CCNA ICND2 Study Guide, 3rd Edition by Todd Lammle

Add and Remove VLANs on a Trunk

Where access ports allow for only one data VLAN and one voice VLAN, a trunk port can carry one or more VLANs. Generally, you would use a trunk to connect switches together where you need to carry traffic. In some cases, you would configure a trunk port to connect to a server, such as a virtual server. If the device needs to use more than one VLAN, then you will want to configure the port as a trunk port.

Configure

The following commands will set up the interface to trunk mode exclusively. This will turn off Dynamic Trunking Protocol (DTP). Depending on the hardware you are on, you may need to set the encapsulation mode. Most newer equipment and code should default to using 802.1Q encapsulation, though.

Switch#configure terminal
Switch(config)#interface interface-id
Switch(config-if)#switchport trunk encapsulation {dot1q | isl}
Switch(config-if)#switchport mode trunk

In order to add and remove VLANs on a trunk, you need to go to the interface and specify whether you want to add or remove VLANs.

To add one or more VLANs to the trunk:

Switch#configure terminal
Switch(config)#interface interface-id
Switch(config-if)#switchport trunk allowed vlan add vlan-id,vlan-id,vlan-id

To remove one or more VLANs from the trunk, you replace the add parameter with remove. It may appear odd that the allowed parameter is in the command but think of it like this, you are removing an allowed VLAN from the trunk.

Switch#configure terminal
Switch(config)#interface interface-id
Switch(config-if)#switchport trunk allowed vlan remove vlan-id,vlan-id,vlan-id

Verify

To verify what interfaces are trunks and what VLANs are configured, you would use the following command:

Switch#show interfaces trunk

You may also want to check the switchport configuration for the interface.

Switch#show interfaces interface-id switchport
Name: interface-id
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: All
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none

Troubleshoot

When you try to set the interface to trunk mode, you may encounter an error message regarding the trunk encapsulation. This occurs on older hardware, but you may still see it. You just need to set the trunk encapsulation first, then go back to configuring the interface as a trunk.

Switch(config-if)#switchport mode trunk
Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.

Trunks will carry multiple VLANs only if they are created. If you look at the output of the show interfaces trunk command and do not see the VLANs you expect, ensure the VLANs are created on the device.

Assigning Switch Ports to VLANs

Interfaces on Cisco switches can belong to two VLANs, one for data traffic and one for voice traffic. You set the interface to be an access port. This also turns off trunking and VLAN Trunking Protocol (VTP).

Configure

The following command will configure an access port. An access port is intended for data traffic.

Switch#configure terminal
Switch(config)#interface interface-id
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan vlan-id

In order to configure a voice VLAN, you follow the exact same procedure as above, but this time, use the voice vlan keyword in place of the access keyword. The following command will configure a voice port. A voice port is intended for voice traffic.

Switch#configure terminal
Switch(config)#interface interface-id
Switch(config-if)#switchport voice vlan vlan-id

Verify

The following command will output switchport statistics for the interface you choose.

Switch#show interfaces interface-id switchport

The above command will output the following:

Name: interface-id
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: negotiated
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: vlan-id (vlan-name)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: vlan-id

You can also look at the running-config output for the interface.

!
interface interface-id
switchport access vlan vlan-id
switchport mode access
switchport nonegotiate
switchport voice vlan vlan-id
!

Troubleshooting

An issue you may run into is seeing  an inactive VLAN entry when you check the status of the switchport.

Switch#show interfaces interface-id switchport
Name: interface-id 
Switchport: Enabled 
Administrative Mode: static access 
Operational Mode: static access 
Administrative Trunking Encapsulation: negotiated 
Operational Trunking Encapsulation: native 
Negotiation of Trunking: Off 
Access Mode VLAN: vlan-id (inactive) 
Trunking Native Mode VLAN: 1 (default) 
Voice VLAN: vlan-id

This occurs when a VLAN was assigned to an interface and then the VLAN was deleted. This could be a result of administrative error or with configuring a protocol like VLAN Trunking Protocol (VTP). If you are not careful, you could plug a switch into the network that will delete the current vlan.dat file. When the VLAN is deleted, the assigned VLAN does not go away. As you can see from the above output, you can see that where the name of the VLAN is usually displayed, instead, you see the word inactive. No traffic flows and the packets are dropped.

Default Virtual Local Area Network (VLAN)

The default virtual local area network (VLAN) is 1 by default on any Cisco switch. It is a special VLAN in that it cannot be changed or deleted. It is a management VLAN that carries control protocols such as Cisco Discovery Protocol (CDP), VLAN Trunking Protocol (VTP), Port Aggregation Protocol (PagP), and Dynamic Trunking Protocol (DTP).

The default VLAN is different than the native VLAN. The native VLAN is a VLAN in which traffic is not tagged in a trunk.

Configure

There isn’t anything to configure for the default VLAN since VLAN 1 is the default VLAN out of the box and is a mandatory VLAN.

Verify

You can verify the default VLAN by typing in the following:

Switch#show vlan

The above command will display the following:

VLAN  Name             Status    Ports
----  ---------------- --------- -------------------
1     default          active    Fa0/1, Fa0/2, Fa0/3

To view the native vlan, you would look at the trunk properties of the interface.

Switch#show interfaces interface-id switchport

This will display the interface switchport information containing VLAN information. This particular line will display the native vlan:

Trunking Native Mode VLAN: 1 (default)

 

Dynamic Trunking Protocol (DTP)

Dynamic Trunking Protocol is a Cisco proprietary protocol used to negotiate trunks between Cisco devices. To autonegotiate trunking, the interfaces must be in the same VLAN Trunking Protocol (VTP) domain. Trunk negotiation is managed by the Dynamic Trunking Protocol, which is a point-to-point protocol.

Configure

Switch# configure terminal
Switch(config)# interface interface-id
Switch(config-if)# switchport mode {access | dynamic {auto | desirable} | trunk}

Modes

  • access: Set the port to access mode. The port is set to access unconditionally and operates as a nontrunking, single VLAN interface that sends and receives nonencapsulated (non-tagged) frames. An access port can be assigned to only one VLAN.
  • dynamic auto: Set the interface trunking mode dynamic parameter to auto to specify that the interface convert the link to a trunk link. This is the default switchport mode.
  • dynamic desirable: Set the interface trunking mode dynamic parameter to desirable to specify that the interface actively attempt to convert the link to a trunk link.
  • trunk:  Set the port to trunk unconditionally. The port is a trunking VLAN Layer 2 interface. The port sends and receives encapsulated (tagged) frames that identify the VLAN of origination. A trunk is a point-to-point link between two switches or between a switch and a router.

Verify

Switch# show interfaces interface-id switchport
Name: interface-id
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: On

Troubleshoot

The default switchport mode is dynamic auto, so if two switches are connected, they will not form a trunk.

Access mode will not trunk, period.

Trunk mode will change the interface to permanent trunking mode.

Dynamic auto will only trunk if the neighboring interface is set to trunk or desirable mode.

Dynamic desirable will trunk if the neighboring interface is set to trunk, desirable, or auto mode.

References


  1. https://networklessons.com/switching/cisco-dtp-dynamic-trunking-protocol-negotiation/
  2. https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3560/software/release/15-0_1_se/command/reference/cr_3560/cli3.html#marker-2357437

Virtual Local Area Network (VLAN)

A Virtual Local Area Network or VLAN is a way to logically break up broadcast domains.

VLAN = Subnet = Broadcast Domain

When using multiple switches, you have to ensure that the VLAN is configured on any switch that will use the VLAN. Since a VLAN defines broadcast domains in a Layer 2 network, in order to pass traffic from one VLAN to another, you must use routers or Layer 3 switches.

Configure

A VLAN is configured in global configuration mode using the vlan keyword. VLAN configuration is stored in a vlan.dat file, not in the running-config or startup-config files.

Switch# configure terminal
Switch(config)# vlan vlan_ID
Switch(config-vlan)# end

VLAN Ranges

  • VLAN 1 is the Cisco default; it is created for you and cannot be deleted.
  • VLAN 2 – VLAN 1001 are used for Ethernet VLANs; these can be created and deleted
  • VLAN 1002 – VLAN 1005 are defaults for FDDI and Token Ring; these cannot be deleted.
  • VLAN 1006 – VLAN 4094 are considered in the extended range and are for Ethernet VLANs only. These will not be propagated by VLAN Trunking Protocol (VTP) and also will not be saved to the VLAN database unless in VTP transparent mode.

Verify

Switch# show vlan [id | name] vlan_name

Troubleshoot

Oddly enough, the Cisco exam objectives for ICND2 call out troubleshooting VLANs. While at this point there is not much for troubleshooting besides verifying that you have created VLANs, the troubleshooting objective will be necessary after further configurations have been made, such as after assigning an interface to a VLAN or with VLAN Trunking Protocol (VTP). There are no specific commands, per se, to aide in troubleshooting.