WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Random MAC addresses?

To: Andrew Brennan <andrew.brennan@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Random MAC addresses?
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 22 Sep 2009 17:05:29 +0100
Cc:
Delivery-date: Tue, 22 Sep 2009 09:06:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090921165123.G68479@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aco7lJCWruJ5vrE4Tzqff+BNfbjNFwACfB+y
Thread-topic: [Xen-devel] Random MAC addresses?
User-agent: Microsoft-Entourage/12.20.0.090605
On 21/09/2009 22:09, "Andrew Brennan" <andrew.brennan@xxxxxxxxxx> 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))



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>