2.15 Static Routes

IPv4/IPv6 Next-Hop Static Routes

In a Next-Hop Static Route, only the Next-Hop IP Address is specified. The exit interface will be automatically obtained via the Next-Hop. Like for example, 3 Next-Hop IPv4 Static Routes are configured on R1 using the IP Address of the Next-Hop Router, R2.

Referring to the example above, the following are the commands used to configure R1 with the IPv4 Static Routes to the three remote networks as per below:

Configuration on R1 to the 3 Remote networks (IPv4)

R1(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.2 
R1(config)# ip route 192.168.1.0 255.255.255.0 172.16.2.2 
R1(config)# ip route 192.168.2.0 255.255.255.0 172.16.2.2

Below is a representation of the IPv4 Routing Table on R1 after the Static Route Configuration was applied:

Post Static Route Configuration Routing Table on R1 (IPv4)

R1# show ip route | begin Gateway
Gateway of last resort is not set
      172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
S        172.16.1.0/24 [1/0] via 172.16.2.2
C        172.16.2.0/24 is directly connected, Serial0/1/0
L        172.16.2.1/32 is directly connected, Serial0/1/0
C        172.16.3.0/24 is directly connected, GigabitEthernet0/0/0
L        172.16.3.1/32 is directly connected, GigabitEthernet0/0/0
S        192.168.1.0/24 [1/0] via 172.16.2.2
S        192.168.2.0/24 [1/0] via 172.16.2.2
R1#

As mentioned earlier, the same can be done for IPv6 as per below:

Configuration on R1 to the 3 Remote networks (IPv6)

R1(config)# ipv6 unicast-routing 
R1(config)# ipv6 route 2001:db8:acad:1::/64 2001:db8:acad:2::2 
R1(config)# ipv6 route 2001:db8:cafe:1::/64 2001:db8:acad:2::2 
R1(config)# ipv6 route 2001:db8:cafe:2::/64 2001:db8:acad:2::2

[NOTE] It’s crucial to always enable IPv6 unicast-routing when configuring anything IPv6 related

Below is a representation of the IPv6 Routing Table on R1 after the Next-Hop Static Route Configuration was applied:

Post Static Route Configuration Routing Table on R1 (IPv6)

R1# show ipv6 route
IPv6 Routing Table - default - 8 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
       I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
       EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
       NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter
       OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
       ON2 - OSPF NSSA ext 2, la - LISP alt, lr - LISP site-registrations
       ld - LISP dyn-eid, lA - LISP away, le - LISP extranet-policy
       a - Application 
S   2001:DB8:ACAD:1::/64 [1/0]
     via 2001:DB8:ACAD:2::2
C   2001:DB8:ACAD:2::/64 [0/0]
     via Serial0/1/0, directly connected
L   2001:DB8:ACAD:2::1/128 [0/0]
     via Serial0/1/0, receive
C   2001:DB8:ACAD:3::/64 [0/0]
     via GigabitEthernet0/0/0, directly connected
L   2001:DB8:ACAD:3::1/128 [0/0]
     via GigabitEthernet0/0/0, receive
S   2001:DB8:CAFE:1::/64 [1/0]
     via 2001:DB8:ACAD:2::2
S   2001:DB8:CAFE:2::/64 [1/0]
     via 2001:DB8:ACAD:2::2
L   FF00::/8 [0/0]
     via Null0, receive