Question about trunking

Unanswered Question
Jun 27th, 2007
User Badges:

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
pciaccio Wed, 06/27/2007 - 11:10
User Badges:
  • Silver, 250 points or more

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....

insccisco Thu, 06/28/2007 - 05:49
User Badges:

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?

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


insccisco Wed, 06/27/2007 - 12:04
User Badges:

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?




Jon Marshall Wed, 06/27/2007 - 12:31
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

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

insccisco Wed, 06/27/2007 - 13:04
User Badges:

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

Jon Marshall Wed, 06/27/2007 - 13:15
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

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



sundar.palaniappan Wed, 06/27/2007 - 13:15
User Badges:
  • Green, 3000 points or more

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

Jon Marshall Wed, 06/27/2007 - 13:16
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

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



power1pete Fri, 06/29/2007 - 07:36
User Badges:

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 Wed, 06/27/2007 - 11:17
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

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

Actions

This Discussion