I could have potentially hundreds of domUs bridged in the same network. What''s the easiest way to assign MAC addresses for domUs? In random mode, how does Xen pick MAC addresses? Once a MAC is chosen for a domU, will it remain fixed? How does Xen know whether a MAC address has already been assigned? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> same network. What''s the easiest way to assign MAC addresses > for domUs?In the config file for the domain, put a line like this: vif = [''mac=aa:00:00:49:ed:85,bridge=br-lan0''] Of course, replace the name of the bridge (in my case "br-lan0") with the name of your bridge. I have a similar line in all my DomU configs. I don''t use anything standard; I just see what Xen gives the NIC on it''s own, then use that in the DomU config. If you wanted to try using something "standard", you could just change the last two digits or something. Hope this helps. -Alan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Tue, Apr 04, 2006 at 03:47:37PM -0700, Fong Vang wrote:> I could have potentially hundreds of domUs bridged in the same > network. What''s the easiest way to assign MAC addresses for domUs? > In random mode, how does Xen pick MAC addresses? Once a MAC is chosen > for a domU, will it remain fixed? How does Xen know whether a MAC > address has already been assigned?I use the following snippet in my domU setup script to create a MAC address for a new host: MACADDR="aa:00:$(echo $VHOSTNAME | md5sum \ | sed ''s/^\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4/'')" Then substitute MACADDR into the template config file we use here. Yes, there is a (small but) non-zero chance of collision. No, I don''t care. - Matt _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I use the "makepasswd" command to generate random mac address. Should be limited the character pool using --string=STRING to use only those assigned to xen. Sadique Fong Vang wrote:>I could have potentially hundreds of domUs bridged in the same >network. What''s the easiest way to assign MAC addresses for domUs? >In random mode, how does Xen pick MAC addresses? Once a MAC is chosen >for a domU, will it remain fixed? How does Xen know whether a MAC >address has already been assigned? > >_______________________________________________ >Xen-users mailing list >Xen-users@lists.xensource.com >http://lists.xensource.com/xen-users > > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users