IPv6 Static Routs

This example shows complete configuration to enable IPv6 static routing in a simple network topology.

IPv6 static route with interface alone as gateway (without gateway IPv6 address) is not supported.

Topology

Figure 6. IPv6 static routing

Configuration

R1

R1#conf t

Enter Configure mode.

R1(config)#interface lo

Enter interface mode.

R1(config-if)#ipv6 address 1111::1/128

Configure IPv6 address

R1(config-if)#commit

Commit the candidate configuration to the running configuration

R1(config-if)#exit

Exit interface mode.

R1(config)#ipv6 route 6000::/64 5000::2

Configure IPv6 Static route to reach remote network with R2 as nexthop

R1(config)#ipv6 route 2222::2/128 5000::2

Configure IPv6 static route to reach R2 lo with R2 as nexthop

R1(config)#ipv6 route 3333::3/128 5000::2

Configure IPv6 static route to reach R3 lo with R2 as nexthop

R1(config)#commit

Commit the candidate configuration to the running configuration

R1(config)#exit

Exit configure mode

R2

R2#conf t

Enter Configure mode.

R2(config)#int lo

Enter interface mode.

R2(config-if)#ipv6 address 2222::2/128

Configure IPv6 address

R2(config)#commit

Commit the candidate configuration to the running configuration

R2(config)#exit

Exit configure mode

R2(config)#ipv6 route 1111::1/128 5000::1

Configure IPv6 static route to reach R1 lo with R1 as nexthop

R2(config)#ipv6 route 3333::3/128 6000::1

Configure IPv6 static route to reach R3 lo with R3 as nexthop

R2(config)#commit

Commit the candidate configuration to the running configuration

R2(config)#exit

Exit configure mode

R3

R3#conf t

Enter Configure mode.

R3(config)#int lo

Enter interface mode.

R3(config-if)#ipv6 add 3333::3/128

Configure IPv6 address

R3(config)#commit

Commit the candidate configuration to the running configuration

R3(config-if)#exit

Exit interface mode.

R3(config)#ipv6 route ::/0 6000::2

Configure Default IPv6 Static route with R2 as nexthop

R3(config)#commit

Commit the candidate configuration to the running configuration

R3(config)#exit

Exit configure mode

Validation

Show ipv6 route, show ipv6 route summary, show ipv6 route database

R1

Copy
R1#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
       IA - OSPF inter area, E1 - OSPF external type 1,
       E2 - OSPF external type 2, E - EVPN  N1 - OSPF NSSA external type 1,
       N2 - OSPF NSSA external type 2, i - IS-IS, B - BGP
Timers: Uptime
 
IP Route Table for VRF "default"
C      ::1/128 via ::, lo, 20:51:02
C      1111::1/128 via ::, lo, 00:01:13
S      2222::2/128 [1/0] via 5000::2, xe3, 00:00:32
S      3333::3/128 [1/0] via 5000::2, xe3, 00:00:13
C      5000::/64 via ::, xe3, 00:01:42
S      6000::/64 [1/0] via 5000::2, xe3, 00:00:54
C      fe80::/64 via ::, ce45, 01:45:19
R1#show ipv6 route summary
IPv6 routing table name is Default-IPv6-Routing-Table(0)
IPv6 routing table maximum-paths : 8
Total number of IPv6 routes      : 7
Total number of IPv6 paths       : 7
Pending routes (due to route max reached): 0
Route Source    Networks
connected       4
static          3
Total           7
FIB             7
 
ECMP statistics (active in ASIC):
---------------------------------
 Total number of IPv6 ECMP routes   : 0
 Total number of IPv6 ECMP paths    : 0
R1#
R1#show ipv6 route database
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
       IA - OSPF inter area, E1 - OSPF external type 1,
       E2 - OSPF external type 2, E - EVPN  N1 - OSPF NSSA external type 1,
       N2 - OSPF NSSA external type 2, i - IS-IS, B - BGP
       > - selected route, * - FIB route,p - stale info
Timers: Uptime
 
IP Route Table for VRF "default"
C   *> ::1/128 via ::, lo, 20:51:19
C   *> 1111::1/128 via ::, lo, 00:01:30
S   *> 2222::2/128 [1/0] via 5000::2, xe3, 00:00:49
S   *> 3333::3/128 [1/0] via 5000::2, xe3, 00:00:30
C   *> 5000::/64 via ::, xe3, 00:01:59
S   *> 6000::/64 [1/0] via 5000::2, xe3, 00:01:11
C   *> fe80::/64 via ::, ce45, 01:45:36
C      fe80::/64 via ::, ce44, 01:45:36
C      fe80::/64 via ::, xe39, 01:45:36
C      fe80::/64 via ::, xe32, 01:45:36
C      fe80::/64 via ::, xe29, 01:45:36
C      fe80::/64 via ::, xe13, 01:45:36
C      fe80::/64 via ::, ce46, 03:56:36
C      fe80::/64 via ::, ce43, 03:56:36
C      fe80::/64 via ::, xe25, 03:56:36
C      fe80::/64 via ::, xe23, 03:56:36
C      fe80::/64 via ::, xe3, 03:56:36
C      fe80::/64 via ::, xe34, 20:41:33
C      fe80::/64 via ::, xe33, 20:41:33
C      fe80::/64 via ::, xe36, 20:50:48
C      fe80::/64 via ::, xe22, 20:50:48
C      fe80::/64 via ::, xe21, 20:50:48
C      fe80::/64 via ::, xe10, 20:50:48
C      fe80::/64 via ::, xe9, 20:50:48

R2

Copy
R2#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
       IA - OSPF inter area, E1 - OSPF external type 1,
       E2 - OSPF external type 2, E - EVPN  N1 - OSPF NSSA external type 1,
       N2 - OSPF NSSA external type 2, i - IS-IS, B - BGP
Timers: Uptime
 
IP Route Table for VRF "default"
C      ::1/128 via ::, lo, 03:59:56
S      1111::1/128 [1/0] via 5000::1, xe3, 00:00:46
C      2222::2/128 via ::, lo, 00:01:27
S      3333::3/128 [1/0] via 6000::1, xe5, 00:00:26
C      5000::/64 via ::, xe3, 00:01:52
C      6000::/64 via ::, xe5, 00:01:10
C      fe80::/64 via ::, vlan1.2, 01:17:00
R2#
R2#show ipv6 route summary
IPv6 routing table name is Default-IPv6-Routing-Table(0)
IPv6 routing table maximum-paths : 8
Total number of IPv6 routes      : 7
Total number of IPv6 paths       : 7
Pending routes (due to route max reached): 0
Route Source    Networks
connected       5
static          2
Total           7
FIB             7
 
ECMP statistics (active in ASIC):
---------------------------------
 Total number of IPv6 ECMP routes   : 0
 Total number of IPv6 ECMP paths    : 0
R2#show ipv6 route database
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
       IA - OSPF inter area, E1 - OSPF external type 1,
       E2 - OSPF external type 2, E - EVPN  N1 - OSPF NSSA external type 1,
       N2 - OSPF NSSA external type 2, i - IS-IS, B - BGP
       > - selected route, * - FIB route,p - stale info
Timers: Uptime
 
IP Route Table for VRF "default"
C   *> ::1/128 via ::, lo, 04:00:02
S   *> 1111::1/128 [1/0] via 5000::1, xe3, 00:00:52
C   *> 2222::2/128 via ::, lo, 00:01:33
S   *> 3333::3/128 [1/0] via 6000::1, xe5, 00:00:32
C   *> 5000::/64 via ::, xe3, 00:01:58
C   *> 6000::/64 via ::, xe5, 00:01:16
C   *> fe80::/64 via ::, vlan1.2, 01:17:06
C      fe80::/64 via ::, vlan1.1, 01:17:06
C      fe80::/64 via ::, xe29, 01:48:22
C      fe80::/64 via ::, xe27, 01:48:22
C      fe80::/64 via ::, ce47, 03:59:22
C      fe80::/64 via ::, ce46, 03:59:22
C      fe80::/64 via ::, ce45, 03:59:22
C      fe80::/64 via ::, ce43, 03:59:22
C      fe80::/64 via ::, xe42, 03:59:22
C      fe80::/64 via ::, xe41, 03:59:22
C      fe80::/64 via ::, xe34, 03:59:22
C      fe80::/64 via ::, xe33, 03:59:22
C      fe80::/64 via ::, xe32, 03:59:22
C      fe80::/64 via ::, xe31, 03:59:22
C      fe80::/64 via ::, xe25, 03:59:22
C      fe80::/64 via ::, xe23, 03:59:22
C      fe80::/64 via ::, xe5, 03:59:22
C      fe80::/64 via ::, xe3, 03:59:22
R2#

R3

Copy
R3#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
       IA - OSPF inter area, E1 - OSPF external type 1,
       E2 - OSPF external type 2, E - EVPN  N1 - OSPF NSSA external type 1,
       N2 - OSPF NSSA external type 2, i - IS-IS, B - BGP
Timers: Uptime
 
IP Route Table for VRF "default"
S      ::/0 [1/0] via 6000::2, xe5, 00:00:07
C      ::1/128 via ::, lo, 20:46:35
C      3333::3/128 via ::, lo, 00:00:57
C      6000::/64 via ::, xe5, 00:00:46
C      fe80::/64 via ::, ce43, 01:50:07
R3#show ipv6 route summary
IPv6 routing table name is Default-IPv6-Routing-Table(0)
IPv6 routing table maximum-paths : 8
Total number of IPv6 routes      : 5
Total number of IPv6 paths       : 5
Pending routes (due to route max reached): 0
Route Source    Networks
connected       4
static          1
Total           5
FIB             5
 
ECMP statistics (active in ASIC):
---------------------------------
 Total number of IPv6 ECMP routes   : 0
 Total number of IPv6 ECMP paths    : 0
R3#
R3#show ipv6 route database
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
       IA - OSPF inter area, E1 - OSPF external type 1,
       E2 - OSPF external type 2, E - EVPN  N1 - OSPF NSSA external type 1,
       N2 - OSPF NSSA external type 2, i - IS-IS, B - BGP
       > - selected route, * - FIB route,p - stale info
Timers: Uptime
 
IP Route Table for VRF "default"
S   *> ::/0 [1/0] via 6000::2, xe5, 00:00:18
C   *> ::1/128 via ::, lo, 20:46:46
C   *> 3333::3/128 via ::, lo, 00:01:08
C   *> 6000::/64 via ::, xe5, 00:00:57
C   *> fe80::/64 via ::, ce43, 01:50:18
C      fe80::/64 via ::, xe32, 01:50:18
C      fe80::/64 via ::, xe29, 01:50:18
C      fe80::/64 via ::, xe15, 01:50:18
C      fe80::/64 via ::, xe3, 01:50:18
C      fe80::/64 via ::, ce47, 04:01:18
C      fe80::/64 via ::, ce45, 04:01:18
C      fe80::/64 via ::, xe42, 04:01:18
C      fe80::/64 via ::, xe41, 04:01:18
C      fe80::/64 via ::, xe5, 04:01:18
C      fe80::/64 via ::, xe34, 20:46:15
C      fe80::/64 via ::, xe33, 20:46:15
C      fe80::/64 via ::, xe12, 20:46:15
C      fe80::/64 via ::, xe11, 20:46:15