Saturday 22 April 2017

Pruning VLAN 1 will prevent a Cisco switch from generating IEEE BPDUs unless the STP mode is set to MST

In order to write this post I have been using a Cisco switchi directly connected to a workstation running WireShark. The workstation was solely used in order to capture and analyze network control frames generated by the switch. The switch was additionally configured with VLAN 2.

Below I list my observations:

1. If the port on the switch is set to access "switchport mode access", then only IEEE BPDUsii will be generated. This holds true for all STP modes.

Additionally,

• STP Configurationiii and RSTP BPDUs will have an Extended System ID value of 1 or 2, depending on whether the port is assigned to the default VLAN, i.e. VLAN 1, or to VLAN 2.

• MSTP BPDUs won't have an Extended System IDiv.

2. If the port on the switch is set to trunk "switchport mode trunk", then:

If PVST+, which is the default STP mode, or R-PVST+ is used, the following BPDUs will be generated:

• IEEE BPDU with an Extended System ID value of 1 ⇒ Bridge priority of IEEE BPDU generated (32769) is higher than other vendor switches running a single instance of STP (32768)

• Cisco BPDUv with no VLAN tag and with an Extended System ID value of 1

• Cisco BPDU with a VLAN tag of 2 and with an Extended System ID value of 2

3. If the port on the switch is left to trunk, and VLAN 2 is set as the Native VLAN "switchport trunk native vlan 2", then:

If PVST+ or R-PVST+ is used, the following BPDUs will be generated:

• IEEE BPDU with an Extended System ID value of 1

• Cisco BPDU with a VLAN tag of 1 and with an Extended System ID value of 1

• Cisco BPDU with no VLAN tag and with an Extended System ID value of 2

4. If the port on the switch is left to trunk, VLAN 2 is left as the Native VLAN and VLAN 1 is pruned, then:

If PVST+ or R-PVST+ is used, then untagged Cisco BPDUs will be generated with an Extended System ID of 2

Note, that unless MSTP is used, no IEEE BPDUs will be generated

5. If the port on the switch is left to trunk, VLAN 2 is left as the Native VLAN and instead VLAN 2 is pruned, then:

If PVST+ or R-PVST+ is used, the following BPDUs will be generated:

• IEEE BPDU with an Extended System ID value of 1

• Cisco BPDU with a VLAN tag of 1 and an Extended System ID value of 1

The table below summarizes these observations:

Port configuration PVSTP+  or  R-PVSTP+ MSTP
IEEE BPDU Cisco BPDU

IEEE

BPDU

Cisco

BPDU

switchport mode access   Ex. Sys. ID = 1

switchport mode access

switchport access vlan 2

  Ex. Sys. ID = 2
switchport mode trunk   Ex. Sys. ID = 1   Ex. Sys. ID = 1
  Ex. Sys. ID = 2,  VLAN tag = 2

switchport mode trunk

switchport trunk native vlan 2

  Ex. Sys. ID = 1   Ex. Sys. ID = 1,  VLAN tag = 1
  Ex. Sys. ID = 2

switchport mode trunk

switchport trunk native vlan 2

switchport trunk allowed vlan 2

  Ex. Sys. ID = 2

switchport mode trunk

switchport trunk native vlan 2

switchport trunk allowed vlan 1

  Ex. Sys. ID = 1   Ex. Sys. ID = 1,  VLAN tag = 1

i Cisco WS-C3560-8PC. Additionally, the results were verified using two images, each having a different version and software packaging. Namely, c3560-ipbase-mz.122-35.SE5.bin and c3560-ipservicesk9-mz.150-2.SE5.bin.

ii IEEE BPDUs are always sent untagged to 01:80:c2:00:00:00.

iii In this post only STP Configuration BPDUs will be analyzed for PVST+ mode.

iv In fact, Cisco's implementation of MSTP conforms to the IEEE standard and therefore only IEEE BPDUs are generated when this mode is used. Additionally, MSTP BPDUs do not have an Extended System ID since MST instances are used in order to create load balancing within the same MST region. For this reason, only the BPDUs generated for Cisco's proprietary STP implementations will be mentioned in the rest of this post.

v Cisco BPDUs are always sent to 01:00:0c:cc:cc:cd.