Monday, March 1, 2010

Spanning Tree, VLANs and VTP

Spanning Tree 802.1d

Before STP Convergence




After STP Convergence






BPDU- Bridge Protocol Data Unit
There are two types of BPDUs:
· Configuration BPDU is used to compute STP
· Topology Change Notification (TCN) is used to announce changes in the network topology


Configuration BPDU message contains the following:
· Root bridge ID 8 bytes
· Root path cost 4 bytes
The primary goal of BPDU probes is to work toward electing a reference point a stable spanning tree topology.

By default BPDUs are sent out all switch ports every 2 seconds, this allows for faster convergence when there is a network failure.

Electing a root bridge:

Each switch has a “unique” id called a “bridge id” that identifies it to other switches in the network. By default switches do not know about each other.

The bridge id is an 8 byte value consisting of the following fields:
· Bridge priority (2 bytes): The priority of a switch ranges from 0-65,535 the default is 32,768
· MAC Address (6 bytes): The MAC Address used by a switch can come from the following:
o Supervisor Module
o The backplane
o A pool of 1,024 addresses assigned to the supervisor backplane

1. Every switch begins by sending BPDUs with a root bridge id equal to its own bridge id and sender id that is its own BPDU message.
2. The sender bridge id simply says who the bridge is
3. After the root bridge is agreed on configuration BPDUs are sent only by the root bridge
4. All other bridges must forward or relay BPDUs adding their own “sender id” in the message


Electing Root Ports:


1. Now that a reference point has been elected (Root Bridge). Each non root switch must figure out where it is located in relation to the root bridge.
2. Only one root port can be selected “per segment” on each non root switch.
3. Each root port is selected by evaluating the “root path cost”, this value is the sum of all links leading to the root bridge.
Note:

· Root path: The root path is carried inside the BPDU, switches add the root path as it travels across the switched network leading back to the root bridge.

· Path Cost: The path cost is not contained in BPDU it is local only to the switch





Common STP cost:

10 mbps = 100
100 mbps= 19
1 gbps =4
10 gbps = 2

To change the spanning-tree port priority type:

Sw (config) # interface fa0/0
Sw (config) #spanning-tree port-priority 112

VLANS:

1. Create VLANS at the physical boundary at the switch block
2. Do not pass VLAN information into the Core, they should stay at the distribution layer
3. The Core layer should be routed
4. Create VLANs in global configuration mode à VLANS in the exec mode is being phased out
5. VLANs are not stored in the running configuration
6. VLANs are stored in flash , they are located at flash:vlan.dat
7. Erasing startup configuration does not erase the vlan.dat file: Type the following command to remove the vlan.dat file: delete flash:vlan.dat




TRUNKING: Tags are not removed

Trunk ports leave the tag on the packet
· Trunking aka “tagging” passes multi-vlan information between switches
· Places VLAN information into each frame
· Trunking is a layer2 feature

There are two flavors of Trunking:

1. Inter switch Link (ISL)
· Cisco proprietary
· Encapsulates the entire frame
· Being phased out

2. 802.1Q
· Open standard
· Inserts a tag into the frame instead of encapsulating it


Note: Native VLAN mismatch is a common error message: The switch generates this message because the configured native VLAN on the port is different than the native VLAN that is set on the connecting switch or router port.

Solution: Ensure that the native VLAN for an 802.1Q trunk is the same on both ends of the trunk link. If the native VLAN on one end of the trunk is different than the native VLAN on the other end, the traffic of the native VLANs on both sides cannot be transmitted correctly on the trunk. This failure to transmit correctly can imply some connectivity issues in your network.

VLAN Trunking Protocol (VTP)

· VTP makes switch administration easier
· VTP is not a trunking is NOT a protocol, it can be better described as a “REPLICATION protocol”

VTP is updated on a “revision number” basis
· Higher VTP revision numbers are preferred
· VTP can destroy a network if it is not properly configured

Note: If the lights on the switch all turn “orange” it is possible that the VLANs have been compromised. This type of scenario is very common when a company places a switch from their lab environment into their production network.


VTP Modes:

Server Mode:
· Has the power to change VLANS
· Send and receive VTP updates
· Saves VLAN configuration in FLASH

Client Mode:
· Cannot change VLAN information
· Sends and receives VTP updates
· Does not save VLAN configuration à gets it from the server

Transparent Mode: The “REBEL SWITCH” DOES NOT ACCEPT VTP UPDATES FROM ANYONE
· Power to change VLAN information
· Forwards (passes on) VTP updates –VTP version 2
· Saves VLAN configuration Does not share its personal VLAN database



Search Engine Submission - AddMe