[Mishmash] Public versus Private IP addresses
Fred Atkinson
fatkinson at mishmash.com
Sun Jul 15 20:04:02 CDT 2007
IP addresses consist of four octets (#.#.#.# where each '#' represents an octet which can be any number from 0 to 255. There are three basic classes of IP addresses on the Internet. They are:
Class A
Class B
Class C
These addresses are assigned by (by purchase from) the ICANN (Internet Corporation for Assigned Names and Numbering) or an organization that resells IP addresses from the ICANN.
If you get a Class A address from the ICANN, they give you a network address such as: 12.0.0.0. Class A addresses always have their first octet (in this case, it is 12) begin with a number between 0 and 127.
If 12.0.0.0 is assigned to you, you now can use all IP addresses from 12.0.0.0 to 12.255.255.255 as you wish to assign them. Each address (excluding the network and broadcast address which we'll discuss another time) can be assigned to a host (a PC, a router, a switch, other types of devices, or a server) at your discretion. You use the formula 2 to the N power minus 2 to figure out how many hosts that you have to assign (each of the three octets consist of eight bits, therefore N is 24 in this case and the total number of bits yields '16777214' addresses for you to assign own your network).
Class B Networks always begin with a number from 128 to 191. The ICANN assigns the first two octets and leaves the third and fourth one for you to assign. Assuming that you requested a Class B network address and got 159.12.0.0, you would be able to use all addresses from 159.12.0.0 to 159.12.255.255. This time we have sixteen bits (since each of the two octets we can assign have eight bits each) and the 2 to the N power minus two yields 65534 host addresses that we can assign.
Class C Networks always begin with a number from 192 to 223. If you requested a Class C network and ICANN assigned you 222.8.12.0, you would be able to use all addresses from 222.8.12.0 to 222.8.12.255. Using the formula, you have 254 host addresses to assign.
Public IP addresses are used on the Internet and on LANs (local area networks). Private IP addresses are not allowed to be used on the Internet. The ICANN sets asides blocks of addresses that are designated as Private IP addresses. They are the following network addresses:
Class A: 10.0.0.0 (only one Class A network is private).
Class B: 172.16.0.0 through 172.31.0.0 (sixteen Class B networks).
Class C: 192.168.0.0 through 192.168.255.0 (256 Class C networks).
Also Class B is an APIPA (automatic private IP addressing) address of 169.254.0.0) which is Microsoft's way of chaining all of their PCs together without using a DHCP server (which assigns IP addresses to hosts automatically). This is one Class B network.
Whenever you see an address that belongs to one of the above networks, it is not an address that can be used on the Internet. It can only be used inside of one's own network.
When a host with a private IP address makes a request of a host with a public IP address, the router at the edge of the LAN changes the private IP address to its public IP address before sending it over the Internet. When the reply comes back, it changes the address back to the private IP address before sending it back to the host that made the request.
The reason that private IP addresse were adopted was because we were rapidly running out of IP addresses on the Internet. Anyone can use these addresses within their own network so long as those addresses stay on their own network. It is a nono to send them over the Internet. The process by which the router that connects to your Internet connection changes between public and private IP addresses is called NAT (Network Address Translation).
I know this is a lot to take in. If you have any questions, shoot them at me.
Regards,
Fred
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mishmash.net/pipermail/mishmash_mishmash.net/attachments/20070715/226be496/attachment-0001.html
More information about the Mishmash
mailing list