device# configure terminal
device(config)# interface ethernet 0/1
device(conf-if-eth-0/1)# switchport
device(conf-if-eth-0/1)# switchport mode trunk
Note
The default mode is access. Enter the switchport mode access command to set the mode as access.Note
Before you change the switch port mode from switchport mode access with an explicit switchport access vlan to switchport mode trunk-no-default-native, you must enter the no switchport command on the interface level, and then enter the switchport command to set the interface as a switchport. Now you can configure the switchport mode trunk-no-default-native command.