HP (Hewlett-Packard) E3000/IX Network Hardware User Manual


 
28 Chapter2
Networking Concepts
Subnetworks
The following rules apply when choosing a subnet mask and an IP
address:
Although any bits in the node address can be used as the subnet
mask, Hewlett-Packard recommends aligning the subnet mask along
byte boundaries, adjacent to the network number.
Although standards allow subnets on the same network to have
different subnet masks, Hewlett-Packard recommends that you
assign the same subnet mask to all subnets on a network.
Do not assign an IP address where the network address and/or node
address bits are all off (all 0s) or all on (all 1s). Likewise, the subnet
address bits cannot be all 0s or all 1s.
To determine the subnet mask, you first need to estimate the number of
networks required and the number of nodes on each subnet. Allow
enough bits for both nodes and subnets, as described in example 1.
Example 1 Assume you are choosing a subnet mask for a class C network (three
bytes for network address, one byte for node address), and you need
four subnets with up to 30 nodes on each subnet. You will need to
reserve three bits for the subnet address (remember, all 0s and all 1s
cannot be used) and the remaining five bits for the node numbers as
shown in Figure 2-1.
Figure 2-1 Class C Address with Subnet Number
The 30 nodes per subnet will require at least five bits of the node
portion of the IP address (30 <32, and 32=2
5
, therefore you need 5 bits).
This leaves three bits remaining in the node portion of the IP address
for use as the subnet identifier. Subnet parts of all 0’s or all 1’s are not
recommended because they can be confused with broadcast addresses.
Therefore, you can have up to six subnets (2
3
–2=6) when three bits are
used for the subnet identifier.
Example 2 An IP address on a class B network with an 8-bit subnet mask
separates as shown in Figure 2-2.