If i configure spanning-tree port type edge trunk
on physical interface instead of port-channel does that work?
Or i have to do spanning-tree port type edge trunk
on port-channel ?
Example:
interface Ethernet1/33
switchport mode trunk
switchport trunk allowed vlan 10,20,30,100
spanning-tree port type edge trunk
spanning-tree bpduguard enable
speed 10000
channel-group 133 mode active
Port-channel
interface port-channel133
switchport mode trunk
switchport trunk allowed vlan 10,20,30,100
speed 10000
vpc 133
Best Answer
Strongly suggested: Configure both port-channel and its members identically (except of course for
description
and thechannel-group
andvpc
bits).As long as an interface is not configured to be member of a LAG, or because LACP negotiation failed and the interface remains LACP individual [1], the configuration from the given (physical) interface applies, and "switching" (as in "MAC address learning" and forwarding of frames) and spanning-tree behaviour happens in the context of the (physical) interface.
show mac address-table ...
will show that MAC addresses are not learned on the port-channel interface, but on the physical interface, andshow spanning tree vlan XXX
will show the physical interface as active interface (in the STP state and role it will happen to have).Once the interface is integrated into a port-channel interface, all the "Layer2 things" (MAC address learning, spanning-tree) are handled in the context of the port-channel interface, and the command outputs change: MAC addresses are learned on the port-channel interface, and the port-channel appears as active interface in the spanning tree(s).
Also: Having portfast (
port type edge [trunk]
) on a member interface but not on the port-channel interface will result in the dreaded 30seconds of LIS/LRN (for STP) or LRN (for RSTP and RPVST+), before the port-channel interface goes into FWD mode and allows traffic in/out.Plus, when a non-portfast port (regardless if individual or port-channel) goes "FWD", a spanning-tree topology change notification runs through the pertaining spanning tree(s).
Addon: Nexus 3K and 9K switches have a convenient feature to help integrating physical ports into port-channels:
force
keyword when applying the port-channel configuration:channel-group NN force mode active
. This will overwrite any possibly conflicting configuration of the physical interface, and enforce the config as given on theport-channel NN
interface.[1] and the interface was not suspended because of "lacp suspend-individual" (default on some Nexus switches), which would bring the interface down.