cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2105
Views
10
Helpful
25
Replies

Spanning-tree portfast

dhanasekaran.r
Level 1
Level 1

Hi All,

I have this small doubt, I have trunk port configured as below

interface GigabitEthernet1/1

description entra

switchport trunk encapsulation dot1q

switchport trunk native vlan 999

switchport trunk allowed vlan 1,199,542,999

switchport mode trunk

logging event link-status

spanning-tree portfast

My question is what will "spanning-tree portfast" do here , will that have any effect since the port is a trunk.

25 Replies 25

Hello,

Yes ... it can have an effect. When spanning-tree portfast is applied to an interface the switch will view that interface to have one host and will make it an edge of the topology for each vlan. This can cause switching loops which is what SPT (RSPT) is there to prevent. A trunk port will indeed see multiple users at the other end and if there is another switch trunk to those users then the mac table for each vlan will see those addresses off different port but will not be able to block one of the ports.

Does that make sense?

Richard

viyuan700
Level 5
Level 5

My question is what will "spanning-tree portfast" do here , will that have any effect since the port is a trunk

R u connecting this Gig1/1 to another switch or a server.

IF connecting to another switch and this is the ONLY connection u have no problem (check your topology).

What i have seen if you define a port trunk it dont take time like access port. It directly goes to forwarding state.

If this port is going to some server etc then there is NO problem.

The topology is Switch X G1/1 to Switch Y G1/1 and G1/2 to Switch Z. Switch X and Z are interconnected. Swictch X is the root.

My question is will switch take any effect since i have already defined trunk first.

Take a look at the attached slide. If that is the topology you describe, then yes it will have adverse effects on your network. A switching loop will occur because all switches will see multiple paths to all mac-addresses. A broadcast storm can, and probably will occur ... which is the main reason you want to employ STP.

Did that help,

Richard

Forgot the attachment

switch take any effect since i have already defined trunk first.

Since X is your root, one port of link between Y & Z will be in blocking state.

In my opinion there will be no effect of this portfast (though portfast is not required on trunk) and there will be no loop because of this.

Is there any specific reason u want to define portfast on trunk?

I am assuming that u have not disabled STP here.

With spanning-tree portfast applied to one on the links between the switches, no port will be in a blocking state since it will see the portfast port as a single host connection. The result will be the CAM for each vlan on each switch having two paths to every mac-address ... which will result in a loop on all vlans applied on that trunk.

With spanning-tree portfast applied to one on the links between the switches, no port will be in a blocking state since it will see the portfast port as a single host connection

I connected 3 switch like X,Y,Z in this case, i have vlan 1,2,3,10,11 on all awitches.

1. When the links interconnecting switches are not trunk,

one port is in block state. Can see the amber light on the port.

Even after changing the port in portfast mode, that port is still in blocking mode.

2. When the links interconnecting switches are in trunk mode.

No port has amber light but that doesnot mean there is loop.

If you use sh spanning-tree int, find that the vlan 1,2,3,10,11 are in blocking state.

Eventhough port is not in blocking state due to trunk mode individual vlan is in blocking mode. These port are also portfast & trunk. No change.

IF you have 2-3 spare switches you can see urself.

If STP is not disabled then switch is making right decisions for us, even though we arenot following rules.

Possible in some cases where the IOS is old it works differently.

How many users did you have in your lab ... other than switches? Labs are great ... but if you do not have the users it can be hard to simulate how a network will react.

No body is encouraging him to go with portfast.

Switch X in the situation given is root and he is defining port fast on link between X & Y. X & Y link is not in blocking state (Link between Y & Z will be in blocking state).

How does it matter if a Vlan goes directly to forwarding state in a link which is not blocked?

Given only these 3 switches (situation will change if there are more switches), even if you connect Billion users to it, will something change?

STP is not going to work differently when created in Lab or in real network.

The link is not blocked. There is a seperate spanning tree for each vlan. While one vlan may be blocked from going through a port, another vlan may have the port in forward mode. The same port can be in a different mode for each vlan.

If portfast is applied on the X-Y trunk then that port will not be considered for STP since it is now handled as a host ... and not a switch. Ports with hosts on it will never be blocked and are not even considered part of the tree. They are dead ends. So from switch X's perspective, the only way to switch Z is through switch Y ... which means it will not place any port on any vlan in a blocking state.

So switch X will see switch Y through switch Z. But the CAM table will see all mac addresses from both ports on all three switches ... for each vlan. What is important to note about that is if a broadcast for a user is sent out the switches will begin forwarding that broadcast both ways and loops will occur.

The link is not blocked. There is a seperate spanning tree for each vlan.

Agreed.

While one vlan may be blocked from going through a port, another vlan may have the port in forward mode. The same port can be in a different mode for each vlan.

If root is same for all the vlans, one vlan will be blocked and other in forwarding state on the same link. Well i have not seen this, do you have example from real network as we can simulate anything in lab.

Can expect different state if for some vlan one switch is root and a different switch is root for other vlan.

"Well i have not seen this, do you have example from real network as we can simulate anything in lab."

Not all switches will have users on all vlans ... that could change the spanning tree for a vlan from the root switch. Also, it may not be best to have the root switch the same for all vlans ... depending on the topology.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: