VLSM Design Considerations
When developing a VLSM design, the network designer must recursively ask the same set of questions as for a traditional subnet design. The same set of design decisions must be made at each level of the hierarchy:
Assume that a network is spread out over a number of sites. For example, if an organization has three campuses today it probably needs 3-bits of subnetting (2 3 = 8) to allow the addition of more campuses in the future. Now, within each campus, there is likely to be a secondary level of subnetting to identify each building. Finally, within each building, a third level of subnetting might identify each of the individual workgroups. Following this hierarchical model, the top level is determined by the number of campuses, the mid-level is based on the number of buildings at each site, and the lowest level is determined by the "maximum number of subnets/maximum number of users per subnet" in each building.
The deployment of a hierarchical subnetting scheme requires careful planning. It is essential that the network designers recursively work their way down through their addressing plan until they get to the bottom level. At the bottom level, they must make sure that the leaf subnets are large enough to support the required number of hosts. When the addressing plan is deployed, the addresses from each site will be aggregable into a single address block that keeps the backbone routing tables from becoming too large.
Requirements for the Deployment of VLSM
The successful deployment of VLSM has three prerequisites:
The bottom line is that if you want to deploy VLSM in a complex topology, you must select OSPF or I-IS-IS as the Interior Gateway Protocol (IGP) rather than RIP-1! It should be mentioned that RIP-2, defined in RFC 1388, improves the RIP protocol by allowing it to carry extended-network-prefix information. Therefore, RIP-2 supports the deployment of VLSM.
Forwarding Algorithm
Forwarding Algorithm is Based on the "Longest Match"
All routers must implement a consistent forwarding algorithm based on the "longest
match" algorithm. The deployment of VLSM means that the set of networks associated
with extended-network-prefixes may manifest a subset relationship. A route
with a longer extended-network-prefix describes a smaller set of destinations than
the same route with a shorter extended-network-prefix. As a result, a route with
a longer extended-network-prefix is said to be "more specific" while a route
with a shorter extended-network-prefix is said to be "less specific." Routers must
use the route with the longest matching extended-network-prefix (most specific
matching route) when forwarding traffic.
For example, if a packet's destination IP address is 11.1.2.5 and there are three network prefixes in the routing table (11.1.2.0/24, 11.1.0.0/16, and 11.0.0.0/8), the router would select the route to 11.1.2.0/24. The 11.1.2.0/24 route is selected because its prefix has the greatest number of corresponding bits in the Destination IP address of the packet. This is illustrated in Figure 19.
Figure 19: Best Match is with the Route Having the Longest Prefix (Most Specific)
There is a very subtle but extremely important issue here. Since the destination
address matches all three routes, it
must be assigned to a host which is attached to the 11.1.2.0/24 subnet. If the 11.1.2.5
address is assigned to a host
that is attached to the 11.1.0.0/16 or 11.0.0.0/8 subnet, the routing system will
never route traffic to the host since
the "longest match algorithm" assumes that the host is part of the 11.1.2.0/24 subnet.
This means that great care must
be taken when assigning host addresses to make sure that every host is reachable!
Topologically Significant Address Assignment
Since OSPF and I-IS-IS convey the extended-network-prefix information with each route,
the VLSM subnets can be scattered throughout an organization's topology. However,
to support hierarchical routing and reduce the size of an organization's routing
tables, addresses should be assigned so that they are topologically significant.
Hierarchical routing requires that addresses be assigned to reflect the actual network
topology. This reduces the amount of routing information by taking the set
of addresses assigned to a particular region of the topology, and aggregating them
into a single routing advertisement for the entire set. Hierarchical routing
allows this to be done recursively at various points within the hierarchy of the
routing topology. If addresses do not have a topological significance, aggregation
cannot be performed and the size of the routing tables cannot be reduced. Remember
this point when we discuss CIDR aggregation later in this
paper.