Sets the mode of the Layer 2 interface.
Interface subtype configuration mode
You must configure the same native VLAN on both ends of an 802.1 or classified VLAN trunk link. Failure to do so can cause bridging loops and VLAN leaks.
To set the mode of a specific Ethernet interface to access:
device# configure terminal switch(config)# interface ethernet 1/9 switch(conf-if-eth-1/9)# switchport mode access
To set the mode of a specific port-channel interface to trunk:
device# configure terminal switch(config)# interface port-channel 44 switch(config-Port-channel-44)# switchport mode trunk