Inter-VLAN Routing using Layer 3 Switches

Layer 3 Switch Configuration

Complete the following steps to configure S1 with VLANs and trunking:

Step 1. Create the VLANs.

Step 2. Create the SVI VLAN interfaces.

Step 3. Configure access ports.

Step 4. Enable IP routing.

First, create the two VLANs as shown in the output.

D1(config)# vlan 10
D1(config-vlan)# name LAN10
D1(config-vlan)# vlan 20
D1(config-vlan)# name LAN20
D1(config-vlan)# exit
D1(config)#

Routing on a Layer 3 Switch

If VLANs are to be reachable by other Layer 3 devices, then they must be advertised using static or dynamic routing. To enable routing on a Layer 3 switch, a routed port must be configured.

A routed port is created on a Layer 3 switch by disabling the switchport feature on a Layer 2 port that is connected to another Layer 3 device. Specifically, configuring the no switchport interface configuration command on a Layer 2 port converts it into a Layer 3 interface. Then the interface can be configured with an IPv4 configuration to connect to a router or another Layer 3 switch.

Routing Configuration on a Layer 3 Switch

Complete the following steps to configure D1 to route with R1:

Step 1. Configure the routed port.

Step 2. Enable routing.

Step 3. Configure routing.

Step 4. Verify routing.

Step 5. Verify connectivity.

1. Configure the routed port.

Configure G1/0/1 to be a routed port, assign it an IPv4 address, and enable it.

D1(config)# interface GigabitEthernet1/0/1
D1(config-if)# description routed Port Link to R1
D1(config-if)# no switchport
D1(config-if)# ip address 10.10.10.2 255.255.255.0
D1(config-if)# no shut
D1(config-if)# exit
D1(config)#

Last updated

Was this helpful?