The purpose of these exercises is to build Layer 2 (switched) networks utilizing the concepts explained in today's design presentations. Students will see how star topology, aggregation, virtual LANs, Spanning Tree Protocol, etc. are put to work.
There will be 5 groups of students, with 4 switches per group. The distribution of IP address space for the building (Layer 2) networks will be as follows:
Cisco 3725 with 16 Port 10BaseT/100BaseTX EtherSwitch (NM-16ESW) module
Note: This Cisco model is actually a router, but the 16-port module provides basic Layer-2 capabilities, and we will use these as switches. Dynamips does not support the emulation of the Cisco Catalyst class of switches, unfortunately.
Refer to the file called lab-access-dynamips.htm
Our building network consists of two redundant backbone switches and two edge switches. The backbone switches connect to the core of our campus network and serve as aggregation points for all the edge switches. Edge switches serve the end users. Each edge switch has a connection to both backbone switches, so that if one of the backbone switches fails, the switch has an alternative connection.
Lab topology
Follow these instructions to configure each switch:
enable
config terminal
hostname <NAME>
aaa new-model
aaa authentication login default local
aaa authentication enable default enable
username nsrc secret nsrc
enable secret nsrc
service password-encryption
line vty 0 4
transport preferred none
line console 0
transport preferred none
no logging console
logging buffered 8192 debugging
no ip domain-lookup
end
write memory
int vlan 1
ip address 10.X.64.Y 255.255.255.0
no shut
end
Replace the "X" with your group number, and replace "Y" like this:
1. BBX1: 10.X.64.4
1. BBX2: 10.X.64.5
1. SWX1: 10.X.64.6
1. SWX2: 10.X.64.7
Verify connectivity by pinging each switch. Do not continue until you can ping each switch from every other switch.
HINT: If ping fails, but the configuration seems OK, try doing the following:
int vlan 1
shutdown
no shutdown
end
(this is not normal, but most likely a bug in the IOS code somewhere)
Run the following commands and pay close attention to the output:
show spanning-tree brief
show spanning-tree blockedports
show spanning-tree
What is the priority on each switch?
Which switch is the root? Why?
Which ports are blocked? Why?
Make a note of the answers to the above questions, as we will compare those with the answers once we do the next step. If the instructors ask you, please write them up on the classroom whiteboard too.
For example, on BB11:
BB11(config)#spanning-tree vlan 1 priority 12288
show spannning-tree brief
Why is it so important to set the priorities explicitly?
We are now going to disable spanning tree to see what effect it has.
WARNING: Disabling spanning tree has a significant effect on the Dynamips server's CPU load. For this reason, we cannot have all groups disable spanning tree at the same time. We will take turns.
ASK THE INSTRUCTOR BEFORE DISABLING STP!!!
THE INSTRUCTOR MAY DEMO A BROADCAST STORM INSTEAD
When you get the go-ahead from the instructor, execute the following on each switch:
no spanning-tree vlan 1
Can the switches ping each other reliably now? Why?
Watch the port counters on the inter-switch links.
show interfaces stats
What happens with the counters of the connected interfaces? What is going on?
Very quickly enable STP again on all switches:
spanning-tree vlan 1
If this still doesn't recover, it may be necessary to get the instructor to restart the simulator.
interface range fastEthernet 1/12 - 15
shutdown
While it is cut off from the rest, verify spanning tree status on the other switches.
Who is the root now?
Verify port roles and status. Verify connectivity with ping.
interface range fastEthernet 1/12 - 15
no shutdown
What happens to the spanning tree when the switch comes back online?
We now want to segment the network to separate end-user traffic from VOIP and network management traffic. Each of these segments will be a separate subnet.
VTP (VLAN Trunking Protocol) is a proprietary Cisco technology that allows for dynamic VLAN provisioning. We will not use it here.
vtp mode transparent
vlan 64
name DATA
vlan 65
name VOIP
vlan 255
name MGMT
interface vlan 1
no ip address
interface vlan 255
ip address 10.X.255.Y 255.255.255.0
Verify connectivity between switches. Can you ping? What's missing?
interface FastEthernet1/14
switchport mode trunk
switchport trunk encapsulation dot1q
Note 1: The Cisco default is to use dot1q encapsulation (rather than the Cisco proprietary ISL). But we include the dot1q command in the configuration in any case.
Note 2: Check Figure 1 to see which ports you need to modify. BBX1 and BBX2 are each connected to a router on Fast1/1. This port also needs to be a trunk.
Try pinging between switches again. It should work now.
On SWX1 and SWX2 only:
interface range Fast1/1 - 5
switchport mode access
switchport access vlan 64
!
interface range Fast1/6 - 10
switchport mode access
switchport access vlan 65
Verify which ports are members or trunks of each vlan:
show vlan-switch id <VLAN ID>
Imagine that there are computers connected to the DATA vlan. Would they be able to ping the switch? Explain your response.
Verify the Spanning Tree status:
show spanning-tree brief
Notice the root and bridge priorities on each VLAN (1,64,65,255). Are they the same?
Note: This is called "Per-VLAN spanning tree", or PVST. This means that the switches are creating 4 separate trees, each with its own parameters, status, calculations, etc. Imagine if you had several hundred VLANs! This is certainly not ideal. There are better standards, like "Multiple Spanning Tree" (MST), that allow the administrator to create only the desired number of trees, and map groups of VLANs to each tree. Unfortunately, this Cisco device does not support MST.
Your two aggregation switches are each connected to a core router (not shown in the pictures).
Suppose you wanted to load-balance the traffic from your various VLANs as they leave your aggregation switches towards your routers? How can you achieve this?
On BBX1:
spanning-tree vlan 64 priority 12288
spanning-tree vlan 65 priority 12288
spanning-tree vlan 255 priority 16384
On BBX2:
spanning-tree vlan 64 priority 16384
spanning-tree vlan 65 priority 16384
spanning-tree vlan 255 priority 12288
On SWX1 and SWX2, the priorities are the same on every VLAN:
spanning-tree vlan 64 priority 24576
spanning-tree vlan 65 priority 24576
spanning-tree vlan 255 priority 24576
show spanning-tree brief
PortFast is a feature that allows end-user stations to be granted instant access to the L2 network. Instead of starting at the bottom of the Blocking-Listening- Learning-Forwarding hierarchy of states (30 seconds!), Portfast starts at the top. The port starts in Forwarding state, and if a loop is detected, STP does all its calculations and blocks the necessary ports. This feature should only be applied to ports that connect end-user stations.
interface range fast1/1 - 10
spanning-tree portfast
With PortFast, end-user ports still participate in STP. That means that anything connected to those ports can send BPDUs and participate in (and affect the status of) the spanning tree calculations. For example, if the device connected to the edge port is configured with a lower bridge priority, it becomes the root switch and the tree topology becomes suboptimal.
Another useful Cisco feature that avoids this situation is BPDUGuard. At the reception of BPDUs, the BPDU guard operation disables the port that has PortFast configured.
spanning-tree portfast bpduguard
We now want more capacity and link redundancy between the aggregation switches.
interface port-channel 1
description BBX1-BBX2 aggregate link
!
interface range fast1/12 - 13
channel-group 1 mode on
show interface port-channel 1
What capacity do you have now on the new trunk? Hint: Look for the line that says BW ... Kbit/sec
interface fast 1/12
shutdown
Is the channel still up?
interface fast 1/12
no shutdown
Note: There is a standard protocol for port bundling. It's called "LACP" (Link Aggregation Control Protocol). The Cisco ESW16 network module does not support LACP, so these port channels are actually using a proprietary Cisco protocol called "EtherChannel". All modern switches support LACP, so we strongly recommend using that, instead of any proprietary versions.
Refer to this priority table below for the appropriate priorities on each switch.
Priority | Description | Notes |
---|---|---|
0 | Core Node | The core switches/routers will not be participating in STP... reserved in case they ever are |
4096 | Redundant Core Node | Ditto |
8192 | Reserved | |
12288 | Building Backbone (BBX1) | |
16384 | Redundant Backbones (BBX2) | |
20480 | Secondary Backbone | This is for building complexes, where there are separate building (secondary) backbones that terminate at the complex backbone. |
24576 | Access Switches (SWX1, SWX2) | This is the normal edge-device priority |
28672 | Access Switches | Used for access switches that are daisy-chained from another access switch. We're using this terminology instead of "aggregation switch" because it's hard to define when a switch stops being an access switch and becomes an aggregation switch. |
32768 | Default | No managed network devices should have this priority. |