Non-contiguous Subnet Mask

ipnetworkingsubnet

In this question:

Is 225.225.225.128 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 255.255.255.88, 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?

Best Answer

  • 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."

  • Related Question