How to create Trunk Line and VLAN Configuration on Layer 3 Cisco Switch

Suppose we have two layer 3 switches with 24 ports each and we want to make two trunk lines in por

Suppose we have two layer 3 switches with 24 ports each and we want to make two trunk lines in port no 23rd and 24th of the switches.

Switch3 [SERVER]
Port1 Port2 —- —-   ——   ——-    Port23 Port24

Switch4 [CLIENT]
Port1 Port2 —– —–   —–  ——-    Port23 Port24

Commands are as follows…

Switch3>en
Switch3#sh flash
Switch3#delete vlan.dat
//if VLAN configuration is already there in the switch3 then Show flash will display the file vlan.dat. file.So you should delete the file for fresh configuration of VLAN otherwise you can skip this step.
Switch3# write erase
//Delete the NVRAM
Switch3#reload
//Switch will reboot
Switch3#sh vlan
Switch3#config t
//Now you enter to the configuration mode of the switch
Switch3(config)#host name SW3
//Give a name to the switch
SW3(config)#enable secret cisco1
//cisco1 is your enable secret password for this switch
SW3(config)#line con 0
SW3(config-line)#loggin synchronous
SW3(config-line)#password cisco2
//cisco2 is your line console password for this switch
SW3(config-line)#login
SW3(config-line)#exit
SW3(config)#

NOW CREATE VTP DOMAIN

SW3(config)#vtp domain humty
//humty is your VTP domain name, you can give any name
SW3(config)#vtp password dumty
//dumty is your VTP domain password
SW3(config)#vtp mode server
//make this switch as server

Next Step, Configure the interfaces for TRUNK

SW3(config)#interface Ethernet 0/23
//we choose interface 23rd for trunk
SW3(config-if)#switchport mode trunk encapsulation
//same way do the configuration for 24th port.
SW3(config-if)#exit
SW3(config)#int Ethernet 0/24
SW3(config-if)#switchport mode trunk en
//You must configure the VLANs only on the SERVER switch. This will automatically advertise the update information of VALNs to its client switches. So you should not configure the VLANs on the client switches. Other configurations are same for both SERVER & CLIENT switches.

Step1. Create VTP domain on both Client/Server switches.
Step2. Trunk line for both Client/Server.
Step3. Assign VLANs per ports according to your plan.

CREATE VALNS FOR SERVER SWITCH

SW3(config)#vlan 10
//10 is unique vlan id
SW3(config)#vlan name sales
//give a name for this 10 valn
//this way we can create other vlans
SW3(config)#vlan 20
SW3(config)#vlan name engg
ASSIGN PORTS FOR DIFFERENT VLANS
SW3(config)#int 0/1
//interface or port 1
SW3(config-if)#switch port mode access
SW3(config-if)#switch port access vlan10
//assign vlan 10 to this port
SW3(config-if)#no shoutdown
SW3(config-if)#exit
SW3(config)#int 0/2
//interface or port 2
SW3(config-if)#switch port mode access
SW3(config-if)#switch port access vlan20
//assign vlan 20 to this port
SW3(config-if)#no shoutdown
SW3(config-if)#exit
// here we put 1 & 2 port of the switch SW3 to vlan 10 and same way we can put other ports to vlan 20 and same way you can configure your second switch also.

SW3#copy running-config startup-config
//save the configuration
SHOW COMMANDS
SW3#sh vtp status
SW3#sh vlan
SW3#sh spanning-tree

Your configuration is over now you can connect both switches through port no 23 & 24.

Leave a Reply

Your email address will not be published. Required fields are marked *

31  −  23  =