TechKnowSurge
Cisco CCNA 3.3 Cisco CCNA 3.1 Cisco CCNA 3.2
VideoNetworkFree

DEMO: Default Route

Covers how to configure default routes on a Layer 3 switch for both IPv4 and IPv6, directing all unknown traffic to an upstream router.

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

About this video

A Layer 3 switch handles routing for the VLANs directly connected to it, but without a default route, it has no way to forward traffic destined for networks it doesn't explicitly know about. This scenario demonstrates that gap: a demo laptop can reach its default gateway on the Layer 3 switch, but the switch drops packets bound for remote networks because it has no routing information for them. The solution is a default route that instructs the switch to forward all unknown traffic to an upstream router, which does have the necessary routing information to deliver those packets. Configuring the default route is done from global configuration mode using the ip route command with the quad-zero address and subnet mask — 0.0.0.0 0.0.0.0 — followed by the next-hop IP address of the upstream router interface. The same concept applies to IPv6, where the catch-all prefix ::/0 is used with the ipv6 route command pointing to the router's IPv6 interface address. Once both routes are in place, the switch successfully forwards traffic it previously could not handle. The routing table can be verified with show ip route and show ipv6 route. In the IPv4 table, the default route appears as a static entry marked with an asterisk, indicating it is the gateway of last resort. These verification steps confirm that the configuration is active and that the switch will now pass unrecognized traffic upstream rather than silently discarding it.

What you'll learn

What's covered

Default Route Configuration

Aligned to

Cisco CCNA
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

Default Gateway
The router that a device uses to send traffic to destinations outside its local network.
Router
A network device that forwards data packets between networks based on IP addresses.
Layer 3
The Network layer of the OSI model, responsible for logical addressing and routing packets between networks.
Static Default Route
A manually configured catch-all route using quad-zero notation (0.0.0.0/0 for IPv4 or ::/0 for IPv6) that forwards all unknown traffic to a specified next-hop device.
Next Hop
The IP address of the immediately adjacent router that a packet is forwarded to on the way toward its final destination. A router's routing table entry for each network destination includes the next-hop address so the router knows where to send the packet.
Quad-Zero Notation
The use of 0.0.0.0 0.0.0.0 in IPv4 or ::/0 in IPv6 to represent a default route that matches all destination addresses.

Topics

Networking Default Routes Ipv4 Ipv6 Static Routing Layer 3 Switching

Transcript

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.

What's happening now

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.

Setting the IPv4 default route

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.

Setting the IPv6 default route

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.

Checking the routing table

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.

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 →