cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
904
Views
0
Helpful
3
Replies

make all access ports or vlan a certain config

robertkwild
Spotlight
Spotlight

hi all,

i want to make all access ports or ports on a certain vlan all port fast, i know the normal way of doing it per port(s)

conf

int range 1/0/1-24 or just 1/0/25,1/0/27

spanning-tree portfast

but can i do this for a vlan instead of ports, shall i do this for the trunk ie PO aswell?

thanks,

rob

3 Replies 3

acampbell
VIP Alumni
VIP Alumni

Hi

You really only want to be running port fast on switch access ports.
port fast is a directed spanning tree state, it make the port go immediately in to "forwarding mode"
but this means it is not going through normal states like listening & learning.
Access ports usually mean we are cooneting directlly to an end user device like a PC or printer etc.

You should be far more wary of putting trunks straight to "forwarding mode" and it is most likely that te IOS will stop that. on a trunk.
You need to be avioding any chance of spanning tree loops

You can use the command "switchprt host" on the port to end user devices.
This command has 3 affects when implemented
1)Ensures the port is in "access mode"
2)Enables spanning tree "port fast"
3) Disables port channeling on the port.

Example config

!
interface range gig1/0/1 - 22
switchport host
switchport access vlan 100
description PC ONLY PORTS
!

Here are a couple of links to give you more pointers:-
https://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/5234-5.html?dtid=osscdc000283
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/interface/command/ir-cr-book/ir-s7.html?dtid=osscdc000283#wp1088640682

search for fast & host within these.


Hope this helps.

Regards, Alex. Please rate useful posts.

Hello
you could utilise a port macro


Example:
macro name set-access_ports
description access ports
switchport host
no logging event link-status
switchport access vlan x
switchport voice vlan xx
switchport nonegotiate
no shut

macro name trunk_ports
description trunk ports
switchport trunk allowed vlan x,x,x
switchport mode trunk
switchport nonegotiate
spanning-tree link-type point-to-point
no shut

interface range x/x-x
macro apply <marco name>


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Joseph W. Doherty
Hall of Fame
Hall of Fame

Per VLAN?  Not that I'm aware of.

However, you can make portfast the default for all access ports (global configuration command spanning-tree portfast default), and change individual port (or port ranges) to disable it.  (Not exactly what you want, but might be less work.)

Regarding setting a trunk port to portfast, that might be done for something like a VM host using multiple VLANs, but even then, you probably don't need it.

Review Cisco Networking for a $25 gift card