IPv6 Unicast routing configuration

Routing Context

The IPv6 routing protocols that are provided within Turbo IPsec are:

  • BGP 4+
  • OSPF v3
  • RIPng

Displaying routing configuration

Routing configuration such as IPv4 or IPv6 static routes are stored into the rtg context.

  • Display routing configuration:

    router{}edit conf myconfig


    router{conf:myconfig}display rtg


         router rip
           default-information originate
       router ripng
       network 3ffe:1000::/64
       network eth1_0
      route default-ipv4
      route default-ipv6 3ffe:0:0:1808::19
    # IPV4 ROUTE
    # IPV6 ROUTE
      route 3ffe:304:107:1800::/64 1111::2

Showing the unicast routing tables (RIBs and router’s FIB)

The FIB contains the aggregated information from all the RIBs that have been discovered by the dynamic routing protocols or that have been set statically. There is one RIB for each routing protocol: a RIP RIB, a RIPng RIB, an OSPF v2 RIB, an OSPF v3 RIB, an IPv4 BGP 4 RIB and an IPv6 BGP 4+ RIB.

In fact, Turbo IPsec comprizes 2 unicast FIBs: the IPv4 one and the IPv6 one.

To display routing information about the current status of the router, such as IPv4 or IPv6 routes, use the show routing commands:

router{}show routing <?>
Valid entries at this position are:
  bgp      BGP information
  ip       IP information
  ipv6     IPv6 information
  memory   Memory statistics


The IPv4 unicast FIB and the IPv6 unicast FIB can be monitored with the show routing ip route and the show routing ipv6 route commands respectively.

The IPv6 unicast FIB - show routing ipv6 route

The show routing ipv6 route command displays the IPv6 routes (the IPv6 FIB) currently used by the routers. The routes can be statically configured or automatically learnt by a routing protocol.

router{}show routing ipv6 route
Codes: K - kernel route, C - connected, S - static, R - RIPng,
       O - OSPF v3, B - BGP, D - DEP, * - FIB route.

C>* ::1/128 is directly connected, lo0
C>* 2001:8::/64 is directly connected, eth1_0
C>* 2001:12::/64 is directly connected, eth2_0
C>* 3ffe:304:124:5101::/64 is directly connected, eth0_0
B>* 3ffe:304:124:5201::/64 [20/0] via fe80::250:4ff:fe53:1e49, eth1_0, 00:05:51
B>* 3ffe:304:124:5301::/64 [20/0] via fe80::2d0:b7ff:febb:4a42, eth2_0, 00:05:45
C * fe80::/64 is directly connected, eth2_0
C * fe80::/64 is directly connected, eth1_0
C * fe80::/64 is directly connected, eth0_0
C>* fe80::/64 is directly connected, lo0

The RIBs of the dynamic IPv6 routing protocols

  • Display dynamic IPv6 routing protocols RIBs:

    router{}show routing ipv6 {ripng|bgp|ospf6}

    Display the RIPng RIB.


    Display the BGP 4+ RIB.


    Display the OSPF v3 RIB.

IPv4 and IPv6 static routes


With the IPv6 technology, the same link can be used by many sub-networks. However, to pass through a router, this router needs to learn how to reach the connected networks of the links with some routes. For example, some static IPv6 routes can be defined between the links.

The static routes do not scale and are not error-free. They should be used only when dynamic routing protocols cannot be deployed, or in case of very simple topologies.

Static routing can be performed by directly manipulating Turbo IPsec routing table. It may be used with any dynamic routing protocol. When both static and dynamic routes are set, the FIB prefers the static ones because their administrative distance is 1.

Configuring static routes

IPv6 static default route

Configuring the static default-route provides output information to Turbo IPsec to forward a packet that cannot be processed locally.

For example, the default route of a CPE is usually the way through the public interface.

router{conf:myconfig-rtg}route default-ipv6 {gwaddress|iface} [distance] [mark <value>/<mask>]
Directly connected address. It means that it can be joined without any recursive routing lookup.
Optional. Specify the administrative distance (1-255). If unspecified, it is set to 1.
Optional. 6WIND next hop marking instead of Netfilter marking. Value can be between 1 and (2:sup:32-1). If nexthop mark field is 0, it means that we do not add a mark. The mark and mask are unsigned 32-bit integers.

With the IPv6 routes, the output interfaces can be enforced with the following command if the address is link-local:

router{conf:myconfig-rtg}route default-ipv6 gwaddress%iface
Link-local IPv6 address.

This format is required to add an IPv6 route via a link-local address:

router{conf:myconfig-rtg}route default-ipv6 fe80::cafe:deca%eth1_0

Regular static routes

  • Add a static IPv6 route:

    router{conf:myconfig-rtg}route network/M gwaddress|iface

    IPv6 (or IPv4) network prefix and prefix length.


    Next-hop address to which packets should be forwarded. This next-hop MUST be directly connected. If the gwaddress is down, the route is down too.



    The static routing configuration is the same for IPv4 and IPv6. However when IPv6 link-local addresses are used for the gateway address, the router’s output interface name, ifname, has to be provided using the following syntax:

    router{conf:myconfig-rtg}route network/prefixlen gwaddress%ifname

    If the interface ifname is down, the static IPv6 route is down too.

  • Delete a static route:

    router{conf:myconfig-rtg}delete route network/prefixlen
  • Delete all static routes:

    router{conf:myconfig-rtg}delete route all


The gateway address is the next-hop address of a remote router that is directly connected to one of the router’s interfaces. Otherwise the route remains inactive.As soon as the egress interface is up, the IPv6 link-local next-hop is always connected via this egress interface.

IPv4 and IPv6 static routing example

The IPv4 and IPv6 route configuration of Turbo IPsec of the following rt1 router is:


IPv4 and IPv6 static routing example


These two previous commands indicate that the network (resp. is reached via the next hop whose IPv4 address is (resp. that is connected to the subnet reachable via the eth0_0 (resp. eth1_0) interface.

However, the following configuration would not work because the next-hops are not directly connected:


The following command deletes the specified route:

router{conf:myconfig-rtg}delete route

The scope of the gateway addresses fe80::1234%eth0_0 and fe80::1234%eth1_0 is local.

router{conf:myconfig-rtg}route 3ffe:cafe::/56 fe80::1234%eth0_0
router{conf:myconfig-rtg}route 3ffe:beef::/56 fe80::1234%eth1_0

The following command deletes the specified route:

router{conf:myconfig-rtg}delete route 3ffe:cafe::/56


Like in IPv4, ECMP is supported. This feature allows defining several paths which have the same cost. It is mainly used for load balancing.

It is assumed the Operating System has been compiled with the appropriate enable-multipath option.

Virtual routers

By default, static routes are configured in VRF 0. To handle virtual routers, a specific VRF can be specified. The route will be stored into the corresponding forwarding table.

router{conf:myconfig-rtg}route network/M gwaddress [blackhole|reject] [mark <value>/<mask>] vrf-id VR
router{conf:myconfig-rtg}route network/M IFACE-PtP [mark <value>/<mask>] vrf-id VR
router{conf:myconfig-rtg}route network/M IFACE-BROADCAST [mark <value>/<mask>] vrf-id VR
Identifier of the VR.