Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

migrated from serverfault.com Mar 11 '12 at 15:03

This question came from our site for system and network administrators.

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. – Mark Henderson Mar 10 '12 at 21:07
up vote 2 down vote accepted

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.
ipv6_ifconfig_fxp0="3ffe:501:ffff:2::1 prefixlen 64"
ipv6_ifconfig_fxp0_alias0="2001:ffff:0:2::2 prefixlen 64"
share|improve this answer

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.

share|improve this answer
Newer versions of /etc/defaults/rc.conf suggest following syntax ifconfig_${ifname}_ipv6="inet6 2001:db8:bdbd::1 prefixlen 64" – SaveTheRbtz Mar 11 '12 at 21:56

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"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.