0

When I add the gateway, I got an error like this RTNETLINK answers: No route to host

I used all the below commands:

root@server1:~# /sbin/ip -6 route add default via 2620:1e6:101::8888:1
RTNETLINK answers: No route to host
root@server1:~# ip -6 r a default via 2620:1e6:101::1/64 dev venet0
Error: an inet address is expected rather than "2620:1e6:101::1/64".

But the issue is not solved

1 Answer 1

1

Both commands have some issues, the first one does not define an interface, while the second one indeed (as the error message says) lacks an address - 2620:1e6:101::1/64 denotes a subnet, not an address.

This should do:

ip -6 route add default via 2620:1e6:101::8888:1 dev venet0

To learn more about how to use the ip utility of the iproute2 suite, see the iproute2 cheat sheet. To delve into the depths of iproute2 magic, see here - the document is a bit dated but still valid.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.