To understand how to subnet, you have to step back and think a little about how routers make routing decisions and how they relate to the subnet mask. Further, you have to understand what composes an IP address and how a subnet mask divides the address up.
Let's take a typical Class C address network like 223.1.2.0 and break it down a little. All IP addresses are composed of 4 byte values or octets. The binary form of this address would look like:
11011111 . 00000001 . 00000010 . 00000000
By applying a mask of 255.255.255.0 or:
| Network Number | | node |
========================================
11111111 . 11111111. 11111111 . 00000000
You define which part of the address is the network and which part
is the node. The generic case is 255.255.255.0 where
the node address breaks on the last byte boundry. Thus, this Class
C address would contain nodes in the range from 1 to 254, utilizing the
full space of the last octet. Each network must have a Net number and broadcast
address, that's why you exclude 0 and 255 as nodes. You will better see this
as you view examples of breaking up Class C adresses.
Below you will see all possible ways to break up a Class C address. Each scenario yields a different number of subnetworks and nodes in each subnetwork depending on the subnet mask you select. Since each subnet mask must break on a bit boundry, there are 8 possible masks. The last case is really useless since it yields no node space, only a network number and broadcast address for each network. Click the Show Table links to generate a table suitable to help plan a subnetting scheme. You do need a broswer that supports tables though. The pages are usefull to print out and help document how you subnet your networks and possibly to help configure clients and log their IP's.
| Subnet Mask (last octet) | # of Nets | Nodes/Net | Show Table |
|---|---|---|---|
| 255.255.255.0 (00000000) | 1 | 254 | Show Table |
| 255.255.255.128 (10000000) | 2 | 126 | Show Table |
| 255.255.255.192 (11000000) | 4 | 62 | Show Table |
| 255.255.255.224 (11100000) | 8 | 30 | Show Table |
| 255.255.255.240 (11110000) | 16 | 14 | Show Table |
| 255.255.255.248 (11111000) | 32 | 6 | Show Table |
| 255.255.255.252 (11111100) | 64 | 2 | Show Table |
| 255.255.255.254 (11111110) | 128 | 0 | Show Table |