Inter-VLAN Routing using Layer 3 Switches
Summary
This topic configure inter-VLAN routing using Layer 3 switching. Start learning CCNA 200-301 for free right now!!
Table of Contents
Layer 3 Switch Inter-VLAN Routing
Modern, enterprise networks rarely use router-on-a-stick because it does not scale easily to meet requirements. In these very large networks, network administrators use Layer 3 switches to configure inter-VLAN routing.
Inter-VLAN routing using the router-on-a-stick method is simple to implement for a small to medium-sized organization. However, a large enterprise requires a faster, much more scalable method to provide inter-VLAN routing.
Enterprise campus LANs use Layer 3 switches to provide inter-VLAN routing. Layer 3 switches use hardware-based switching to achieve higher-packet processing rates than routers. Layer 3 switches are also commonly implemented in enterprise distribution layer wiring closets.
Capabilities of a Layer 3 switch include the ability to do the following:
- Route from one VLAN to another using multiple switched virtual interfaces (SVIs).
- Convert a Layer 2 switchport to a Layer 3 interface (i.e., a routed port). A routed port is similar to a physical interface on a Cisco IOS router.
To provide inter-VLAN routing, Layer 3 switches use SVIs. SVIs are configured using the same interface vlan vlan-id command used to create the management SVI on a Layer 2 switch. A Layer 3 SVI must be created for each of the routable VLANs.
Layer 3 Switch Scenario
In the figure, the Layer 3 switch, D1, is connected to two hosts on different VLANs. PC1 is in VLAN 10 and PC2 is in VLAN 20, as shown. The Layer 3 switch will provide inter-VLAN routing services to the two hosts.
The table shows the IP addresses for each VLAN.
D1 VLAN IP Addresses
VLAN Interface | IP Address |
---|---|
10 | 192.168.10.1/24 |
20 | 192.168.20.1/24 |
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.
Click each button for details of the configuration step.
Layer 3 Switch Inter-VLAN Routing Verification
Inter-VLAN routing using a Layer 3 switch is simpler to configure than the router-on-a-stick method. After the configuration is complete, the configuration can be verified by testing connectivity between the hosts.
From a host, verify connectivity to a host in another VLAN using the ping command. It is a good idea to first verify the current host IP configuration using the ipconfig Windows host command. The output confirms the IPv4 address and default gateway of PC1.
C:\Users\PC1> ipconfig Windows IP Configuration Ethernet adapter Ethernet0: Connection-specific DNS Suffix . : Link-local IPv6 Address : fe80::5c43:ee7c:2959:da68%6 IPv4 Address : 192.168.10.10 Subnet Mask : 255.255.255.0 Default Gateway : 192.168.10.1 C:\Users\PC1>
Next, verify connectivity with PC2 using the ping Windows host command, as shown in the output. The ping output successfully confirms inter-VLAN routing is operating.
C:\Users\PC1> ping 192.168.20.10 Pinging 192.168.20.10 with 32 bytes of data: Reply from 192.168.20.10: bytes=32 time<1ms TTL=127 Reply from 192.168.20.10: bytes=32 time<1ms TTL=127 Reply from 192.168.20.10: bytes=32 time<1ms TTL=127 Reply from 192.168.20.10: bytes=32 time<1ms TTL=127 Ping statistics for 192.168.20.10: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms C:\Users\PC1>
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 Scenario on a Layer 3 Switch
In the figure, the previously configured D1 Layer 3 switch is now connected to R1. R1 and D1 are both in an Open Shortest Path First (OSPF) routing protocol domain. Assume inter-VLAN has been successfully implemented on D1. The G0/0/1 interface of R1 has also been configured and enabled. Additionally, R1 is using OSPF to advertise its two networks, 10.10.10.0/24 and 10.20.20.0/24.
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.
Click each button for details of the configuration step.
Packet Tracer – Configure Layer 3 Switching and Inter-VLAN Routing
In this activity, you will configure Layer 3 switching and Inter-VLAN routing on a Cisco 3560 switch.
Ready to go! Keep visiting our networking course blog, give Like to our fanpage; and you will find more tools and concepts that will make you a networking professional.