Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk(三层交换机)

三层交换机在配置trunk口时会遇到一个报错,如下图:

SW2(config-if)#switchport mode trunk

Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.  # 命令被拒绝:接口的中继封装是“自动”不能被配置的“主干”模式。

怎么办?

只需要 像单臂路由一样 给端口封装一个  接口封装协议。命令:Switch(config-if)#switchport trunk encapsulation dot1q 

SW2(config-if)#switchport trunk encapsulation dot1q

SW2(config-if)#switchport mode trunk

SW2(config-if)#exit

SW2(config)#int f0/24

SW2(config-if)#switchport trunk encapsulation dot1q

SW2(config-if)#switchport mode trunk

SW2(config-if)#

原文地址:https://www.cnblogs.com/gaojunIT/p/14153671.html