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-users

RE: [Xen-users] uniq mac address generator

To: "Timo Benk" <timo.benk@xxxxxx>
Subject: RE: [Xen-users] uniq mac address generator
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Fri, 13 Apr 2007 16:20:32 +0200
Cc: trilok nuwal <tc.nuwal@xxxxxxxxx>, Xen list <Xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 13 Apr 2007 07:19:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <55f8f8e88ce7d37294788ce0ca4c2986@localhost>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acd91pHWQFZjcF1LQWSrpD+hjb0PrAAACI/w
Thread-topic: [Xen-users] uniq mac address generator
 

> -----Original Message-----
> From: Timo Benk [mailto:timo.benk@xxxxxx] 
> Sent: 13 April 2007 15:16
> To: Petersson, Mats
> Cc: trilok nuwal; Xen list
> Subject: RE: [Xen-users] uniq mac address generator
> 
> 
> 
> On Fri, 13 Apr 2007 16:04:21 +0200, "Petersson, Mats" 
> <Mats.Petersson@xxxxxxx> wrote:
> >  
> > 
> >> -----Original Message-----
> >> From: Timo Benk [mailto:timo.benk@xxxxxx] 
> >> Sent: 13 April 2007 15:00
> >> To: Petersson, Mats
> >> Cc: trilok nuwal; Xen list
> >> Subject: RE: [Xen-users] uniq mac address generator
> >> 
> >> On Fri, 13 Apr 2007 15:40:45 +0200, "Petersson, Mats" 
> >> <Mats.Petersson@xxxxxxx> wrote:
> >> >  
> >> > 
> >> >> -----Original Message-----
> >> >> From: Timo Benk [mailto:timo.benk@xxxxxx] 
> >> >> Sent: 13 April 2007 14:34
> >> >> To: trilok nuwal
> >> >> Cc: Petersson, Mats; Xen list
> >> >> Subject: Re: [Xen-users] uniq mac address generator
> >> >> 
> >> >> Hi,
> >> >> 
> >> >> > But How i can insure that mac geneareted by this script will
> >> >> > be uniq in whole world. Some body in the same network also
> >> >> > might use the same script
> >> >> > and can get the same  mac as i am .
> >> >> 
> >> >> You can add a little python to your config files. That way
> >> >> you can bind the MAC to the vmid parameter. The vmid
> >> >> code is directly extracted off the example configuration.
> >> > 
> >> > But that's CERTAINLY doesn't make it unique, unless you 
> >> also make sure
> >> > the rest of the numbers that make up the MAC address are 
> >> unique to the
> >> > world. I also think you need to restrict your VMID to 
> 0..255 in some
> >> > way, such as "and 255" or "modulo 256". [Don't know for 
> >> sure how you do
> >> > that in Python].  
> >> 
> >> Well, i don't think that the intention of the original author 
> >> was to ensure
> >> worldwide uniqueness.
> >> 
> >> But with the skript you can ensure unique MAC-Adresses inside 
> >> you network.
> >> 
> >> By changeing the prefix you can run multiple Domain-0s, each 
> >> with a uniq
> >> MAC-Adress space.
> > 
> > Yes, but if you start/restart/save/restore/migrate your domain(s)
> > sufficient number of times (and implement the modulo, 
> otherwise you'll
> > just end up with a "badly formed mac-address"), you'll have 
> a collision
> > every 256 VMid's. 
> 
> Why that?
> 
> I don't think that you will have 256 running domains, and if you have
> such many domains, add another parameter, another prefix, whatever.
> 
> vmid is not equal to the domain id, but a new xm parameter.

Ah, ok, that explains something I hadn't caught on to (I'm by far not an
expert on the xm-level of Xen). 

Having more than 256 VM's on the same machine is probably pretty rare
indeed. 

--
Mats
> 
> Greetings,
> -timo
> 
> -- 
> Timo Benk - Jabber ID: fry@xxxxxxxxxxxx - ICQ ID: #414944731
> PGP Public Key: http://www.m28s01.vlinux.de/timo_benk_gpg_key.asc
> 
> 
> 
> 
> 



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