Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jan 2022 16:57:25 +0100
From:      Roger Pau =?utf-8?B?TW9ubsOp?= <roger.pau@citrix.com>
To:        Brian Buhrow <buhrow@nfbcal.org>
Cc:        <freebsd-xen@freebsd.org>
Subject:   Re: Missing MAC addresses for domu VM's
Message-ID:  <YdxXZUlJ8pLgWZJP@Air-de-Roger>
In-Reply-To: <202112011842.1B1IgdY7003809@nfbcal.org>
References:  <YXFxUMCM/IdRytJ0@MacBook-Air-de-Roger.local> <202112011842.1B1IgdY7003809@nfbcal.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 01, 2021 at 10:42:38AM -0800, Brian Buhrow wrote:
> 	hello.  In looking into this further, I discovered that the bridges on NetBSD have the
> same issue, that is, you can't have the same MAC address on the dom0 side as the domu side.
> However, I'd like to suggest that the NetBSD solution to the problem is more elegant in that it
> is possible to track domains solely based on netstat output and their MAC addresses while, at
> the same time, being able to derive both the front end and back end  MAC addresses for a given
> domain by reading the MAC address from either side.  I'll quote the comment and the relevant
> line of code from
> sys/arch/xen/xen/xennetback_xenbus.c in the NetBSD source tree.  Is there any reason this
> solution wouldn't work in the FReeBSD case as well?  If it would, it would be nice to see MAC
> addresses return to netstat  -i output for xen virtual interfaces.
> 
> -thanks
> -Brian
> 
> 	/* we can't use the same MAC addr as our guest */
> 	xneti->xni_enaddr[3]++;

Sorry, been on PTO and catching up on email.

I'm not a network expert, I wonder whether this could cause clashes
with other network adapters then (as a user could create another VM
with a MAC address that matches enaddr[3]++).

It would be nice to have a way to set the same mac on the netback
interface and that things still work as expected, but I'm unsure
that's possible. tap interfaces also seem to have the same issue, as
the MAC on the tap interface seems to be a random one.

Thanks, Roger.



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