第2章-IP子网划分和VLSM.ppt_第1页
第2章-IP子网划分和VLSM.ppt_第2页
第2章-IP子网划分和VLSM.ppt_第3页
第2章-IP子网划分和VLSM.ppt_第4页
第2章-IP子网划分和VLSM.ppt_第5页
已阅读5页,还剩37页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、IP子网划分和VLSMIP Subnetting and VLSM,熊金波 福建师范大学软件学院,教学目标( Objectives ),1. IP地址表示(Representation of IP Address) 2. IP地址分类 (Class of IP Address) 3. 保留和私有地址( Reserved and Private IP Address) 4. 网络掩码和子网划分(Network Mask and Subnetting ) 5. 可变长度子网掩码( VLSM ) 6. 使用VLSM设计自己的网络(Design Our Network Using VLSM) 7. 路

2、由汇总( Summarization ) 8. IP寻址故障诊断(IP Addressing Troubles Diagnosis),1 IP地址表示(Representation of IP Address),为了容易使用,采用点分十进制格式来表示IP地址 To make the IP address easier to use, the address is usually written as four decimal numbers separated by periods,192 . 168 . 123 . 2,2 IP地址的类别(Class of IP Address),3 保留地

3、址(Reserved Address),保留地址指某些地址不能分配网络上的设备使用 Certain host addresses are reserved and cannot be assigned to devices on a network. 1.主机部分全0表示网络地址 An IP address that has binary 0s in all host bit positions is reserved for the network address. 2.主机部分全1表示广播地址 An IP address that has binary 1s in all host bit

4、 positions is reserved for the broadcast address. 3.全0的IP地址,即0.0.0.0。设置缺省路由时使用。 An IP address that has binary 0s in all bit positions is reserved for default route 4.全1地址255.255.255.255,表示泛洪广播 An IP address that has binary 0s in all bit positions is reserved for flood broadcast,私有地址(Private IP Addre

5、ss),1. 私有地址可以节省IP地址 Private IP addresses are another solution to the problem of the impending exhaustion of public IP addresses. 2. 私有地址不能在Internet上被路由 Private IP addresses are not routed on the Internet backbone.,Exercise: IP Address Classes,Address,Class,Network,Host,10.2.1.1,128.63.2.100,201.222.

6、5.64,192.6.141.2,130.113.64.16,256.241.201.10,IP Address Classes Exercise Answers,网络掩码的作用(Function of Network Mask),10101100 00010000 00000010 10100000 172.16.2.160 11111111 11111111 00000000 00000000 255.255.0.0 10101100 00010000 00000000 00000000 172.16.0.0,Network ID,4 网络掩码(Network Mask),A类:255.0

7、.0.0,B类:255.255.0.0,C类:255.255.255.0,子网划分(Subnetting),为了克服有限的IP地址,所有类别网络可以被划分为更小的子网。 To efficiently manage a limited supply of IP addresses, all classes can be subdivided into smaller subnetworks.,划分子网原因(Reasons for Subnetting),1. 提供灵活的编址 Provides addressing flexibility Provides 2. 提供广播抑制 Broadcast

8、Containment 3. 为LAN提供低水平的安全 Low-level security on the LAN.,简单实例 (Simple Case ),介绍子网划分(Introduction toSubnetting),介绍子网划分(Introduction to Subnetting),划分子网要从主机位借位 Host bits must are reassigned (or “borrowed”) as network bits.,3 bits borrowed allows 23-2 or 6 subnets,5 bits borrowed allows 25-2 or 30 su

9、bnets,12 bits borrowed allows 212-2 or 4094 subnets,Comparison between decimal and binary,Classless Inter-Domain Routing(CIDR),CIDR值: 1.掩码255.0.0.0:/8(A类地址默认掩码) 2.掩码255.128.0.0:/9 3.掩码255.192.0.0:/10 4.掩码255.224.0.0:/11 5.掩码255.240.0.0:/12 6.掩码255.248.0.0:/13 7.掩码255.252.0.0:/14 8.掩码255.254.0.0:/15

10、9.掩码255.255.0.0:/16(B类地址默认掩码) 10.掩码255.255.128.0:/17 11.掩码255.255.192.0:/18 12.掩码255.255.224.0:/19,13.掩码255.255.240.0:/20 14.掩码255.255.248.0:/21 15.掩码255.255.252.0:/22 16.掩码255.255.254.0:/23 17.掩码255.255.255.0:/24(C类地址默认掩码) 18.掩码255.255.255.128:/25 19.掩码255.255.255.192:/26 20.掩码255.255.255.224:/27 2

11、1.掩码255.255.255.240:/28 22.掩码255.255.255.248:/29 23.掩码255.255.255.252:/30,Classless Inter-Domain Routing(CIDR),划分子网的几个捷径 (Shortcuts of Subnetting),1、你所选择的子网掩码将会产生多少个子网? -2的x次方-2(x代表掩码位,即2进制为1的部分) 2、每个子网能有多少主机? -2的y次方-2(y代表主机位,即2进制为0的部分) 3、合法子网是多少? -块大小=256-10进制的子网掩码(结果叫做block size或base number),从0开始以

12、块大小递增,即可得到合法子网。 4、每个子网的广播地址是? -广播地址=下个子网号-1 5、每个子网的有效主机范围分别是? -忽略子网内全为0和全为1的地址剩下的就是有效主机地址。最后有效1个主机地址=下个子网号-2(即广播地址-1),实例1:C类地址2位子网化( E.g1 Two Bits Subnetting for Class C ),子网号(Subnet) 地址范围(range) 00 000000 0 0000000100111111 162 其中:0为网络地址,63为广播地址 01 000000 64 0100000101111111 65127 其中:64为网络地址,127为广播

13、地址 10 000000 128 1000000110111111 129191 其中:128为网络地址,191为广播地址 11 000000 192 1100000111111111 193255 其中:192为网络地址,255为广播地址,实例2:C类地址4位子网化( E.g2 4 Bits Subnetting for Class C ),组合 子网号 地址范围 0000 0000 0 0000000100001111 115 其中:15为广播地址 0001 0000 16 0001000100011111 1731 其中:31为广播地址 0010 0000 32 001000010010

14、1111 3347 其中:47为广播地址 0011 0000 48 0011000100111111 4963 其中:63为广播地址 0100 0000 64 0100000101001111 6579 其中:79为广播地址 0101 0000 80 0101000101011111 8195 其中:95为广播地址 0110 0000 96 0110000101101111 97111 其中:111为广播地址 0111 0000 112 0111000101111111 113127 其中:127为广播地址 1000 0000 128 1000000110001111 129143 其中:14

15、3为广播地址 1001 0000 144 1001000110011111 145159 其中:159为广播地址 1010 0000 160 1010000110101111 161175 其中:175为广播地址 1011 0000 176 1011000110111111 177191 其中:191为广播地址 1100 0000 192 1100000111001111 193207 其中:207为广播地址 1101 0000 208 1101000111011111 209223 其中:223为广播地址 1110 0000 224 1110000111101111 225239 其中:23

16、9为广播地址 1111 0000 240 1111000111111111 241255 其中:255为广播地址,可用的子网和主机数(Number of Usable Subnets and Hosts ),usable subnets (2 power of borrowed bits)2 usable hosts= (2 power of remaining host bits)2,C类地址划分子网情况汇总(Summary of Class C Subnetting),Written Exercise: Subnet Masks,Address,Subnet Mask,Class,Subn

17、et,172.16.2.10,10.6.24.20,201.222.10.60,255.255.255.0,255.255.240.0,255.255.255.248,Subnet Mask Exercise Answers,5 可变长度子网掩码(Variable-Length Subnet Mask),HQ,172.16.0.0/16,可变长度子网掩码(Variable-Length Subnet Mask),HQ,172.16.1.0/24,172.16.2.0/24,HQ,172.16.0.0/16,172.16.14.32/27,172.16.14. 64/27,172.16.14.9

18、6/27,可变长度子网掩码(Variable-Length Subnet Mask),C,B,A,将子网172.16.14.0/24划分为更小的子网,首先掩码长度为27 Subnet 172.16.14.0/24 is divided into smaller subnets: Subnet with one mask at first (/27),HQ,172.16.1.0/24,172.16.2.0/24,HQ,172.16.0.0/16,172.16.14.32/27,172.16.14. 64/27,172.16.14.96/27,将没有使用的掩码长度为27的子网进一步划分为掩码长度为

19、30 Subnet with one mask at first (/27) Further subnet one of these subnets not used elsewhere (/30),C,B,A,HQ,172.16.1.0/24,172.16.2.0/24,HQ,172.16.0.0/16,172.16.14.136/30,172.16.14.132/30,172.16.14.140/30,可变长度子网掩码(Variable-Length Subnet Mask),主机30台以内,计算VLSM(Calculating VLSMs),Subnetted Address: 172.

20、16.32.0/20In Binary 10101100. 00010000.00100000.00000000,计算VLSM(Calculating VLSMs),VLSM Address: 172.16.32.0/26In Binary 10101100. 00010000.00100000.00000000,Subnetted Address: 172.16.32.0/20In Binary 10101100. 00010000.00100000.00000000,计算VLSM(Calculating VLSMs),Network,Subnet,VLSM subnet,Host,1,0,

21、1,0,1,1,0,0,.,0,0,0,1,0,0,0,0,.,0,0,1,0,0,0,0,0,.,0,0,0,0,0,0,0,0,=,172.16.32.0/26,1st subnet:,VLSM Address: 172.16.32.0/26In Binary 10101100. 00010000.00100000.00000000,Subnetted Address: 172.16.32.0/20In Binary 10101100. 00010000.00100000.00000000,Subnetted Address: 172.16.32.0/20In Binary 1010110

22、0. 00010000.00100000.00000000,VLSM Address: 172.16.32.0/26In Binary 10101100. 00010000.00100000.00000000,1st subnet:,1,0,1,0,1,1,0,0,.,0,0,0,1,0,0,0,0,.,0,0,1,0,0,0,0,0,.,0,0,0,0,0,0,0,0,=,172.16.32.0/26,1,7,2,.,16,.,0,0,1,0,0,0,0,0,.,0,1,0,0,0,0,0,0,=,172.16.32.64/26,1,7,2,.,16,.,0,0,1,0,0,0,0,0,.,

23、1,0,0,0,0,0,0,0,=,172.16.32.128/26,1,7,2,.,16,.,0,0,1,0,0,0,0,0,.,1,0,0,0,0,0,0,=,172.16.32.192/26,1,7,2,.,16,.,0,0,1,0,0,0,0,1,.,0,0,0,0,0,0,0,0,=,172.16.33.0/26,Network,Subnet,VLSM Subnet,Host,1,2nd subnet:,3rd subnet:,4th subnet:,5th subnet:,计算VLSM(Calculating VLSMs),6 练习:使用VLSM规划自己的网路(Exercise:D

24、esign Our Network Using VLSM ),(62 Hosts),(62 Hosts),(62 Hosts),(62 Hosts),练习答案(Exercise Answer),172.16.33.0/30,172.16.33.4/30,172.16.33.8/30,172.16.33.12/30,30-Bit Mask (2 Hosts),172.16.32.0/26,172.16.32.64/26,172.16.32.128/26,172.16.32.192/26,26-Bit Mask (62 Hosts),7 路由汇总(Route Summarization),Rout

25、ing table 172.16.25.0/24 172.16.26.0/24 172.16.27.0/24,172.16.27.0/24,172.16.26.0/24,172.16.25.0/24,A,路由汇总(Route Summarization),路由协议能够将几条路由条目汇总成一条 Routing protocols can summarize addresses of several networks into one address,I can route to the 172.16.0.0/16 network.,Routing Table 172.16.0.0/16,B,Ro

26、uting Table 172.16.25.0/24 172.16.26.0/24 172.16.27.0/24,172.16.27.0/24,172.16.26.0/24,172.16.25.0/24,A,Routing Table 172.16.16.0/20,在一个位组内汇总(Summarizing within an Octet),172.16.168.0/24 = 10101100 . 00010000 . 10101 000 . 00000000,相同的位数为21(Number of Common Bits = 21)不同位数11位(Noncommon Bits = 11) 汇总:172.16.168.0/21(Summary: 172.16.168.0/21),172.16.169.0/24 = 172 . 16 . 10101 001 . 0,172.16.170.0/24 = 172

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论