secondary IPV6 address add gateway and interface problem in VPS ON / openNebula.

Solved2.09K viewsVirtual servers#address #ipv6 #vpson
0

After several manual attempts directly in the shell on the vps I decided to ask for support via email. A nice and friendly technician gave me the following link https://kb.wedos.com/cs/vps-on/vps-on-pridani-ipv6-adresy/#pridani-druhe-ipv6-adresy

i followed the guide and i finally managed to add additional ipv6 to the ::/56 subnet assigned in the opennebula panel. As you can see from the following images I have attached and added a total of 5 ipv6.

After updating the changes and restarting the server, the situation is as follows. Given that it is absurd from my point of view that openNebula raises 5 interfaces eth1 for ::1, eth2 for ::2, eth3 ::3 .. in the config and assigning a single ipv6 address for each interface being precisely from the same subnet and not there is an attempt to delegate to a user outside the network. Having said that, I rebooted the server and was expecting that /etc/network/interfaces had already taken the configuration but to my surprise it didn’t.

So I tried to add static addresses at startup without specifying the gateway for all addresses but only for the starting ::1 (see example). Result ::1 responds to pings and all others ::2 ::3 ::4 ::5 do not respond. I then tried to add the gateway for each ip with the result that ::5 replied and ::4 ::3 ::2 ::1 no longer replied.

1) vim /etc/network/interfaces

auto eth1
iface eth1 inet6 static
  address 2a02:x:x:x::1
  netmask 56
  autoconf 0
  accept_ra 0
  gateway 2a02:x:x:x::1 # opennebula specified in the panel
 auto eth2
iface eth2 inet6 static
  address 2a02:x:x:x::2
  netmask 56
# gateway 2a02:x:x:x::1 (test add ipv6 without gateway)
...
continue up to 5

At this point I went to add by hand following information from the main opennebula panel and then to check the routes on the vps and I realized that the situation is the following.

~$ ip -6 r s
2a02:x:x:x::/56 dev eth1 proto kernel metric 256 pref medium
2a02:x:x:x::/56 dev eth2 proto kernel metric 256 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev eth1 proto kernel metric 256 pref medium
fe80::/64 dev eth2 proto kernel metric 256 pref medium
default via 2a02:x:x:x::1 dev eth1 metric 1024 onlink pref medium
~$ route -6
Kernel IPv6 routing table
Destination                    Next Hop                   Flag Met Ref Use If
2a02:x:x:x::/56           [::]                       U    256 2     0 eth1
2a02:x:x:x::/56           [::]                       U    256 1     0 eth2
fe80::/64                      [::]                       U    256 2     0 eth0
fe80::/64                      [::]                       U    256 2     0 eth1
fe80::/64                      [::]                       U    256 1     0 eth2
[::]/0                         2a02:2b88:2:500::1         UGH  1024 2     0 eth1
ip6-localhost/128              [::]                       Un   0   4     0 lo
address/128               [::]                       Un   0   4     0 eth1
2a02:x:x:x::2/128         [::]                       Un   0   2     0 eth2
fe80::59ff:fedd:d89e/128       [::]                       Un   0   4     0 eth0
fe80::e8ff:fe41:9a4/128        [::]                       Un   0   4     0 eth1
fe80::e8ff:fe41:9a5/128        [::]                       Un   0   2     0 eth2
ff00::/8                       [::]                       U    256 3     0 eth0
ff00::/8                       [::]                       U    256 2     0 eth1
ff00::/8                       [::]                       U    256 2     0 eth2
[::]/0                         [::]                       !n   -1  1     0 lo

ifconfig:

I realized then and I tried add manually add the gateway for eth2, eth3 … obviously with result:

~$ sudo ip  -6 r a default via 2a02:x:x:x::1 dev eth2 
RTNETLINK answers: File exists

at this point I wonder how it is right to do. Theoretically I should remove the gateway which is only assigned to eth1 and globally assign it to everything. Correct?

Example:

~$ sudo ip -6 r d default via 2a02:x:x:x::1 dev eth1

and add new global gateway without dev

~$ sudo ip -6 r a default via 2a02:x:x:x::1

I have a feeling it won’t work. Did you have the same problem? do you have any ideas about it?

Thanks for your help.

Role: Customer
Question is closed for new answers.
MB313456 Selected answer as best 26. 11. 2021

Categories