Subnetting
893-743-A
F-5
Subnetting and Routing
Routers and hosts can use the subnet field for routing. The rules for routing on
subnets are the same as those for routing on networks. However, correct routing
requires all subnets of a network to be physically contiguous. In other words,
the network must be set up so that it does not require traffic between any two
subnets to cross another network. Also, RFC 950 implicitly requires that all
subnets of a network have the same number of bits in the subnet field.
Subnet Masks
A subnet mask identifies the subnet field of a network address. This mask is a
32-bit Internet address written in dotted-decimal notation with all ones in the
network and subnet portions of the address. For the example in Figure F-4, the
subnet mask is 255.255.248.0.
Table F-2 shows the subnet masks you can use to divide an octet into subnet
and host fields. The subnet field can consist of any number of the host field bits;
you do not need to use multiples of eight. However, you should use three or
more bits for the subnet field—a subnet field of two bits yields only four
subnets, two of which are reserved (the 1,1 and 0,0 values).
Table F-2. Subnet masks
Subnet Bits
Host Bits
Hex Mask
Decimal Mask
0
8
0
0
1
7
0x80
128
2
6
0xC0
192
3
5
0xE0
224
4
4
0xF0
240
5
3
0xF8
248
6
2
0xFC
252
7
1
0xFE
254
8
0
0xFF
255