3

I am given a list of IPs, some of them have a netmask, other no. I got the idea of how to create a mask but i'm not understanding why there are cases where an IP doesn't have a mask.

Like the following:

  • 121.34.56.64–121.34.56.128 > Don't have mask
  • 128.131.9.0–128.131.9.192 > Don't have mask
  • 93.20.10.0–93.20.11.0 > Don't have mask

While the following actually have mask address:

  • 67.56.34.64-67.56.34.79 > Prefix notation: 67.56.34.64/28 | Address/Mask: 67.56.34.64/255.255.255.240 and so on.

For example if I look at the third one of the addresses without mask i do the following:

93.20.10.0–93.20.11.0

93.20. 0000 101|0 . 0000 0000
93.20. 0000 101|1 . 0000 0000

NetMask: 255.255.254.0, that is not correct.

Can somebody explain me why and how to understand when a mask exists?

BioShock
  • 141
  • 4

1 Answers1

5

The reason for a mask is to divide an address into two parts: the network part and the host part. You can have a list of addresses which do not fit into one network, but they will fit into a larger network. Your example: 93.20.10.0–93.20.11.0 will not fit into the 93.20.10.0/24 network, but will fit into the 93.20.10.0/23 network. The catch is that there are more addresses in the 93.20.10.0/23 network than are in your list. That means that your list is a subset of the addresses in the 93.20.10.0/23 network.

IP addresses and masks are just binary numbers. We use them in the dotted-decimal notation to make it easier to read, but if you really want to understand them, you need to look at them in binary. The devices on the network, hosts, routers, etc., only see and use the binary number.

You should study this answer to understand how IP addresses and masks work.

Ron Maupin
  • 99,565
  • 26
  • 120
  • 195