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

Re: [Xen-users] Xen with 'Routing' scripts



Am Montag, den 18.04.2005, 16:30 +0200 schrieb Roland Paterson-Jones:
> Now really, the only ugly part is discovering/forcing the dom-U IP 
> addresses.

If you do not want to patch dhcpd, you may do funny other things:

* generate huge dhcpd.conf with bash/perl scripts (ok, that's not so 
  funny)

* supply all domUs with a network initscript which greps network
  information from kernel command line /proc/cmdline (for example
  "eth0=192.168.1.2/24 gw=192.168.1.1". Put not only mac address
  into /etc/xen/domUconf, but also 'extra+=" eth0=..."'

* poor man's dhcp: encode all networking information (ip/mask/gw) within
  the MAC (for networks <= /21 possible) and supply all domUs with
  a network initscript that decodes the MAC. For example 192.168.1.2/24
  with gw 192.168.1.1 could be encoded as

    0x80:1:192:168:1:2

  (decimal octets have to be converted to hex): the first four bits are 
  the prefix-complemneent "32-24=8", the next tree bits are void, the 
  eighth bit has to be zero (to be a valid unicast MAC), the second MAC-
  octet is the last IP-octet of the gw-ip (.1), the last four MAC-octets
  are the ip. 

  Evil, eh?

/nils.


_______________________________________________
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®.