Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using a non conventional subnet mask

A normal mask for example; 255.255.255.0 this gives us 1111 1111.1111 1111.1111 1111.0000 0000 binary where ones represent network id, and zeroes represent host id. Would it be possible to use a layout which doesn't have all ones to the left and zeroes to the right? example: 170.170.170.170 or 10101010.10101010.10101010.10101010 in binary.

Maybe just one additional bit at the end? 11111111.11111111.11111111.00000001 or 255.255.255.1

Maybe reverse the whole mask? 0.255.255.255

Of course you would have to use the specified id-type for the (by the mask) specified place.

like image 679
Filip Haglund Avatar asked Mar 15 '11 14:03

Filip Haglund


1 Answers

As far as I know, subnetting is defined in RFC 950, which says the following:

Since the bits that identify the subnet are specified by a bitmask, they need not be adjacent in the address. However, we recommend that the subnet bits be contiguous and located as the most significant bits of the local address.

Using the most significant bits to identify the subnet is mostly a practical choice to simplify everyday operations—such as figuring out a network or host address—without having to make complex calculations.

That said, just because the RFC says that you could use non-contiguous masks, that doesn't necessarily mean that there are devices out there that support it.

like image 181
madd0 Avatar answered Oct 17 '22 17:10

madd0