TechKnowSurge
Cisco CCNA 1.6 Cisco CCNA 3.3 Cisco CCNA 3.1 Cisco CCNA 3.2
VideoNetworkFree

DEMO: L3 Switch to Router via Routed Port

Routed ports on a Layer 3 switch allow the switch to connect directly to a router by converting a switchport into a routable interface with its own IP address. This content covers the configuration steps needed to establish that link and verify connectivity between the two devices.

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

About this video

A Layer 3 switch needs a path to the broader network, and in most environments that path runs through a router. Rather than using a trunk or VLAN interface for this uplink, one straightforward approach is to configure a routed port directly on the switch — turning a physical switchport into a Layer 3 interface capable of holding an IP address and participating in routing decisions. The configuration process begins on the router, where an existing interface is updated with a new IP address that falls within a dedicated point-to-point subnet, in this case a slash 30 network that provides exactly two usable addresses. On the switch side, the interface connected to the router is stripped of its Layer 2 configuration — including any trunk or access VLAN settings — using the no switchport command. An IP address from the same subnet is then applied to that interface, completing the link. A successful ping from the switch to the router confirms the routed port is functioning correctly. However, full end-to-end connectivity from hosts behind the switch to destinations beyond the router does not work at this stage, and that behavior is expected. The router only knows about its directly connected networks and has no visibility into the VLANs or subnets sitting behind the Layer 3 switch. Solving that requires either static routes or a dynamic routing protocol — a topic addressed separately. What this configuration establishes is the foundational routed link between the two devices, which is a prerequisite for any of those routing solutions to work.

What you'll learn

What's covered

Layer 3 Switch Routed Port

Aligned to

Cisco CCNA
1.6 Configure and verify IPv4 addressing and subnetting
3.3 Configure and verify IPv4 and IPv6 static routing
3.1 Interpret the components of routing table
3.2 Determine how a router makes a forwarding decision by default

Key terms

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.
Virtual LAN
VLAN
A logical grouping of network devices that behave as if they are on the same network regardless of physical location.
Default Gateway
The router that a device uses to send traffic to destinations outside its local network.
IP Address
A numerical label assigned to each device connected to a network that uses the Internet Protocol.

Topics

Networking Layer 3 Switching Routed Ports Cisco Ios Inter Vlan Routing Static Routing Switch Configuration

Transcript

Connecting a Layer 3 Switch to the Rest of the World

If we're going to have a layer 3 switch, we still want that layer 3 switch to be connected to the rest of the world, and it's probably going to go through some sort of gateway to do that. In our network that we have set up, it's a router. But how do we connect a layer 3 switch to the rest of the world through a router? There are actually a couple of different ways to do that, and here we're going to set up a routed port on a switch.

The configuration that I have is I'm on this demo laptop right here, and I want to configure this layer 3 switch to connect into the router, and we're going to do this through a routed port on this switch right here. So the first thing I'm going to do is configure the router, and then we're going to get into the routed port on this switch.

Configuring the Router

I'm going to move this diagram off to the side there, and I've got all of my devices that are up on here, although for this particular one we're just going to be working with switch 1 and router 1. I'm consoled into the router with a cable right now, and I'm doing that because I don't have any kind of connectivity to it right now other than just the physical cable connected into it.

So what I'm going to do is first of all configure this router 1. I'm just going to do a show run, and we'll take a look to see what the configuration is on it currently. I see here's the fast ethernet, it's set up with an old IP address from one of the old demos. We want to change that, so I'm going to show run interface fa 0 1, that way we've got it up right here. Then I'm going to get into the global configuration mode, and interface fa 0 1.

Then I want to change this IP address, so I'll just highlight that and copy it, and we want this to be in our new VLAN. The IP address for our new VLAN, which I happen to have recorded right over here, R1 right here, so 10.24.0.2 is the IP address that we want. So, 10.240.0.2, and it's a slash 30, so I'm going to put that 252 at the end here. Really we only need two IP addresses for this one, one for the router and one for the switch. So I'm going to enter in that IP address right there and it's going to change, and there, that's the end of our router configuration. That's all we really need to do on that side of it.

Configuring the Routed Port on the Switch

So now let's jump over to the switch and configure the switch. I'm jumping on this switch here, and I'm going to do a show run interface, and we're looking at fa 1047, which is the one that that router is plugged into. So it's set up as a trunk line, so the first thing that we need to do is remove some of that configuration.

I'm going to get into the global configuration mode and get into interface fa 1047. I'm going to do a no on the switchport VLAN 2, and I'm going to also do a no on the switchport trunk. When I highlight the whole line, it highlights the carriage return, and so it automatically enters it in when I do that.

Then the other command I'm going to enter on here, which is our new command, is no switchport. What that does is it turns off the switching capability, and now we can assign an IP address to it. So I'm going to assign the IP address, and it is 10.240.0.1, and that'll be 255.255.255.252. Enter that in.

All right, so now that's entered in to this, and so now we have connectivity between two routed ports, and we should be able to ping between those.

Testing Connectivity

So I think the next thing we'll do is we will try pinging them and see how successful we are. What I'll do is I'm just going to end out of here, and I'm going to ping 10.240.0.2 and see if we've got connectivity. And there you have it, we got connectivity to that, and so I am now able to ping that.

The other thing that I want to do is I'm going to test that out, so I'm going to bring up a command prompt, and 10.240.0.1, which is the switch side of this, and I have access to that, so that's great. Then I'm going to ping the other side of that, 10.240.0.2, and see if I have access to that - and it doesn't look like I have access. This is actually to be expected, and let's analyze why it's to be expected.

Why the Return Path Fails

Everything is functioning correctly, except for the router doesn't know how to get back to this network. We're not going to cover that in this module, we're going to cover that in a future module.

But what's happening is this demo laptop 10.240.0.2 and realizes it's somewhere outside of its own network, so it needs to reach its default gateway. So it sends the frame to the default gateway, which is this layer 3 switch. The layer 3 switch knows where to go - it's a directly connected network - and so it sends it to the router, and then it reaches the router. But the problem is the router is not aware of all of the networks down here. So we need to establish like a static route, or we need to establish some sort of routing protocol; we need something for it to communicate back. So that's not going to happen yet.

In fact, what we can do is jump onto the switch and just do a show ip route, and we can see that it sees all of the networks that we're concerned about right here. Show ip route on the router, and we can see that it really only knows of the directly connected networks to it. It's not aware of the 10.1.10 network or any of the other VLANs; it's just not aware of those.

So for now, just know that this is one of the ways where we set up a routed port on our layer 3 switch, and then we set up the router just as a standard routing port, and then we have communication.

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 →