Forum Moderators: phranque
Also, why is it 32bit number, instead of say 36 or 48 bit? Wouldn't that extend the # of unique IP addresses?
Thanks,
The host was assigned the IP by their upstream provider(or in better cases, ARIN). It was assigned to them in a class, of something between /24 and /19. Read those numbers as an indication of how many IPs they were given. /24 is equivalent to 255, /19 is a whole crapload of IPs(several thousand or more).
Internet Protocol version 4 specifies that an address is 32 bits long. That's just 'the rule'.
Internet Protocol version 6 specifies that an address is 128 bits long. This so eponentially increases the number of available IPs that it's just amazing. Rumor is every square foot of surface area of the earth could have its own IPv6 address.
Yes, if you have more bits available, you can squeeze more IPs out of it. That goes back to the /24 and /19 designation. Currently an IP is 32 bits. If you are assigned a block of IPs with a designation of /24, that means you get 32 bits minus 24 bits of IP addresses. Or, 8 bits, 256 IPs in this example. There are a few technical reasons why you can't use all of those, just accept that you get 254 or 255 usable IPs(depending on where you are in the grand scheme of things). If you had been assigned a /19, that would be 32 bits minus 19 bits or 13 bits(8,192) of IP addresses.
edit: Its not nice to move a thread while someones replying to it ;) Fortunately, I've gotten into the habit of copying large blocks of text to the clipboard before I post.
In a Class B the first two digits designate the type and location of the institution on the internet, the third digit can be used by the institution to subdivide the network and the last digit specifies a specific machine within the subnet at that location.
Class C addresses use the first three digits to specify the location of the institution and the final digit to specify the machine. Class C's don't have subnets.
IPv6 increases the size of the address from 32 bits to 128 bits and defines anycast.
For routing purposes, however, addresses are split up into "network" and "host" parts. The popular "classes" specify network/host subdivision schemes at one of the octet section points. There is one notation that specifies a network address by substituting zeroes for the host parts. If you have want to define a network that doesn't start at one of the class boundaries, then you have to specify the network bits explicitly after a slash:
Class A: 123.0.0.0/8
Class B: 123.45.0.0/16
Class C: 123.45.67.0/24
Class D: 123.45.67.89/32 ("one host networks" are sometimes used for dialup connections)
Note that the seperation points are completely arbitrary, after the traditional class structure was found to waste too many addresses. The formula 2n gives you the number of addresses in a subnet, where n is the number of bits reserved for the hosts, which is 32 minus the number after the slash (as in Slades explanation)
As an example, the network 123.45.67.64/27 includes the 32 (= 25) addresses between 123.45.67.64 and 123.45.67.95.
Similar rules are in place for IPv6, although the notation is different (using a colon as octet seperator). The 128 bit address space should last for slightly longer than the old one currently still in use.
I started typing these as some others were building their replies...
When the addresses were first being given out, they were done by class. Most places only needed a C class but a lot of other institutions received A and B class blocks.
A Class X.Y.Y.Y
B Class X.X.Y.Y
C Class X.X.X.Y
They specified a unique X, and you got to use any unique Y you wanted.
The regulatory agencies soon discovered they needed to be a little more fine grained in licensing the addresses out, so they went to the CIDR method, that I described above. (Classless Inter-Domain Routing)
Loosely...
A Class = /8
B Class = /16
C Class = /24
There were other classes defined, and some other restrictions on what exactly made an A, B, or C class, but that's the gist of it.