Hands-On Lab: Configuring and Allowing Inter-VLAN Routing — SVI

This hands-on lab configures inter-VLAN routing using Switch Virtual Interfaces on a Layer 3 switch, enabling IP routing directly on the switch itself and comparing this approach against the router-on-a-stick method from the previous lab.

Switch Virtual InterfaceIP Routing EnableLayer 3 Switch

~2 دقیقه مطالعه · آخرین به‌روزرسانی ۳۱ شهریور ۱۴۰۵

Lab Objective

Configure SVIs for two VLANs on a Layer 3 switch, enable IP routing globally, and verify inter-VLAN connectivity without using any external router.

Lab Purpose

Unlike router-on-a-stick, covered in the previous lab, a Layer 3 switch with SVIs routes traffic entirely internally at hardware speed, without funneling all inter-VLAN traffic through a single trunk link — the standard approach in modern enterprise campus networks.

Lab Topology

Switch1 (Layer 3 capable switch)
  Gi1/0/1 ---- PC-A (VLAN 10): 192.168.10.10/24
  Gi1/0/2 ---- PC-B (VLAN 20): 192.168.20.10/24

SVIs to configure:
  VLAN 10: 192.168.10.1/24
  VLAN 20: 192.168.20.1/24

Task 1: Create the VLANs and Assign Ports

Create VLANs 10 and 20, and assign Gi1/0/1 and Gi1/0/2 to them respectively.

Task 2: Enable IP Routing Globally

Enable IP routing on the switch, which is disabled by default even on Layer 3-capable hardware.

Task 3: Configure the SVIs

Create interface VLAN 10 and interface VLAN 20, assigning the appropriate addresses and bringing each up.

Task 4: Configure PC Default Gateways

Set each PC's default gateway to its respective SVI address.

Task 5: Verify Inter-VLAN Connectivity

Confirm PC-A can reach PC-B, and examine the switch's routing table.

Solution and Verification

Switch1(config)# vlan 10
Switch1(config-vlan)# exit
Switch1(config)# vlan 20
Switch1(config-vlan)# exit

Switch1(config)# interface gigabitethernet1/0/1
Switch1(config-if)# switchport mode access
Switch1(config-if)# switchport access vlan 10
Switch1(config-if)# exit

Switch1(config)# interface gigabitethernet1/0/2
Switch1(config-if)# switchport mode access
Switch1(config-if)# switchport access vlan 20

Switch1(config)# ip routing

Switch1(config)# interface vlan 10
Switch1(config-if)# ip address 192.168.10.1 255.255.255.0
Switch1(config-if)# no shutdown
Switch1(config-if)# exit

Switch1(config)# interface vlan 20
Switch1(config-if)# ip address 192.168.20.1 255.255.255.0
Switch1(config-if)# no shutdown

PC-A: default gateway 192.168.10.1
PC-B: default gateway 192.168.20.1

PC-A> ping 192.168.20.10

Reply from 192.168.20.10: bytes=32 time=1ms

Switch1# show ip route

C    192.168.10.0/24 is directly connected, Vlan10
C    192.168.20.0/24 is directly connected, Vlan20

Key Takeaway

Forgetting ip routing is the single most common mistake in this configuration — without it, the SVIs behave purely as Layer 2 management interfaces and packets between VLANs are silently dropped, even though the SVI IP addresses themselves appear correctly configured and each shows as up/up in isolation.

نوشته و پژوهش‌شده توسط دکتر شاهین صیامی

مقالات مرتبط

Hands-On Lab: Final Comprehensive CCNP Troubleshooting Challenge (BGP, DMVPN, and QoS Integration)

This hands-on lab presents a complex multi-layer failure across an integrated BGP-over-DMVPN topology combined with QoS marking, requiring systematic diagnosis of a route reflector misconfiguration, an NHRP registration failure, and an incorrectly applied QoS policy simultaneously affecting the same network.

ادامه

Hands-On Lab: Configuring BGP over DMVPN

This hands-on lab runs iBGP as the routing protocol across the same DMVPN hub-and-spoke topology used in the two previous labs, configuring the hub as a route reflector so spokes learn each other's routes without a full iBGP mesh, combining two previously separate concepts into one integrated design.

ادامه

Hands-On Lab: Configuring OSPF over DMVPN

This hands-on lab runs OSPF as the dynamic routing protocol across the same DMVPN hub-and-spoke topology, configuring the tunnel interface as an OSPF point-to-multipoint network type to correctly handle the hub-and-spoke adjacency pattern without requiring the broadcast network type's DR/BDR election.

ادامه

Hands-On Lab: Configuring EIGRP over DMVPN

This hands-on lab runs EIGRP as the dynamic routing protocol across the DMVPN hub-and-spoke topology built in earlier labs, verifying neighbor relationships form correctly across the multipoint tunnel and routes propagate without requiring per-spoke static configuration on the hub.

ادامه

Hands-On Lab: Configuring HSRP MD5 Authentication

This hands-on lab configures MD5 authentication on an HSRP group, verifying two routers with matching authentication strings form a normal active/standby relationship while a router with a mismatched string is excluded from the group entirely.

ادامه

Hands-On Lab: Configuring Cisco Umbrella-Style DNS Security via DNS Forwarding Redirection

This hands-on lab configures a router to redirect all client DNS queries toward a security-focused DNS resolver using DNS forwarding interception, approximating cloud-delivered DNS security enforcement without requiring per-client configuration changes.

ادامه