Layer 3 Switches also known as multilayer switches can forward frames based on layer 2 address and packet-based on layer 3 address. They in fact perform the functions of both Routers and Switches. Like routers, Cisco’s layer 3 line of switches use the Cisco Express Forwarding (CEF) mechanism to carry out efficient layer 3 forwarding.

In this lesson, we will learn to configure a layer 3 switch to perform Inter-VLAN routing which previously was carried out by using a router. We will also learn to configure a switch port for native Layer 3 functionality just like an Ethernet port in a router.

Shown below in the diagram is the network topology

We will configure the switch so that our end systems which are in different VLANs can communicate with each other, and we will also configure the switch port connected to the router as a Layer 3 Port.

First we will create the VLANs and configure the ports attached to the systems in the respective VLANs

Switch(config)# vlan 10

Switch(config-vlan)# exit

Switch(config)# vlan 20

Switch(config-vlan)# exit

Switch(config)# interface fastethernet 0/10

Switch(config-if)# switchport mode access

Switch(config-if)# switchport access vlan 10

Switch(config)# interface fastethernet 0/20

Switch(config-if)# switchport mode access

Switch(config-if)# switchport access vlan 20

Once we have created the VLANs and associated the end-user ports with the respective VLANs then we will configure the VLAN Switched Virtual Interface (SVI), this is a virtual layer 3 port that enables layer 3 functionality for the VLAN.

Switch(config)# interface vlan 10

Switch(config-if)# ip address 10.10.1.1 255.255.255.0

Switch(config)# interface vlan 20

Switch(config-if)# ip address 10.20.1.1 255.255.255.0.

The configuration is now sufficient for InterVLAN routing and both systems will be able to communicate with each other. We will also configure the switch port connected to the router as native Layer 3 port.

Switch(config)# interface fastethernet0/1

Switch(config-if)# No switchport

Switch(config-if)# ip address 192.168.1.2 255.255.255.0

The ‘no switchport’ command enables native layer 3 functionality just like an Ethernet port on the router performs.

This brings us to the end of this article in which we covered Layer 3 switches and basic configuration of a Layer 3 switch. Most switches deployed in today’s network are Layer 3 switches, so it is very important we understand the architecture of a Layer 3 switch.