Covers how to configure default routes on a Layer 3 switch for both IPv4 and IPv6, directing all unknown traffic to an upstream router.
Default Route Configuration
We've set up a static route, so router 1 knows how to get to the demo laptop. Now let's set up a default route.
Similar to last time, I'm already pinging a couple of IP addresses. I'm pinging 10.240.2.2 and the IPv6 address for that same interface, so you can see that it's coming back where it's not reaching that. What interface is that? That interface is this router 1 right here, on the other side of this router.
What's happening is this demo laptop is not able to reach that. Router 1 is able to reach back — I left the static routes on from our last video — so this router is able to come back to the demo laptop. We know that it knows how to get back to the demo laptop, and the demo laptop knows of its default gateway.
So what is happening is it's sending this ICMP packet to this layer 3 switch, since that's the default gateway. The layer 3 switch then doesn't know what to do with it. It's not aware of this 10.240.2 network; it can't see any of these other networks.
What we can do for this layer 3 switch is set up a default gateway, or default route. We're going to set up a default route that says, if you don't know what to do with it, go ahead and send it to router 1, and router 1 will know what to do with it. That's what we're going to do: set up a default route that points to router 1, because let's face it, almost all the traffic that goes through here, with the exception of the VLANs that are set up on this layer 3 switch, is going to go through router 1.
Let's go ahead and set that up on the switch. What I'm going to do is get into the global configuration mode, and I'm going to type in ip route. What we do for this one is it's called quad zero. This is the summary of the internet — it's everything, it's the catch-all. So we do 0.0.0.04, the address, the IP address; we also do it for the subnet mask, and that matches everything. Then we're going to specify the next hop, that it's 10.240.0.2, so that is the router 1 interface. I'm going to hit enter on here, and give it a second, and we are now communicating to that interface. It knows how to — well, it really doesn't know how to get to that specific network, but it's just sending it to the next hop of router 1.
Next I'm going to do the same thing for IPv6, so I've got to type in ipv6 route, and then we're going to do ::/0, so that's the catch-all for IPv6. The address we want to go to is fc0:a:1::2. We'll hit that in there, and now we're communicating.
So now that is a default route. It's sending any traffic that comes by it, that it doesn't know what to do with, out to our router 1 here.
One last thing we can do is just do a show ip route, just to see what it looks like. It's got an S with a star on it, so the star is the default route there. That's what it looks like in the routing table.
Let's go ahead and do an IP version 6 route so we can see what that looks like — how about a show IP version 6. And there's the static route for that one right there.
That's how to set up a static default route on your devices.
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 →