IPV6 multiple addresses with same prefix

Matthew Seaman matthew at FreeBSD.org
Tue Oct 22 18:34:02 UTC 2013


On 22/10/2013 18:35, Steve O'Hara-Smith wrote:
> 	Hi,
> 
> 	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.
> 

Works for me...

lucid-nonsense:/home/matthew:# ifconfig em0
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_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=21<PERFORMNUD,AUTO_LINKLOCAL>
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active

... and at least one of those IPv6 IPs is for a jail.  rc.conf settings
are like so:

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

for the aliases, and like so:

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

for the jail.

	Cheers,

	Matthew

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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1036 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20131022/d87e6ce0/attachment.sig>


More information about the freebsd-questions mailing list