VirtualBox: I'm stuck with choosing an IPv6 prefix for NAT Network

Ubuntu Version:
Host: 22.04
Guest: 24.04

Desktop Environment (if applicable): Gnome

VirtualBox version:
7.0.24 r167081 (Qt5.15.3)

Problem Description:

VirtualBox doesn’t support IPv6 by default, but it can be made to do so. I need it for some testing in my guest machine.

(I should probably state that my host uses IPv6 — I can see it on What Is My IP Address, among other places.)

To enable IPv6 in VirtualBox, I’m following these instructions to create a NAT Network in VirtualBox, but I’m stuck where I have to enter an IPv6 Prefix.

VirtualBox NAT Network IPv6 Prefix

I have no clue how to choose an IPv6 prefix. I’ve tried various ideas that I’ve found on the internet, but as none of them directly addressed the issue, and I don’t understand what it means, unsurprisingly I’ve not managed to make any of them work!

How do I work out what I’m supposed to put in there, please? (All that I know is that it’s supposed to be a /64 prefix, but I don’t even know what that means. :frowning: )

Thank you

It has been years since I’ve used VB, I’m very fond on KVM’s :stuck_out_tongue:

Paddy will it show in:

ip a | grep prefix

Thanks, @1fallen

I’m very fond on KVM’s

I tried QEMU/KVM not that long ago, but it didn’t allow snapshots for VMs with Secure Boot. I also found it far more complex to set up than VirtualBox, so I decided to stick with the latter.

Anyway, on running your command, I get this result:

$ ip a | grep prefix
    inet 192.168.55.128/24 brd 192.168.55.255 scope global dynamic noprefixroute wlo1
    inet6 2a05:b100:2600:6e00:3ade:a88c:dc27:9229/64 scope global dynamic mngtmpaddr noprefixroute 
    inet6 fe80::90ac:85df:121c:4239/64 scope link noprefixroute

When I try to use this as the IPv6 prefix:

2a05:b100:2600:6e00:3ade:a88c:dc27:9229/64

I get this error:

Non-zero bits in the interface ID part of the IPv6 prefix 2a05:b100:2600:6e00:3ade:a88c:dc27:9229/64.

When I try to use this as the IPv6 prefix:

fe80::90ac:85df:121c:4239/64

I get this error:

IPv6 prefix fe80::90ac:85df:121c:4239 is not unicast.

Unfortunately, this means absolutely nothing to me. Does this make sense to you?

Nope, Dang!
If it were me I would just set-up a bridge now! Or hopefully someone wiser on ipv6 will reply…

Sorry Paddy I wish I could be more help! :frowning:

1 Like

I posted on the VirtualBox forum, and discovered that I didn’t have the latest Version of VirtualBox (I had thought that I had).

The latest version of VirtualBox (version 7.1.6) supports IPv6 out of the box — no special settings required!

This is a great relief.

VirtualBox 7.1.6 introduces a couple of new problems, which I’m busy trying to address, but at least I can work around them at the moment.

So, solved!

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.