cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
605
Views
5
Helpful
11
Replies

Question about trunking

insccisco
Level 1
Level 1

Guys, a very simple question, what exactly does this line do:

spanning-tree portfast trunk?

I have it on all 24 interfaces on my 2950 switch.

I've read that for switch ports that connect to only one single device, enabling portfast will be enough (spanning-tree portfast).

In my config, there are few ports that connect to routers and other switches.

can anyone explain?

thank you

11 Replies 11

pciaccio
Level 4
Level 4

The Spanning Tree Protocol incorporates hold timers that are activated upon the insertion of a device into a switch port. It is about 30 secs(can be modified). However by allowing Port Fast enable on the port thus bypasses the hold timers and the device automatically enters the network. This is a very risky thing to do unless you know for sure that the device you are adding is not another switch or another access point that can find its way back onto your network from another port. If so then you will see a broadcast storm arise on your switch backbone (Not a pretty site, much worse then Katrina). Anyway the Portfast bypasses the timers . I would recommend that you do not turn on Portfast on your ports. But if you feel you need it or want it then do so, but beware of any possible looping of traffic onto your switch.....Good Luck...Please rate....

good info... I appreciate it.

Now, if this is the case, how would you notice a switch is experiencing "looping of traffic, or a broadcast storm"?

Would the logs tell you this? Would the switch reboot by itself?

bjw
Level 4
Level 4

If you issue the set spantree portfast command on a trunk port without using the trunk keyword, the trunk port will stay in disable mode.

In your case if the subject ports are not trunk ports, the trunk keyword effectively does nothing and should be removed from the commands.

We like to use portfast in conjunction with bpduguard on known access ports. This combo will err-disable a port if someone attempts to attach a switch to an access port, but will keep end-user/host connections snappy when started/connected/booted, etc.

In our case, spanning-tree timers should not be felt by end-users/hosts

So, in my 2950, port 0/1 connects to one of 4 ports in an 1841 router (this 1841 has a 4-port WIC). This 0/1 port on my 2950 switch belongs to VLAN 2. Here's my config for this 0/1 port:

!

interface FastEthernet0/1

switchport access vlan 2

spanning-tree portfast trunk

!

Based on all this info, is this 0/1 port considered a trunk port?

Hi

If the port is only meant to be in vlan 2 then no it should not be a trunk port and you do not need the spanning-tree portfast trunk command.

HTH

Jon

Then, if you really excuse my novice knowledge, when is a port really considered a Trunk port?

Hi

A trunk port is a port that carries multiple vlans down it. In you config if you have "switchport access vlan 2" that means your port is a member of vlan 2 only. if you made that port a trunk port it would not be a memeber of a single vlan but it would carry traffic for multiple vlans.

Trunk links are primarily used to connect switches together so you can have the same vlans across multiple switches.

If you want to carry traffic between vlans you still need a routed interface, whether that be an interface/sub-interface on a rouyter or more commonly a Switched Virtual Interface (SVI) on a layer 3 switch.

Hope this makes sense

Jon

A port becomes a trunk one of two ways.

1. Manually configured to be a trunk

2. DTP successfully negotiates a trunk with the device connected.

You can do the command 'show int (int_type_#) switchport' and it will show you what the operational state of the port is. It appears based on the info you provided the port is an access port.

HTH

Sundar

Hi

A trunk port is a port that carries multiple vlans down it. In you config if you have "switchport access vlan 2" that means your port is a member of vlan 2 only. if you made that port a trunk port it would not be a memeber of a single vlan but it would carry traffic for multiple vlans.

Trunk links are primarily used to connect switches together so you can have the same vlans across multiple switches.

If you want to carry traffic between vlans you still need a routed interface, whether that be an interface/sub-interface on a rouyter or more commonly a Switched Virtual Interface (SVI) on a layer 3 switch.

Hope this makes sense

Jon

Hi,

Try to issue the show interface trunk command and see if f0/1 is trunking. The port right now is set to desirable trunk mode, means that if there is a trunk on the other side of the connection, the trunk will form. Otherwise, it will be running as access port on vlan 2.

HTH.

Jon Marshall
Hall of Fame
Hall of Fame

Hi

As Phil has stated the "spanning-tree porfast" command allows a port to bypass the listening and learing states ofd STP and go stright to forwarding. The port still runs the STP algorithm.

"Spanning-tree portfast trunk" allows you to turn posrtfast on trunk connections. As Phil says, be very careful with this. You must know your topology very well to use this for connections to other switches.

An example of where it might come in use is if you connect a server that is running 802.1q on it's NIC.

HTH

Jon

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco