How to define IPv6 policy routing default route via NetworkManager?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 8
  • IPv6
  • Policy routing

Issue

  • How to define IPv6 policy routing default route via NetworkManager?
  • I have a route configuration file with the default route for a routing table like this, but it does not apply on boot:
route6-bond0
default via 2001::ff table 1
# ip -6 route show table 1
Error: ipv6: FIB table does not exist.
Dump terminated

Resolution

Add the route to the NetworkManager connection properties with:

nmcli con mod bond0 ipv6.routes "::/0 2001::ff table=1"

This results in the configuration:

# nmcli con show bond0 | grep ipv6.routes
ipv6.routes:                            { ip = ::/0, nh = 2001::ff table=1 }

Or on disk with:

# cat /etc/sysconfig/network-scripts/route6-bond0
::/0 via 2001::ff table 1

Diagnostic Steps

The FIB table does not exist is the expected result when a routing table has not been populated:

Define policy routes for NetworkManager like this:

Components

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.