In this question:

Is a valid subnet mask?

The accepted answer states that the subnet mask must be contiguous. A few comments reference RFCs stating that this is the case. However, I'm unable to find this in the RFCs.

In RFC 950 on page 15, there's an explicit example using, which produces a mask with a fourth octect of 01011000. Then on page 17, the glossary states the following:

Subnet Field

The bit field in an Internet address denoting the subnet number.
The bits making up this field are not necessarily contiguous in
the address.

Is there a more recent standard that overrides this one? I haven't found one (RFC 6918 updates RFC 950, but does not affect subnet masks).

Alternately (assuming the above standard is valid), is there a good reason why non-contiguous bit fields should not be used in subnet masks?

  • should not be used in subnet masks It would confuse the hell out of most people? Because 99% of the implementations assume that the mask will be contiguous.
    – Zoredache
    Commented Dec 1, 2016 at 17:41
  • @Zoredache I understand the importance of not confusing people. Like readability in code. However, implementations assuming contiguous masks still seems like an implementation flaw if the standard states otherwise. Commented Dec 1, 2016 at 18:25

1 Answer 1


CIDR (Classless Inter-Domain Routing) came along in 1993 in RFC 1519 (now RFC 4632 / BCP 122 ) and spelled the end for non-contiguous subnet masks:

"An implementation following these rules should also be generalized, so that an arbitrary network number and mask are accepted for all routing destinations. The only outstanding constraint is that the mask must be left contiguous."


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .