When use static route
  • Providing ease of routing table maintenance in smaller networks that are not expected to grow significantly.
  • Routing to and from stub networks. A stub network is a network accessed by a single route, and the router has only one neighbor.
  • Using a single default route to represent a path to any network.
  • Floating route: Floating static routes are static routes that are used to provide a backup path to a primary static or dynamic route, in the event of a link failure.
  • Summary static route:
    • The destination networks are contiguous and can be summarized into a single network address.
    • The multiple static routes all use the same exit interface or next-hop IP address.
Configure a static route:
  • IPv4 static routes are configured using the ip route network mask {next-hop-ip | exit-intf}[ distance ] [ name name ] [ permanent ] [ tag tag ]  global configuration command. The default static route can be configured by ip route {exit_intf|next-hop-ip  (The distance parameter is used to create a floating static route) Based on if we use exit_intf or next-hop-ip or both, there are three type of static route:
    • Next-hop route – Only the next-hop IP address is specified. In this case, the router has to first lookup which next-hop goes to the destination network, then decide which interface is connected to the the next-hop. So there are 2 lookup, which is called recursive static route. CEF (Cisco Express Forwarding) is the default behavior on most platforms running IOS 12.0 or later. CEF provides optimized lookup for efficient packet forwarding by using two main data structures stored in the data plane: a FIB (Forwarding Information Base), which is a copy of the routing table and an adjacency table that includes Layer 2 addressing information. The information combined in both of these tables work together so there is no recursive lookup needed for next-hop IP address lookups.
    • Directly connected static route – Only the router exit interface is specified. If the router find the route entry in the table, it will know the exit interface straight away, only 1 lookup needed. But for the multicast interface, the router will take extra step to decide which way to send. Therefore, for point-to-point interfaces, you can use static routes that point to the exit interface or to the next-hop address. For multipoint/broadcast interfaces, it is more suitable to use static routes that point to a next-hop address. For example, R1 knows that the packet needs to be encapsulated in an Ethernet frame and sent out the GigabitEthernet 0/1 interface. However, R1 does not know the next-hop IPv4 address and therefore it cannot determine the destination MAC address for the Ethernet frame. Depending upon the topology and the configurations on other routers, this static route may or may not work.
    • Fully specified static route – The next-hop IP address and exit interface are specified. This form of static route is used when the output interface is a multi-access interface and it is necessary to explicitly identify the next hop. The next hop must be directly connected to the specified exit interface.
  • Ipv6 static route: First of all, use
    R1(config)#ipv6 unicast-routing

    ipv6-prefix/prefix-length{ipv6-address|interface-type interface-number}.
    Respectively, a default static IPv6 route can be configured by
    ipv6 route ::/0 {ipv6-address | interface-type interface-number
Verify a static route

 R1#show ip route static

R1#show ipv6 route static