Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Feb 2009 13:32:32 -0500
From:      Steve Bertrand <steve@ibctech.ca>
To:        Reinhard Haller <reinhard.haller@interactive-net.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ipv6 aliases in rc.conf
Message-ID:  <49970E40.4030604@ibctech.ca>
In-Reply-To: <4996AFAC.1050707@interactive-net.de>
References:  <4996AFAC.1050707@interactive-net.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

Technically, IPv6 is designed for multiple addresses on each interface,
so the secondary (alias) parameter should not be needed at all. However,
using ifconfig, we must abide by it's methods of usage.

IPv6 addresses should be put inline with the IPv4 addresses under the
alias numbering scheme, and things will hold together.

Out of curiosity, why are you using a /48 prefixlen? I understand the
/128 (when it is not inside of another assigned prefix), but IMHO, you
should only use a /64 on an interface.

Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49970E40.4030604>