Layer 3 switches can be configured to operate routed ports alongside standard switch ports, enabling IP-based routing at the interface level. This content covers the commands used to convert a switch port to a routed port and back again on a Cisco 3750.
Switch Port to Routed Port
We've taken a look at switch ports on a switch, and we've taken a look at routed ports on a router. Now let's look at what it looks like when we turn a switch port into a routed port. That is, a switch that has switch ports on it, and we turn one of them into a routed port. We can do this on a layer 3 device.
I'm on a layer 3 switch right here, a 3750, and what I'm going to do is configure it to be a routed port, or at least one of the ports to be a routed port. So I have to choose one. First of all I'm going to just do a show ip interface brief and see what ports I have here.
The one I'm going to actually change is going to be this FastEthernet 1/0/48. So let's take a look at what the running config looks like on that right now. I'm going to do show run interface Fa1/0/48, we'll hit enter, and we can see that there's no configurations on it right now.
Let's go ahead and jump into that interface and start configuring it. I'm going to get into global configuration mode, go into the interface Fa1/0/48, and we're now configuring the interface.
We pretty much just need two commands to turn this into a routed port. Actually just one turns it into a routed port, and the other one assigns an IP address to it. So we're going to type in no switchport, and that's what turns it into a switch port.
Let's go ahead and take a look at the running config now and see what happens with it. So do show run interface, we'll hit enter, and we see it has the no switchport on there, and it also has a no ip address, because it is expecting an IP address. So let's type in the IP address that we're going to give it. I'm just going to come up with one, so maybe 10.10.10.10, we'll just have all tens there. Well, let's do a zero, so 24. We hit enter, and now this should be set up to be a routed port. It acts as if it's a router.
There is a couple of steps. Because this is a layer 3 switch, it can do routing and utilize this port for routing, but I don't have routing turned on right now. Really, I'm just showing you this to show you one of the differences between these routed ports and a switch port. So I'd have to type in ip routing in the global configuration mode to turn on routing on this.
What I'm going to do is end out of here, and let's take a look at a few of the settings here. I'm going to do a show run interface and we'll take a look at what it looks like.
Then I'm going to do a show ip interface brief and see what it looks like. There's our IP address that we have assigned to it.
Now I can do a show interface status, and we can see what the status of these different connections are. We're looking for 48, which is routed, so we can see that that's routed from there.
Finally, what we're going to do is a show interface Fa1/0/48 switchport, and we can see that switchport is disabled on it.
Now what I want to do is reverse this. What I can do to reverse this is go back into global configuration mode. I'm going to apply the switchport back onto it. Maybe I'll take off the IP address first, so no ip address, and then I'll do a switchport, which turns it back into a switch port.
So I can end out of this, go back and do my show interface Fa1/0/48 switchport command, and I can see that switchport is enabled and has a bunch of stats on the switch port, and some VLAN information on it.
So this is one way to turn a switch port into a routed port, and then we turned it back into a switch port. We will be using that command later on. We're not going to use this one right away, but we're going to be using it when we turn a layer 3 switch into actually operating at a layer 3, and we'll get into that when we get into VLANs.
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 →