Configuring the switchport interface mode

Do the following to set the switchport interface as access or trunk. This configuration works only when the interface is set as switchport.

Procedure

  1. Enter the configure terminal command to access global configuration mode.
    device# configure terminal
    
  2. Enter the interface ethernet command to configure the interface mode.
    device(config)# interface ethernet 0/1
    
  3. Enter the switchport command to set the interface as switchport.
    device(conf-if-eth-0/1)# switchport
    
  4. Enter the switchport mode command to configure the switchport interface in trunk mode.
    device(conf-if-eth-0/1)# switchport mode trunk
    
    Note

    Note

    The default mode is access. Enter the switchport mode access command to set the mode as access.

What to do next

Note

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.