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

weird behavior Spanning-tree portfast through an interface template

NicP
Level 1
Level 1

Hi All,

 

Today I encountered weird behavior on my switch when i configured through an interface template.

To my knowledge Spanning-tree portfast should be configured on the interface itself, and won't work when it is only present in the template. Therefor almost all switch models i know configure it automatically on the interface when you source a template with spanning-tree portfast configured in it.

 

Today wasn't consistent in this behavior on my stack switch.

the facts:

- stack switches are WS-C3650-48PD both running IOS 16.9.5

- template configuration

template PLACEHOLDER_NAME
 storm-control broadcast level pps 1k
 storm-control multicast level pps 2k
 storm-control action shutdown
 storm-control action trap
 spanning-tree portfast
 spanning-tree bpduguard enable
 switchport access vlan xx
 switchport mode access
 switchport nonegotiate
 load-interval 30
!

- Interfaces start configuration

interface GigabitEthernet1/0/45
switchport access vlan xx
storm-control broadcast level 5.00
storm-control multicast level 5.00
storm-control action trap
ip device tracking maximum 10
!
interface GigabitEthernet1/0/46 switchport access vlan xx storm-control broadcast level 5.00 storm-control multicast level 5.00 storm-control action trap ip device tracking maximum 10 !
interface GigabitEthernet2/0/3
switchport access vlan xx
storm-control broadcast level 5.00
storm-control multicast level 5.00
storm-control action trap
ip device tracking maximum 10

- behavior

I performed exactly the same action on both interfaces, removing the current configuration and adding 'source template PLACEHOLDER_NAME'. I want to point out that both interfaces hadn't have spanning-tree portfast configured yet.

the following commands were performed

Switch(config)#int ra g1/0/45-46
Switch(config-if-range)#source template PLACEHOLDER_NAME
%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

%Portfast has been configured on GigabitEthernet1/0/45 but will only
have effect when the interface is in a non-trunking mode.
%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

%Portfast has been configured on GigabitEthernet1/0/46 but will only
have effect when the interface is in a non-trunking mode. Switch(config-if-range)#no switchport access vlan Switch(config-if-range)#no storm-control broadcast level 5.00 Switch(config-if-range)#no storm-control multicast level 5.00 Switch(config-if-range)#no storm-control action trap Switch(config-if-range)#do sh run int g1/0/45 Building configuration... Current configuration : 140 bytes ! interface GigabitEthernet1/0/45 source template PLACEHOLDER_NAME ip device tracking maximum 10 end
Switch(config-if-range)#do sh run int g1/0/46
Building configuration...

Current configuration : 140 bytes
!
interface GigabitEthernet1/0/46
source template PLACEHOLDER_NAME
ip device tracking maximum 10
end

For some reason it does notify with the portfast warning as it should, but does not configure it on the interfaces itself. I was like, Ok, than I add it manually this time. But on another interface where i performed the same action it reacted differently.

Switch(config)#int g2/0/3
Switch(config-if)#source template PLACEHOLDER_NAME
Switch(config-if)#no storm-control broadcast level 5.00
Switch(config-if)#no storm-control multicast level 5.00
Switch(config-if)#no storm-control action trap
Switch(config-if)#no switchport access vlan
Switch(config-if)#do sh run int g2/0/3
Building configuration...

Current configuration : 169 bytes
!
interface GigabitEthernet2/0/3
source template PLACEHOLDER_NAME
spanning-tree portfast
ip device tracking maximum 10
end

No warning this time, but it did configure spanning-tree portfast on the interface. 

 

I do encountered the spanning-tree portfast warning when using the range command on most of the switches and it always configures spanning-tree portfast as expected on the interfaces. This time it did not.

 

Is this a minor bug? Is it configuration order? I don't know.

It did not break anything and is just a minor problem, but I still want to point it out.

0 Replies 0
Review Cisco Networking products for a $25 gift card