# Ipv6 unique address for each person

1. Aug 30, 2011

### Smarky

Ipv4 = address size of 32 bits
Ipv6 = address size of 128 bits

My question is:
If we pick a random address from all 2^128 possibilities for each person on earth, assuming population of 7 billion people, what is the probability of there being a collision (2 or more people with the same address).

How do you calculate such a thing?

2. Aug 30, 2011

### chiro

Hey smarky and welcome to the forums.

I'm not exactly sure about your assumptions, but I'm going to assume that a) every IP address has an equally likely chance of being selected (normally this would be false due to the fact that IP addresses have inherent structure in them for specific locations and on top of that certain addresses are reserved for special uses) and b) Both trials are based on drawing an IP from a barrel with every choice of IP address.

If these assumptions are correct, we know that both draws from the barrel are independent and each choice is equally likely.

Based on this P(A has same address as B) = P(A has I.P. Z AND B as I.P. Z) = P(A has I.P. Z) x P(B has I.P. Z) = 1/(2^128) x 1/(2^128) = 1/2^(256)

The population of 7 billion doesn't come into play in this model because we assume that every single person has the same chance of picking any address, along with other assumptions like independent selections (like you would find with a binomial model).

This is a pretty simplified model, but it is a little hard trying to figure out the assumptions should be.