From owner-freebsd-net@freebsd.org Wed Apr 21 07:55:54 2021 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4947D5FB213 for ; Wed, 21 Apr 2021 07:55:54 +0000 (UTC) (envelope-from pi@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4FQCXp1Tk0z4lpg for ; Wed, 21 Apr 2021 07:55:54 +0000 (UTC) (envelope-from pi@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 32AF75FB212; Wed, 21 Apr 2021 07:55:54 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 326FA5FB0D3 for ; Wed, 21 Apr 2021 07:55:54 +0000 (UTC) (envelope-from pi@freebsd.org) Received: from fc.opsec.eu (fc.opsec.eu [IPv6:2001:14f8:200:4::4]) (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 4FQCXp14tvz4lvf; Wed, 21 Apr 2021 07:55:53 +0000 (UTC) (envelope-from pi@freebsd.org) Received: from pi by fc.opsec.eu with local (Exim 4.94 (FreeBSD)) (envelope-from ) id 1lZ7i4-0000DG-Nl; Wed, 21 Apr 2021 09:55:44 +0200 Date: Wed, 21 Apr 2021 09:55:44 +0200 From: Kurt Jaeger To: Kyle Evans Cc: FreeBSD Net Subject: Re: source of ether address for tap0 ? Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4FQCXp14tvz4lvf X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2021 07:55:54 -0000 Hi! > > does anyone know how the system selects the MAC/ether adress of a > > newly-created tap0 device ? > > > > ifconfig tap0 create [...] > > How is that selected ? > > We had a case where two devices selected the same ether/MAC... > > tap MACs are derived from the hostid (/etc/hostid) -- you generally > end up with the same MAC in one of two scenarios: Thanks! I've submitted two PRs to help others find this info in the future. augment if_tuntap man page on source of autogenerated MAC (/etc/hostid) https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255294 man page for /etc/hostid and pointer in sethostid/gethostid(3) to /etc/hostid https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255293 If I find the time, I'll try to submit the necessary patches. -- pi@FreeBSD.org +49 171 3101372 Now what ?