From nobody Fri Oct 22 07:01:56 2021 X-Original-To: freebsd-xen@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 B4B1E180BF21 for ; Fri, 22 Oct 2021 07:01:58 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b: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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HbFdf4h1xz3Fwl; Fri, 22 Oct 2021 07:01:58 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from localhost (unknown [93.176.190.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: royger) by smtp.freebsd.org (Postfix) with ESMTPSA id 27AA72D87A; Fri, 22 Oct 2021 07:01:58 +0000 (UTC) (envelope-from royger@FreeBSD.org) Date: Fri, 22 Oct 2021 09:01:56 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Brian Buhrow Cc: freebsd-xen@freebsd.org Subject: Re: Missing MAC addresses for domu VM's Message-ID: List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-xen List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-xen@freebsd.org X-BeenThere: freebsd-xen@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <202109280004.18S04d7Q016828@nfbcal.org> X-ThisMailContainsUnwantedMimeParts: N On Mon, Sep 27, 2021 at 05:04:39PM -0700, Brian Buhrow wrote: > hello. Under Xen-4.14.0 and FreeBSD-12.2 running a command like: > netstat -bin > shows all the interfaces, including the virtual interfaces for the domU machines running on > that server, but the MAC addresses are all 0's on those entries that show the link level > address. Is this a deliberate design decision or a bug that needs to be filed? > If it's a deliberate design decision, is there a way to get at the MAC address for a particular > domU and match it to a specific virtual interface on the dom0? There's a comment in the code about this: /* * Set the MAC address to a dummy value (00:00:00:00:00), * if the MAC address of the host-facing interface is set * to the same as the guest-facing one (the value found in * xenstore), the bridge would stop delivering packets to * us because it would see that the destination address of * the packet is the same as the interface, and so the bridge * would expect the packet has already been delivered locally * (and just drop it). */ IIRC I've added that myself. I think this is mostly a consequence of how bridges work on FreeBSD. Maybe there's another way to fix this by setting different bridge or interface flags. You can forcefully set the MAC address using: $ ifconfig xnbXX ether 02:01:02:03:04:FF If you wish to play with it, so you can try to give the host facing interface (xnbXX) the same MAC address as the guest facing one and see if it can still get network traffic delivered as expected. Regards, Roger.