Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Oct 2021 09:01:56 +0200
From:      Roger Pau =?utf-8?B?TW9ubsOp?= <royger@FreeBSD.org>
To:        Brian Buhrow <buhrow@nfbcal.org>
Cc:        freebsd-xen@freebsd.org
Subject:   Re: Missing MAC addresses for domu VM's
Message-ID:  <YXJh5GHiQ3PtwFpW@MacBook-Air-de-Roger.local>
In-Reply-To: <202109280004.18S04d7Q016828@nfbcal.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



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