Subnetting a Class C Network
How do you find out the values that you can use for a Class C network subnet mask? Remember from a previous discussion that InterNIC defines the leftmost three octets in a Class C address,
leaving you with the rightmost octet for your own host and subnetting use. If your network consists of a single segment, you have the following subnet mask:
11111111 11111111 11111111 00000000
When expressed as a decimal number, this is
255.255.255.0
Because all of your addresses must match these leftmost 24 bits, you can do what you’d like with the last 8 bits, given a couple of exceptions that we’ll look at in a moment.
You might decide to divide your network into two equally sized segments, with, for example, the numbers 0 through 127 as the first subnet (00000000 through 01111111 in binary) and the
numbers 128 through 255 as the second subnet (10000000 through 11111111 in binary).
Notice how the numbers within each subnet can vary only in the last seven places. So, placing 1s in the mask where the bits should be identical for all hosts in a subnet, the subnet mask becomes
Because all of your addresses must match these leftmost 24 bits, you can do what you’d like with the last 8 bits, given a couple of exceptions that we’ll look at in a moment.
You might decide to divide your network into two equally sized segments, with, for example, the numbers 0 through 127 as the first subnet (00000000 through 01111111 in binary) and the numbers 128 through 255 as the second subnet (10000000 through 1111111 in binary).
Notice how the numbers within each subnet can vary only in the last seven places. So, placing 1s in the mask where the bits should be identical for all hosts in a subnet, the subnet mask becomes
255.255.255.128
In binary this is
11111111.11111111.11111111.10000000
Note:
Use the Windows Calculator in scientific mode (choose View Scientific) to look at binary-to-decimal and decimal-to-binary conversions. Click the Bin (binary) button and then type the bit pattern that you want to convert. Click the Dec (decimal) button to display its decimal value. You can also go the other way and display a decimal number in binary form. This works great for hexadecimal and octal numbering systems, as well.
Now let’s get back to the exceptions mentioned earlier. The network number is the first number in each range, so the first subnet’s network number is X.Y.Z.0 and the second is X.Y.Z.128
(X, Y, and Z are the octets assigned by InterNIC). The default router address is commonly the second number in each range—X.Y.Z.1 and X.Y.Z.129—and the broadcast address is the last
address, or X.Y.Z.127 and X.Y.Z.255. You can use all the other addresses within the range as you see fit on your network.
Table 3.3 describes how you can divide a Class C network into four equally sized subnets with a subnet mask of 255.255.255.192. This gives you 62 IP addresses on each subnet once you have accounted for the network and broadcast addresses.
TABLE 3 . 3 Class C Network Divided into Four Subnets
Table 3.4 describes how you can divide a Class C network into eight equally sized subnets with a subnet mask of 255.255.255.224. This gives you 30 IP addresses on each subnet once you have accounted for the network and broadcast addresses. You can continue this trend for subnet masks with fourth-octet values of 240, 248, and 252. A fourth-octet value of 254 is widely regarded as unusable because the only possible values in each subnet have only 0s or 1s in the host portion, which are illegal for assignment to hosts.
TABLE 3 . 4 Class C Network Divided into Eight Subnets
0 comments:
Post a Comment