EtherChannel - Converting an L2 EtherChannel to L3
When configuring an EtherChannel, it is required to ensure consistency between the logical portchannel interface and the underlying physical interfaces. If you configure a Layer 2 (L2) EtherChannel and then issue the no switchport
command on the portchannel interface, you are converting it to a Layer 3 (L3) interface. However, if the physical interfaces remain configured as L2 interfaces, this inconsistency will cause the physical interfaces to go down and be removed from the EtherChannel.
To avoid this issue, configure the physical interfaces as L3 interfaces using the no switchport
command before adding them to the logical portchannel. This order of operations ensures that the interfaces are consistent and prevents the observed inconsistencies.
Links
https://networklessons.com/switching/layer-3-etherchannel-cisco-ios-switch/