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:
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 RoutesDefining 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.
Method 1: Using Outgoing interface and Link-Local Next-HopOne 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 1The 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::2Note 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 nexthopOnce 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, receiveThis 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-HopThis 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 2The 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::2Once 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, receiveThis 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-HopAnother 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. |