Cannot configure IPv6 route
To reproduce the error, add IPv6 configuration to /etc/network/interfaces:
auto eth0
iface eth0 inet6 static
address 2606:8001:c845:9c54::1/112
gateway 2606:8001:c845::1
Note that IPs in the listing above are fictional.
On service networking start
the following error happens, and networking is not started:
RTNETLINK answers: Host is unreachable
The problem was not solved by installing iproute2-minimal
, because the root reason of the problem is inside ifup
.
The error happend because ifup
tries to add default route with command ip -6 route add default via 2606:8001:c845::1 metric 1 dev eth0
, however route for gateway does not exist. As a result, Linux kernel rejects this command. To fix this behaviour, command ip -6 route add 2606:8001:c845::1 dev eth0
should be executed by ifup before adding default route.
The buggy script is located here: https://github.com/ifupdown-ng/ifupdown-ng/blob/main/executor-scripts/linux/static