TechKnowSurge
Cisco CCNA 3.1 Cisco CCNA 3.2
VideoNetworkFree

Routes

Routers use routing tables to forward packets toward their destination by matching the destination IP address against a list of known routes. This content covers how routes work, what information they contain, and the key types found in both IPv4 and IPv6 routing tables.

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

About this video

Routers forward traffic by inspecting the destination IP address of each incoming packet and comparing it against entries in their routing table. A route is a mapping that tells the router which direction to send traffic in order to reach a particular network, and each router in a path maintains its own independent routing table with routes that reflect its unique position in the topology. Because routing decisions are made hop by hop, a router may know how to reach a destination network without having a return path established, meaning reachability in one direction does not guarantee bidirectional communication. Each entry in a routing table carries several pieces of information: the destination network address, the next-hop IP address or exit interface, an administrative distance value that ranks the trustworthiness of the routing source, a metric representing the cost to reach the network, and a timestamp showing how long the route has been known. Routes fall into three broad categories: directly connected networks, which are attached to an interface on the device itself; remote networks, which must be reached through one or more other devices; and default routes, which act as a catch-all for traffic with no more specific match and function similarly to the default gateway configured on an end-user device. In IPv4 routing tables, routes are organized using a parent-child hierarchy where a classful network address serves as the parent and its subnets appear as indented child routes beneath it. IPv6 routing tables do not use this structure because IPv6 was designed without classful addressing, so all entries appear at the same level while still containing the same core fields: destination network, next hop, administrative distance, and metric. A host route, denoted by a /32 prefix in IPv4 or /128 in IPv6, identifies a route to a single specific device rather than a range of addresses, and these appear in routing tables when traffic must be directed to one precise endpoint.

What you'll learn

What's covered

Routes & Routing Tables

Aligned to

Cisco CCNA
3.1 Interpret the components of routing table
3.2 Determine how a router makes a forwarding decision by default

Key terms

Router
A network device that forwards data packets between networks based on IP addresses.
Routing Protocol
A protocol used by routers to communicate and share routing information to determine the best path for data.
Default Gateway
The router that a device uses to send traffic to destinations outside its local network.
Routing Table
A database stored in a router that lists known network destinations, the metric (cost) to reach them, and the next-hop address or outgoing interface to forward packets toward those destinations. Routers consult this table for every packet they forward.
Active Directory
AD
Microsoft's directory service used to manage users, computers, and resources in a network.
Metric
A value used by a router to determine the preferred path to a destination when multiple routes exist; lower values typically indicate a more preferred route.
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.
Host Route
A route that specifies a single specific host, identified by a /32 prefix in IPv4 or /128 in IPv6, rather than an entire network.
Default Route
A catch-all routing entry represented as 0.0.0.0/0 (IPv4) or ::/0 (IPv6) that a router uses to forward packets when no more specific matching route exists in the routing table. It is typically configured to point toward the next-hop router or ISP connection.

Topics

Routing Tables Ipv4 Ipv6 Static Routing Network Routing Networking

Transcript

When a packet comes into your router, your router takes a look at that packet and looks at the destination IP address inside that packet. Then it makes a determination of where it needs to send that out. It makes that determination based off of what it finds in the routing table. And what does it find in its routing table? A bunch of routes.

What a route is

A route is a direction or mapping to a network. So let's give a little example here. In this network diagram I have three routers, we'll call this router 1, router 2 and router 3. We also have a layer 3 switch, so this layer 3 switch acts as a router as well. And off of this layer 3 switch we have several VLANs, one of which is this VLAN 10, VLAN 10.1.10.0/24. So that is its network address.

Let's say that all these layer 3 devices, so these three routers and the switch, know of this network. On this layer 3 switch right here, that's a directly connected network, and so within the routing table it would show a route to that directly connected network. However, for router 1 this network right here is not directly attached, and so it has a route, but the route points to this switch. Same thing with router 2: router 2 understands this network of 10.1.10.0 and knows how to get to it, but it knows that it gets to it through router 1. And then router 3 understands it gets to that network through router 2.

So these routes are specific to the router. They're different. It's the same network, pointing to the same network, but they point to different devices depending on where they fall within this network. So that is a route: it's a pointer, a mapping towards a network.

So here's a couple examples of that. This is off of that layer 3 switch. We can see that because it's a directly connected network it has information about that network and the fact that this is directly connected on this router. We can also see that it has a mapping for 10.2.0.0/24, so that network shows up on this router as well, and it has a route 10.240.0.2. That's the next hop. So if information comes destined for this network right here, it will then send it to this router right here, which is the next hop.

The routing table

These routes are stored on a routing table. Routing tables can be found on each of your layer 3 devices. And what will happen is a packet will come into that router or layer 3 device, that router will then reference the destination IP address with the list of routes that it has, determine what the best route is, and then send it on its way.

A couple pieces of information that you should consider when this is happening. Not all routers necessarily have all up-to-date information, which could be problematic in some cases, because each one of these routers makes a determination of where it's going to send this packet on to next. And the other thing to keep in mind, and we've experienced that while going through this course, is that just because it knows how to get to a destination network, it doesn't necessarily know how to get back to where that packet came from for a reply. So just because there's communication across this network one way doesn't necessarily mean that there's communication across it the other way.

Route information

So what would you see as part of a route? Well, the first thing that we see is that it has the network address, so that's the network address that it's going to associate with. Another thing that we see in here is what is the next hop, and in many of these cases it's by IP address, so we see that in here. We also see some directly connected networks in here. So if it's a directly connected network, you can see that it will specify that not only does it have the next hop IP address, it also has the exit interface. So for these right here it's VLAN 9.

We also see some other information in here. We see this 110 right here. That's what's called an administrative distance. You can see that we have the administrative distance of 1 for this statically assigned route, and then for this OSPF routes we have an administrative distance of 110, and we'll get more into that a little later. We also see the cost to each one of these networks, so this is the cost that it takes to get to each one of those networks. And then the other thing that we have is the time stamp, and this is how much time there's been since this route was learned, so this is representative of how long this device has known about this route right here. So there's some information that you would see for each one of these routes within the routing table.

Types of networks

There are three different types of networks that you'll see. One of them is a directly connected network. Directly connected networks are all of those networks that are directly connected. So for this switch one, we have one directly connected network between the router and the switch, and then all of the VLANs that are part of this switch are also directly connected. Or for this router right here, these two on each side of it would be a directly connected network.

Next you have a remote network. A remote network is something that is not directly connected. So for this switch right here, this would be a remote network, this would be a remote network, and this would be a remote network. So in this example right here it would have three remote networks to it.

And then finally you may have a route that points to the internet, or just in this case right here where we call this a stub route, it's the end of the line essentially. Then this switch points out to this router, and maybe we have just the default route that says if you need to communicate, send it this way. And so that's a default route. It's a catch-all. It's just like a default gateway that you would set on your computer.

Child and parent routes

You may hear some terminology out there such as child and parent routes. So there's a level 1 route, a level 1 parent route, and a level 2 route. First of all, level 1: if it's a level 1, that is anything that is justified all the way over to the left, any route that comes all the way to the left hand side. So that would be three routes in this example right here. This route, this route and this route all are level ones. So these two are level ones, and then this one right here is a level 1, but it's also a parent route, because it has these child routes to it. And so this would be a level 2 child route.

And this is something we would just see with an IP version 4, and really what it does is it designates anything that's subnetted within here. So any subnetted routes, that's where you're going to see a child and parent route. However, when we get to IPv6, they never had classful routing, and so you don't see that same structure with IPv6.

The IPv6 route

This is an example of a show IPv6 route command showing the routing table for IPv6, and we can see that it's all at the same level. Right here you see a static route in here for our quad zero, so that's the default route that we have. We still have administrative distance on each one of these, we still have a metric on each one of these, we have the destination network and how to get to that network. So we see all the same components on an IPv6 routing table. It just looks a little differently. It doesn't have child and parent routes.

Host routes

And then one last call out for a host route. A host route goes to just one specific host. It's anything where you see the network mask is all ones or the prefix is 128. So here's a couple examples of that, where we see 10.1.10.35 4 32, we're specifying a specific host there, and same thing for that IPv6: the prefix size being 128 means that we're doing an exact match. So that is when you would see in a routing table something going directly to a specific host, and not necessarily a range of hosts or a whole network.

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 →