[Lxc-users] updated lxc template for debian squeeze - with attachedscript ; )
Brian K. White
brian at aljex.com
Wed Mar 2 22:18:52 UTC 2011
On 3/2/2011 3:39 AM, Jäkel, Guido wrote:
>> Hi,
>> i have tried to find an rfc about this but have failed, instead, the
>> only (serious/credible) documentation i could find was
>> http://wiki.xen.org/xenwiki/XenNetworking#head-d5446face7e308f577e5aee1c72cf9d156903722 ,
>> so i updated the script accordingly, here is the updated patch.
>> again,
>
> Dear Jon,
>
> at the given link, right at the last sentence of the paragraph, you'll find:
>
>> It's recommended to use a MAC address inside the range 00:16:3e:xx:xx:xx. This address range is reserved for use by Xen.
>
>
> You see, there's no only the reserved prefix 00:50:C2, but there is at least one more official MAC space 00:16:3e reserved by Xen. Why do you don't use this and follow my simple or advanced suggestions
>
> macaddr=$(echo -n "00:50:C2"; hexdump -n 3 -v -e '/1 ":%02X"' /dev/urandom)
>
> macaddr=$(echo -n "00:50:C2"; echo "${hostname:0:1}${hostname: -2} $(head -c 3 /dev/urandom) " | hexdump -n 3 -v -e '/1 ":%02X"')
>
> Of corse, the prefix may be replaced by any of this appropriate Prefixes. Probably just Daniel will know, if there is already a MAC space requested by the LXC project.
I would suggest exactly the opposite.
In my own container creation/management recipes, I specifically do _not_
use the xen prefix exactly _because_ that's what xen uses.
For the same reason I don't use any other known prefix used by hardware
or other vm systems.
I happen to use 02:00 but I don't suggest that specifically as
especially "righter" than any other in the reserved local/private range.
For one thing we probably can't realistically claim an address space
that large just for lxc.
But I do suggest don't use the same thing xen or vmware or openvz or
hyper-v etc uses, wherever there is any known consistent usage.
--
bkw
More information about the lxc-users
mailing list