Variable Length Subnet Masks (VLSMs)
Neither RIPv1 nor IGRP routing protocols has a field for subnet information, so the subnet information gets dropped. What this means is that if a router running RIP has a subnet mask of a certain value, it assumes that all interfaces within the classful address space have the same subnet mask. This is called classful routing, and RIP and IGRP are both considered classful routing pro- tocols. (I’ll be talking more about RIP and IGRP in Chapter 5, “IP Routing.”) If you mix and match subnet mask lengths in a network running RIP or IGRP, that network just won’t work!
Classless routing protocols, however, do support the advertisement of subnet information. Therefore, you can use VLSM with routing protocols such as RIPv2, EIGRP, or OSPF. (EIGRP and OSPF will be discussed in detail in Chapter 6.) The benefit of this type of network is that you save a bunch of IP address space with it.
As the name suggests, with VLSMs we can have different subnet masks for different subnets. Look at Figure 3.1 to see an example of why VLSM networks are so beneficial.
Typical Classful Network
F0/3 Subnet 96
In this figure, you’ll notice that we have two routers each with a LAN, and connected together with a WAN serial link. In a typical classful network design (RIP or IGRP routing protocols), we could subnet a network as follows:
192.168.10.0 = Network 255.255.255.224 = Mask Our subnets would be (you know this part, right?) 0, 32, 64, 96, 128, 160, 192, and 224. We can then assign three subnets to our three networks. But how many hosts are available on each network? Well, as you should be well aware of by now, each subnet provides 30 hosts. This means that each LAN has 30 valid hosts, but the point-to-point WAN link also has 30 valid hosts. All hosts and router interfaces have the same subnet mask—again, this is called classful routing.
The only problem here is that the link between the two routers will never use more than two valid hosts! That wastes valuable IP address space, and it’s the very reason we’re going to talk about VLSM network design. Following our discussion of VLSM design, we will look at how to implement VLSM networks.