I am going to set a static IPv6 address and a corresponding IPv6 default route with dhcpcd. I have looked through man dhcpcd.conf, but to find nowhere mentioning how to set an IPv6 default route.
My current dhcpcd.conf:
hostname
duid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option interface_mtu
require dhcp_server_identifier
interface eth0
noipv6rs
static ip6_address=2001:xxx::xxx/128
What I want dhcpcd to do is:
ip addr add 2001:xxx::xxx/112 dev eth0
ip -6 route add 2001:xxx::xxxx dev eth0
ip -6 route add default via 2001:xxx::xxxx
However, with my current configuration, dhcpcd does only the first two lines for me but not the third line.
man dhcpcd.conf only tells that an IPv4 default router can be set via something like static routers=192.168.0.1.
I know it can be done by ip -6 route add manually, using hooks of dhcpcd, or simply put aside dhcpcd. But I rely on dhcpcd to handle DHCPv4. And I think it would less messy if dhcpcd can handle both IPv4 and IPv6 configurations.
My question:
Is there a more direct way where dhcpcd sets the IPv6 default route automatically by specifying some options / commands in dhcpcd.conf?