Network Configuration in FreeBSD

There are detailed projects for installing a Dual Stack FreeBSD server with both FreeBSD 8.4 and 9.1. These include enabling and configuring IPv6, but that information is included here as well, for those who already have FreeBSD installed. FreeBSD 9.x is a major revision of FreeBSD in many respects. One of the significant changes is in how you configure IPv6. 

Deploy Dual Stack FreeBSD 8.4 Server

Deploy Dual Stack FreeBSD 9.1 Server

There is also a project showing how to enable and configure a DHCPv4 server (dhcpd) and a Router Advertisement Daemon (rtadvd). It also enables packet forwarding for both IPv4 and IPv6:

Create a Virtual Dual Stack Router with FreeBSD 9.1

In the following, it is assumed we are enabling and configuring IPv6 on one interface, which is "em0". Replace "em0" with the name of your interface if different. You can enable IPv6 on any number of interfaces. It is further assumed that the desired node address is 2001:db8:1:1000::21, and the default gateway address is 2001:db8:1:1000::1. Replace these addresses below with your own settings.

Enable IPv6:

Pre 9.x:






Specify IPv6 Static Address

Pre 9.x:

ipv6_ifconfig_em0="2001:db8:1:1000::21 prefixlen 64"


ifconfig_em0_ipv6 = "inet6 2001:db8:1:1000::21 prefixlen 64"

Specify Default Gateway

All versions (use global unicast or link-local, but not both):



Note: with all versions of FreeBSD, if you specify a static address, the node will not use SLAAC to determine the default gateway or to configure additional global unicast addresses, even if you have specifically told it to receive router advertisements. This is different from Windows behavior. If you specify a static node address, you must also specify the default gateway explicitly as shown above.

If you do not specify a static address, the node will obtain the link-local default gateway and a global unicast address for each advertised subnet prefix, using SLAAC.