1

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.

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
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"
----------------------------
2

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
    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
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"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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