5.0 Static Routing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

CIT 4209 - Router and Routing Basics

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

ip route-static [destination_network] [mask] [next-hop address or exit interface]

This list describes each command in the string:


ip route-static :- The command used to create the static route.

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

[R3]ip route-static 192.168.1.0 24 192.168.4.2


[R3]ip route-static 192.168.2.0 24 192.168.4.2
[R3]ip route-static 192.168.3.0 24 192.168.4.2
Types of Static Routes
i) Default Static Route
- A default static route is a route that matches all packets.
- A default route identifies the gateway IP address to which the router sends all IP packets
that it does not have a learned or static route.
- A default static route is simply a static route with 0.0.0.0/0 as the destination IPv4
address.

[R1] ip route-static 0.0.0.0 0.0.0.0 172.16.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.

Calculate a Summary Route


Summarizing networks into a single address and mask can be done in three steps as shown
below:-
Step 1: List the networks in binary format. The figure below lists networks 172.20.0.0/16 to
172.23.0.0/16 in binary format.

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.

iii) Floating Static 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.
- The floating static route is only used when the primary route is not available.
- In order to accomplish this, the floating static route is configured with a higher
administrative distance than the primary route.

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

Test the backup static routes.


Disable the path to 10.0.23.3 via GigabitEthernet0/0/2 on R2 and observe the changes in the IP
routing tables.
[R2] interface GigabitEthernet0/0/2
[R2-GigabitEthernet0/0/2] shutdown
[R2-GigabitEthernet0/0/2] qu
Compare the routing tables with the previous routing tables before Gigabit Ethernet 0/0/2 was
disabled.

5
Note: The next hops and preferences of the two routes as shown in the preceding routing table
for R2 have changed.

You might also like