xen-users
RE: [Xen-users] uniq mac address generator
> -----Original Message-----
> From: trilok nuwal [mailto:tc.nuwal@xxxxxxxxx]
> Sent: 13 April 2007 14:26
> To: Petersson, Mats
> Cc: Xen list
> Subject: Re: [Xen-users] uniq mac address generator
>
> So we cant insure that genearted mac is 100 % uniq in the
> same network.
> How much the possibility of getting the same mac address. Is
> it frequent or rare.
I just had a look at the script, and it uses "/dev/urandom", which is a
device that generates random bytes. The upper half (3 bytes) of the
mac-address is a constant (but you have two choices based on whether you
choose "static" or "random" mac-address).
The other three bytes are taken from "urandom", which we assume is a
good random number generator, so relatively equal probability of hitting
all numbers (_NO_ random number generator is absolutely perfect, but
it's not extremely hard to make one that gives reasonably good equality
in probability). Given a 3-byte combination, you have 1 in 2^24
(16777216) to hit the same number with another machine. It's not very
likely to happen. Presumably this is only done when creating a new
domain, which isn't a very frequent occurrence [I think], which in turn
means that you're very unlikely to match with another MAC address in
your lifetime.
>
> Any other thing that we can try to insure the 100% uniq addresses.
> If we use the mac genearted by xen itself then Could we get
> the uniqness ?
No, because it also uses a very similar technique of random numbers.
>
> I dont think so it could insure uniqness. Because xen also
> genrate the same way as easymac do .
Exactly.
>
> If we change the easymac a bit for differnet users then
> probably we can achieve the uniqness.
If each easymac script uses different numbers (and otherwise unusued in
the mac-address range) in the three first digits, then you should have
no problem.
The only way to entirely guarantee that YOUR mac-address is unique is to
have a world-wide store of mac-addresses that are known, and "register"
yours there to ensure that you are the owner of that address and no-one
else uses it [but that also assumes that EVERYONE has access to this
mac-address database]. But as stated before, they don't need to be
unique other than within your own network [up to the gateway]. Once it's
outside YOUR network, the mac-address is meaningless.
--
Mats
>
> Still Doubtful...
> Thanks,
>
>
>
>
>
>
> On 4/13/07, Petersson, Mats <Mats.Petersson@xxxxxxx> wrote:
>
>
>
> > -----Original Message-----
> > From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
> > [mailto: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
> <mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx> ] On Behalf Of
> > trilok nuwal
> > Sent: 13 April 2007 14:13
> > To: Xen list
> > Subject: [Xen-users] uniq mac address generator
> >
> > Hi All,
> >
> > I am using easymac.sh script to genearte the uniq
> mac address.
> > This can be downloaded from here.
> >
> > http://www.easyvmx.com/software/easymac.sh
> >
> > 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 .
> >
> > can anybody tell me, how these will be uniq ?
>
> It only needs to be unique to your local network -
> anything outside that
> will not be using MAC addresses to determine the
> routing of the packet
> anyways [AFAIK], so it's meaningless to aim for
> uniqueness outside your
> own network (although it is of course practical to know
> that ALL MAC
> addresses used in the entire known world are unique).
>
> Of course, if you're on a large corporate network, you
> may still have
> the problem that someone else uses the same easymac
> script to generate
> MAC addresses...
>
> --
> Mats
>
> --
> Mats
> >
> > Thanks,
> > --Trilok
> >
> >
> >
>
>
>
>
>
>
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|