From nobody Sun Oct 24 21:10:12 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 35A481816227 for ; Sun, 24 Oct 2021 21:10:23 +0000 (UTC) (envelope-from buhrow@nfbcal.org) Received: from nfbcal.org (ns.NFBCAL.ORG [157.22.230.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "nfbcal.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HcrMf19pwz4tTN; Sun, 24 Oct 2021 21:10:21 +0000 (UTC) (envelope-from buhrow@nfbcal.org) Received: from nfbcal.org (localhost [127.0.0.1]) by nfbcal.org (8.15.2/8.14.1-NFBNETBSD) with ESMTPS id 19OLACar029814 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 24 Oct 2021 14:10:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at lothlorien.nfbcal.org Received: (from buhrow@localhost) by nfbcal.org (8.15.2/8.12.11) id 19OLACSx003317; Sun, 24 Oct 2021 14:10:12 -0700 (PDT) Message-Id: <202110242110.19OLACSx003317@nfbcal.org> From: Brian Buhrow Date: Sun, 24 Oct 2021 14:10:12 -0700 In-Reply-To: X-Mailer: Mail User's Shell (7.2.6 beta(4.pl1)+dynamic 20000103) To: Roger Pau =?utf-8?B?TW9ubsOp?= Subject: Re: Missing MAC addresses for domu VM's Cc: freebsd-xen@freebsd.org, buhrow@nfbcal.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nfbcal.org [127.0.0.1]); Sun, 24 Oct 2021 14:10:13 -0700 (PDT) X-Rspamd-Queue-Id: 4HcrMf19pwz4tTN X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of buhrow@nfbcal.org designates 157.22.230.125 as permitted sender) smtp.mailfrom=buhrow@nfbcal.org X-Spamd-Result: default: False [-2.63 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:ns.nfbcal.org]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[nfbcal.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.33)[-0.331]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7091, ipnet:157.22.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N 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 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?=