Part2 Chapter 8 Advanced TCP/IP Network Design - CLASSLESS ADDRESSING AND VARIABLE- LENGTH SUBNET MASKS
Variable-Length Subnet Masks Variable-length subnet masks specified how a single network ID could have different subnet masks among its subnets. Used correctly, VLSM could minimize the wasted IP addresses forced by a single subnet mask per network ID
Benefits The major benefit of VLSM is that subnets can be defined to different sizes as needed under a single Network ID, thereby minimizing, if not eliminating, wasted addresses. As a result, an organization s assigned IP address space is more efficiently used. Second, when correctly defined to match the physical topology of the network, variable-length subnet masks can used to permit router aggregation that minimizes the number of distinct routes that need to be advertised and processed by network backbone or Internet routers
Implementation Requirements In order for VLSM to be successfully implemented, the routers on the network where VLSM is implemented must be able to share subnet masks and/or extended network prefixes along with each router advertisement All routers supporting VLSM must support a longest match routing algorithm. This is particularly important in VLSM networks because subnets can be embedded within subnets Finally, the implemented network topology must match the distribution of addresses and definition of subnets.
That is to say, the network designers must decide in advance how many levels of subnets are required, and how many hosts per subnet must be supported at each level
Recursive Division of a Network Prefix with VLSM As previously described, VLSM allows an organization s assigned address space to be recursively divided into as many levels and sizes of subnets as required. In order to better understand this process, we will first show how the address space is divided and then show how the routes from that recursively divided address space can be aggregated to effectively reduce the amount of transmitted routing information. In addition to reducing the amount of transmitted and stored routing information, an added benefit is that the associated network topology and structure of one subnet is unknown to other subnets.
Figure 8-12 illustrates how a single network prefix can be recursively divided thanks to VLSM
Route Aggregation with VLSM While the benefits of flexible subnet size definition is illustrated in Figure 8-12, the route aggregation benefits of VLSM are illustrated in Figure 8-13. Often, the terms summarization and aggregation are used interchangeably to describe the process of reducing the number of routing advertisements between subnets by only advertising the common portion of subnet IDs. Alternatively stated, summarization and aggregation mean that subnet information is not shared between two networks when a router connects those networks
In some cases, however, a distinction is made between the two terms. In such cases, the term summarization is reserved to describe those circumstances in which subnet addresses have been rolled up all the way to the major network prefix as assigned by the Internet authorities. In Figure 8-13, this would be the 121.0.0.0/8 major network prefix. On the other hand, the term aggregation is used to more generally describe any circumstance when only the common portion of those addresses in a routing advertisement can represent a subnet s entire address space
Notice in Figure 8-13, how each physical network that houses multiple subnet IDs can have its routing information summarized to a single route advertisement to the next higher layer of subnet. Finally, the entire internetwork can be advertised to the Internet routing tables by the single assigned network ID: 121.0.0.0.
Such route aggregation and the efficiencies gained therein, are only possible if subnet masks are assigned in a planned manner so that subnet address assignment mirrors the actual topology of the network, as illustrated in Figure 8-13. If assigned addresses are not organized to mirror the physical topology of the network, then address aggregation is not possible and the benefit of reduction of routing table size will not be realized
Subnet Design Using VLSM Subnet design with variable-length subnet masks is similar to subnet design with fixed-length subnet masks, but the decisions made regarding subnets for the entire network in the fixed-length subnet mask scenario are made independently at each level in the variable-length subnet mask scenario.
To elaborate, at each level (subnets, sub-subnets, sub2- subnets, etc.), basically two questions must be answered: 1. How many subnets are required at this level, both now and in the future? 2. What is the largest number of host required per subnet on this level, both now and in the future?
Defining Sub-Subnet Numbers with VLSM Figure 8-14 provides an example of how subnet numbers are defined in VLSM. In this example, it was determined that six sub-subnets were needed beneath the 121.253.0.0/16 subnet. Since two subnets are reserved, we need to really be able to define eight sub-subnets. Two to the third power is eight, so it will take 3 additional bits or /19 (/16+3 = /19) extended network prefix to provide the required six sub-subnets
Defining Sub2-Subnet Numbers with VLSM If it was then decided that the 121.253.160.0/19 sub-subnet needed to be recursively divided into six sub2-subnets, so 3 additional bits of variable length subnet mask would be required. This is illustrated in Figure 8-15
Defining Host Addresses for a Given Subnet With VLSM, defining host addresses involves the same process for subnet, sub-subnets, or sub2-subnets. Figure 8-16 illustrates the host definition process for sub2- subnet 121.253.184.0/22 defined in Figure 8-15. The extended network prefix of /22 tells us that 1022 host IDs can be defined on this sub2-subnet. (32 bit address 22 reserved bits = 10 bits available for host ID; two to the tenth power = 1,024 2 reserved host IDs = 1,022 available host IDs).
If 1,022 host IDs are way more than we could ever reasonably use, we would probably want to consider defining another subnet level so as not to strand or waste precious IP addresses. Notice how the extended network prefix does not increase when we define host IDs for a given subnet the way it did when we defined additional subnet levels to existing subnets
Notice how the third octet has changed from 184 to 187 on the last few host IDs. Does this mean that the subnet ID changed somehow? The answer is no. If you look in the extended network prefix column, you will see that the subnet ID has not changed. The reason the third octet changed is because the extended network prefix was 22, leaving 2 bits of the third octet left over for use by the host ID.
Since the host IDs start using the rightmost bits first, it was only when we got to the last few host IDs that we were forced to use the leftmost bits, which happened to belong in the third octet. As a result, the third octet may have become 187, but the sub2-subnet ID is still 184
Determining if VLSM IP Addresses Are Part of the Same Subnet Routers use the same algorithm to determine if IP addresses are part of the same subnet, whether or not VLSM is used. A router must somehow know the extended network prefix or subnet mask, as well as the IP address. In the case of fixed-length subnet masks, the router could use its own interface s subnet mask (since all subnet masks on a given network had to be the same), or it could assume the default subnet mask based on classful address class.
In the case of variable-length subnet masks, no such assumptions can be made. Extended network prefixes must accompany every advertised route that is shared between routers