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] ARP problems in -testing?

To: "Adam Sulmicki" <adam@xxxxxxxxxxxx>, "Felipe Alfaro Solana" <lkml@xxxxxxx>
Subject: RE: [Xen-devel] ARP problems in -testing?
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Mon, 17 Jan 2005 01:23:00 -0000
Cc: "Derrik Pates" <demon@xxxxxxxxxxxxx>, Jan Kundrát <jan.kundrat@xxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxxx>, "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, "Ron Watkins" <xen-devel@xxxxxxxxx>
Delivery-date: Mon, 17 Jan 2005 01:29:12 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
Thread-index: AcT8MdpcwndulXhTS86nw80brUFccQAAG8ew
Thread-topic: [Xen-devel] ARP problems in -testing?
 > >
> > vif = [ 'mac=XX:XX:XX:XX:XX:XX' ]
> >
> > Now, the MAC address is always the same and thus I don't 
> need the ugly ping 
> > hack.
> 
> this is good, but if I start multiple domains, like this
> 
>       xm create vm4-bproc vmid=1
>       xm create vm4-bproc vmid=2
>       xm create vm4-bproc vmid=3
>       xm create vm4-bproc vmid=4
> 
> then I'll end up with 4 copies of the same mac. Is there some 
> way to tie 
> mac generation to vmid ?

The following will work, though has obvious limitations (256 domains):
vif = [ 'mac=XX:XX:XX:XX:%02x:XX' % vmid ]

The netback vif needs a MAC addr too, and this is picked as the frontend's MAC 
addr+1. This was probably a bad choice as people tend to pick consecutive MAC 
addrs for their domains. We should probably move the front/back bit to a mor 
esignificant bit.

Hence, the above vif= line sets vmid into the 2nd octet.

Ian



Ian


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel