A Layer 3 switch, also known as a multilayer switch, is a type of switch that is capable of both routing and switching functions.
Unlike the Layer 2 switch, the Layer 3 switch operates one layer higher in the OSI model, specifically at Layer 3. This distinction allows the Layer 3 switch to operate on Layer 3 information, such as IP routing.
With a Layer 3 switch, you gain the ability to create Switch virtual interfaces (SVIs) for each VLAN and assign IP addresses to these interfaces. These IP addresses assigned to the SVIs serve as the default gateways for all the host devices residing within those VLANs.
In this post, I will show you how to configure layer 3 switch in the packet tracer. By the end of this post, you will have the knowledge and skills to:
- Create SVIs
- Assign IP addresses to the SVIs.
- Create Access ports
- Configure trunk links.
- Implement inter-VLAN routing With Multilayer switch.
Here is a vidoe tutorial showing How to Configure Layer 3 Switch in Packet Tracer;
Network Topology
The network topology shown below comprises of a layer 3 switch and 3 layer 2 switches attached to it. Each of the layer 3 switch is further connected to PCs.
Configuration Objectives
- Creating of SVIs on the Layer 3 Switch
- Creating of Trunk link
- Creating of Access port on Layer 2 switches
- Testing
Configuration
Below are the configurations needed for each of the network components and a brief explanation of what each configuration does.
Multilayer Switch Configuration
Creating VLANs
Enter the following command to create the two vlans;
SWI(config)#vlan 20
SWI(config)#exit
SWI(config)#vlan 30
Confirms the vlans…
SWI(config)#do show vlan brief
Creating the trunk port
Enter the following commands to create trunk port on the layer 3 switch;
SWI(config)#int fa0/1
SWI(config-if)#switchport trunk encapsulation dot1q
SWI(config-if)#switchport mode trunk
SWI(config-if)#int fa0/2
SWI(config-if)#switchport trunk encapsulation dot1q
SWI(config-if)#switchport mode trunk
SWI(config)#int fa0/3
SWI(config-if)#switchport trunk encapsulation dot1q
SWI(config-if)#switchport mode trunk
Creating SVIs
Enter the following commands to create SVIs and assign IP addresses to them;
SWI(config)#int vlan 20
SWI(config-if)#ip address 192.168.2.1 255.255.255.0
SWI(config-if)#no shut
SWI(config-if)#int vlan 30
SWI(config-if)#ip address 192.168.1.1 255.255.255.0
SWI(config-if)#no shut
Enable IP Routing
Enter the following commands to enable Ip routing on the layer 3 Switch;
SWI(config)#ip routing
SWI(config)#exit
Confirm IPs addresses on SVIs;
Enter the following command to confirm the ip address assigned to the vlans;
SWI#show ip interface brief
Switch1 Configuration
Creating Trunk port
Enter the following commands to create the trunk port on the first layer 2 switch;
Note: This configuration completes the creation of Trunk link between Switch1 and the Layer 3 switch
Switch(config)#int fa0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Creating VLANs
Enter the following commands to create VLAN 20 and VLAN 30 on swtich1;
Switch(config)#vlan 20
Switch(config-vlan)#vlan 30
Creating Access ports
Enter the following commands to create access ports on switch1;
Switch(config-vlan)#int fa0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#do write
Switch2 Configuration
Creating Trunk port
Enter the following commands to create the trunk port on switch2;
Switch(config)#int fa0/1
Switch(config-if)#switchport mode trunk
Creating VLANs
Enter the following commands to create VLAN 20 and VLAN 30 on swtich2;
Switch(config-if)#vlan 20
Switch(config-vlan)#vlan 30
Creating Access ports
Enter the following commands to create access ports on switch2;
Switch(config-vlan)#int fa0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 30
Switch(config-if)#int fa0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#do write
Switch0 Configuration
Creating Trunk port
Enter the following commands to create the trunk port
Switch(config)#int fa0/1
Switch(config-if)#switchport mode trunk
Creating VLANs
Enter the following commands to create VLAN 20 and VLAN 30 on swtich0;
Switch(config)#vlan 20
Switch(config-vlan)#vlan 30
Creating Access ports
Enter the following commands to create access ports on switch0;
Switch(config-vlan)#int fa0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 30
Switch(config-if)#do write
Configure the host devices
Configure the host with Ip address as labeled in the network topology showed above.
Note PC1 and PC3 are in the 192.168.2.0/24 subnetwork while PC0 and PC2 are in the 192.168.21.0/24 subnetwork.
Testing
With the configuration we have completed on each of the network components, which comprises creating SVIs on the layer 3 switch, creating a trunk link between the layer 3 switch and each of the layer 2 switches, and creating an access port on the layer 2 switches, we have been able to achieve inter-VLAN routing in the network.
To test it, we have pinged from PC3 to PC2, and the result is as shown in the image below:
I am a passionate Networking Associate specializing in Telecommunications.
With a degree in Electronic engineering, I possess a strong understanding of electronic systems and the intricacies of telecommunications networks. I gained practical experience and valuable insights working for a prominent telecommunications company.
Additionally, I hold certifications in networking, which have solidified my expertise in network architecture, protocols, and optimization.
Through my writing skills, I aim to provide accurate and valuable knowledge in the networking field.
Connect with me on social media using the links below for more insights.
You can contact me using [email protected] or connect with me using any of the social media account linked below