The Quick Guide to GUIDs

Our world is numbered. Books have ISBNs and products have barcodes. Cars have VINs, even people have social security numbers.

This is a companion discussion topic for the original entry at

IPv6 (which is very similar to GUIDs, since it’s also 128 bits in length) is capable of assigning approx. 1000 addresses per each square meter of surface on Earth. They also say that every grain of sand in the Sahara could have it’s own IP address, but the question is still open whether there’d be any left for the rest of us :slight_smile:

Remember IPv4, which should allow almost every person on Earth (6-7 billion and growing fast) to have an address, but with everyone having a dozen gadgets on them this number seems less than enough. Ofcourse this is kind of an overstatement, but has some truth in it. Up to this day almost half of the IPv4 addresses have been used, and with the current rate we are running out of them exponentially!

In contrast with GUIDs, IPv6 will have a central authority managing the addresses (or at least address ranges), thus collisions are out of the question, and still we could have the same amount of both IDs. Though I wouldn’t assign an address to all my teddy bears and goldfish, it’d be a challenge for them to interpret all the protocols :slight_smile:

Perhaps you should write an article about IPv6 too, it’s at least as interesting as GUIDs, and I like your style much better than my own :slight_smile:

Thanks for the comment! IPv6 is an excellent example of the use of GUIDs.

I played with the numbers a bit, I think we may have enough IPv6 addresses for a while. It seems we can squeeze over 600,000 GUIDs or IPv6 addresses per square nanometer:

That ought to be enough for anyone, right? :slight_smile: (Of course, there’s probably some overhead as you say by allocating addresses in fixed blocks by a central authority. I wonder if some entity like MIT is going to get a ridiculous 18...* “class A” address block like they have now:

I really appreciate the comment, I think IPv6 would be a great topic as it’s becoming more and more relevant.

Actually if we reallocated some IPv4 address ranges and started a better management of distribution of new ones then we could make it last longer, even much longer, but that would mean kicking over a lot of engrained habits, it’s always easier to widen the address range. Besides that, IPv6 offers a lot more improvements compared to IPv4 which developers had to think about in the last 20 or so years since it was standardized :slight_smile:

I just read my notes on IPv6 and the lecturer said that it should last till about 2040. In 2001 they said that we will run out of IPv4 addresses by 2007, but this has been prolonged to 2010, but I suppose there might be a few more years there. So I just wonder how the hell we are going to use up all those IPv6 addresses in a mere 30 years :slight_smile:

Yeah, it seems like IPv6 would have been designed to avoid the inevitable IP address shortage. Unless there’s a mistake in my numbers, I’d be hard pressed to say how we’d run out :).

It depends. You can envision a future in which IPv6 addresses are used to address every component in the machine, for example, as a universal address. This would significantly increase usage of existing allocations.

I control several IPv6 subnets myself, one /64 and one /48 (although I am only using a /64 of my /48 allocation). That totals around 1.2 x 10^4 addresses. And I’m just a regular guy! (check out SixXS)

Generating a random 128-bit number obviously works, but it’s not really the recommended approach. See RFC-4122 for sample code.

Thanks Derrell, that’s a good point. I had forgot to mention there are certain “flags” you can set in the GUID for various versions. It’s best to use a library to create them.

[…] Even though there are 2128 (1e38) GUIDs, we only have 264 (1e19) to use up before a 50% chance of collision. And 50% is really, really high. […]

[…] “It seems we can squeeze over 600,000 GUIDs or IPv6 addresses per Earth’s square nanometer: […]

[…] The Quick Guide to GUIDs […]

[…] In other news, Dscam in flies is alternatively spliced to almost 18000 different forms so that each neuron can randomly have a unique form of the protein, allowing them to recognize themselves. This reminds me a lot of GUIDs (Globally Unique Identifiers)! […]

[…] Distributed version control focuses on sharing changes; every change has a guid or unique id. […]

[…] I do want to add that the 128 bit part was shamelessly lifted from this awesome article about GUIDs. […]

[…] A GUID, or large ID number used in programming, is at no risk of running out. How many are there? Well, we could give everyone a copy of the internet, every second, for a billion years… and still have enough GUIDs to identify each page. See how much bigger that is than “2^128″? (For the geeks: yes, the birthday paradox makes the chance of collision much higher). […]

Well, at 71 and having started to reach myself how to use a sesktop my son gave me on retirement, I never knew what a GUID is until I read this article. You admirably explain it! Thank you.

You’re more than welcome Auldsod, happy to hear it was helpful for you! :slight_smile:

[…] “It seems we can squeeze over 600,000 GUIDs or IPv6 addresses per Earth’s square nanometer: […]

[…] Now the science says we have just 10 years to change course or things will get. ITALIAN WEB RADIO TV. Date: 2008-04-18, 7:13AM CDT 20 Magnavox TV…. Oakville, Ontario: Entertainment Cable Networks Channels - Oakville ON Channels. Entertainment News SAG signs interim pact with independent film. This programme (formerly BA Broadcasting) has an outstanding national and international profile in the television industry and is ranked as one of the most. The Tulsa County Sheriff’s Office is investigating the shooting death of an area teen. This is the last ever line-up of guests for the Michael Parkinson show which was snapped last night as the chat-show host finished filming for his last ever. It’s an online Network featuring original video shows created by working professionals in the TV and Film Industry. as the Tulsa World, Fox 23 News, and Tulsa’s ABC news affiliate, KTUL Channel 8. […]