From nobody Thu Mar 31 18:03:36 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 32FC71A5C4D0 for ; Thu, 31 Mar 2022 18:03:47 +0000 (UTC) (envelope-from meka@tilda.center) Received: from c3po.tilda.center (c3po.tilda.center [108.61.164.129]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4KTrlP6DbFz3Fl8 for ; Thu, 31 Mar 2022 18:03:45 +0000 (UTC) (envelope-from meka@tilda.center) Received: from tilda.center (109-93-255-137.static.isp.telekom.rs [109.93.255.137]) by c3po.tilda.center (Postfix) with ESMTPSA id 6BE151EB06; Thu, 31 Mar 2022 20:03:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tilda.center; s=c3po; t=1648749817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8UU1Xg/FbfKMDOxzOdUUqSSB3tTCl/iMnNV/zSKD99E=; b=T6i6sFPjK/d8M+7K9S/yOczdfq0+FOPHZb2oZyZiPtmLZOXAGfb8E1emwv9AqKnTeDYijS 1RcdmTGfuwCmp+X3+pKWhGaJ5KY18etZj+fFKAGOn1nBHimFOGnO0PUHQCpgbY4pBipt+0 g4HdeHPiZcUYMpiAdefunL4ujwAgUSQ= Date: Thu, 31 Mar 2022 20:03:36 +0200 From: Goran =?utf-8?B?TWVracSH?= To: Ronald Klop Cc: freebsd-current@freebsd.org, "Bjoern A. Zeeb" Subject: Re: DHCPDv6 in non-vnet jail Message-ID: <20220331175315.qr3brqiug6ujigks@tilda.center> References: <20220326222957.wuc7xwyiq3bjtlnv@tilda.center> <4772ECB8-6482-4B94-A887-F04EC6272911@lists.zabbadoz.net> <20220329081129.p5xtxlbiyw6klxcl@tilda.center> <1527544025.66.1648548860391@mailrelay> <20220329161105.uw5aigvpazd77we4@tilda.center> <900760441.75.1648644317126@mailrelay> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="w3bc75zt3ylmwpnx" Content-Disposition: inline In-Reply-To: <900760441.75.1648644317126@mailrelay> X-Rspamd-Queue-Id: 4KTrlP6DbFz3Fl8 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tilda.center header.s=c3po header.b=T6i6sFPj; dmarc=pass (policy=reject) header.from=tilda.center; spf=pass (mx1.freebsd.org: domain of meka@tilda.center designates 108.61.164.129 as permitted sender) smtp.mailfrom=meka@tilda.center X-Spamd-Result: default: False [-5.40 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[tilda.center:s=c3po]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; HAS_ATTACHMENT(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[tilda.center:+]; DMARC_POLICY_ALLOW(-0.50)[tilda.center,reject]; NEURAL_HAM_SHORT(-0.93)[-0.928]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-current]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_MIXED_CHARSET(0.62)[subject]; ASN(0.00)[asn:20473, ipnet:108.61.164.0/22, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --w3bc75zt3ylmwpnx Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable On Wed, Mar 30, 2022 at 02:45:17PM +0200, Ronald Klop wrote: > Hi, >=20 > First. I'm not an IPv6 expert. Got it running at home. Although with SLAA= C, not DHCP yet. > Another disclaimer is that I use VNET-jails nowadays. > But I like to try and think along with you. >=20 > What surprises me is that your non-vnet jail does not have a LINKLOCAL fe= 80::: address. These addresses are used for configuration in the local netw= ork (AFAIK). > And your routing table does not contain a line like this: > ff02::/16 ::1 UGRS = lo0 >=20 > So how is the ff02:: multicast routed in your network? >=20 > But the tcpdump shows that the multicast solicit message is received on t= he non-vnet dhcp-server so that seems to work: > 18:02:51.229813 IP6 fe80::2a0:98ff:fe7d:cad.dhcpv6-client > ff02::1:2.dhc= pv6-server: dhcp6 solicit > I don't know if the dhcp-server program also sees this request coming in = on its interface. Maybe extra logging can help there. >=20 > According to https://en.wikipedia.org/wiki/DHCPv6#Example the dhcp-server= would reply with a link-local fe80:: address. > "Server replies with an advertise from [fe80::0011:22ff:fe33:5566]:547 to= [fe80::aabb:ccff:fedd:eeff]:546." > But your dhcp-server does not have an fe80::. >=20 > So I'm wondering how that would work. >=20 > More questions than answers. But I hope it helps. >=20 > Regards, > Ronald. Hello, It helps narrow down the search! I created a small lab and this is jail.conf: path =3D "/usr/jails/${name}"; exec.start =3D "/bin/sh /etc/rc"; exec.stop =3D "/bin/sh /etc/rc.shutdown"; exec.clean; mount.devfs; dhcp { host.hostname =3D dhcp.hal9000.meka.rs; host.domainname =3D hal9000.meka.rs; ip4.addr =3D 'bridge0|172.16.0.250'; ip6.addr =3D 'bridge0|fd10:6c79:8ae5:8b91::3'; ip6.addr +=3D 'bridge0|fe80::dead:beef'; enforce_statfs =3D 1;=20 sysvshm =3D new; sysvsem =3D new; devfs_ruleset =3D 7; allow.chflags; allow.mount.devfs; allow.mount.procfs; allow.mount; allow.mount.devfs; allow.mount.procfs; allow.mount.nullfs; allow.mount.tmpfs; allow.socket_af; allow.raw_sockets; persist; } client { $id =3D 10; host.hostname =3D client.hal9000.meka.rs; host.domainname =3D hal9000.meka.rs; enforce_statfs =3D 1;=20 sysvshm =3D new; sysvsem =3D new; devfs_ruleset =3D 8; allow.chflags; allow.mount.devfs; allow.mount.procfs; allow.mount; allow.mount.devfs; allow.mount.procfs; allow.mount.nullfs; allow.mount.tmpfs; allow.socket_af; allow.raw_sockets; persist; vnet; vnet.interface =3D "epair${id}b"; exec.prestart =3D "ifconfig epair${id} create up"; exec.prestart +=3D "ifconfig epair${id}a up descr vnet-${name}"; exec.prestart +=3D "ifconfig bridge0 addm epair${id}a up"; exec.prestop =3D "ifconfig epair${id}b -vnet ${name}"; exec.poststop =3D "ifconfig bridge00 deletem epair${id}a"; exec.poststop +=3D "ifconfig epair${id}a destroy"; } Note the "dead:beef" address. Even if I remove that line I get the same output of ifconfig inside dhcp jail: ifconfig re0: flags=3D8843 metric 0 mtu 1500 options=3D8209b ether bc:ae:c5:e1:31:d0 media: Ethernet autoselect (1000baseT ) status: active nd6 options=3D23 lo0: flags=3D8049 metric 0 mtu 16384 options=3D680003 groups: lo nd6 options=3D21 bridge0: flags=3D8843 metric 0 mtu = 1500 description: re0 ether 58:9c:fc:10:ff:90 inet 172.16.0.250 netmask 0xffffffff broadcast 172.16.0.250 inet6 fd10:6c79:8ae5:8b91::3 prefixlen 128 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: epair10a flags=3D143 ifmaxaddr 0 port 5 priority 128 path cost 2000 groups: bridge nd6 options=3D21 pflog0: flags=3D141 metric 0 mtu 33160 groups: pflog epair10a: flags=3D8943 metr= ic 0 mtu 1500 description: vnet-client options=3D8 ether 02:82:6f:d8:f0:0a groups: epair media: Ethernet 10Gbase-T (10Gbase-T ) status: active nd6 options=3D29 And this is relevant portion of /etc/rc.conf: cloned_interfaces=3D"bridge0" ifconfig_bridge0=3D"inet 172.16.0.254 netmask 255.255.255.0 description re0" ifconfig_bridge0_ipv6=3D"inet6 -ifdisabled auto_linklocal fd10:6c79:8ae5:8b= 91::1" The following is ifconfig on host re0: flags=3D8843 metric 0 mtu 1500 options=3D8209b ether bc:ae:c5:e1:31:d0 inet6 fe80::beae:c5ff:fee1:31d0%re0 prefixlen 64 scopeid 0x1 inet6 2001:470:1f1a:ae:beae:c5ff:fee1:31d0 prefixlen 64 autoconf inet 192.168.111.3 netmask 0xffffff00 broadcast 192.168.111.255 media: Ethernet autoselect (1000baseT ) status: active nd6 options=3D23 lo0: flags=3D8049 metric 0 mtu 16384 options=3D680003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=3D21 bridge0: flags=3D8843 metric 0 mtu = 1500 description: re0 ether 58:9c:fc:10:ff:90 inet 172.16.0.254 netmask 0xffffff00 broadcast 172.16.0.255 inet 172.16.0.250 netmask 0xffffffff broadcast 172.16.0.250 inet6 fe80::5a9c:fcff:fe10:ff90%bridge0 prefixlen 64 scopeid 0x3 inet6 fd10:6c79:8ae5:8b91::1 prefixlen 64 inet6 fd10:6c79:8ae5:8b91::3 prefixlen 128 inet6 fe80::dead:beef%bridge0 prefixlen 128 scopeid 0x3 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: epair10a flags=3D143 ifmaxaddr 0 port 5 priority 128 path cost 2000 groups: bridge nd6 options=3D21 pflog0: flags=3D141 metric 0 mtu 33160 groups: pflog epair10a: flags=3D8943 metr= ic 0 mtu 1500 description: vnet-client options=3D8 ether 02:82:6f:d8:f0:0a groups: epair media: Ethernet 10Gbase-T (10Gbase-T ) status: active nd6 options=3D29 I can see "dead:beef" address until I stop the dhcp jail. I can also see that auto_linklocal produced fe80 address (the first inet6 address) on the host but not inside the jail. Is there something I need to configure/start on the host or jail to have link-local address inside non-vnet jail? Regards, meka --w3bc75zt3ylmwpnx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE1WIFkXy2ZeMKjjKEWj1TknovrLYFAmJF7PUACgkQWj1Tknov rLZ/3g/+JX6r+awHoSVBVcqV8V6N/n8inxh3X1LIUBIEUMoAYcTob6uL/jLxcxKp RIHv+pK5riT9BpCpoTJPHTElHRp/Ju9Y2o7M2hzJoDwS1SstpfTWrtsk2EVzXThF mrvTKHmer6REU3c85Zr2I4UpLXasNdT+Zzo3aOflLcJvh5iliVgNBnHvvTL2LQir o76XBqTrm7dpHlAFBIqzTuEN4lZD8IdqFYOpLdbO/bATudKybZ1jNOHpyD+j3QvU ZN2T+D392x351BlrxhAah9bCb+d+F7v51UAN8xtsuNLEOuAteNT1/QCEEme+cetb TG9XnWG31k7Vtj8pOa1+WzQ3l/iBCfHP/1FsROyUINszOdAJhUo21udlAKZofMP8 vXUz0uD0JYUlyClH/gOtGal7tin5Q1h8xlCZAMf/rfxabpQglA4yoCzeiDaw0aJT KJCSBEc8mVp5xec2NDUZSW3L4H805755scr48XB8vEqQCYw49w9GPLvAzqO0L8Dq rqv4e6oXohmMMt69d/wsGpK/6lLUGbxwHDEjCjxeAypgIMuPDfj7jqd8jtAk6+MI pl4uZ3N4J11Opr60a35M1MkA7NVngL4eBuolXhsVV1zmjgNx7WOiaolsYcVJqdVE MYh6TvEHn97qsKyUX8UdrXf3CUX/JxoltUtgJ4clwk1iVCtOvCc= =YRyO -----END PGP SIGNATURE----- --w3bc75zt3ylmwpnx--