SlightlyLoony
Tera Contributor

Serial numbers are an important notion in Discovery — they are the best way we have to unambiguously identify a particular device or system, even if it changes IP address or location. Unfortunately for all of us, serial numbers themselves are not always unambiguous!

Some kinds of devices have very reliably unique serial numbers — for example, network gear made by Cisco (and many other leading manufacturers) have done a very good job with their serial numbers. In general, network gear either has a good, unique serial number or it has none at all. The same thing is true for network printers and document centers.

But computers are a whole 'nother kettle of fish. There are certain makes and types that have good, unique serial numbers. Apple's computers and Sun's computers are a couple examples of these serial number "good guys". Sadly, the Intel-compatible hardware world is much less uniform.

For starters, there several different serial numbers to choose from on most Intel-compatible hardware. Most motherboards have both a "baseboard" serial number and a UUID (which can be thought of as a serial number). Depending on the make and model, these may or may not have been configured by the motherboard manufacturer — and they may or may not be configurable by you. Some motherboards also have a "system" or "chassis" serial number, and a few have one or two more besides that one. As if that wasn't enough ambiguity, the Windows operating system has its own serial number (but if you deploy by image, this isn't very useful).

So on Intel-based hardware, we have a bunch of serial numbers to choose from — any of which may or may not be actual unique numbers. Sometimes the serial numbers aren't configured by the maker at all, and sometimes they're configured with the same value for all of that make and model (such as "0123456789"). Sometimes the serial numbers configured electronically match the serial number physically present on the hardware, and sometimes they do not.

What can we do with this mess?

Here's what Discovery does on Intel-based hardware. First, it looks at the various serial numbers in a specific order: system, chassis, UUID, and baseboard. For each of these serial numbers, Discovery checks to see that (a) it has a value, and (b) that value is valid. The first one it finds with a valid value is the one it uses to identify the system.

find_real_file.pngWhat constitutes a valid serial number? Glad you asked! Discovery considers a serial number to be valid if it doesn't match any of the entries in the Invalid Serial Numbers table (Discovery Definition -> Invalid Serial Numbers). If you click on the thumbnail at right, you'll see the out-of-the-box entries that come with Discovery (and of course you can add more if you need to). The fourth entry in this table would catch the example used above — that entry says that any serial number containing "123456789" anywhere within it, after throwing out all the ignore characters ("- _#.(){}[]<>=+") is invalid. That entry would catch all these examples: "123_45_6789", "(123) 456-7890", "01234-56789", and "0123456789".

Bet you never knew serial numbers were this complicated!