So, I am new to these concepts so my question may be stupid. I know that there are 5 classes of public IP addresses and we use the 3 of them (Class A, B, C). I also know their range. But when it comes to private IPs I am a little confused. I know the ranges of these IPs too. So, if my puvlic IP is e.g (Class B), does this mean that alla the private IPs in my house should be from through ?

Thank you

  • 2
    Forget about IP address classes, they died 24 years ago.
    – JFL
    Mar 17, 2017 at 12:06
  • Network classes are dead (please let them rest in peace), killed in 1993 (two years before the Internet went commercial!) by RFCs 1517, 1518, and 1519 that defined CIDR (Classless Inter-Domain Routing). Network classes are not used in the century.
    – Ron Maupin
    Feb 15, 2020 at 18:40

3 Answers 3


No, your private IP range is entirely separate from your public IP range. Your private range is determined by your own configuration on your router. You can choose whichever private range you'd like.

  1. Repeat after me: "Classful addressing is obsolete. Classful addressing is obsolete." Say that to yourself ten times.
  2. There is no relationship between public and private addresses. Your devices can have either public or private addresses -- it's up to you. But if private, they can't be routed over the Internet.
  3. There is nothing special about private addresses. Routers treat public and private addresses exactly the same way. The only difference is the Internet community has agreed not to route private addresses on the Internet.
  4. Network Address Translation (NAT) is used to translate private addresses into public ones so your PC with a private address can communicate over the Internet. There are lots of explanations on how NAT works just a quick Google search away.
  5. Since private addresses are local to networks under your control, you can use any address you want. Fun fact: some organizations actually "borrow" public addresses to use on their internal networks, and translate them to their assigned public addresses. This is poor practice, yet it's more common than you'd think.

I feel your original question may have many other questions embedded in it. I have therefore provided some background as well as helping you understand how you might choose your private IPs.

Public IPs are very tightly controlled resources that are in very short supply. Private IPs are used on internal networks and can be whatever you want, providing they are separated by a NAT boundary.

Different IP networks are connected together by network routers. Network routers are simply devices that know how to route your network traffic to its destination and how to route the reply back.

So for example, if you are using a laptop on a private network with an IP of and you wanted to visit a website on Your laptop would send it's requests to the router hoping the router knows a valid route to the target IP.

Public and private IPv4 networks are often separated by a Network Address Translation (NAT) boundary. A NAT boundary is simply a network device (often the router) that effectively hides the source IP. So in the case above the IP address the server at would see is a NAT'd IP, not the original IP.

You asked what your private IP should be. In order to determine what your IP should be you first need to determine what network address you would like to use and how many nodes you are going to need on that private network. Normally people do not bother with this process and simply go for an easy option. I will lay out both an easy option and a slightly more involved opportunity to learn below.

Easy option: Pick whatever network address you want, e.g. This will allow you to use any private IP between and Give your router an IP of and ensure everything on the network uses the subnet mask

More difficult option: Pick whatever address you want, but increase the /24 value to reduce the number of available IP addresses to match what you actually need. For example if you chose, this would allow you to use any IP from to Give your router the same IP, but this time use a subnet mask of

The above example uses CIDR blocks instead of classes. The class of a network is not that relevant as such. What is more relevant is the address range and subnet mask.

/24, /25 or other netmasks simply determine how many bits of an IP address are used for the network address. Thus leaving the remaining bits for host addresses. To understand this you simply need to convert the IP to its binary form, examples below:

11111111.11111111.11111111.00000000 = This is /24 because there are 24 ones in the binary address.

11111111.11111111.11111111.10000000 = This is /25 because there are 25 ones in the binary address.

The more ones you have for the network portion, the less digits you have free for host addresses. Thus the higher the netmask value, the fewer IPs you can have on your network. The network mask also determines how many networks you can have.....but I suggest we ignore that bit for now :).

  • That is a great insight.
    – 5A7335H
    Jun 21, 2017 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.