Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Oct 2013 19:33:47 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: IPV6 multiple addresses with same prefix
Message-ID:  <5266C50B.9050102@FreeBSD.org>
In-Reply-To: <20131022183548.9b18fc59e4374e7274d0e116@sohara.org>
References:  <20131022183548.9b18fc59e4374e7274d0e116@sohara.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--AREl4sR6DUnNqRwkfkIdRihdiLJLk7w7m
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 22/10/2013 18:35, Steve O'Hara-Smith wrote:
> 	Hi,
>=20
> 	Does anyone here know of a way to set multiple IPV6 addresses with
> the same prefix on an interface so that a jail can have it's own IPV6
> address ? When I try it ifconfig happily assigns the second address but=
 it
> gets flagged as 'duplicate' and no traffic gets to the jail using /64
> or /128 makes no difference, even ping6 fails to get responses.
>=20

Works for me...

lucid-nonsense:/home/matthew:# ifconfig em0
em0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 15=
00
	options=3D4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,W=
OL_MAGIC,VLAN_HWTSO>
	ether 68:05:ca:0b:3d:42
	inet6 2001:8b0:151:1:3850:9ee6:9c6b:8a8b prefixlen 64
	inet6 fe80::6a05:caff:fe0b:3d42%em0 prefixlen 64 scopeid 0x5
	inet 81.2.117.97 netmask 0xfffffff8 broadcast 81.2.117.103
	inet6 2001:8b0:151:1:3cd3:cd67:fafa:3d78 prefixlen 64
	inet6 2001:8b0:151:1:78ea:429a:bbd9:f62f prefixlen 64
	inet6 2001:8b0:151:1:c2f:23d1:314c:5e2e prefixlen 64
	inet6 2001:8b0:151:1:e2cb:4eff:fe26:6481 prefixlen 64
	inet6 2001:8b0:151:1:38df:dfbd:32df:5017 prefixlen 64
	inet6 2001:8b0:151:1:68b2:667a:d0cc:7c8f prefixlen 64
	inet6 2001:8b0:151:1:18d3:a7d:fe4:1d6a prefixlen 64
	inet6 2001:8b0:151:1:6a05:caff:fe0b:3d42 prefixlen 64
	inet6 2001:8b0:151:1:: prefixlen 64 anycast
	inet6 2001:8b0:151:1:54f9:9484:e8b0:12d1 prefixlen 128
	nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL>
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active

=2E.. and at least one of those IPv6 IPs is for a jail.  rc.conf settings=

are like so:

ipv6_prefix_em0=3D"2001:8b0:151:1"
ifconfig_em0_ipv6=3D"inet6 2001:8b0:151:1:3850:9ee6:9c6b:8a8b/64"
ifconfig_em0_alias0=3D"inet6 2001:8b0:151:1:3cd3:cd67:fafa:3d78/64"
ifconfig_em0_alias1=3D"inet6 2001:8b0:151:1:78ea:429a:bbd9:f62f/64"
ifconfig_em0_alias2=3D"inet6 2001:8b0:151:1:c2f:23d1:314c:5e2e/64"
ifconfig_em0_alias3=3D"inet6 2001:8b0:151:1:e2cb:4eff:fe26:6481/64"
ifconfig_em0_alias4=3D"inet6 2001:8b0:151:1:38df:dfbd:32df:5017/64"
ifconfig_em0_alias5=3D"inet6 2001:8b0:151:1:68b2:667a:d0cc:7c8f/64"
ifconfig_em0_alias6=3D"inet6 2001:8b0:151:1:18d3:a7d:fe4:1d6a/64"

for the aliases, and like so:

jail_xenophobe_hostname=3D"xenophobe.infracaninophile.co.uk"
jail_xenophobe_rootdir=3D"/jail/xenophobe"
jail_xenophobe_ip=3D"2001:8b0:151:1:54f9:9484:e8b0:12d1"
jail_xenophobe_mount_enable=3D"YES"
jail_xenophobe_zfs=3D"zroot/jail/xenophobe zroot/jail/xenophobe/TimeMachi=
ne"
jail_xenophobe_params=3D"enforce_statfs=3D1"

for the jail.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey



--AREl4sR6DUnNqRwkfkIdRihdiLJLk7w7m
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJ8BAEBCgBmBQJSZsUTXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC
QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATrLsQAKri2lc/cr8p7CT/VQ5ChBPF
RUxNpue2EBggvBfrDL2zobdwiAkJTiV2VF9XJmbLno5QScW7le9QhEcX0EilyL/E
ecGL9OG/sahl+46JhQKF2FvzbjBWaFj2qgAQpdafvEZqxnKNcC8sGhF6f2BKTZgf
yYVKpAhDdM4Tydsd2M8sUyOJ45DoVPVpzZ1665UK017zeRhRJQ+i4+dfInPch4hz
xsWWpt9qhlaKygXOegWS0oAwNkUjUrKWmjISbZ8Sin/zj+sHnjssId2jGlN+Tzni
PHGV59yByx5hQepLXLKZzMhumZNkZYPupcorMNzD6e22cIraEh8iafC+3+89v3L/
YViXUnr6vn5qbXYwYxlHu5dXJlDx+hEuXj3AmfwHrv8phwLi//9a621nT8MpTGit
Ia5mVWpeuaa3KZXallH4resgi3uvjGcoym2SaDSxPtheudFx1guRLK+7vSDlvMfR
lS0KwUKERjdgUDpZGimstInmbyVc6ZlJKeKfgqvTy+RfUJ/mPMjqCDWfRQktnq/z
IYuu8bK9ykPIXq31wP2OaXRmmqw+FFC39L/p2f0X3Tfmk3WYVIJxJ77aSSkpceMr
0aZwy3uQXjv24ERVeVogYdE8XxwEqavY4EkazCX4PcYD4JLksURKV+72XZr8slQT
iuXu6F20UGQk5OZXyLFS
=J/8z
-----END PGP SIGNATURE-----

--AREl4sR6DUnNqRwkfkIdRihdiLJLk7w7m--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5266C50B.9050102>