Packet tracer. Lab : Configuring floating static routes

Network topology

Packet tracer. Lab : Configuring floating static routes

Tasks

  1. Create a default static route
  2. Deploying a floating static route
  3. Checking for switching to a floating static route when the main route fails

Overview

So, to begin with, a few words about what is a static, and even a floating route. Unlike dynamic routing, static routing requires you to independently build a route to a specific network. A floating static route is used to provide a backup path to the destination network if the primary route fails.

Using the example of our network, the "Border Router" so far has only directly connected routes to the ISP1, ISP2, LAN_1 and LAN_2 networks.

Packet tracer. Lab : Configuring floating static routes

Create a default static route

Before we talk about the backup route, we first need to build the main route. Let the main route from the border router go through ISP1 to the Internet, and the route through ISP2 will be a backup. To do this, on the border router in global configuration mode, set the default static route:

Edge_Router>en
Edge_Router#conf t
Edge_Router(config)#ip route 0.0.0.0 0.0.0.0 s0/0/0 

where:

  • the first 32 bits of zeros are the destination network address;
  • the second 32 bits of zeros is the network mask;
  • s0/0/0 is the output interface of the border router that is connected to the ISP1 network.

This entry says that if packets arriving at the border router from LAN_1 or LAN_2 networks contain a destination network address that is not in the routing table, they will be forwarded through the s0/0/0 interface.

Packet tracer. Lab : Configuring floating static routes

Let's check the routing table of the border router and send a ping request to the web server from PC-A or PC-B:

Packet tracer. Lab : Configuring floating static routes

Packet tracer. Lab : Configuring floating static routes

We see that a default static route entry has been added to the routing table (as evidenced by the S* entry). Let's trace the route from PC-A or PC-B to the web server:

Packet tracer. Lab : Configuring floating static routes

The first hop is from PC-B to the edge router's local IP address of 192.168.11.1. The second hop is from the border router to 10.10.10.1 (ISP1). Remember, in the future we will compare the transitions.

Deploying a floating static route

So, the main static route has been built. Next, we create, in fact, a floating static route through the ISP2 network. The process of creating a floating static route is the same as a regular default static route, except that the first one additionally specifies an administrative distance. Administrative distance refers to the degree of reliability of the route. The fact is that the administrative distance of a static route is equal to one, which means absolute priority over dynamic routing protocols, in which the administrative distance is many times greater, except for local routes - they have it equal to zero. Accordingly, when creating a static floating route, you should specify an administrative distance greater than one, for example, 5. Thus, the floating route will not have priority over the main static route, but at the time of its unavailability, the default route will be considered the main one.

Packet tracer. Lab : Configuring floating static routes

The syntax for setting a floating static route is as follows:

Edge_Router(config)#ip route 0.0.0.0 0.0.0.0 s0/0/1 5

where:

  • 5 - this is the value of the administrative distance;
  • s0/0/1 is the output interface of the edge router connected to the ISP2 network.

I just want to say that while the main route is in operation, the floating static route will not be displayed in the routing table. To be more convincing, let's display the contents of the routing table at a time when the main route is in good condition:

Packet tracer. Lab : Configuring floating static routes

You can see that the main default static route with the output interface Serial0/0/0 is still displayed in the routing table and no other static routes are displayed in the routing table.

Checking for switching to a floating static route when the main route fails

And now the most interesting: Let's simulate a failure of the main route. This can be done by disabling the interface at the software level, or simply by removing the connection between the router and ISP1. Disable the Serial0/0/0 interface of the main route:

Edge_Router>en
Edge_Router#conf t
Edge_Router(config)#int s0/0/0
Edge_Router(config-if)#shutdown

... and immediately run to look at the routing table:

Packet tracer. Lab : Configuring floating static routes

In the figure above, you can see that after the failure of the main static route, the output interface Serial0/0/0 changed to Serial0/0/1. In the first trace we ran earlier, the next hop from the border router was to IP address 10.10.10.1. Let's compare hops by rerouting when using the fallback route:

Packet tracer. Lab : Configuring floating static routes

The transition from the border router to the web server is now via IP address 10.10.10.5 (ISP2).

Of course, static routes can be seen by displaying the current router configuration:

Edge_Router>en
Edge_Router#show run

Packet tracer. Lab : Configuring floating static routes

Source: habr.com

Add a comment