From owner-freebsd-virtualization@FreeBSD.ORG Wed Feb 5 19:57:20 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1957394B for ; Wed, 5 Feb 2014 19:57:20 +0000 (UTC) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com [IPv6:2a00:1450:4010:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 78BED1223 for ; Wed, 5 Feb 2014 19:57:19 +0000 (UTC) Received: by mail-la0-f43.google.com with SMTP id pv20so720953lab.16 for ; Wed, 05 Feb 2014 11:57:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=OzavNnbxCfat4S/+l113to7drPK3v1T2Bu2t1eiRZNY=; b=Ub3NRZJmDq2j9gZbD5s4IqYBYcYH4z1BA7zZh858X6VAV9W6LLeFh8SBK4f2ekkw/c wKM7d/ffrSiKMDaHKVweeAiE87hKdhGTN4FXOGUolIivbYXCkWRyO6l/ZEZsQTvD5DeY I4JjqetrDQrwR++g88YeP47vAvm3l6FswG5stnA00b1OQdcwI5AC/frjANLGE/V/zuUP ApF9wFKh48HD0q7jIUbsPSwHQC1aRTNYDwBgw49jy1K9Lbv18hku5eww7hYpIhoFbIFG 29UH4vZfyCRb4nuC+cU7/RNYJv+gk9NucuR8S5J14YCMOf1Q3pD2sQ/cxzErgNQOiOPq 3HSw== MIME-Version: 1.0 X-Received: by 10.112.148.197 with SMTP id tu5mr66771lbb.79.1391630237441; Wed, 05 Feb 2014 11:57:17 -0800 (PST) Sender: crodr001@gmail.com Received: by 10.112.30.211 with HTTP; Wed, 5 Feb 2014 11:57:17 -0800 (PST) In-Reply-To: <52F278EA.3020509@pix.net> References: <9BF7840E-03C2-47E4-A863-DE07FB1256F1@freebsd.org> <52F278EA.3020509@pix.net> Date: Wed, 5 Feb 2014 11:57:17 -0800 X-Google-Sender-Auth: TdUP9A8IXfLpFzD4NRmjbm_hZ74 Message-ID: Subject: Re: MAC addresses to use for BHyve VM's running under FreeBSD? From: Craig Rodrigues To: Kurt Lidl Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Feb 2014 19:57:20 -0000 On Wed, Feb 5, 2014 at 9:46 AM, Kurt Lidl wrote: > On Feb 5, 2014, at 3:33 , Kai Gallasch wrote: >> >> Am 05.02.2014 um 08:03 schrieb Craig Rodrigues: >>> >>>> Hi, >>>> >>>> I am running many BHyve VM's and am using tap interfaces >>>> with a single bridge. I am configuring the IP addresses >>>> of these VM's via DHCP. >>>> >>>> I need to have separate MAC addresses for each VM. >>>> >>>> Can anyone recommend a range of MAC addresses to use? >>>> >>>> I seem to recall that at the 2013 FreeBSD Vendor Summit in >>>> Sunnyvale, California, that George mentioned that >>>> there might be a Organizational Unique Identifier (OUI) for the FreeBSD >>>> project that we can use for BHyve VM's. Is that right? >>>> >>>> If not, can people recommend a range of addresses to use? >>>> >>> >>> http://standards.ieee.org/develop/regauth/oui/public.html >>> >>> Using "Search the Public MA-L Listing" with search term FreeBSD reveals.. >>> >>> --- snip --- >>> >>> Here are the results of your search through the public section of the >>> IEEE Standards OUI database report for freebsd: >>> >>> 58-9C-FC (hex) FreeBSD >>> Foundation >>> 589CFC (base 16) >>> FreeBSD >>> Foundation >>> P.O. Box 20247 >>> Boulder CO 80308-3247 >>> UNITED STATES >>> --- snap --- >>> >>> >>> >> Correct, that is an address that the Foundation has registered with the >> IEEE. >> >> If you look at sys/net/ieee_oui.h you will see that I've allocated a >> range to bhyve already. >> > > At work, we modified the bhyverun command to seed the hostname > of them machine running the hypervisor as part of the "generate a MAC > address" routine. That means that for virtual machine "foo", > you now get different MACs on server "bar" and server "baz". > Without this patch, you're likely to get identical MAC addresses > for virtual machine "foo" on different servers. > > I personally also have my virtual machines set bit 2 in > the first octet of the MAC address, so it falls into the > "locally administered" catagory of MAC addresses. My gut feel > is that using the FreeBSD OUI bhyve range, *AND* setting the > locally administered bit in the MAC address is the way to go. > b > George, Thanks for allocating that range of MAC addresses. We shoud probably document that MAC address range in one of the BHyve man pages. Kurt, Your change is definitely useful. It changes the behavior of BHyve with respect to MAC addresses, but it is a very useful change. Have you submitted your change to Peter and Neel to see if they can evaluate if it can be made part of BHyve in the FreeBSD src tree? -- Craig