2

How can I assign two or more IPv6 address on one NIC. I tried Google but no luck. I've done it with ipv4 but ipv6 can not.

1
  • Can you elaborate more on what you've tried and the issues you've encountered? Otherwise you'll likely just find the same answers you got on Google. Mar 10, 2012 at 21:07

3 Answers 3

3

I tried a search for freebsd ip tools ipv6. I found instruction at http://www.kame.net/~suz/freebsd-ipv6-config-guide.txt.

method 1) completely static configuration like IPv4
Linklocal prefix (fe80:....) is automatically generated, so you 
don't have to configure it.
-------/etc/rc.conf---------
ipv6_network_interfaces="fxp0"
ipv6_ifconfig_fxp0="3ffe:501:ffff:2::1 prefixlen 64"
ipv6_ifconfig_fxp0_alias0="2001:ffff:0:2::2 prefixlen 64"
ipv6_defaultrouter="fe80::1%fxp0"
----------------------------
0
3

Manually configuring IPv6 addresses:

ifconfig if_name inet6 ipv6_address/len action

So to add an address to em0

ifconfig em0 inet6 2001:db8:bdbd::1/64 add

Delete that address simply by swapping delete for add

Configure addresses in rc.conf almost the exact same way as IPv4:

ifconfig_em0_aliasN="inet6 2001:db8:bdbd::1/64"

See man ifconfig and man rc.conf for lots more info too.

1
  • 1
    Newer versions of /etc/defaults/rc.conf suggest following syntax ifconfig_${ifname}_ipv6="inet6 2001:db8:bdbd::1 prefixlen 64" Mar 11, 2012 at 21:56
2

Method at http://www.kame.net/~suz/freebsd-ipv6-config-guide.txt is obsolete. Below method is working for me (I'm using FreeBSD 9.0) :

Example :

ifconfig_em0_ipv6="inet6 2607:f358:0001:fed2:0023:0000:6cd2:aaaa/64"
ifconfig_em0_alias0="inet6 2607:f358:0001:fed2:0023:0000:6cd2:aabb/64"
ipv6_defaultrouter="2607:f358:0001:fed2:0023::1"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .