Skip to content
  • There are no suggestions because the search field is empty.

Configuring Static Routing

Configuring a static route involves defining two parameters: the destination network or host and the corresponding next-hop address or exit interface to get there. In addition, you can set a different AD value than the default of 1.

Configuring a static route on a Cisco router is done in the global configuration mode, and the command format consists of several parameters: 

ip route ip-address subnet-mask {next-hop | interface} [tag]

Using static routing for reaching local networks and networks on the internet.

The image above shows the topology used in this example for configuring static routing on router R2 for reaching network 192.168.1.0/24, PC1, and any network on the internet.

Below are the commands used to configure static routes:

Configuring static routes on a router

Define Static Route (R2 to R1)

The first command in the configuration above defines a static route on R2 to 192.168.1.0/24 through the next-hop IP address of 10.10.10.1 (R1). R1 has a default AD of 1. 

Define Static Route (R2 to R3)

The second command creates another static route to the same network of 192.168.1.0/24. However, this time the route goes through R3 (10.20.20.3) and has an AD of 2.

This route is called a floating static route because it has an administrative distance greater than 1. This allows for a backup option if the primary route through R1 becomes unavailable.

Define Static Route (PC1)

The third command defines a static route pointing to the exact IP address of PC1 (192.168.2.100/32) instead of the network where it belongs (192.168.2.0/24). Such a static route that points to a single host is called a host route.

Define Static Route (Default)

The last command defines a static default route pointing to any network where the destination IP and the subnet mask are 0.0.0.0. This time, instead of using a next-hop IP address (203.0.113.1), an exit interface (G0/2) is used.

Note: Although an exit interface is used in this example, it is generally not recommended. The IP address of the next-hop device should be used instead.

Verify Configuration

You can use the “show ip route” command that shows the routing table and all static routes included to verify that the static routes have been successfully configured on R2. The backup route to 192.168.1.0/24 is not included in the routing table because there is a better route with a smaller AD through R1 (10.10.10.1). When the active route fails, the backup route will be installed in the routing table of R2.

Show ip route command on a router and its output