Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I have a MAC represented as:

0:b:23:26:32:52

is that the same as:

00:0b:23:26:32:52

or:

00:bb:23:26:32:52

?

share|improve this question

migrated from stackoverflow.com Apr 22 '10 at 17:35

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer 1

up vote 7 down vote accepted

You would add the leading zeros, not repeat single characters (so 00:0b:23:26:32:52, yes).

Chances are that the application in question just didn't format its output correctly with the leading zeros.

irb(main):003:0> sprintf '%X', 11
=> "B"
irb(main):004:0> sprintf '%02X', 11
=> "0B"

If you wanted to (somewhat) verify this, you could use a MAC lookup tool to check the manufacturer of the device.

According to MAC_Find, the 00:0b:23 prefix belongs to "Siemens Subscriber Network", while the other one is unknown. That's not 100% proof of anything, but if you know the device is a Siemens device, that would be enough verification for most cases.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.