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] mac addresses domUs

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] mac addresses domUs
From: "Emiliano Gabrielli (aka AlberT)" <AlberT@xxxxxxxxxxxxxx>
Date: Thu, 27 Apr 2006 12:02:07 +0200
Delivery-date: Thu, 27 Apr 2006 03:02:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4450321E.7080505@xxxxxxxxxxxxx>
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>
Organization: SuperAlberT.it
References: <1244162.01146043661253.JavaMail.root@geriatrix> <444FDB33.3030701@xxxxxxxxxxxxx> <4450321E.7080505@xxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.1
On Thursday 27 April 2006 04:53, Fajar A. Nugraha wrote:
> 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

otherwise 

echo "00:16:3E:`dd if=/dev/random bs=1 count=3 2>/dev/null | xxd -u -g 1 | 
cut -d\  -f2-4 --output-delimiter :`"

:-)

-- 
<?php echo '     Emiliano Gabrielli (aka AlberT)     ',"\n",
'  socio fondatore e membro del direttivo del GrUSP  ',"\n",
' AlberT_at_SuperAlberT_it   -   www.SuperAlberT.it  ',"\n",
'  IRC:    #php,#AES azzurra.com ',"\n",'ICQ: 158591185'; ?>

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

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