First, req -new
(without -x509
) creates a CSR (Certificate Signing Request) not a certificate. Whether and which name attributes and/or extensions that you put in a CSR subsequently appear in the certificate is up to the CA that issues the certificate.
Second, if this cert is for (a device which will be) a HTTPS server, or most other SSL/TLS based protocols like SMTPS, LDAPS, etc, CommonName in Subject should be the name used by clients to connect to the server; usually this will be a fully-qualified domain name (and usually must be for a cert issued by a public CA like Verisign, GoDaddy, etc.), but for internal networks and CAs it can be a local name or address. Officially the SubjectAlternativeName extension supersedes CommonName and if your cert contains SAN (which depending on the CA you might or might not request in the CSR) clients should use SAN for name matching and ignore CommonName even if contains something else, but unless you check all the clients that will be used I wouldn't like to rely on that. If the cert is for a client or other purposes like S/MIME protocol doesn't require the communication (URL) name, but a public CA will still want to be sure it doesn't mislead reliers as to your identity; since MAC addresses are easily changed or spoofed, and can be duplicated either by mistake or intentionally, I don't know if they will be considered good identification.
If you want to stuff more or less arbitrary data in Subject, OrganizationalUnit (OU) is probably the best place. It has no really common meaning, and is the only subject-related value not required to be verified by CAs following CA/Browser Forum requirements.
Note it is possible to have more than one instance of an Attribute in a DistinguishedName i.e. you could have 2 (or 3 or 7) OUs, with a tweak to the openssl config file (and subject to approval of the CA, as always). Although if you want some software using this cert to automatically check a particular one of those values, it becomes a tiny bit more complicated.