When an IPv6 static route is configured as a backup route to a static route What should the administrative distance?

Static routes provide tools for restricting and troubleshooting routed traffic flows and in small networks can provide the simplest and most reliable configuration for IPv6 routing.

Static routes are manually configured in the routing table. A static route entry comprises the following:

  • IPv6 network prefix for the route's destination network

  • next-hop gateway, which can be one of the following:

    • either the link-local address and VLAN ID or the VLAN link to the next-hop router

    • a Global unicast address on the next-hop router

    • a "null" interface (the routing switch drops traffic forwarded to the null interface)

  • Optionally, a non-default administrative distance

NOTE: To enable routing in both directions on a static route, you must configure reciprocal static routes on the routers at both ends of the route.

On a given routing switch you can create one static route or null route to a given destination. Multiple static or null routes to the same destination are not supported.

The routing switches can concurrently support a maximum of 256 IPv6 static routes and 256 IPv4 static routes.

For example, in Example of a routing domain, static routes enabling routed traffic between routers "A," "B," and "C" could be configured as follows:

Example of static route configuration in a network

Router "A" Router "B" Router "C"

ipv6 route

2620:a::/64 2620:e::55:1

ipv6 route

2620:a::/64 2620:b::22:1

ipv6 route

2620:c::/64 2620:b::22:2

ipv6 route

2620:b::/64 2620:e::55:1

ipv6 route

2620:c::/64 2620:e::55:2

ipv6 route

2620:e::/64 2620:b::22:2

Note: next-hop addresses can be either global unicast or link-local.

Example of a routing domain

Static routing is relatively reliable and gives you tight control over traffic flow. You determine exactly which connections to use to forward traffic to each destination. In a given VLAN, you can use multiple IPv6 addresses to add multiple static routes in the VLAN. Other advantages include:

  • efficiency in a small network with few paths to manage

  • ease of configuration and maintenance

  • lower CPU utilization

In a large or expanding network, configuring static routes for all the necessary routes can become increasingly complicated and time-consuming. Ensuring that all routes remain accurate can also add to the administrative burden. Each time you add a connection or change a route, you must configure the change on every routing device in the network. Also, routers do not automatically respond to a failed static connection, so traffic can be lost or misrouted.

NOTE: Network management and monitoring applications such as PCM and PCM+ can detect failed static routes.

You can configure these types of static IPv6 routes:

Standard: The static route consists of:

  • Destination network prefix

  • Link-local IPv6 address and VLAN ID of the (next-hop router) gateway IPv6 address

Interface-based: The static route consists of:

  • Destination network address or host and a corresponding network prefix

  • VLAN interface through which you want the routing switch to send traffic for the route

Null (discard): Null routes include the following:

Default: When IPv6 routing is enabled, a route for the ::1/128 network is created and traffic to this network is rejected (dropped). The loopback address (lo0) is entered as the gateway. This route is for all traffic to the "loopback" network, with the single exception of traffic to the host address of the switch's loopback interface.

Configured: Provides a route that is used as a backup route for discarding traffic where the primary route is unavailable. A configured null route consists of:

  • Destination network address or host and a corresponding network mask

  • Either the reject keyword (traffic dropped with ICMP notification to the sender) or blackhole keyword (traffic dropped without any ICMP notification).

Non-default null routes created with the reject or blackhole keywords use a gateway of zero (0).

Example of static routes in an ECMP application illustrates the default and configured null route entries in the switch's routing table.

The routing switch applies default administrative distance and metric values to ensure that static routes are preferred over dynamic routes to the same destination.

Administrative distance: In the case of static routes, this is the value the routing switch uses to compare a static route to routes from other route sources to the same destination before placing a route in the routing table. The default administrative distance for static routes is 1, but can be configured to any value in the range of 1–255.

Metric: In the case of static routes, this is the value the routing switch uses when comparing a static route to routes in the routing table from any dynamic routes to the same destination. The metric for static routes is fixed, that is, always set to "1".

Static routes remain in the routing table only while the interface link to the next-hop router is up. If the next-hop router interface link goes down, the software removes the static route from the routing table. If the next-hop interface comes up again, the software adds the route back to the routing table.

This feature allows the routing switch to adjust to changes in network topology. The routing switch does not continue trying to use routes on unreachable paths, but instead uses routes only when their paths are reachable.

Equal-cost multi-path routing (ECMP) is a routing strategy where next-hop packet forwarding to a single destination can occur over multiple "best paths." Each path has the same cost as the other paths, but a different next-hop router. In static routing, load-balancing can be achieved through ECMP. Example of static routes in an ECMP application illustrates static routes applied to an ECMP topology.

Example of static routes in an ECMP application

The [no] ip load-sharing <2–4> command enables or disables load-sharing for both IPv4 and IPv6 applications and specifies the number of ECMP routes to allow. In the default configuration, load-sharing is enabled with four ECMP routes allowed. For more information, see Equal-cost multi-path routing (ECMP) for the Switch 2620-series.

...but your activity and behavior on this site made us think that you are a bot.

Note: A number of things could be going on here.

  1. If you are attempting to access this site using an anonymous Private/Proxy network, please disable that and try accessing site again.
  2. Due to previously detected malicious behavior which originated from the network you're using, please request unblock to site.

...but your activity and behavior on this site made us think that you are a bot.

Note: A number of things could be going on here.

  1. If you are attempting to access this site using an anonymous Private/Proxy network, please disable that and try accessing site again.
  2. Due to previously detected malicious behavior which originated from the network you're using, please request unblock to site.

When a router's interface is configured with an IP address/Mask and enabled, the router automatically adds the prefix in its routing table as Connected. However, to forward packets toward networks that are not directly connected to the router, it has to have a valid routing entry in the routing table. If we examine figure 1 for example, from the perspective of Router 1, Subnet 1 is directly connected, but Subnet 2 is not. Therefore, router 1 is not able to forward packets destined for subnet 2 while it doesn't have a routing entry for 2001:1234:A:2::/64 in the Routing table.

There are two methods to add entries in the routing table:

  • Statically - meaning that a network administrator statically configures a routing entry and the router places it in the routing table.
  • Dynamically - meaning that there is a routing protocol running in the network and routers exchange routing information automatically 

In this lesson, we are going to look at the first technique demonstrating different methods to add a static routing entry. Most of the concepts apply equally to IPv4 and IPv6, however, we are going to examine only the IPv6 configuration portion.

The main benefits of using IPv6 static routes are better security and efficiency. Static routes use fewer resources than dynamic routing protocols because no CPU cycles are needed to calculate the topology and no messages are being exchanged between routers. However, there is a huge disadvantage which is the lack of automatic re-routing around network failures and topology changes.

Configuring IPv6 Static Routes

Defining an IPv6 static route entry is done using the

ipv6 route [ destination prefix ] [ outgoing interface ] [ next-hop ] [ AD ] 

command in global configuration mode. Because some of the parameters are optional, there are a few different combinations of specified parameters when configuring an IPv6 static route. Depending on the next-hop, the outgoing interface, and the administrative distance that is configured, the router acts differently. Table 1 summarizes the different types of ipv6 static routes.

Table 1. Different methods of configuring IPv6 static routes Type of IPv6 static route Outgoing interface NextHop AD Use case
Directly Attached set not set 1

ipv6 route 2001:AB5::/32 Serial0/0

Only an outgoing interface is specified. This type of static routing is used on point-to-point links that do not need next-hop resolution. This method is not applicable to broadcast networks such as Ethernet.

Recursive not set set 1

ipv6 route 2001:AB5::/32 2001:1234:B::1

Only GUA next hop is specified. The outgoing interface is then derived by performing another routing lookup for the next-hop address. Typically used when the static route's status does not have to depend on the outgoing interface status.

Fully Specified set GUA 1

ipv6 route 2001:AB5::/32 FastEthernet0/0 2001:1234:B::1

An outgoing interface and a next-hop are specified when configuring the static route. This is the recommended method for configuring static routing entries. 

Fully Specified set LLA 1

ipv6 route 2001:AB5::/32 FastEthernet0/0 FE80::1

Similar to the above example, but the next-hop is a link-local address. It is a valid and common case scenario that is typically used when the ethernet segment does not have GUA addresses configured.

Floating set GUA or LLA >1

ipv6 route 2001:AB5::/32 FastEthernet0/0 FE80::1 210

A fully specified static route that is typically used as a backup for a particular destination. The administrative distance of the routing entry is set to a value greater than the primary route for this destination.

Method 1: Using Outgoing interface and Link-Local Next-Hop

One of the most common methods for configuring ipv6 static routes is by specifying an outgoing interface and a link-local next-hop. This is a convenient way to use static routing on segments where there are no global unicast addresses configured. 

Figure 1. Configuring IPv6 Static Route Method 1

The syntax for configuring an ipv6 routing entry with an outgoing interface and LLA next-hop is as follow:

R1(config)#ipv6 route 2001:1234:A:2::/64 GigabitEthernet0/0 FE80::2

Note that link-local addresses are only reachable from devices on the same link. Therefore, if we use LLA next-hop, specifying an outgoing interface is required because the same link-local address may exist on another link. If we look at the example in figure 1, that is the case with the address FE80::2, it is configured on PC1 and R2 Gi0/0. Thus R1 won't accept the command if an outgoing interface is not explicitly set.

R1(config)#ipv6 route 2001:1234:A:2::/64 FE80::2 % Interface has to be specified for a link-local nexthop

Once the static route is configured, we can verify that R1 has accepted and added it to the routing table with the following command:

R1#show ipv6 route IPv6 Routing Table - 6 entries Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP U - Per-user Static route, M - MIPv6 I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2 ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2 D - EIGRP, EX - EIGRP external C 2001:1234:A:1::/64 (0/0) via GigabitEthernet0/1, directly connected L 2001:1234:A:1::1/128 (0/0) via GigabitEthernet0/1, receive S 2001:1234:A:2::/64 (1/0) via FE80::2, GigabitEthernet0/0 C 2001:1234:A:B::/64 (0/0) via GigabitEthernet0/0, directly connected L 2001:1234:A:B::1/128 (0/0) via GigabitEthernet0/0, receive L FF00::/8 (0/0) via Null0, receive

This entry in the routing table can be translated as "Send packets destined to network 2001:1234:A:2::/64 out interface GigabitEthernet 0/0 to next-hop FE80::2"

Method 2: Using Outgoing interface and GUA Next-Hop

This is the same example as Method 1 with the only difference being the next-hop address. Instead of a link-local address, we can specify a global unicast address as shown in Figure 2. There is no functional difference comparing to Method 1. If all nodes on the link have GUA addresses, this is the recommended way of specifying static routes.

Figure 2. Configuring IPv6 Static Route Method 2

The syntax of configuring IPv6 static route with an outgoing interface and a GUA next hop is shown below.

ipv6 route 2001:1234:A:2::/64 GigabitEthernet 0/0 2001:1234:A:B::2

Once the routing entry is configured, we can verify that R1 has accepted and added it to the routing table with the following command:

R1#show ipv6 route IPv6 Routing Table - 6 entries Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP U - Per-user Static route, M - MIPv6 I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2 ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2 D - EIGRP, EX - EIGRP external C 2001:1234:A:1::/64 (0/0) via GigabitEthernet0/1, directly connected L 2001:1234:A:1::1/128 (0/0) via GigabitEthernet0/1, receive S 2001:1234:A:2::/64 (1/0) via 2001:1234:A:B::2, GigabitEthernet0/0 C 2001:1234:A:B::/64 (0/0) via GigabitEthernet0/0, directly connected L 2001:1234:A:B::1/128 (0/0) via GigabitEthernet0/0, receive L FF00::/8 (0/0) via Null0, receive

This entry in the routing table can be translated as "Send packets destined to network 2001:1234:A:2::/64 out interface GigabitEthernet 0/0 to next-hop 2001:1234:A:B::2"

Method 3: IPv6 Static Route using only GUA Next-Hop

Another valid way of specifying static routes is by only pointing to a Global Unicast Next-Hop. This type of configuring without specifying an outgoing interface tells the router to do another routing lookup and find the link on which this GUA address is attached to.

Figure 3. Configuring IPv6 Static Route Method 3

The syntax of configuring an IPv6 static route to a GUA next hop is shown below:

R1(config)#ipv6 route 2001:1234:A:2::/64 2001:1234:A:B::2

Let's see how R1 added this entry in the routing table.

R1#show ipv6 route IPv6 Routing Table - 6 entries Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP U - Per-user Static route, M - MIPv6 I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2 ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2 D - EIGRP, EX - EIGRP external C 2001:1234:A:1::/64 (0/0) via GigabitEthernet0/1, directly connected L 2001:1234:A:1::1/128 (0/0) via GigabitEthernet0/1, receive S 2001:1234:A:2::/64 (1/0) via 2001:1234:A:B::2 C 2001:1234:A:B::/64 (0/0) via GigabitEthernet0/0, directly connected L 2001:1234:A:B::1/128 (0/0) via GigabitEthernet0/0, receive L FF00::/8 (0/0) via Null0, receive

Note that the static route in the routing table does not have an outgoing interface. So when packets destined to 2001:1234:A:2::/64 come in, the router knows that it has to forward them to the next-hop 2001:1234:A:B::2, but to find the outgoing interface it has to perform another routing lookup for the next-hop address. 

Figure 4. IPv6 Static Route Recursive Lookup

This entry in the routing table can be translated as "Send packets destined to network 2001:1234:A:2::/64 next-hop 2001:1234:A:B::2. Make another routing lookup to find the outgoing interface."

Floating static routes

In this example, we are going to look at another type of IPv6 Static routing called Floating Static Route. This means that when we configure a route, we set a higher Administrative Distance than the default value of 1. This is useful in scenarios where we have two paths to a particular destination and want to use one of them as a primary path and the other one as a backup. Such an example is shown in figure 5. Let's say that we want to configure R1 to send all packets via the link between R1 and R2 and only in case of link failure to use the link R1-R3 as a backup path. 

Figure 4. Using a Floating IPv6 Static Routes

We can achieve this by using the following configuration. First, we specify that Subnet 2 is reachable via link R1-R2:

R1(config)#ipv6 route 2001:1234:A:2::/64 GigabitEthernet0/0 FE80::2 ? <1-254> Administrative distance <cr> R1(config)#ipv6 route 2001:1234:A:2::/64 GigabitEthernet0/0 FE80::2

Note that at the very end we have the option to configure the AD value. If we do not specify any value, it inherits the default value of 1.

Now that we have the primary path set up, let's configure the backup path using the following command:

R1(config)#ipv6 route 2001:1234:A:2::/64 GigabitEthernet0/1 FE80::2 250

Note that at the very end of the command, we specify the value of 250. This is the Administrative Distance of the static route. Routers use the AD value as a measure of the trustworthiness of the source of the routing information. For example, if a router has two routes (static or dynamic), it chooses to use the one with a lower AD value. Therefore in our case, R1 would have two static routes to Subnet 2, the route via R2 with AD of 1 and the route via R3 with AD of 250. Thus the router will use the path via R2 as a primary path and only in case of link failure will use the link via R3.

Figure 6. Using a Floating IPv6 Static Route as a backup

Now let's see which route is installed in R1's routing table:

R1#show ipv6 route IPv6 Routing Table - 6 entries Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP U - Per-user Static route, M - MIPv6 I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2 ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2 D - EIGRP, EX - EIGRP external S 2001:1234:A:2::/64 (1/0) via FE80::2, GigabitEthernet0/0 C 2001:1234:A:B::/64 (0/0) via GigabitEthernet0/0, directly connected L 2001:1234:A:B::1/128 (0/0) via GigabitEthernet0/0, receive C 2001:1234:A:C::/64 (0/0) via GigabitEthernet0/1, directly connected L 2001:1234:A:C::1/128 (0/0) via GigabitEthernet0/1, receive L FF00::/8 (0/0) via Null0, receive

You can see that the static route with an Administrative Distance of 1 is installed in the forwarding table. Let's now see what will happen if we shut down the link between R1 and R2.

R1(config)#int gi0/0 R1(config-if)#shutdown R1(config-if)# %LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to administratively down %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to down R1#show ipv6 route IPv6 Routing Table - 4 entries Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP U - Per-user Static route, M - MIPv6 I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2 ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2 D - EIGRP, EX - EIGRP external S 2001:1234:A:2::/64 (250/0) via FE80::2, GigabitEthernet0/1 C 2001:1234:A:C::/64 (0/0) via GigabitEthernet0/1, directly connected L 2001:1234:A:C::1/128 (0/0) via GigabitEthernet0/1, receive L FF00::/8 (0/0) via Null0, receive

You can see that after we disabled the link R1-R2, now the static route via R3 is installed in the routing table and is used to reach Subnet 2. Note the value in red, this is the Administrative Distance we specified. The route is being used only when the primary one with AD of 1 is invalid, due to the outgoing interface being down.

Toplist

Latest post

TAGs