|
|
There are two types of subnetting: static length and variable length. Static subnetting, in which all the subnets in the subnetted network use the same subnet mask, has already been described in ``Subnetting and Classless Interdomain Routing''. Native IP and RIP version 1 routing only support static subnetting. Variable length subnetting allows the subnets that make up the network to use different subnet masks. A small subnet with only a few hosts needs a subnet mask that accommodates only these hosts. A subnet with many hosts may need a different subnet mask to accommodate the hosts. Variable length subnetting allows you to divide the network so that it is possible to define adequate hosts for each subnet by changing the subnet mask for each network. RIP version 2 supports variable length subnetting as well as static subnetting. RIP version 1 only supports standard class lengths.
For example, a company with the address 195.34.136.0 needs to split the address range into five separate networks, as shown in ``Variable length subnetting''. There need to be 254 hosts on 3 of the subnets and 126 hosts on 2 of the subnets. This cannot be achieved using static subnetting as it can only divide the network into four subnets with 254 hosts each or eight subnets with 126 hosts each. To divide the address into five subnets, you should use multiple netmasks. The first four subnets use the mask 255.255.255.0 and have 254 hosts each. The first subnet can then be divided into two subnets with 126 hosts each and a subnet mask of 255.255.255.128. There would be three subnets with 254 hosts each and two subnets with 126 hosts each.

Variable length subnetting
Each time you subnet your network you lose some available addresses, as these become broadcast addresses.