Would you like to learn how to configure a Trunk on Cisco Switch using the command-line? In this tutorial, we are going to show you all the steps required to create a vlan and configure a trunk on a Cisco Switch 2960 or 3750 using the command-line.
CIsco Switch Playlist:
On this page, we offer quick access to a list of videos related to Cisco Switch.
Don’t forget to subscribe to our youtube channel named FKIT.
Cisco Switch Related Tutorial:
On this page, we offer quick access to a list of tutorials related to Cisco Switch.
Tutorial – Trunk on Cisco Switch
First, you need to access the console of your Cisco Switch.
In our example, we are going to use an Opensource software named Putty and a computer running Windows.
The Putty software is available on the putty.org website.
After finishing the download, run the software and wait for the following screen.
To access the console of a Cisco Switch model 2960 or 3750, you will need to select the Serial Connection category and use the following options:
• Connection type: Serial
• Serial line: COM1
• Speed: 9600
If COM1 does not work you will need to try to use COM2, COM3, COM4 or the next.
Using either the console, telnet or ssh, connect to the command-line of your switch and log in with a user who has administrative privileges.
On the prompt screen, enter the administrative login information.
After a successful login, the console command-line will be displayed.
Switch>
Use the enable command to enter the privilege mode.
Switch> enable
Use the configure terminal command to enter the configuration mode.
Switch# configure terminal
Create a new vlan, select an identification number and add a brief description.
Switch(config)# vlan 100
Switch(config-vlan)# name Data Network
Switch(config-vlan)# exit
Switch(config)# vlan 200
Switch(config-vlan)# name Voice Network
Switch(config-vlan)# exit
Access the interface configuration mode.
Set the Switch port as a trunk.
Add the list of authorized Vlans to use this trunk.
Switch(config)# interface gigabitethernet0/40
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk native vlan 1
Switch(config-if)# switchport trunk allowed vlan add 1,100,200
Switch(config-if)# exit
Switch(config)# exit
In our example, the Switch port 40 was configured as a trunk.
The following Vlans were allowed to use this port as a trunk: 1, 100 and 200.
Vlan 1 is the default native VLAN of Cisco Switches.
Don’t forget to save your Switch trunk configuration
Switch# copy running-config startup-config
You have successfully created a new VLAN.
You have successfully associated a Switch port to a specific VLAN.