# Static Routing
## What is Static Routing
Static routing is the process of manually configuring routes in a router's routing table rather than having routes learned automatically through dynamic routing protocols. An administrator manually specifies the destination network, the subnet mask or prefix length, and the next-hop IP address or exit interface for each route. Static routes do not change unless the administrator manually modifies them. Static routing is simple and gives administrators complete control over the routing behavior of the network.
## How Static Routes Work
When a static route is configured, the administrator specifies the destination network and how to reach it. For example a static route to the network 10.1.1.0/24 via next-hop 192.168.1.1 tells the router to send any packets destined for addresses in the 10.1.1.0/24 range to the router at 192.168.1.1. The router forwards the packet to 192.168.1.1 which then handles further routing. Static routes remain in the routing table as long as the exit interface is up, regardless of whether the destination is actually reachable.
## Default Static Route
A default static route matches all destinations and is used when no more specific route exists. It is written as 0.0.0.0/0 and points to the next-hop gateway, typically the internet router. A default route is configured on routers that do not need to know the full internet routing table but need to forward unmatched traffic toward the internet.
## Floating Static Routes
A floating static route is a static route with a higher administrative distance than a dynamically learned route to the same destination. Under normal conditions the dynamic route is preferred. If the dynamic route disappears because a link fails, the static route becomes active and provides a backup path. The higher administrative distance means the static route floats above the dynamic route in preference and only activates when needed.
## Advantages of Static Routing
Static routing requires no routing protocol overhead and no additional bandwidth for exchanging routing updates. It provides complete predictability because routes do not change unexpectedly. It consumes less CPU and memory than dynamic routing. It is more secure because there is no risk of routing protocol manipulation attacks.
## Disadvantages of Static Routing
Static routing does not adapt automatically to network failures. If a link fails, the static route pointing through that link remains in the table and traffic continues to be sent toward a broken path until an administrator manually removes the route. In large networks with many routes, manually managing all static routes becomes impractical and error-prone. Adding new networks requires manual configuration of routes on multiple routers.
## When to Use Static Routing
Static routing is appropriate for small networks with few routers and simple topology. It is used for stub networks that have only one path to the rest of the network. It is used for specific routes that must follow a fixed path regardless of conditions. Default routes on branch office routers are typically static.Back to Subject