Showing posts with label STP. Show all posts
Showing posts with label STP. Show all posts

CCNP: MST (Multiple Spanning Tree) Notes and configuration

In PVST,we need to have different calculations for each VLAN. This will be fine for less number of VLANS. But if we have 100's of VLAN this is not easy.For such cases we use MST (Multiple Spanning Tree).

In MST,Instead of calculating a spanning tree for each VLAN we can use instances and map VLANS to each instance. For example consider we have 200 vlans.it can be configured as 

• Instance 1: VLAN 100 – 200.
• Instance 2: VLAN 201 – 300.

Only two spanning tree calculations (instances) are required for all these VLANs.

MST works with the concept of regions. Switches that are configured to use MST need to find out if their neighbors are running MST. When switches have the same attributes they will be in the same region. It's possible to have one or more regions and here are the attributes that need to match

• MST configuration name.
• MST configuration revision number.
• MST instance to VLAN mapping table.

When switches have the same attributes configured they will be in the same region. If the attributes are not the same the switch is seen as being at the boundary of the region. It can be connected to another MST region but also talk to a switch running another version of spanning tree.

We can give any name or number for "MST configuration name" and "MST configuration revision number".VLANs will be mapped to an instance by using the "MST instance to VLAN mapping table". This is something we have to do ourselves.

Within the MST region we will have one instance of spanning tree that will create a loop free topology within the region. When you configure MST there is always one default instance used to calculate the topology within the region. We call this the IST (Internal Spanning Tree). By default Cisco will use instance 0 to run the IST.

By default there will be only instance 0 is available.We can see that all VLANs are currently mapped to instance 0.

Lets do an example.There are two switches-Switch A and Switch B. Don't forget to create trunk between switches.

SwitchA(config)#spanning-tree mode mst
SwitchA(config)#vlan 10
SwitchA(config-vlan)#vlan 20
SwitchA(config-vlan)#vlan 30
SwitchA(config-vlan)#vlan 40
SwitchA(config-vlan)#vlan 50
SwitchA(config-vlan)#vlan 60
SwitchA(config-vlan)#exit

SwitchB(config)#spanning-tree mode mst
SwitchB(config)#vlan 10
SwitchB(config-vlan)#vlan 20
SwitchB(config-vlan)#vlan 30
SwitchB(config-vlan)#vlan 40
SwitchB(config-vlan)#vlan 50
SwitchB(config-vlan)#vlan 60
SwitchB(config-vlan)#exit

We enabled mst and configured vlan 10,20,30,40,50 and 60 in both switch A and Switch B

SwitchA(config)#spanning-tree mst configuration
SwitchA(config-mst)#name sysnetnotes
SwitchA(config-mst)#revision 1
SwitchA(config-mst)#instance 2 vlan 10,20,30
SwitchA(config-mst)#instance 3 vlan 40,50,60
SwitchA(config-mst)#exit

SwitchB(config)#spanning-tree mst configuration
SwitchB(config-mst)#name sysnetnotes
SwitchB(config-mst)#revision 1
SwitchB(config-mst)#instance 2 vlan 10,20,30
SwitchB(config-mst)#instance 3 vlan 40,50,60
SwitchB(config-mst)#exit

This is how we configure MST. First you need the spanning-tree mst configuration command to enter the configuration of MST. We set the name by using the name command[You can set any name]. Don't forget to set a revision number and map the instances with the instance command.

We can use the show spanning-tree mst configuration command to verify our configuration.You can see that we now have two instances. The VLANS are mapped to instance 2 and 3.All the other VLANs are still mapped to instance 0.

To create Root bridge manually in MST
Switch(config)#spanning-tree mst < 0 > priority 4096

This is how I change the priority for MST "instance 0".

To view 
Switch#show spanning-tree mst
Switch#show spanning-tree mst configuration

NOTE : MST will only advertise BPDUs from the IST [(Internal Spanning Tree)] to the outside world
Read More...

Rapid spanning tree (RSTP) Notes

Rapid spanning tree is not a revolution of the original spanning tree but an evolution from it.Behind the scenes some things have been changed to speed up the process.

In original STP we had 4 port-states.They are
  • Blocking
  • Listening
  • Learning
  • Forwarding
In RSTP,Blocking and Listening state is combined to one and total there are 3 states.They are
  • Discarding
  • Learning 
  • Forwarding
As in original STP,Root bridge election process in RSTP is same.The switch with the best bridge ID (priority + MAC address) becomes the root bridge. The other switches (non-root) have to find the shortest cost path to the root bridge. This is the root port.No change in this.On each segment there can be only one designated port or we’ll end up with a loop. The port will become the designated port if it can send the best BPDU. Root bridge ports are always in designated mode.

Rapid spanning tree and Original STP are compatible.In original STP Root bridge only send BPDU to other non-root switches and they receive it on their root ports.But in RSTP all switches generate BPDUs every two seconds (hello time). This is the default hello time but you can change it.

The original STP uses the max age timer (15 seconds) so MAC addresses could be removed faster from the mac address table. In RSTP, BPDUs uses as a keep-alive mechanism similar to what routing protocols like OSPF or EIGRP use. If a switch misses three BPDUs from a neighbor switch it will assume connectivity to this switch has been lost and it will remove all MAC addresses immediately.

Original STP used to reject inferior BPDU. BUT RSTP accepts inferior BPDU(as the backbone fast feature is enabled)

Rapid spanning doesn't use timers to decide whether an interface can move to the forwarding state or not. It will use a negotiation mechanism for this

Rapid spanning tree can only put interfaces in the forwarding state really fast on edge ports (port-fast in original STP) or point-to-point interfaces. RSTP  uses "Sync" mechanism instead of the “timer-based” mechanism that the Original STP (listening -> learning -> forwarding)
Read More...

Spanning Tree Protocol Interface States

Spanning Tree Protocol Interface States

You might have noticed that when you plug in a cable to cisco switches the led above the interface was orange and after a while became green. What is happening at this moment is that spanning tree is determining the state of the
interface.

This is what happens as soon as you plug in a cable:

•  Listening state: Only a root or designated port will move to the listening state. The alternate port will stay in the blocking state. In the listening state the switch tries to figure out what the topology looks like. No data transmission occurs at this state and after 15 seconds we will move to the learning state.

 Learning state: At this moment the interface will process Ethernet frames by looking at the source MAC address to fill the mac-address-table. Ethernet frames however are not forwarded to the destination. It takes 15 seconds to move to the next state called the forwarding state.

•  Forwarding state: This is the final state of the interface and finally the interface will forward Ethernet frames so that we have data transmission!

When a port is not a designated or root port it will be in blocking mode. it takes 30 seconds in total to move from blocking to forwarding

Did You Enjoy this Article ?

If yes, Then enter your email below to get
more articles on CCNA and CCNP in your inbox
For FREE !

Read More...

Bridge protocol data unit (BPDU)

Bridge protocol data unit (BPDU)

Switches running spanning-tree, exchange information with a special message called the (BPDU) bridge protocol data unit. BPDU is a data message transmitted across a local area network to detect loops in network topologies. A BPDU contains information regarding ports, switches, port priority and addresses.

BPDU can be called as the language of switch. BPDU’s are sent out all ports every two 

seconds, are forwarded to a specific MAC multicast address: 0180.c200.0000.

When a switch is "UP" it starts sending BPDU through every ports.If a BPDU comes back to the switch,switch will know there is a redundant  link.In such cases switch will run STP.


There are two types of BPDU

  • Configuration BPDU
  • TCN BPDU (Topology change notification)
When devices are initially attached to switch ports, they do not start data transmission immediately. Instead, they moves through different states while BPDU processing determines the network topology. A topology change notification (TCN) BPDU informs other switches of port changes. They are injected into the network by a non-root switch and propagated to the root. When a TCN is received, the root switch will set a topology change flag in its normal BPDU. This flag is propagated to all other switches to instruct them to rapidly age out their forwarding table entry switches.

When a root receives the TCN BPDU, it transmits a configuration BPDU message on all the ports with topology change flag set to 1. Switches that receive this BPDU on the root port filter the database and generate their own configuration BPDUs on designated ports. This propagates down the tree to the end of the path. 

Did You Enjoy this Article ?

If yes, Then enter your email below to get
more such great articles in your inbox
For FREE !
Read More...