From: Keir Fraser Subject: Re: Random MAC addresses? Date: Tue, 22 Sep 2009 17:05:29 +0100 Message-ID: References: <20090921165123.G68479@dust.noc.drexel.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20090921165123.G68479@dust.noc.drexel.edu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Andrew Brennan , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 21/09/2009 22:09, "Andrew Brennan" wrote: > I'm curious about this bit of documentation - "By default xend will select > a random address[.]" [ http://wiki.xensource.com/xenwiki/XenNetworking ] > A couple paragraphs later, this appears - "It's recommended to use a MAC > address inside the range 00:16:3e:xx:xx:xx. This address range is reserved > for use by Xen." My user has MACs starting with 1A5DA4, 42A1FD and CE8CF4 > so these would appear to be bogus MACs (and potentially evidence of a bad > ethernet driver). Our MAC address generator is below, and seems to do the right thing. The user may have specified their own MAC addresses in their VM configuration files (either manually, or perhaps the file could get generated by a vendor 'wizard' application). -- Keir mac = [ 0x00, 0x16, 0x3e, random.randint(0x00, 0x7f), random.randint(0x00, 0xff), random.randint(0x00, 0xff) ] return ':'.join(map(lambda x: "%02x" % x, mac))