TechKnowSurge
Cisco CCNA 3.1 Cisco CCNA 3.2 Cisco CCNA 3.3 Cisco CCNA 3.4
VideoNetworkFree

Route Discovery

Routers learn network paths through either manual static route configuration or dynamic routing protocols, each with distinct trade-offs in scalability, security, and manageability. This content covers how routing tables are built and when to apply each approach.

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

About this video

Routers build their routing tables through two fundamental mechanisms: manual configuration and dynamic routing protocols. A directly connected route is added automatically whenever an IP address is assigned to an interface and that interface is operational. In IPv6 environments, a local host route with a /128 prefix is also installed alongside the connected route. Beyond directly connected networks, administrators can define static routes using the ip route command, specifying the destination network along with either an exit interface or a next-hop IP address. These manually defined entries remain fixed in the routing table until explicitly removed or changed. Dynamic routing protocols such as OSPF, RIP, EIGRP, and BGP provide an alternative by allowing routers to automatically discover and share routing information with neighboring devices speaking the same protocol. The routing table legend identifies each entry by its source, distinguishing connected routes, static routes, and those learned through various dynamic protocols. A default route, marked with an asterisk and identified as the Gateway of Last Resort, directs traffic destined for unknown networks and is commonly implemented as a static entry even in environments that otherwise rely on dynamic protocols. The practical choice between static and dynamic routing involves several trade-offs. Static routes are straightforward to configure and consume minimal bandwidth and processing resources, but they do not adapt to topology changes and become difficult to manage at scale. A moderately complex network with just a handful of VLANs and multiple Layer 3 devices can quickly require dozens of manually maintained static entries to achieve full connectivity in both directions. Dynamic routing protocols address this scalability challenge by automatically propagating route changes across the network, though they introduce greater initial configuration complexity, consume bandwidth and CPU resources during updates, and expose routing information that could be leveraged by an attacker to map the network. Static routes remain the appropriate choice for small or simple networks, stub networks with no onward path, default gateway configuration, and scenarios where explicit traffic path control is required. Dynamic routing protocols are better suited to larger networks, environments with redundant links, and any topology where automatic failover and adaptability are priorities.

What you'll learn

What's covered

Router Route Learning

Aligned to

Cisco CCNA
3.1 Interpret the components of routing table
3.2 Determine how a router makes a forwarding decision by default
3.3 Configure and verify IPv4 and IPv6 static routing
3.4 Configure and verify single area OSPFv2

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.
Static Route
A routing table entry manually configured by an administrator that specifies a fixed path to a destination network and never changes unless the administrator modifies it. Static routes are simple and predictable but do not adapt automatically to network topology changes.
Dynamic Routing
The ability of a network to automatically determine and adjust the path packets take based on current network conditions.
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.
Default Gateway
The router that a device uses to send traffic to destinations outside its local network.
Scalability
The ability of a system to handle increased load by adding resources without degrading performance.
Redundancy
The duplication of critical components or systems to increase reliability and availability.
Failover
The automatic switching to a redundant system or component when the primary one fails.
Border Gateway Protocol
BGP
The routing protocol used to exchange routing information between autonomous systems on the internet.

Topics

Routing Protocols Static Routing Dynamic Routing Routing Tables Network Topology Networking

Transcript

We know your router uses routes to be able to route traffic in the proper direction, but how does it learn of those routes?

Route types

There are two ways that your router can learn of other networks and install routes into the routing table. One way is that it can dynamically learn from a dynamic routing protocol. The other way is some sort of manual configuration on that router.

So for instance, if I get onto a router and I assign an IP address, then it will learn of a directly connected network, and as long as that network interface is up, then that directly connected network will be inside the routing table. If it's IPv6, the other thing that it will add is the local route. The local, or the L on here on IPv6, is the direct IP address that you set up — notice the /128 on there. So when I set up a network on this device, it will add the directly connected network whenever that interface is up, and if it's IPv6 it'll also add the local address.

The other way that I could manually set up a route on my router is to do the ip route command and specify the network that it needs to reach and what exit interface or next hop to use to get there. So that's statically set up, that's a manual configuration. Whether I'm setting up an interface or I'm setting up a static route, we can configure that and the route gets installed in the routing table.

The other way for it to learn is through a dynamic routing protocol. If we actually configure it for something like RIP or OSPF, then as long as it's connected to other routers that are speaking essentially the same language — and maybe it's OSPF — then they'll learn from each other of all of these directly connected routes that are on these routers.

Reading the routing table

Here's an example of an IPv4 routing table. On here we can see it's very similar. We don't see the L's, the local routes, that are in there, but we see a lot of directly connected networks, so anything with the C on here is a directly connected network. We also see a couple of examples of a statically assigned route, and then we see several O's on here as well. If we need to find out what that O means, we can look up here, and O is OSPF. So we look into the legend and we can find that this router has learned of these routes on here through OSPF. The legend tells us whether it's connected, whether it's static, or learned through RIP, or learned through BGP or EIGRP, so it could learn through several of these other methods for these different routes on there.

One other thing that I'll point out there is this special out right here with the asterisk next to it. That is the default gateway or the default route. We see Gateway of Last Resort right here to network quad zero, and it's got this 10.240.0.2. That statement right here exists because it is in the routing table right here, and it's in the routing table because it's a statically assigned route on this device right here. We see that that IP address matches up with that IP address, so that is the Gateway of Last Resort or the default route that's on this router.

What static routing costs you

At this point on our network we have that demo laptop, and it is not able to ping this far distant network right here. What will happen is it's got a default gateway set up on this computer, so it'll make it to the layer 3 switch. Then the layer 3 switch doesn't know how to get to this network, and so it will end right there.

But what we could do is set up a static route that says: to get to this network, you would send it to this router right here. So we would set up that statically assigned route on this layer 3 device right here. The packet would get to this router right here, then this router would say, well, I don't know how to get to that network, so then we'd have to put a static route on here that points to this router right here. And then this router would say, I don't know how to get to that network, so we'd have to add a static route there. It would get to this red right here — it's a directly connected network — and so we'll send it to the network, and it'll reach the end device.

Let's say this is a ping and the end device is then responding back. This end device right here has a default gateway set up, so it'll make its way to its default gateway and successfully get to its default gateway. From this default gateway, it is not aware of this network that this computer is on, and so what we'd have to do is assign a static route on here that points to this router over here. Then this router would get it and would say, well, I don't know how to get there, so we'd have to assign a static route that would point to this router right here. And then this router would get it and say, I don't know what to do with that, so we'd have to create another static route that would point to this layer 3 switch.

So to facilitate this level of communication we would have to have six different routes — here's two, four, six — entered on these machines. Six different static routes, just to allow this computer to communicate to this network right here.

If we were talking about this demo Pi, we could through the same static routes make it to this network right here, but once again this router would not know how to get to the network the demo Pi is on, so we would have to have another set of static addresses, 10.1.20.024 network.

So you can see that static routes are great, we can get this up and running and communicating, but it would take quite a few routes on here. We're at nine routes already and we haven't even touched — we've only done a couple of VLANs, and we've got probably about five VLANs we would need to do with this. So we would need quite a few routes to make this all function correctly.

That's where a dynamic routing protocol could really help us out, because if we set up dynamic routing protocols on all of our layer 3 devices, what will happen is they will communicate with each other and pass routing information and network information to each other. Therefore this layer 3 device will automatically learn of this network over here, and this router right here will automatically learn of the networks attached to this layer 3 switch. That's where OSPF or RIP or EIGRP can really help us grow our network and make it more scalable, because then it could just automatically learn of these different routes and of these different networks.

Static versus dynamic

Let's take a look at some of the differences between statically assigning routes and these dynamic routing protocols, which will help the routers learn of routes dynamically.

First of all, from a manageability standpoint, static routes are really easy. They're just simple lines that we can enter in there and get this communication going — until your network starts growing. As you scale up your network, this becomes increasingly difficult to manage. So from a manageability standpoint this can get difficult as it increases in size. Versus, initially a dynamic routing protocol is a little bit harder to set up. There's a little more gotchas with it and little things that you've got to be concerned about, but it's much more scalable. Once you have it set up, it scales much easier.

From a topology standpoint, if there are changes that happen, static routes are statically set, they don't change, and so you would have to go onto the equipment and actually change it if a link went down and you needed to reroute a different direction. Versus dynamic routing protocols are adaptable — when things change they automatically update. So static routes are not as scalable, versus dynamic routes can be much more scalable.

From a security standpoint, there are some issues with dynamic routing protocols. There's information that's being passed back and forth between these devices, and anytime we've got information that's being sent around, that is a way for a hacker to be able to gather information about your network and learn more about your network. So that can be a problem. Whereas with static routes there's not that same information that's being passed back and forth.

From a resource usage standpoint, these dynamic routing protocols are active, so they're taking up bandwidth, and every time changes happen it will take up memory and CPU as well. So that is possibly a downfall from the dynamic routing protocols, whereas static routes are very simplistic in how they operate.

As far as path predictability — that means that if I look at my network diagram, I know exactly how it's going to communicate and can predict where the paths are going to go across — well, you define it with static routes, and so it's pretty straightforward there. But with a dynamic routing protocol you don't have as much control over it, or you have to get in there and start configuring things so that way you can specify exactly how you want the choice of the routes to be selected.

When to use each

When it comes to static routes, we use them when we're dealing with smaller, simpler networks. We use them with default routes — there are still times, even though we have dynamic routing protocols set up, when we still will set up a default static route. We use them if we have what's called stub networks, where the network doesn't continue on, it just ends at a certain point. And we use them if we want to be explicit, if we want to control the flow of data on our networks.

For the dynamic routing protocols, we use those when it becomes larger networks, or if we have things like redundancy where we want to use multiple links, or we want failover from one link to another.

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 →