TechKnowSurge
Cisco CCNA 2.1 Cisco CCNA 3.3 Cisco CCNA 1.13 Cisco CCNA 2.2
VideoNetworkFree

DEMO: L3 Switch to Router via SVI

A Switched Virtual Interface (SVI) on a Layer 3 switch provides an alternative method for connecting that switch to a router, using a dedicated VLAN and an access port rather than a routed physical port. This approach assigns an IP address to the VLAN interface itself, allowing Layer 3 communication between the two devices.

Complete this video to capture a CTF flag worth 1 point.

About this video

A Layer 3 switch can be connected to a router through two primary methods: a routed port on the switch itself, or a Switched Virtual Interface (SVI). The SVI approach uses a VLAN as the logical Layer 3 boundary, assigning an IP address to the VLAN interface rather than to a physical port. This method is widely used in enterprise environments where VLAN-based segmentation is already in place and a single physical link must carry traffic for a specific subnet between the switch and an upstream router. The configuration involves three steps on the Layer 3 switch: creating a dedicated VLAN, assigning an IP address to the SVI for that VLAN, and setting the physical port connected to the router as an access port in that VLAN. The router requires only a standard IP address on its connecting interface, making its configuration identical regardless of which method is used on the switch side. Once both devices are configured, ping tests between their respective interface addresses confirm Layer 3 reachability across the link. An important limitation to recognize is that reachability between directly connected interfaces does not guarantee full end-to-end routing. End hosts can reach their default gateway on the switch, and the switch can forward traffic to the router, but the router will only respond to networks it has explicit routes for. Without static routes or a dynamic routing protocol in place, the router has no path back to the internal VLANs. Addressing that routing gap is a separate topic, but understanding it is critical when designing or troubleshooting networks that use SVIs for upstream connectivity.

What you'll learn

What's covered

Layer 3 Switch SVI to Router

Aligned to

Cisco CCNA
2.1 Configure and verify VLANs (normal range) spanning multiple switches
3.3 Configure and verify IPv4 and IPv6 static routing
1.13 Describe switching concepts
2.2 Configure and verify interswitch connectivity

Key terms

Switch Virtual Interface
SVI
A virtual layer 3 interface on a switch associated with a VLAN. On a layer 2 switch a single SVI provides the management IP address; on a layer 3 switch, SVIs also route between VLANs.
Virtual LAN
VLAN
A logical grouping of network devices that behave as if they are on the same network regardless of physical location.
Layer 3
The Network layer of the OSI model, responsible for logical addressing and routing packets between networks.
Router
A network device that forwards data packets between networks based on IP addresses.
Routed Port
A switch port on a multilayer switch that has been configured to operate like a router interface at Layer 3 rather than as a switching port, allowing it to be assigned an IP address and participate in routing protocols. Routed ports are used where a Layer 3 boundary is needed directly on the switch without a separate router.
Default Gateway
The router that a device uses to send traffic to destinations outside its local network.

Topics

Networking Layer 3 Switching Switch Virtual Interface Vlan Configuration Inter Vlan Routing Router Connectivity

Transcript

Let's continue this discussion and figure out the other way of connecting our layer 3 switch to our router. Previously we did a routed port on the layer 3 switch; now instead let's create an SVI and connect it to the switch and see what that looks like.

For this we're going to set up our router the same way — it's going to be just a standard routed port on the router, and we're not going to do anything special with that. Then for the layer 3 switch what we're going to do is set up another switch virtual interface on another VLAN, and then we are going to create a connection into that VLAN via one of the ports for the router.

The Router Side

Really the configuration of the router is exactly the same in both these scenarios, so I'm not going to cover it again, although I will show you just the configuration really quickly, because it doesn't take that long. I'm going to do a show run interface fa, and that is on our 0/1 port, and take a look at that. We can see that I have the IP address, and this is just a standard connection on a router, so that's good to go.

Creating the VLAN and the SVI

Next, how do we configure this switch part of this? I'm going to jump over to the switch now and we're going to configure the switch. Now, this switch is going to be an SVI, so we need a VLAN that we're going to have this switch virtual interface on. The first step here is to create a VLAN for that.

I'm going to get into the global configuration mode and I'm going to create — we'll call this VLAN 9 — get into VLAN 9. I'm going to name it, and we'll just call it router, we'll keep it simple for now. So I've named it router, and I'm going to exit out of this.

Next I need to get into the switch virtual interface, so I'm going to jump into that: interface VLAN 9, that's the switch virtual interface. We're going to give it an IP address, and the IP address is going to be 240.0.1, and it's a slash 30, so let's do a 255.255.255.252. We'll enter that into there. So now that VLAN has an IP address associated with it.

Connecting the Port to the Router

Next I'm going to get into the interface that's connected to the router, so I'm going to do interface fa1/0/47 — that's the interface to that router — switchport. I'm going to turn this into an access port. It's not a trunk line; we're not setting up a trunk line between these two devices. So switchport mode access — I'll do switchport mode access and turn it into an access port — switchport access VLAN, and it's going to be that VLAN 9, and now it's assigned to it.

Testing Connectivity

Now we have connectivity through the SVI to the router, so we should be able to ping between those two devices. Let's jump in and see if we can ping. I'm going to end through here, and 10.240.0.2, and I'll try to ping that and we'll see if there's connectivity — and we have success, so we can ping between these devices.

Now, if I were to bring up a command prompt, I would still be able to ping 10.240.0.1, because these devices are all connected together. But one thing I would not be able to ping is the router from this device. The reason is because this device knows how to get to its default gateway, which is on the switch, and the switch knows how to get to the router, but the router doesn't know how to get to anywhere but that local area connected connection.

In a later module we'll actually talk more about routing and how routing works, but for now just realize that to connect these devices we will have to establish some sort of connection between these two devices. We've made it happen — I can show you that it's pinged, so we are good to go, we're connected.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →