-1

This is a general question about Subnet Masks.

Preface

Most of our private networks are on 192.168.1.xxx/24 The Subnet mask will be 255.255.255.0. This is the default configuration of any router you go buy at Best Buy.

The Actual Question

Here's what I'm wondering: Why wouldn't the subnet mask be 192.168.1.0 instead of 255.255.255.0

Assume your ip address is 192.168.1.14

If you 'logical and' the 192.168.1.0 subnet mask with your ip address, you will get the same results as if you 'logical and' it with a 255.255.255.0 subnet mask.

A subnet mask of 192.168.1.0 would be more descriptive than 255.255.255.0. This is because, a subnet mask of 255.255.255.0 would apply to thousands more potential subnets, a subnet mask of 192.168.1.0 would apply to fewer. Also, a convention where you use a subnet mask like 192.168.1.0 for an ip address of 192.168.1.14 would be much easier to read.

So, why isn't the subnet mask for common private networks, 192.168.1.0? Why don't we use more specific subnet masks?

Thanks,

Captainlonate
  • 4,878
  • 4
  • 25
  • 35

1 Answers1

1

Because the specification in section 3.1 of RFC4632 says the masks must have continuous set of 1 bits.

Of course this doesn't really answer the question in any other way than "because it was decided so." You can still think about it: what benefit would it bring? Netmask 255.255.255.0 shows the subnet size of exactly. What size would mask 192.168.1.0 be? How would you describe net mask 255.255.255.192 when the network starts with 192.168.1.0? Impossible.

Also it's a lot easier to say /24 or /27 when the masks are like this.

So in short: they're unambiguous and show the actual size regardless the network address.

Community
  • 1
  • 1
Sami Kuhmonen
  • 30,146
  • 9
  • 61
  • 74