Subnetworks (or subnets) extend the IP addressing scheme an organization uses to one with an IP address range for multiple networks. Subnets are two or more physical networks that share a common network-identification field (the network portion of the 32-bit IP address).
You create a subnet address by increasing the network portion to include a subnet address, thus decreasing the host portion of the IP address. For example, in the address 128.32.10.0, the network portion is 128.32, while the subnet is found in the first octet of the host portion (10). A subnet mask is applied to the IP address and identifies the network and host portions of the address.
The following table illustrates how subnet masks used with class B and class C addresses can create differing numbers of subnets and hosts. This example includes the zero subnet, which is permitted on the switch.
Number of bits |
Subnet mask |
Number of subnets |
Number of hosts for each subnet |
---|---|---|---|
Class B |
|||
2 |
255.255.192.0 |
2 |
16 382 |
3 |
255.255.224.0 |
6 |
8 190 |
4 |
255.255.240.0 |
14 |
4 094 |
5 |
255.255.248.0 |
30 |
2 046 |
6 |
255.255.252.0 |
62 |
1 022 |
7 |
255.255.254.0 |
126 |
510 |
8 |
255.255.255.0 |
254 |
254 |
9 |
255.255.255.128 |
510 |
126 |
10 |
255.255.255.192 |
1 022 |
62 |
11 |
255.255.255.224 |
2 046 |
30 |
12 |
255.255.255.240 |
4 094 |
14 |
13 |
255.255.255.248 |
8 190 |
6 |
14 |
255.255.255.252 |
16 382 |
2 |
Class C |
|||
1 |
255.255.255.128 |
0 |
126 |
2 |
255.255.255.192 |
2 |
62 |
3 |
255.255.255.224 |
6 |
30 |
4 |
255.255.255.240 |
14 |
14 |
5 |
255.255.255.248 |
30 |
6 |
6 |
255.255.255.252 |
62 |
2 |
You use variable-length subnet masking (VLSM) to divide your intranet into pieces that match your requirements. Routing is based on the longest subnet mask or network that matches. Routing Information Protocol version 2 and Open Shortest Path First are routing protocols that support VLSM.