ipv6 aliases in rc.conf

Steve Bertrand steve at ibctech.ca
Sun Feb 15 10:37:52 PST 2009


> Reinhard Haller wrote:
>> Hi,
>>
>> I'm trying to add ipv6 aliases for my jails (7.1) in rc.conf.
>>
>> ifconfig_lo0_alias0="inet 192.168.64.1 netmask 255.255.255.0"
>> ifconfig_lo0_alias1="inet 192.168.64.2 netmask 255.255.255.255"
>> ipv6_ifconfig_lo0_alias0="inet6 fd08:2548:a3e8:40::1 prefixlen 48"
>> ipv6_ifconfig_lo0_alias1="inet6 fd08:2548:a3e8:40::2 prefixlen 128"
>
> ifconfig_lo0="inet 192.168.64.1 netmask 255.255.255.0"
> ifconfig_lo0_alias0="inet 192.168.64.2 netmask 255.255.255.255"
> ifconfig_lo0_alias1="inet6 fd08:2548:a3e8:40::1 prefixlen 48"
> ifconfig_lo0_alias2="inet6 fd08:2548:a3e8:40::2 prefixlen 128"
>
> ...works for me.

I want to add to my post that it is not advisable to use your primary
loopback interface for anything other than localhost.

Keep lo0 as is, and use loN interfaces instead.

To add new loopback interfaces, in rc.conf add:

cloned_interfaces="lo1 lo2 lo3" #etc

...and then, add an 'UP' entry to ifconfig prior to interface use:

ifconfig_lo1="UP"
ifconfig_lo1="inet ..."
ifconfig_lo1_alias0="inet6 ..."
# etc.

Steve


More information about the freebsd-questions mailing list