openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'
или
GetMAC()
{
if [ -n "$1" ]; then
OID="00:16:3e"
RAND=$(echo $1 | md5sum | sed 's/\(..\)\(..\)\(..\).*/\1:\2:\3/')
echo "$OID:$RAND"
else
echo "ERROR: please supply hostname to create MAC address from, e.g.:"
echo " $FUNCNAME myhost"
fi
}
$ GetMAC myhost