Achievable logoAchievable logo
CCNA
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Exam catalog
Mountain with a flag at the peak
Textbook
Introduction
1. Introduction to networking
2. Administering Ethernet LANs
3. IP connectivity
3.1 Understanding IP addresses
3.2 Calculating networks and hosts
3.3 Routers and IPv4 routing fundamentals
3.4 Static routing
3.5 Static vs. dynamic routing and OSPF fundamentals
3.6 Router redundancy in an Ethernet LAN using First Hop Redundancy Protocols (FHRPs)
3.7 Configuring Cisco Routers
4. Network services
5. IPv6
6. Wireless networking
7. Network management and administering network devices
8. Network security fundamentals
9. Network automation and programmability
Wrapping up
Achievable logoAchievable logo
3.4 Static routing
Achievable CCNA
3. IP connectivity
Our CCNA course is currently in development and is a work-in-progress.

Static routing

8 min read
Font
Discuss
Share
Feedback

In the previous chapter, you learned that a router automatically creates routes to networks it’s directly connected to as soon as you assign an IP address from that network to a router interface. As long as the interface is up, the route to that directly connected network appears in the routing table.

That leads to the next question: how do routers learn about remote networks (networks they aren’t directly connected to)? There are two ways to do this. Here, we’ll focus on the simplest approach: manually configuring routes to remote networks. When you manually configure routes like this, they’re called static routes.

Static routes

For a router to forward an IP packet to a destination host, it must have a route in its routing table that points either:

  • to that specific host, or
  • to the network where that host lives.

Static routes let routers reach remote networks by explicitly listing the remote destination network and the next hop IP address - the IP address of the router that should receive the packet next on the way to that destination.

That next hop is typically a neighboring router (a router you’re directly connected to). The neighboring router doesn’t have to be directly connected to the final destination network, but it does need a route that continues the path toward that destination.

Let’s say a host (PC A) in the 192.168.1.0/24 network (directly connected to R1) needs to communicate with another host (PC D) in a remote network 192.168.4.0/24 (directly connected to R3). If there’s a router in between R1 and R3 (R2), then R1 needs a route toward 192.168.4.0/24 via R2 - and R2 also needs a route toward 192.168.4.0/24.

(Image 150)

Image Title - Static routes to destination network 192.168.4.0/24 via R2 and R3

Bi-directional connectivity

It’s not enough to configure a static route only in the direction your local hosts need to send traffic. The routers on the destination side also need a route back to the source network so return traffic can make it home. This is what we mean by bi-directional connectivity.

Using the same example, if PC D needs to send packets back to PC A, then R3 must have static routes that tell it how to reach the 192.168.1.0/24 network. And because R2 sits in the middle and isn’t directly connected to 192.168.1.0/24, R2 also needs a route to 192.168.1.0/24.

(Image 151)

Image Title - Static routes to for the return traffic back to network 192.168.1.0/24 via R2 and R1

This must be manually done for all host-to-host communication where you are expecting bi-directional traffic flows so that the destination hosts have a route back to the sender. It is very important when administering a network to remember this.

How to read static routes in a routing table

For the CCNA and for real-world administration, you’ll want to be able to read a static route entry in a routing table. We’ll cover configuration in another chapter. For now, here’s a snippet of a static route in a routing table:

(Image 152)

Image Title - A Static Route to the 192.168.4.0/24 network

Let’s break down what it means:

  • S - This is the code for Static Routes within the routing table.
  • 192.168.4.0/24 - This is the remote destination network that the Static Route is targeting
  • [1/0] - The placeholder where the “1” is within the square brackets is the “Administrative Distance”. The Administrative Distance is the trustworthiness of a routing source. It is also the second tie-breaking decision in routing. The lower the Administrative Distance, the better. The default Administrative Distance value for Static Routes is 1. This value can also be modified to a higher value. You cannot configure an Administrative Distance (AD) value lower than 1, since a value of 0 is reserved for Directly Connected routes. Other routing sources, such as routing protocols have their own default AD values, which can also be modified. The placeholder where the “0” is within the square brackets is for the “Metric” of a routing source. The Metric is a value used within routing protocols to determine how far away a destination network is, in relation to the local Router. This is the third and final tie-breaking decision in routing. Static Routes do not have a metric therefore, this value will always be 0 for Static Routes. In the next chapter, we will discuss a routing protocol that does utilize the metric value. The placeholders for the brackets are generally represented as so: [Administrative Distance/Metric]
  • Via 10.1.1.2 - This represents the “Next Hop” IP Address that the local Router would send the packets to in order to reach the specified destination network. If you recall from the previous example with the route on R1 pointing to the 192.168.4.0/24 network, this would be the IP Address on R2’s GigabitEthernet0/0 router interface, since R2 is the directly connected next hop along the path to the destination network.

The default route

A special route called the default route allows a router to forward packets even when it doesn’t have a more specific route to the destination network.

As you learned in Chapter 3.3 Routers and IPv4 routing fundamentals, if a router can’t find a matching entry for a destination network in its routing table, it will drop the packet. A default route changes that behavior by defining a gateway of last resort - a next hop router to send packets to when no more specific routes exist.

The default route uses 0.0.0.0/0 as the destination network. This matches any and every IP network. So if a router doesn’t have a specific entry for a destination network, the default route can still be used.

One key point: the next hop router (and any routers beyond it) must still have routes to the destination network. If they don’t, they’ll drop the packet further down the path.

The default route is commonly used for Internet connectivity. You typically point an Internet-facing router to an ISP router’s IP address as the next hop for the default route. The reason is scale: there are about 1,000,000 routes on the Internet at the time of this writing (public IP networks). Storing that many routes would crash the average router. A default route keeps the routing table smaller and memory usage manageable, while still sending Internet-bound traffic in the correct direction.

Default Routes can be configured either manually, by configuring it as a Static Route, or they can be generated or advertised using a dynamic routing protocol.

Floating static routes

Often, you’ll want backup links between routers in case a primary link fails. Consider an Internet-facing router in your organization that connects to two different ISPs:

(Image 153)

Image Title - R1 connected to ISP 1 and ISP 2

R1 has two static routes to reach Server X:

  • A route via ISP 1 at 203.0.113.2 (the primary link)
  • A route via ISP 2 at 203.0.113.6 (the secondary (backup) link)

The primary link is 1Gbps, so it’s preferred. The backup link is 100 Mbps, which is slower and has less bandwidth. Backup links are often cheaper and lower-bandwidth, but they provide redundancy. Because the backup link is slower, you typically don’t want traffic using both links at the same time.

To make the 1Gbps link (ISP 1) the preferred route, you increase the administrative distance on the backup route (ISP 2). As discussed earlier, the lower the AD, the better. Since you can’t lower AD below 1, you make the backup route less preferred by raising its AD.

That backup route is called a floating static route. It stays in the running configuration, but it isn’t installed in the routing table unless the primary route is no longer available. When the primary route goes down, the floating static route is installed automatically. When the primary route comes back, the floating static route is removed from the routing table again until it’s needed.

Let’s see what this would look like once configured:

(Image 154)

Image Title - Floating Static Route with ISP 1 as the primary and ISP 2 as the backup with a higher Administrative Distance.

Host routes

One more route type to know is the host route. A host route is a route to one specific IP address only. You use this when you only need to reach a single device - like a specific server - rather than an entire network.

(Image 155)

Image Title - Host route to Server X

Host routes are written as a single IP address (for example, 10.2.2.45) with a subnet mask of all 1s: 255.255.255.255. In CIDR notation, that’s 10.2.2.45/32, because all 32 bits are turned on.

Here is what a static host route would look like in a route table:

  • S 10.2.2.45/32 [1/0] via 172.16.1.2

Static routes

  • Manually configured routes to remote networks
  • Specify destination network and next hop IP address
  • Enable communication to networks not directly connected

Bi-directional connectivity

  • Static routes required in both directions for two-way traffic
  • Destination routers need return routes to source networks
  • Must configure all routers along the path for full connectivity

Reading static routes in routing table

  • Marked with code “S” for Static
  • Format: Destination network, [Administrative Distance/Metric], next hop IP
    • Administrative Distance (AD): trustworthiness, default = 1 for static routes
    • Metric: always 0 for static routes
  • Next hop IP: router interface to forward packets to

The default route

  • Special static route: 0.0.0.0/0 as destination
  • Used as gateway of last resort when no specific route exists
  • Commonly points to ISP for Internet access
    • Keeps routing tables manageable in size

Floating static routes

  • Backup static routes with higher administrative distance
  • Only used if primary route fails
  • Provide redundancy without load balancing

Host routes

  • Route to a single IP address (host)
  • Uses /32 mask (255.255.255.255)
  • Example: S 10.2.2.45/32 [1/0] via next hop IP

Sign up for free to take 10 quiz questions on this topic

Previous
Next  | 3.5 Static vs. dynamic routing and OSPF fundamentals
All rights reserved ©2016 - 2026 Achievable, Inc.

Static routing

In the previous chapter, you learned that a router automatically creates routes to networks it’s directly connected to as soon as you assign an IP address from that network to a router interface. As long as the interface is up, the route to that directly connected network appears in the routing table.

That leads to the next question: how do routers learn about remote networks (networks they aren’t directly connected to)? There are two ways to do this. Here, we’ll focus on the simplest approach: manually configuring routes to remote networks. When you manually configure routes like this, they’re called static routes.

Static routes

For a router to forward an IP packet to a destination host, it must have a route in its routing table that points either:

  • to that specific host, or
  • to the network where that host lives.

Static routes let routers reach remote networks by explicitly listing the remote destination network and the next hop IP address - the IP address of the router that should receive the packet next on the way to that destination.

That next hop is typically a neighboring router (a router you’re directly connected to). The neighboring router doesn’t have to be directly connected to the final destination network, but it does need a route that continues the path toward that destination.

Let’s say a host (PC A) in the 192.168.1.0/24 network (directly connected to R1) needs to communicate with another host (PC D) in a remote network 192.168.4.0/24 (directly connected to R3). If there’s a router in between R1 and R3 (R2), then R1 needs a route toward 192.168.4.0/24 via R2 - and R2 also needs a route toward 192.168.4.0/24.

(Image 150)

Image Title - Static routes to destination network 192.168.4.0/24 via R2 and R3

Bi-directional connectivity

It’s not enough to configure a static route only in the direction your local hosts need to send traffic. The routers on the destination side also need a route back to the source network so return traffic can make it home. This is what we mean by bi-directional connectivity.

Using the same example, if PC D needs to send packets back to PC A, then R3 must have static routes that tell it how to reach the 192.168.1.0/24 network. And because R2 sits in the middle and isn’t directly connected to 192.168.1.0/24, R2 also needs a route to 192.168.1.0/24.

(Image 151)

Image Title - Static routes to for the return traffic back to network 192.168.1.0/24 via R2 and R1

This must be manually done for all host-to-host communication where you are expecting bi-directional traffic flows so that the destination hosts have a route back to the sender. It is very important when administering a network to remember this.

How to read static routes in a routing table

For the CCNA and for real-world administration, you’ll want to be able to read a static route entry in a routing table. We’ll cover configuration in another chapter. For now, here’s a snippet of a static route in a routing table:

(Image 152)

Image Title - A Static Route to the 192.168.4.0/24 network

Let’s break down what it means:

  • S - This is the code for Static Routes within the routing table.
  • 192.168.4.0/24 - This is the remote destination network that the Static Route is targeting
  • [1/0] - The placeholder where the “1” is within the square brackets is the “Administrative Distance”. The Administrative Distance is the trustworthiness of a routing source. It is also the second tie-breaking decision in routing. The lower the Administrative Distance, the better. The default Administrative Distance value for Static Routes is 1. This value can also be modified to a higher value. You cannot configure an Administrative Distance (AD) value lower than 1, since a value of 0 is reserved for Directly Connected routes. Other routing sources, such as routing protocols have their own default AD values, which can also be modified. The placeholder where the “0” is within the square brackets is for the “Metric” of a routing source. The Metric is a value used within routing protocols to determine how far away a destination network is, in relation to the local Router. This is the third and final tie-breaking decision in routing. Static Routes do not have a metric therefore, this value will always be 0 for Static Routes. In the next chapter, we will discuss a routing protocol that does utilize the metric value. The placeholders for the brackets are generally represented as so: [Administrative Distance/Metric]
  • Via 10.1.1.2 - This represents the “Next Hop” IP Address that the local Router would send the packets to in order to reach the specified destination network. If you recall from the previous example with the route on R1 pointing to the 192.168.4.0/24 network, this would be the IP Address on R2’s GigabitEthernet0/0 router interface, since R2 is the directly connected next hop along the path to the destination network.

The default route

A special route called the default route allows a router to forward packets even when it doesn’t have a more specific route to the destination network.

As you learned in Chapter 3.3 Routers and IPv4 routing fundamentals, if a router can’t find a matching entry for a destination network in its routing table, it will drop the packet. A default route changes that behavior by defining a gateway of last resort - a next hop router to send packets to when no more specific routes exist.

The default route uses 0.0.0.0/0 as the destination network. This matches any and every IP network. So if a router doesn’t have a specific entry for a destination network, the default route can still be used.

One key point: the next hop router (and any routers beyond it) must still have routes to the destination network. If they don’t, they’ll drop the packet further down the path.

The default route is commonly used for Internet connectivity. You typically point an Internet-facing router to an ISP router’s IP address as the next hop for the default route. The reason is scale: there are about 1,000,000 routes on the Internet at the time of this writing (public IP networks). Storing that many routes would crash the average router. A default route keeps the routing table smaller and memory usage manageable, while still sending Internet-bound traffic in the correct direction.

Default Routes can be configured either manually, by configuring it as a Static Route, or they can be generated or advertised using a dynamic routing protocol.

Floating static routes

Often, you’ll want backup links between routers in case a primary link fails. Consider an Internet-facing router in your organization that connects to two different ISPs:

(Image 153)

Image Title - R1 connected to ISP 1 and ISP 2

R1 has two static routes to reach Server X:

  • A route via ISP 1 at 203.0.113.2 (the primary link)
  • A route via ISP 2 at 203.0.113.6 (the secondary (backup) link)

The primary link is 1Gbps, so it’s preferred. The backup link is 100 Mbps, which is slower and has less bandwidth. Backup links are often cheaper and lower-bandwidth, but they provide redundancy. Because the backup link is slower, you typically don’t want traffic using both links at the same time.

To make the 1Gbps link (ISP 1) the preferred route, you increase the administrative distance on the backup route (ISP 2). As discussed earlier, the lower the AD, the better. Since you can’t lower AD below 1, you make the backup route less preferred by raising its AD.

That backup route is called a floating static route. It stays in the running configuration, but it isn’t installed in the routing table unless the primary route is no longer available. When the primary route goes down, the floating static route is installed automatically. When the primary route comes back, the floating static route is removed from the routing table again until it’s needed.

Let’s see what this would look like once configured:

(Image 154)

Image Title - Floating Static Route with ISP 1 as the primary and ISP 2 as the backup with a higher Administrative Distance.

Host routes

One more route type to know is the host route. A host route is a route to one specific IP address only. You use this when you only need to reach a single device - like a specific server - rather than an entire network.

(Image 155)

Image Title - Host route to Server X

Host routes are written as a single IP address (for example, 10.2.2.45) with a subnet mask of all 1s: 255.255.255.255. In CIDR notation, that’s 10.2.2.45/32, because all 32 bits are turned on.

Here is what a static host route would look like in a route table:

  • S 10.2.2.45/32 [1/0] via 172.16.1.2
Key points

Static routes

  • Manually configured routes to remote networks
  • Specify destination network and next hop IP address
  • Enable communication to networks not directly connected

Bi-directional connectivity

  • Static routes required in both directions for two-way traffic
  • Destination routers need return routes to source networks
  • Must configure all routers along the path for full connectivity

Reading static routes in routing table

  • Marked with code “S” for Static
  • Format: Destination network, [Administrative Distance/Metric], next hop IP
    • Administrative Distance (AD): trustworthiness, default = 1 for static routes
    • Metric: always 0 for static routes
  • Next hop IP: router interface to forward packets to

The default route

  • Special static route: 0.0.0.0/0 as destination
  • Used as gateway of last resort when no specific route exists
  • Commonly points to ISP for Internet access
    • Keeps routing tables manageable in size

Floating static routes

  • Backup static routes with higher administrative distance
  • Only used if primary route fails
  • Provide redundancy without load balancing

Host routes

  • Route to a single IP address (host)
  • Uses /32 mask (255.255.255.255)
  • Example: S 10.2.2.45/32 [1/0] via next hop IP

More from IP connectivity

  • Calculating networks and hosts
  • Routers and IPv4 routing fundamentals
  • Static vs. dynamic routing and OSPF fundamentals
  • Router redundancy in an Ethernet LAN using First Hop Redundancy Protocols (FHRPs)