Skip to content

Instantly share code, notes, and snippets.

@sc68cal
Last active August 29, 2015 14:20
Show Gist options
  • Save sc68cal/dfc37458e9fe331ca3b9 to your computer and use it in GitHub Desktop.
Save sc68cal/dfc37458e9fe331ca3b9 to your computer and use it in GitHub Desktop.
IPv6 in VirtualBox

VirtualBox allows the creation of IPv6 networking prefixes on Host-Only adapters. It will statically assign an address to the interface, however it will not advertise the route. Meaning that guest VMs that are attached to the Host-Only network will not configure their IPv6 stacks automatically.

radvd (or rtadvd on *BSD) can be configured to advertise the IPv6 prefix that has been created in VirtualBox, however there is an issue in some operating systems, where the IPv6 stack cannot simultaneously be a host as well as a router (forward packets).

Linux Support

https://lkml.org/lkml/2011/7/26/482

The current IPv6 behavior is to not accept router advertisements while
forwarding, i.e. configured as router.

This does make sense, a router is typically not supposed to be auto
configured. However there are exceptions and we should allow the
current behavior to be overwritten.

Therefore this patch enables the user to overrule the "if forwarding
enabled then don't listen to RAs" rule by setting accept_ra to the
special value of 2.

FreeBSD Support

In addition to them, a per-interface flag NO_RADR and a sysctl(8) variable 
net.inet6.ip6.rfc6204w3 have been added. 
This controls whether default router list information via RA messages on
an RA-accepting interface should be ignored or not. 
In an IPv6 router model, it is not supposed to accept RA messages as an
information source for the default router list. 
Because of that, FreeBSD 9.0-RELEASE ignores the default router list part 
when IPv6 packet forwarding is enabled, 
even if the interface has an ACCEPT_RTADV flag. However, this can make for a 
difficult situation when the system has to 
work as a CPE (Customer Premises Equipment) which needs RA messages from the 
upstream network for network configuration 
and acts as a router for the LAN simultaneously. 
For more information about this kind of configuration, see RFC 6204.

LINKS

https://tools.ietf.org/html/rfc6204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment