[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] mac addresses domUs


  • To: xen-users <xen-users@xxxxxxxxxxxxxxxxxxx>
  • From: "Fajar A. Nugraha" <fajar@xxxxxxxxxxxxx>
  • Date: Thu, 27 Apr 2006 09:53:18 +0700
  • Delivery-date: Wed, 26 Apr 2006 19:53:56 -0700
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

Anthony Valentine wrote:
"You may also want to edit the vif variable in order to choose the MAC address of the virtual ethernet interface yourself. For example:

    vif = ['mac=00:16:3E:F6:BB:B3']

If you do not set this variable, xend will automatically generate a random MAC address from the range 00:16:3E:xx:xx:xx, assigned by IEEE to XenSource as an OUI (organizationally unique identifier). XenSource Inc. gives permission for anyone to use addresses randomly allocated from this range for use by their Xen domains."

This script will probably be useful

#!/bin/bash
prefix="00:16:3E"

mac="$prefix"
for seqnum in 1 2 3 ;do
       part=`dd if=/dev/random bs=1 count=1 2>/dev/null | xxd -ps -u`
       mac="$mac:$part"
done
echo $mac

--
Fajar

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.