Vous êtes sur la page 1sur 4

Manual Summarization of Addresses with VLSM subnets

Studying routing protocols we learn that some can support autosummarization (of addresses), others can support manual summarization and, out of this group there are those who support both types of summarization. Automatic summarization (autosummarization) - as the name suggests - is handled automatically by the routing protocol, but sometimes we also need to configure static routes in the routers, so I think it's important to learn how to manually work out the summary addresses for static routes, that is, to use your brain and do your own calculations to find out the resulting summary address for those static routes. Hint: if you want to cut to the chase, go to the paragraph First example finding a summary address for a list of five different subnets If you look for this topic in books that cover CCNA (at least CCNA 4.1) topics you may find a very clear explanation for the process of manual summarization. It's very easy to accomplish the task of calculating the manual summary route using the guidelines you may find in these materials. However, I noticed in part of the material that I used to prepare for my CCNA certification (I won't cite any one specific to avoid violating the Policy Agreement and because it doesn't matter for this discussion) that they only mention manual summarization for a series of subnet numbers that share the exact same prefix length. This raised a question in my mind: what if I wanted to apply those guidelines for a series of subnet numbers with different prefix lengths (VLSM), would it work? Therefore, I thought about writing this text, hoping that it may be of interest of someone who ever comes across the task of calculating the summary route by himself/herself for a series of subnet numbers that do not share the same prefix length. I don't know if a CCNA-related exam would test us up to this level, but I think it won't hurt if I share a piece of information for something that raised some doubts in my mind when I first came across it. Fortunately, the process is not complicated (I hope not to make it appear so because of this writing), since we just need to analyze the two ends of a major range, regardless of the prefix lengths used in the set of subnets. Enough said, let's go to our first example. First example finding a summary address for a list of five different subnets: 172.16.72.0/25 172.16.80.0/20 172.16.14.0/24 172.16.30.0/26 172.16.0.0/21 All prefix length's are different but all subnet numbers share the octets 172.16 in the network portion of the address. This means we'll be summarizing at the boundary 172.16 part. So let's put the previous five subnet numbers in order and take a look at them: 172.16.0.0/21 range 172.16.0.0 172.16.7.255 172.16.14.0/24 range 172.16.14.0 172.16.14.255 172.16.30.0/26 range 172.16.30.0 172.16.30.63 172.16.72.0/25 range 172.16.72.0 172.16.72.127 172.16.80.0/20 range 172.16.80.0 172.16.95.255 As we can see, there are no overlapping subnets. It's not a task of the summarization process to

make sure there aren't overlapping subnets, despite I noticed it. It's something that should have been done in the design of those subnets, in my humble opinion. Now, if we look at the prefix lengths, they are all different. The good thing is that doesn't matter for our task. We just need to focus on the low and high ends of the range we want to summarize. For a better understanding, let's pick the numerically smallest IP address, the 172.16.0.0 (that was easy because the subnet numbers are ordered) and the numerically highest IP address, which is the broadcast address 172.16.95.255. Our task is to find a combination of subnet number and prefix length that includes in its range all addresses from 172.16.0.0 to 172.16.95.255. Now, lets look at the addresses 172.16.0.0 and 172.16.80.0 in binary. Since all of the addresses for the five subnet numbers share the 172.16 part, the binary part of these addresses will be the same and it's not of interest for us right now (we'll not focus on the 172.16 part now). The last octet is 0 for all the subnet numbers, so they will be omitted (0 in binary is 00000000). A) 10101100.00010000.00000000 (172.16.0) B) 10101100.00010000.01011111 (172.16.80) These series of bits represent the network and subnet portions of the subnets 172.16.0.0/21 and 172.16.80.0/20. These portions are highlighted in bold. We now have to look at the highlighted bits from left to right to find the last bit the matches between the two addresses. We are not doing an ANDing process, just comparing two bits at the same position to see if they are equal or not. Notice that the first two octets are the same for both subnets (172.16), therefore the binary values for these octets will be the same as well (10101100.00010000). The difference appears in the third octet. The first bit (0) is the same in both subnets, but the second bit is different in line A) it's 0 and in line B) it's 1. This means that only the first seventeen (17) bits in these two addresses have a match. It also means that we are almost finding our summary route for all those five subnets at the beginning of this example. All we have to do now is to complete the matching part (painted with blue) of the address with zeros and convert back to decimal form, like this: 10101100.00010000.00000000.00000000 (172.16.0.0/17) To confirm that we have found the right answer (the best summary route for those five subnets), lets work out the range of addresses for this prefix length: 172.16.0.0/17 ranges from 172.16.0.0 to 172.16.127.255. This range includes addresses from 172.16.0.0/21 to 172.16.95.255/20. Notice, however, that there a lot of other addresses that do not belong to any of those five subnets. Those are the costs of using summarization to refer to all of those five subnets. It's up to you to consider if the summarization is the best for your topology and guarantee that it will not cause you any troubles, mainly with routing protocols advertisements.

Now, let's take a look at another example. Let's summarize all these seven VLSM subnets: 10.12.19.0/25 10.12.15.0/26 10.12.16.0/23 10.12.44.0/23 10.12.58.224/29 10.12.32.0/21 10.12.58.0/28 First, let's order the subnets 10.12.15.0/26 10.12.16.0/23 10.12.19.0/25 10.12.32.0/21 10.12.44.0/23 10.12.58.0/28 10.12.58.224/29 Now, let's find out the numerically lowest IP address and the numerically highest IP address. Paying attention to the ordered list, we can see that the first and second octets are equal for all seven subnets. So we will directly look at the third octet of the addresses. The numerically lowest IP address is the subnet address 10.12.15.0/26. For the numerically highest IP address there is a tie, so in this case we will also look at the fourth octet to break that tie. As it turns out, the subnet 10.12.58.224/29 is the one that contains the numerically highest IP address among all the subnets listed remember this is a subnet ID. Therefore, we find the numerically highest IP address as the broadcast address of this subnet, which is 10.12.58.231/29. There is no magic here, we just need to be able to do the maths quickly to find subnet and broadcast addresses. If you have difficulty with that, then I suggest you start by watching this very good webinar in the CCNA Study Group about the basics of subnetting at https://learningnetwork.cisco.com/videos/1597. Back to our example, now the task is to find the least prefix length that includes the range of

addresses from 10.12.15.0 and 10.12.58.231. Now we'll do the binary comparison for the two subnet numbers we selected. The process state that we have to look for a match in the network portion of both addresses. A) 00001010.00001100.00001111.00000000 (10.12.15.0/26) B) 00001010.00001100.00111010.11100000 (10.12.58.224/29) In this case, we painted the matching bits with blue too. It's easy to see that we need at least 18 bits to summarize all those seven subnets. Note that since we are looking for a match in the network portion of the addresses, using the the subnet ID (10.12.58.224) and the (broadcast) IP address (10.12.58.231) does not change anything. If we had put 10.12.58.231 in the second IP address or 172.16.95.255 in letter B of the previous example, the outcome would have been the same. So, to complete the process, we add zeros to the address, after these 18 bits: 00001010.00001100.00000000.00000000 (10.12.0.0/18) To check that we are correct, we calculate the range for the subnet 10.12.0.0/18, which is from 10.12.0.0 to 10.12.63.255. This range includes the addresses from 10.12.15.0 to 10.12.58.231. Again, there are a lot of addresses included in the /18 summary route that don't belong to any of the seven subnets we have in this example. A summary route to the network 10.12.0.0/18 would be pointing to all theses addresses and it's important to consider that for static routes, or even for route redistribution in routing protocols. It's also noticeable that the summary route for VLSM subnets point to a range of addresses that we really need to summarize (in this example we have an interval from 10.12.15.0 to 10.12.58.231 that we want to summarize). All the addresses in the ranges from 10.12.0.0 to 10.12.14.255, and from 10.12.58.232 to 10.12.63.255 will also be addressed by that / 18 summary route, but we don't need them. However, this is the same effect we notice in some summarization for subnets with the same prefix length. This is the price for the summary route.

Elias Meira dos Santos, Brazil, So Paulo, 2013

Vous aimerez peut-être aussi