IPV4 Public vs. Private addressing
-
Good morning, I hope this question I am wording this question correctly? I understand how to convert decimal into binary, however, what determines how each IP address goes into a public address and a private IPv4 address? May have some examples please? Next question when you convert decimal back to binary do you do the opposite by adding all the numbers together? I also understand the first three numbers of the IP address is 192.25.28.10 will be the network address, but the last number is who the host you identify, for example: laptop, printer, desktop etc. I'm thinking, just me a public address is the internet and a private address can be the Intranet.
-
Hey Dwyane, great questions, let’s tackle the first question:
“what determines how each IP address goes into a public address and a private IPv4 address?”How we determine this is by identifying the range the IP address in question falls. For example, if you are given an IP address of 192.170.10.223. First, identify the IP address class ranges such as 1-126 for Class A, 128-191 for Class B, and 192-239 for Class C. We can see in this example that the 1st octet 192 falls in the Class C range. Next, we identify the private IP (or formally RFC1918) ranges or 10.0.0.0 -10.255.255.255. for Class A, 172.16.0.0 - 172.31.255.255 for Class B, and finally, 192.168.0.0 -192.168.255.255 for Class C. With this information, we can now identify that an IP address of 192.170.10.223 is a Class C public IP address. Using the method mentioned above will give you the tools needed to identify public and private IP addresses.
For the second question:
“Next question: when you convert decimal back to binary, do you do the opposite by adding all the numbers together?”
Good catch and you are correct! If you subtract any place value in the process of converting the dotted-decimal notation into binary (128, 64, 32, 16, 8, 4, 2, 1), reverse the process and add all the place values you used (by marking binary ones in your place value chart) to get the binary value, and this gives you the decimal equivalent. For example,
1100 0000 (binary bits are separated for visualization), when written with place values, would look something like this:128 = 1 64 = 1 32 = 0 16 = 0 8 = 0 4 = 0 2 = 0 1 = 0
Note the binary ones and add these place values = 128 + 64 = 192
Finally, for the last question (another great one), IP addresses require the use of a subnet mask in order to determine the network portion or network ID, for instance, in your example:
“I also understand the first three numbers of the IP address is 192.25.28.10 will be the network address.”
Without the use of the subnet mask, we cannot say that the network portion is the first three octets. For instance, if we take that IP address of 192.25.28.10 and apply a classful 255.255.255.0 subnet mask, then you are correct; the first three octets of 192.25.28.0 would be the network portion. However, if we apply a subnet mask of 255.255.0.0 to 192.25.28.10, the network portion becomes 192.25.0.0. The key takeaway is that the bits within the subnet mask define which portion of an IP address is treated as the network identifier. Without this, we cannot determine the network ID (just like the PC would not be able to either)
-
You're too quick for me @wes-bryan :p
-
@Andrew-Despres haha! Your input in the ITPro forums is always appreciated!
-
So let me understand this correctly, IP address will determine what is an public and private IP address ?
-
Dwayne, close! Remember, if the IP address does not fall within the private IP ranges mentioned earlier, then it will be a public IP address. There are a variety of public committees that oversee these standards such as IETF which controls the RFC1918 standard and IANA/ICANN for example which oversees the public IP address registrars. The subnet mask identifies the network portion, network ID or generically speaking the network the nodes are connected to.
-
One thing that I would like to add to this thread @Dwayne-Coleman, that I forgot to mention is there are reserved addresses as well. For example, 127.0.0.1 (loopback processing), 169.254.x.y. (APIPA addressing) and 255.255.255.255 (sending communications to all hosts on a network), that are used for special circumstances.