"Ryan Finnie" <[EMAIL PROTECTED]> writes: > I took a simpler route for pseudo-random non-varying mac address > generation. Here you go: > > echo $(hostname)${UMID} | md5sum | \ > awk '{print "00:08:93:"substr($1,1,2)":"substr($1,3,2)":"substr($1,5,2)}' > > This combines the umid you expect you assign to the instance with the > hostname of the host. That way, the mac address will be the same each > time it boots,
Not if it boots off a different host it won't. > For non-temporary instances, my homebrew system has a field for mac > addresses. If it is empty, the above code is used. But for permanent > instances, I create a completely random mac ahead of time: > > dd if=/dev/urandom bs=1k count=1 2>/dev/null | md5sum | \ > awk '{print > "00:08:93:"substr($1,1,2)":"substr($1,3,2)":"substr($1,5,2)}' This is a good system but incomplete - how do you ensure that you don't get duplicates? It's very difficult to know what hw addresses are on the network (ie: what macs are already taken) because not all hosts respond to broadcast pings (UMLs don't for example). -- Nic Ferrier http://www.tapsellferrier.co.uk for all your tapsell ferrier needs ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ User-mode-linux-user mailing list User-mode-linux-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user