5.0 Static Routing
5.0 Static Routing
5.0 Static Routing
Static Routing
Static routing is the process that ensues when you manually add routes in each router’s routing
table.
Why Use Static Routing?
Static routing provides some advantages over dynamic routing, including:
- Easy to implement in a small network.
- Static routes are not advertised over the network, resulting in better security.
- Static routes use less bandwidth than dynamic routing protocols, no CPU cycles are used
to calculate and communicate routes.
- No routing algorithm or update mechanisms are required. Therefore, extra resources
(CPU and memory) are not required.
- The path a static route uses to send data is known.
Static routing has the following disadvantages:
- Suitable for simple topologies or for special purposes such as a default static route.
- Configuration complexity increases dramatically as the network grows. Managing the
static configurations in large networks can become time consuming.
- If a link fails, a static route cannot reroute traffic. Therefore, manual intervention is
required to re-route traffic.
- Initial configuration and maintenance is time-consuming.
- Configuration is error-prone, especially in large networks.
- Administrator intervention is required to maintain changing route information.
- Does not scale well with growing networks; maintenance becomes cumbersome.
- Requires complete knowledge of the whole network for proper implementation.
When to Use Static Routes
Static routing has three primary uses:
- 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 no other neighbors.
- Using a single default route to represent a path to any network that does not have a more
specific match with another route in the routing table. Default routes are used to send
traffic to any destination beyond the next upstream router.
Static Route Applications
Static Routes are often used to:
- Connect to a specific network
- Provide a Gateway of Last Resort for a stub network
- Reduce the number of routes advertised by summarizing several contiguous networks as
one static route
- Create a backup route in case a primary route link fails
1
destination_network:- The network you’re placing in the routing table (unreachable network).
Mask:- The subnet mask being used on the network.
Next-hop-address:- This is the IP address of the next-hop router that will receive packets and
forward them to the remote network, which must signify a router interface that’s on a directly
connected network.
Exit interface: Used in place of the next-hop address if you want, and shows up as a directly
connected route.
Example:
[R1]ip route-static 192.168.4.0 30 192.168.2.2
[R1]ip route-static 192.168.5.0 24 192.168.2.2
[R1]ip route-static 192.168.3.0 24 192.168.2.2
2
ii) Summary Static Route
A single IPv4 static summary route can be used to replace multiple static routes when those
routes can be summarized with a common prefix length. The configuration of a summary static
route is similar to the configuration of other IPv4 static routes.
Route summarization, also known as route aggregation, is the process of advertising a
contiguous set of addresses as a single address with a less-specific, shorter subnet mask. CIDR is
a form of route summarization and is synonymous with the term supernetting. CIDR ignores the
limitation of classful boundaries, and allows summarization with masks that are smaller than that
of the default classful mask.
This type of summarization helps reduce the number of entries in routing updates and lowers the
number of entries in local routing tables. It also helps reduce bandwidth utilization for routing
updates and results in faster routing table lookups.
Step 2: Count the number of far left matching bits to determine the mask for the summary route.
The figure below highlights the 14 far left matching bits. This is the prefix, or subnet mask, for
the summarized route: /14 or 255.252.0.0.
3
Step 3: Copy the matching bits and then add zero bits to determine the summarized network
address. The figure below shows that the matching bits with zeros at the end results in the
network address 172.20.0.0. The four networks—172.20.0.0/16, 172.21.0.0/16, 172.22.0.0/16,
and 172.23.0.0/16—can be summarized into the single network address and prefix 172.20.0.0/14.
Example:
Configure a static route for destination networks 10.0.13.0/24 and 10.0.3.0/24, with the next hop
set as the IP address 10.0.23.3 of R3, a preference value of 60 is the default and need not be set.
[R2]ip route-static 10.0.13.0 24 10.0.23.3
[R2]ip route-static 10.0.3.0 24 10.0.23.3
4
Configure floating / backup static routes
The data exchanged between R2 and 10.0.13.3 and 10.0.3.3 is transmitted through the link
between R2 and R3. R2 fails to communicate with 10.0.13.3 and 10.0.3.3 if the link between R2
and R3 is faulty.
According to the topology, R2 can communicate with R3 through R1 if the link between R2 and
R3 fails. A backup static route can be configured to enable this redundancy. Backup static routes
do not take effect in normal cases. If the link between R2 and R3 fails, backup static routes are
used to transfer data.
Amend the preferences for on the backup static routes to ensure that the routes are used only
when the primary link fails. In this example, the preference of the backup static route is set to 80.
[R2]ip route-static 10.0.13.0 255.255.255.0 10.0.12.1 preference 80
[R2]ip route-static 10.0.3.0 24 10.0.12.1 preference 80
5
Note: The next hops and preferences of the two routes as shown in the preceding routing table
for R2 have changed.