Configure IPv6 for natnetwork

This is for discussing general topics about how to use VirtualBox.
Post Reply
Tim.Price
Posts: 1
Joined: 1. Dec 2016, 17:40

Configure IPv6 for natnetwork

Post by Tim.Price »

Hi,

after enabling IPv6 for the natnetwork, my guest system gets a IPv6 ULA assigned. So far that´s great.
But how can I configure the IPv6 settings, especially the IPv6 prefix for the natnetwork?

Listing the natnetworks on my host system returns:

Code: Select all

# VBoxManage list natnetworks
NetworkName:    IPv6Test
IP:             10.0.2.1
Network:        10.0.2.0/24
IPv6 Enabled:   Yes
IPv6 Prefix:    fd17:625c:f037:2::/64
DHCP Enabled:   Yes
Enabled:        Yes
loopback mappings (ipv4)
        127.0.0.1=2
The IPv6 Prefix does not seem to be related to any configuration of my Virtualbox installation, the host system or the host networks.
So were does Virtualbox aquire the IPv6 Prefix from and how can I configure it?
In the documentation I can´t even find the IPv6 Prefix mentioned. It just says "--ipv6 on|off" (see section 8.36. in the user manual).

Any help is very appreciated.
Best regards!
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Configure IPv6 for natnetwork

Post by socratis »

Tim.Price wrote:So were does Virtualbox aquire the IPv6 Prefix from and how can I configure it? In the documentation I can´t even find the IPv6 Prefix mentioned.
It's mentioned twice in the source code. The related files are, "/src/VBox/NetworkServices/NAT/VBoxNetLwipNAT.cpp" and "/src/VBox/Main/src-server/NATNetworkImpl.cpp":

Code: Select all

/*
 * RFC 4193 Locally Assigned Global ID (ULA) in slot 1
 * [fd17:625c:f037:XXXX::1] where XXXX, 16 bit Subnet ID, are two
 * bytes from the middle of the IPv4 address, e.g. :dead: for
 * 10.222.173.1
 */
and if you follow the trail, you end up in https://tools.ietf.org/html/rfc4193 sections 3.2.1 and 3.2.2.

For VirtualBox it seems that it's fixed for the largest part and you'd have to modify the source code to change it.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Knudch
Posts: 21
Joined: 24. Jun 2016, 21:19

Re: Configure IPv6 for natnetwork

Post by Knudch »

I take this old thread up.....

It seems that VBoxManage does not return correct info about IPv6 at least in a Natnetwork

Ipv6 prefix is generated as Socratis describe but VBoxManage returns incorrect values

VBoxmanage natnetwork list return network info but IPv6 prefix info is truncated to the first chararter of the prefix
prefix = fd17:625c:f037:a80f:: (Taken from natnetwork.log and what is correct in the virtual machine)
Shows only f

VBoxmanange list natnets returns the full prefix
Shows fd17:625c:f037:2::/64
But wrong value....assume it just takes the value from VirtualBox.xml file
This value does not reflect the calculation rules Socratis referenced and not what the virtualmachine operates with.

Further the command VBoxmanange list natnets does not show that there is actually a IPv6 loopback mapping
Prefix::2 mapped to host ::1

It seems that there are some "missing" points in IPv6 guest support

Knud
Post Reply