New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Configuring IPv6 with Netplan on GreencloudVPS
I got a VPS from Greencloud from their recent sale, and I'm trying to set up IPv6 on it. The VPS is running Ubuntu 22.04, and therefore uses netplan.
Unfortunately, their support wasn't very helpful and pointed me to general netplan documentation, followed by a request for my root password(!), so here I am:
I have the following configuration:
network:
ethernets:
ens3:
dhcp4: true
accept-ra: false
gateway6: "2607:9000:8000:22::1"
addresses:
- "2607:9000:8000:22::XX:XXXX/112"
version: 2
However, this does not lead to IPv6 connectivity, as can be confirmed by running ping:
$ ping -6 google.com
ping: connect: Network is unreachable
How would I go about fixing this?
Thanks!
Comments
Are using reconfigure networking from solusvm not work?
Tagging @yoursunny as resident IPv6 guru
also so he can get shredded.
This is what I use in Singapore location:
match.macaddress field is the MAC address of the uplink interface.
I use MAC address matching rather than name matching, to avoid loss of connectivity due to unexpected name changes.
See Disabling VNC in Virtualizor ⇒ Lost Connectivity?.
There are two IPv6 addresses listed.
The first one can be selected for outgoing connections.
The second one is only for incoming connections.
See How to Select Default IPv6 Source Address for Outbound Traffic with Netplan.
That typically just changes the /etc/network/interfaces file, which is of no use in a netplan setup.
Thanks for the pointers, is there a reason for adding a route block? Does it simply act as a replacement for the gateway6 attribute which netplan reports as being deprecated?
I don't use netplan but I suspect the
route
-block is required since the gateway IP is outside your /112 subnet.Correct.
It needs to have on-link: true.
Some ill-advised tutorials may tell you to artificially enlarge your subnet so that the gateway is in your subnet.
The consequence for that is breaking communication to destinations within your enlarged subnet.
In SolusVM network tab you have ipv6 info.. Using that info follow this
ip -6 addr add Ipv6/sub dev ens3
ip -6 route add GW dev ens3
ip -6 route add default via GW dev ens3
after testing if all works just add these in rc.local so they load on restart.
just for sample this is mine
ip -6 addr add 2001:41d1:f:3a5::b00b/64 dev eth0
ip -6 route add 2001:41d0:e:3ff:ff:ff:ff:ff dev eth0
ip -6 route add default via 2001:41d0:e:3ff:ff:ff:ff:ff dev eth0