
In a situation where you are trying to connect two PCs with IP addresses from different network segment through the gateway a Palo Alto firewall, you might encounter this error message while configuring trunk mode on a Cisco switch interface:
Switch(config-if)#switchport mode trunk
Command rejected: An interface whose trunk encapsulation is "Auto" can not be configured to "trunk" mode.
This means that the encapsulation mode must be configured for trunk mode because VLAN tagging(encapsulation) is used in trunk mode: