免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1374 | 回复: 0
打印 上一主题 下一主题

IP addressing decimal Math [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-06-21 22:32 |只看该作者 |倒序浏览

                                Finding Inclusive Summary Routes—Decimal
To find the same inclusive summary using only decimal math, use the following process. The process works just fine with variable prefix lengths and nonconsecutive subnets.
  • Count the number of subnets; then, find the smallest value of y, such that 2y => that number of subnets.
  • For the next step, use a prefix length based on the longest prefix length of the component subnets, minus y.
  • Pretend that the lowest numeric subnet number in the list of component subnets is an IP address. Using the new, smaller prefix from Step 2, calculate the subnet number in which this pretend address resides.
  • Repeat Step 3 for the largest numeric component subnet number and the same prefix. If it is the same subnet derived as in Step 3, the resulting subnet is the best summarized route, using the new prefix.
  • If Steps 3 and 4 do not yield the same resulting subnet, repeat Steps 3 and 4 with another new prefix length of 1 less than the last prefix length.

Table 4-11 shows two examples of the process. The first example has four routes, 172.31.20.0, .21.0, .22.0, and .23.0, all with prefix /24. The second example adds 172.31.24.0 to that same list.

Finding Exclusive Summary Routes—Binary
A similar process, listed next, can be used to find the exclusive summary. Keep in mind that the best exclusive summary can be comprised of multiple summary routes. Once again, to keep it simple, the process assumes SLSM.
  • Find the best inclusive summary route; call it a candidate exclusive summary route.
  • Determine if the candidate summary includes any address ranges it should not. To do so, compare the summary’s implied address range with the implied address ranges of the component subnets.
  • If the candidate summary only includes addresses in the ranges implied by the component subnets, the candidate summary is part of the best exclusive summarization of the original component subnets.If instead the candidate summary includes some addresses that match the candidate summary routes and some addresses that do not, split the current candidate summary in half, into two new candidate summary routes, each with a prefix 1 longer than before.
  • If the candidate summary only includes addresses outside the ranges implied by the component subnets, the candidate summary is not part of the best exclusive summarization, and it should not be split further.
  • Repeat Steps 2 through 4 for each of the two possible candidate summary routes created at Step 4.

Routes to Summarize:
172.31.20.0/24 (20.0 thru 20.255)
172.31.21.0/24 (21.0 thru 21.255)
172.31.22.0/24 (22.0 thru 22.255)
172.31.23.0/24 (23.0 thru 23.255)
172.31.24.0/24 (24.0 thru 24.255)
Best inclusive summary:
172.31.16.0/20
=================================
        172.31.16.0/20: 16.0 Thru 31.255 (Too inclusive, split)
                                        |
                                        |
               -----------------------------------------
              |                                            |
              |                                                 |
172.31.16.0/21: 16.0 thru 23.255                172.31.24.0/21: 24.0 thru 31.255
    (Too inclusive, split)                               (Too inclusive, split)
              |                                                      |
              |                                                      |
    ---------------------                        -----------------------
   |                         |                      |                           |
   |                          |                      |                            |
172.31.16.0/22:      172.31.20.0/22:     172.31.24.0/22:        172.31.28.0/22:
16.0 Thru 19.255     20.0 Thru 23.255    24.0 Thru 27.255       28.0 Thru 31.255
    A                        B                   C                    D   
A. Range completely outside range to be summarized; stop splitting.
B. Range is exclusively from target range — keep this as part of best exclusive summary!
C. Too inclusive: keep splitting! (Details not shown.)
D. Range completely outside range to be summarized; stop splitting.
               
               
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/42903/showart_1006880.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP