How to Configure Layer 3 Switch in Packet Tracer | Inter-Vlan Routing with Layer 3 Switch

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:

  1. Create SVIs
  2. Assign IP addresses to the SVIs.
  3. Create Access ports
  4. Configure trunk links.
  5. 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.

Network topology for this project

Configuration Objectives

  1. Creating of SVIs on the Layer 3 Switch
  2. Creating of Trunk link
  3. Creating of Access port on Layer 2 switches
  4. 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

an images showing the 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;

ALSO READ:  Layer 3 Switch Configuration: SVI Setup & Inter-VLAN Routing in Packet Tracer
SWI#show ip interface brief

image showing the ip addressess assigned to the SVIs

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

on switch0;

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.

ALSO READ:  How to Connect a Multilayer Switch to a Router in Packet Tracer

To test it, we have pinged from PC3 to PC2, and the result is as shown in the image below:

an image showing ping traffic from PC3 to PC2

Leave a Comment

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

Scroll to Top