Rapid Spanning-Tree (RSTP)

Hello Po

Portfast should only be enabled on the ports of a switch to which hosts are connected, because these interfaces are likely to go up and down all the time. Portfast saves you from waiting for the port to go through the listening and learning states whenever the port comes back up. Portfast however should never be used on any ports that connect to other switches or to routers.

You can find out a lot more about this feature at the following lesson:


I hope this has been helpful!

Laz

Thank you for your explanation. I’ve read the lesson you provided.
"Portfast however should never be used on any ports that connect to other switches or to routers."
What are the downsides when we use portfast on ports that are connected to switches or routers?
Will the network be affected?

Hello Po

I think the warning message you get on a port whenever you configure portfast on it is the clearest explanation of what can happen:

SW1(config)#interface FastEthernet 0/1
SW1(config-if)#spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single
 host. Connecting hubs, concentrators, switches, bridges, etc... to this
 interface  when portfast is enabled, can cause temporary bridging loops.
 Use with CAUTION

Why? Because portfast causes a port to bypass the listening and learning states, which are a part of the mechanisms of STP that protect against layer 2 loops.

I hope this has been helpful!

Laz

Hi Lazaros,

Further to your reply to Ajay on Jul '16,
“STP
When a link goes down, STP waits for the Max Age time in order to consider a link down.”

What if it’s a fault on the link of the root port, doesnt it immediately know the link is down? Does it still have to wait for the Max Age time in order to consider the link is down?

"When a root port fails on a switch and a new root bridge has to be elected, RSTP momentarily blocks all its ports eliminating loops and thus eliminating the need for the Listening state, so we save another 15 seconds there. And the Learning stage is quick because the switch sends an RSTP proposal message immediately and receives one right away. So the port can go into forwarding state immediately. "

Is it true that the switch who has lost its root port will always be the one who will send the Proposal out to the other switches connected to it?

Hello Edmund

The Max Age Timer plays a role only when BPDUs stop arriving on the root port while the root port remains up. If the actual root port goes down, the switch will not wait for Max Age timer before taking the next step in reconvergence.

When a new link between RSTP switches is created, both ports will send BPDUs with the proposal bit set, because both switches assume they have the right to be designated. Based on which BPDU is deemed superior, the role of the ports will be updated accordingly. However, in the scenario you describe, where a root port goes down, it is indeed the switch that lost its root port that will be the one that will send the proposal. This is because only it knows that it lost its connection, and it must immediately do something about it, so it sends the proposal.

I hope this has been helpful!

Laz

Hi Lazaros,

Thanks a lot for the reply and information.

1 Like

what’s backbone fast ? i debate with my friend regarding RSTP so i can learn more . He said to understand RSTP you should understand backbone fast , edge ports , uplink fast.

i dont know about uplink fast & backbone fast . did i miss something or it will come ?

please explain also uplink & backbone fast.

some confusion:-
“SW2 will block all its non-edge interfaces and will start the synchronization towards SW3 and SW4, once this is done SW2 will let SW1 know about this”

in easy english sw2 will block all non edge ports (trunk ports)? and will sync towards sw3 and sw4 . but edgeports are only activated on accessports so rstp should be useless . still sw2 uptime will take 50 seconds ? & acessports will be in forwarding state quickly because sw2 to sw3 are switchc and we cant use port fast between switches link (trunk)

im confused any guidance will be helpful

thank you

Hello Abdul

When learning about the various types of STP, we always start off with learning how basic STP functions. Once you learn that, then you can go on to the various types of STP such as RSTP, MTP, PVST+ and so on.

Normal STP has some additional features that you can configure such as BackboneFast and UplinkFast, that you can activate to make your topology function better. But as now types of STP were introduced, such as RSTP, these features were automatically incorporated into the protocol, so there is no more need to actually configure them. But as your friend indicates, it’s useful to understand them so that you can understand how RSTP functions.

You can find out more about these features for plain STP at the following lessons:

Remember, these are incorporated into RSTP so you don’t have to actually configure them when implementing RSTP.

First of all, non-edge ports are those that are connected to other switches. These may be trunks (usually they are) but they can also be access ports.

Edge ports are defined as those that are not connected to other switches, but to end devices like PCs, IP phones, IP cameras and so on. RSTP doesn’t need to function on these ports so you have no problem there.

No this is not the case, because RSTP doesn’t use timers like STP does. It uses this negotiation procedure of syncing which is almost immediate. So there is no delay.

Remember, portfast for regular STP does two things: places a port in forwarding state immediately, and also does not generate topology changes. This makes a big difference for regular STP because of the timers involved. It can take several tens of seconds to get an access port to come up.

For RSTP, the edge port configuration is the same idea as portfast. However, the difference is much smaller. It doesn’t save that much time, since RSTP is already fast. But it’s a good idea to do it because it uses less CPU power, and fewer BPDUs and topology changes to be sent, so it is indeed more efficient. But the benefits are different than those of portfast, primarily due to the timers used for STP.

I suggest you go over the lesson again carefully, as all the answers to your questions are found within.

I hope this has been helpful!

Laz

point to point
in a point-to-point connection the link is only between two devices i.e. a sender and a receiver.

Easy english : What’s point to point interfaces ? sorry for dumb question .

Rapid spanning tree can only put interfaces in the forwarding state really fast on edge ports (portfast) or point-to-point interfaces. It will take a look at the link type and there are only two link types:

Point-to-point (full duplex) (Some confusion on this)
Shared (half duplex)

Hello Abdul

Yes, this is an important clarification that you are asking for. Regardless of RSTP, in general terms, a point to point interface is one that uses a point to point technology, such as a serial interface. On such an interface, only one single device can be connected on the other end of the circuit. Conversely, Ethernet is not considered a point to point technology, but a broadcast technology, because you can have multiple devices on a single network segment.

Looking at these terms within the framework of RSTP however, these terms take a different meaning. Specifically, a point to point connection, as far as RSTP is concerned, is any connection on the interface of a switch. Because switches create a separate collision domain for each switch port RSTP considers such links connected only to a single device on the other end, thus a point to point link.

Conversely, if you were to use a hub (bad idea by the way), then the link to a hub would be detected by RSTP as a shared link type. Such a link would not be able to be placed immediately into a forwarding state by RSTP.

I hope this has been helpful!

Laz

Hi Reno,
I have 2 core switches, 2 distribution, they are located in a campus where customers buy an office and connect to our LAN throught their switch to the distribution, is it possible to exclude customers switches from spanning tree ?

Hello Valerio

It depends on the topology. If you provide only a single port to each customer so that they have an uplink from their switch to the network, then yes, you can exclude them from the participation in your STP topology. If you only provide them with a single uplink, then no L2 loop can be created on their end. You can disable STP on the port that you offer them.

However, if you offer them two or more physical uplinks that are on the same L2 segment, then it is not recommended that they don’t participate, because they can create an L2 loop by (accidentally) connecting both ports to an unmanaged switch, for example.

If you must provide two or more physical links to the customer equipment, then consider one of these options:

  1. Use of EtherChannel with the customer to avoid the participation of STP
  2. Provide a different subnet/network segment for each physical link
  3. Disable STP, but make sure to clearly state that it is the responsibility of the customer to ensure that their network is loop free. Set up various protections on your network such as BPDUGuard, Bridge Assurance and Root Guard to protect your network from any attempts at affecting your STP topology.

I hope this has been helpful!

Laz

Wow, nice explanation, another question, what happens if i exclude a vlan from a spanning tree ? Its steel possible use that vlan in a topology with spanning tree ?thank you in advance. Have a nice weekend

Hello Valerio

It depends on what you mean by “exclude a VLAN from spanning tree”. Do you mean to configure all switches in the topology such that STP does not operate for a specific VLAN? You can do this, and that VLAN will actually function normally. However, this simply means that if there is an L2 loop created for that VLAN, the network will malfunction. This may also affect other VLANs because an L2 loop will consume resources on switches (processing eternally looping frames on that particular VLAN) and causes switches to become unresponsive.

Remember that by default, STP is operational, so if you were to do this, you would have to actively disable STP on the particular VLAN. This however is risky, so you can do it, but it is not recommended.

I hope this has been helpful!

Laz

As Rstp (802.1w) doesn’t use timers I was just wondering why does it show the usual timers same as 802.1d for example when you show spanning tree vlan x x x ?
Are they perhaps there for backward compatibility with 802.1d ?

Hello Sean

Yes, you are correct, RSTP uses a negotiation mechanism to converge, so it doesn’t have to rely on the MaxAge timer and the forward delay timer. It does rely on the hello timer, however, as that is the frequency with which BPDUs are sent. If a switch misses three BPDUs from a neighbor, it will assume connectivity has been lost and all MAC addresses will be removed immediately.

For RSTP, MaxAge is actually 3 times the hello interval as mentioned above and not the 20 seconds displayed in the output. So to answer your question, the MaxAge and forward delay timers are there for situations where the switch on the other end of a link is not running RSTP, thus providing backward compatibility with 802.1d.

I hope this has been helpful!

Laz

1 Like

Thanks very much Lazaros

1 Like

Hi Laz,

1)I am confused in which BPDU( first bpdu which will be used for root bridge election or next bpdu ) Proposal bit will bet set.
2) which will be send first , sync or proposal message and is sync message will be send
by either of the switch or both switches at the same time
3) shall the ports of the switches be in the blocking state during the sync messages, if yes
then how can it be possible while ports are in blocking state?

Hello everyone!

I have a question about the RSTP’s negotiation mechanism.
In the lesson, there is a sentence: “SW2 will block all its non-edge interfaces and will start the synchronization towards SW3 and SW4”. I am pretty confused by it.
I would like to know why SW2 must block the non-edge interfaces?

Thank you!

Hello Tuan

When a switch using RSTP synchronizes with its neighbors, the first thing it wants to discover is the root port, Until that is discovered, it will block all of its ports to ensure that no user traffic is forwarded causing a Layer 2 loop. Remember that even a blocked port can receive and accept a BPDU.

Once the root port is chosen, then the sync mechanism continues on all the other non-edge ports of the switch with its neighbors. This ensures that the STP tree structure is maintained without creating a Layer 2 loop in the process.

This process is further described in detail in the following Cisco documentation:

I hope this has been helpful!

Laz