|  | 10.7 | Creating a Subnet
| 10.7.1 | Range of bits needed to create subnets

To create subnets, you must extend the routing portion of the address. The Internet knows your network as a whole, identified by the Class A, B, or C address, which defines 8, 16, or 24 routing bits (the network number). The subnet field will become additional routing bits, so that the routers within your organization can recognize different locations, or subnets, within the whole network.

1. Question: In the address 131.108.0.0, which are the routing bits?
   Answer: 131.108 - That's the 16 bit Class B network number.

2. Question: What are the other two octets (16 bits) of the address 131.108.0.0 used for?
   Answer: Well, as far as the Internet knows, that's just a 16 bit host field, because that's what a Class B address is - a 16 bit network number and a 16 bit host number.

3. Question: What part of the address 131.108.0.0 is the subnet field?
   Answer: When you decide to create subnets, you must divide the original host field (16 bits in the case of Class B) into two parts - the subnet field and the host field. This is sometimes referred to as "borrowing" some of the original host bits to create the subnet field. The other networks in the Internet won't care - they look at the address the same - all they really see is the Class A, B, or C network number, and send the packet on to its destination. The minimum number of bits that you can borrow is 2, regardless of whether you're working with a Class A, B, or C network1. Because at least 2 bits must remain for host numbers2, the maximum number of bits borrowed varies by address class.

Address Class | Size of Default Host Field | Maximum Number of Subnet Bits
A | 24 | 22
B | 16 | 14
C | 8 | 6

The subnet field always follows immediately after the network number. That is, the borrowed bits must be the first n bits of the default host field, where n is the desired size of the new subnet field.

The subnet mask is the tool used by the router to determine which bits are routing bits and which bits are host bits.

1 Previous standards did not allow for the use of subnets obtained by borrowing 1 bit (with only 1 subnet bit, the subnet field can only have two values: subnet 0 is part of the network address, and subnet 1 would be part of the network broadcast address) – although many devices can now support subnets obtained by borrowing 1 bit, it is still common practice to avoid doing this to insure compatibility with legacy devices; for our purposes here, you will always borrow at least 2 bits.

2 Similarly, a 1 bit host field would allow only for host 0, which is part of the network address, and host 1, which is part of the broadcast address, leaving 0 valid host addresses.