Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Oct 2021 14:10:12 -0700
From:      Brian Buhrow <buhrow@nfbcal.org>
To:        Roger Pau =?utf-8?B?TW9ubsOp?= <royger@FreeBSD.org>
Cc:        freebsd-xen@freebsd.org, buhrow@nfbcal.org
Subject:   Re: Missing MAC addresses for domu VM's
Message-ID:  <202110242110.19OLACSx003317@nfbcal.org>
In-Reply-To: <YXJh5GHiQ3PtwFpW@MacBook-Air-de-Roger.local>

next in thread | previous in thread | raw e-mail | index | archive | help
	Hello Roger.  Thanks for the feedback.  What I'm trying to do is figure out how to track
the bandwidth of a particular domu from the dom0.  I have a NetBSD installation where I just
match the MAC address of the domu with the address shown with netstat -bin or brconfig.
However, as noted, that doesn't work under FreeBSD-12.2.  I've thought of using the interface
name, but the output of netstat -bin truncates that name so that not all of the interface name
appears in the output.  For the NetBSD bridge driver, having the MAC address show up on the
dom0 facing interface isn't a problem.
While Im guessing I could figure out how to get the MAC address out of the xen store, it
wouldn't really help me, because I would then want to map it to something I could uniquely pull
from the output of netstat -bin.  
Any suggestions?
-thanks
-Brian

On Oct 22,  9:01am, Roger Pau =?utf-8?B?TW9ubsOp?= wrote:
} Subject: Re: Missing MAC addresses for domu VM's
} 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.
>-- End of excerpt from Roger Pau =?utf-8?B?TW9ubsOp?=





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