Variable Length Subnet Masking (VLSM) Overview VLSM is the process by which we take a major network address and use different subnet masks at different points. Figure 7.1 represents a topology where VLSM is not used. Throughout the entire topology the mask of 255.255.255.240 or /28 is used for network 22.214.171.124. Figure 7.1 Addressing without VLSM A classful routing protocol requires that we use the same mask for the same major network. If we have to keep the subnet mask the same we encounter severe problems concerning addressing space. In some cases the 255.255.255.240 mask might be the best mask for the Ethernet interfaces, but is it the best mask for the serial interfaces? The 255.255.255.240 mask will allow 14 host addresses to be configured on each wire. We only need two hosts on the serial wire. Every time this mask is used on a serial link, 12 host addresses will be lost. If we could use the 255.255.255.252 mask on the serial links we would have the perfect scenario, considering that this mask provides for two host addresses and that is exactly the number of hosts needed. But if we use the /30 mask on the Ethernet links we would have a maximum of 2 hosts, which is not very practical. VLSM allows the use of different masks for the same major network or we can say that VLSM allows us to change the length of the subnet mask for the same major network address. VLSM will allow us to use the 255.255.255.252 mask on the serial interfaces while placing another mask on the multi-access links. Figure 7.2 shows a mask of 255.255.255.252 on the serial links. Since this mask is only practical for serial links it has been nicknamed the serial mask. The 255.255.255.240 mask is still set for the Ethernet links. Since we have two different masks for the same major network we are using VLSM. Figure 7.2 VLSM Addressing Example Consider the topology shown in Figure 7.3. Figure 7.3 ARI Topology With a single Class C address it would be impossible for us to configure all the links with an IP address without the use of VLSM. If we were to try to configure all these networks with the same mask we would run out of addressing space. As an example, if we were to choose a mask that would allow for 58 users we would need the 255.255.255.192 mask. This mask would only allow 2 networks to be addressed; we need 7. VLSM makes addressing this network a simple task. One addressing solution for ARI follows. Serial Link Addressing The serial mask to use is of course the 255.255.255.252 mask, since that mask provides for exactly two IP addresses, which is perfect for our needs. There are only two hosts on a serial connection; as result of using this mask, we do not waste any addresses. Wire 126.96.36.199 to the JAX-SANFRAN link Wire 188.8.131.52 to the JAX-TAMPA link Wire 184.108.40.206 to the JAX-DALLAS link IP addresses will be assigned as follows: Router JAX S0 220.127.116.11/30 255.255.255.252 S1 18.104.22.168/30 255.255.255.252 S2 22.214.171.124/30 255.255.255.252 At this point we have addressed 6 interfaces and used the addressing space 126.96.36.199–188.8.131.52 Now we will move on to the LAN interface. Router SANFRAN We need to have host addressing space for 10 users. The mask to use would be 255.255.255.240/28 if we were to use the 248 mask that would only provide for 6 addresses. The first available wire address we could use with the /28 mask would be 16. What I might do at this point is pick the next wire, which would be 32, this would leave us the lower address of 16–31 for additional serial connections in case our network grows. I could pick the 16 wire for SANFRAN; it is just a matter of preference to keep the lower addresses for the serial connections. IP address of E0 for SANFRAN will be 184.108.40.206/28. Router TAMPA The same situation as SANFRAN: the next wire would be 48. IP address of E0 for TAMPA will be 220.127.116.11/28. Now we have burned all the addressing space up to 63, but we also have reserved the space of 16–33. Router DALLAS Our situation here is a little different because we need to have addressing space for 25 users. Since the 240 mask only gave us a maximum of 14 users we will take the 5 255.255.255.228, which will give us a maximum of 2 –2=30 host addresses. The first wire address available we can use with the 240 mask is 32, but be careful; if there is any place to make mistakes in VLSM it is right at this point. We have already used this addressing space at another location, so we will take the next wire address of 18.104.22.168. IP address of E0 for DALLAS will be 22.214.171.124/27. Router JAX At this location we need addressing space for 58 users. The 240 mask only gave us 30 host addresses, so we will use the 255.255.255.192 mask. This mask will provide up to 62 users. The first wire address for this mask would be 64, but again be careful; we already used this space for DALLAS. The next wire is 126.96.36.199. IP address of E0 for JAX is 188.8.131.52 /26. We have now addressed all of the router interfaces and have provided enough addressing space for all of the hosts at each location. Address Summary The addressing space in bold still remains for growth: Addresses 184.108.40.206–15 used for serial connections Addresses 220.127.116.11–31 not used Addresses 18.104.22.168–63 used for SANFRAN & TAMPA Addresses 22.214.171.124–95 used for Dallas Addresses 126.96.36.199–127 not used Addresses 188.8.131.52–191 used for JAX Addresses 184.108.40.206 through 220.127.116.11 not used IP Unnumbered IP unnumbered is a Cisco specific IP addressing solution. Cisco allows us not to put an IP address on the serial interface, thereby saving address space. This solution would be used with a classful routing protocol. There are drawbacks to this solution; we will discuss IP unnumbered in greater detail in the configuration section. When Can VLSM Be Used? A classless routing protocol will allow the use of VLSM; we will cover classless routing protocols in the next chapter. A classless routing protocol does communicate a subnet mask other than the default mask. The term classless comes from the fact that the mask does not have to be the default mask for each of the class addresses. In other words if we are using a Class B address, the mask communicated to other routers can be something other than 255.255.0.0.