Department of Defense
High Performance Computing Modernization Program

Enabling IPv6

Internet Protocol version 6 (IPv6) is enabled by default in FreeBSD 9.0 and later. These directions will help you enable IPv6 on earlier FreeBSD systems (IPv4 will continue to run at the same time). You must be logged in as root to make the changes. To get root type su and your root password. Warning: In FreeBSD, you must be in the wheel group to su to root.

You need to edit the file /etc/rc.conf to perform the following actions:

1. To enable IPv6, just add the line:


You can choose to manually or automatically configure the IPv6 settings. The latter method uses the daemon rtsol to autoconfigure your interface on boot; to use it, you do not need to add any other lines.

To manually assign an IP address, you need to determine the name of your network interface using the ifconfig command. Typical interfaces are em0 or fxp0.

2. To add the IPv6 address 2001:471:1f11:251:290::2093 to your fxp0 interface, add the following line:


3. To assign a default router of 2001:471:1f11:251:290::1 add the following line:


Reboot your machine, and IPv6 should be ready to go. To verify that IPv6 is working, try

$ ping6 -n

4. Privacy extensions are not enabled by default. Execute the following

sysctl net.inet6.ip6.use_tempaddr=1

to enable their use on all interfaces. To prefer their use over other address types, execute the following

sysctl net.inet6.ip6.prefer_tempaddr=1

Another useful IPv6 command on FreeBSD is traceroute6. You can also use a v6-capable browser like mozilla or epiphany to reach IPv6 sites such as

To manually resolve an IPv6 address:

$ nslookup
> set type=AAAA

For more information, please visit

and look at the IPv6 section of the Advanced Networking chapter.

Also, for information about FreeBSD on an IPv6-only network visit


Disabling IPv6

The first version to contain IPv6 support was FreeBSD 4. In FreeBSD releases 9.0 and later, IPv6 is enabled by default. To disable it,

1. Edit the file /etc/rc.conf

2. Add the following line to the file

ipv6_network_interfaces="none"                 # Default is auto

(If other ipv6_network_interfaces lines exist in the file, delete them)

3. Reboot (or, restart the rc.d script)

In FreeBSD releases up to 8.x, IPv6 was disabled by default. To disable it after it has been enabled,

1. Edit the file /etc/rc.conf

2. Delete the ipv6_enable line or else edit it to read

ipv6_enable="NO"                                                # Default is NO

3. Reboot (or, restart the rc.d script)