Static Route Configuration

We can configure either static or dynamic routes after the configuration of directly connected interfaces. The static routes are manually configured and it provides a clear path between two networking devices. It must be manually reconfigured if there are changes in the network topology. This is the main disadvantage of static routes. It is more secure and more efficient than dynamic routes. It uses less bandwidth than dynamic routing protocols because of no CPU cycles required to calculate and communicate routes.  it provides easy maintenance in smaller networks that are not expected to grow significantly. We can use static routes in the following different situations.

  • We can use static routing from stub networks where a network accessed by a single route, and the router has only one neighbour.
  • Using a single default route, for a network that does not have a match with another route in the routing table. Default routes are used to send traffic to any destination further than the next upstream router.
  • We can also use a static route to reduce the number of routes advertised by summarizing several nearby networks as one static route.
  • The static routing can also be used to create a backup route in case a primary route link goes down.
  • Standard static route and Default Static Routes
  • Summary static route
  • Floating static route
  • A route between two specific networks.
  • Static Default Route

Static Route Between Two Specific Network

We can configure a static route to reach a specific remote network. The command syntax for static IPv4 routes is following.
Router(config)# ip route network address network mask {next-hop-ip | exit-interface}

The configuration command must be issued in global configuration mode. We can identify the static routes with the code ‘S’ in the routing table. The figure below shows the configuration of a static IPv4 route on Router2 to the Serial 0/3/0 interface.

Static Route Configuration 2

The static route on Router2 is configured to reach to network 172.16.17.0/24 on Router 3. It is configured using the exit interface towards Router3. We can also configure the router using the IP address of the next hop. In this example, the next hop is the serial 0/3/0 interface of Router 0.

Both, the route with the next-hop address and exit interface are acceptable. There is no difference between both, only they are looking different in the routing table. We can also configure the static IPv6 route between two specific networks. The command should be issued in global configuration mode. The command syntax for static IPv6 route is following.
Router(config)#ipv6 route ipv6-prefix/prefix-length{ipv6-address|interface-type interface-number}

Static Default Route

We can also examine another route “S” with an asterisk pointing to gigabitEthernet 0/1. Asterisk illustrates that it is the default route. It is also known as the gateway of last resort because it is not set for any specific network. If the packet destination is unknown for the router, the router search routing table for the default route. A default route role is similar to a default gateway on a host. It specifies the path for the packet when the router has no information about the destination of the packet. To configure an IPv4 default route, use the following command in global configuration mode.

Router(config)# ip route 0.0.0.0 0.0.0.0 {exit-interface | next-hop-ip}

Notice that the next-hop address for the default route is the exit interface of the router towards Router 0. We can also configure the default static route with the next-hop IP address similar to static route configuration. In the same way, we can configure the default static IPv6 route, using the following command in global configuration mode.

Router(config)#ipv6 route ::/0 {ipv6-address |interface-type interface-number}