Wednesday, July 13, 2011

Adding IPv6 to FreeBSD systems

In order to bind  IPv6 on a FreeBSD 6.X or 7.X system that was deployed and imaged prior to having an IPv6 subnet under your account, you will need to add the following to your /etc/rc.conf file


This configuration shows that em1 is the network interface you want to use. It also shows that 2607:f0d0:2001::5 is the address that you want assigned with a prefix length of /64, and that the default routers is 2607:f0d0:2001::1


#ipv6
ipv6_enable="YES"
ipv6_network_interfaces="em1"
ipv6_ifconfig_em1="2607:f0d0:2001::5 prefixlen 64"
ipv6_defaultrouter="2607:f0d0:2001::1"


Once this has been edited and saved, you can reboot your machine and it will bring up the interface.


If you want to have secondary IPv6 addresses on the FreeBSD machine you can add the following lines to your /etc/rc.conf under your ipv6 configuration section.


ipv6_ifconfig_em1_alias0="2607:f0d0:2001::7  prefixlen 64"
ipv6_ifconfig_em1_alias1="2607:f0d0:2001::6 prefixlen 64"
ipv6_ifconfig_em1_alias2="2607:f0d0:2001::8 prefixlen 64"


So my ipv6 section on this freebsd box looks like this.


fbsd-ipv6-test# cat /etc/rc.conf | grep ipv6


#ipv6
ipv6_enable="YES"
ipv6_network_interfaces="em1"
ipv6_ifconfig_em1="2607:f0d0:2001::5 prefixlen 64"
ipv6_ifconfig_em1_alias0="2607:f0d0:2001::7  prefixlen 64"
ipv6_ifconfig_em1_alias1="2607:f0d0:2001::6 prefixlen 64"
ipv6_ifconfig_em1_alias2="2607:f0d0:2001::8 prefixlen 64"
ipv6_defaultrouter="2607:f0d0:2001::1"


Read more http://blogmee.info/index.php/adding-ipv6-to-freebsd-systems/

No comments:

Post a Comment