资源描述
Slide Title,Body Text,Second level,Third level,Fourth level,Fifth level,Chapter 3 IP,地址划分,概述,IP,地址分类,子网划分,规划,IP,地址,在,WIN2000,中指定,IP,地址,CIDR,基础,运算,二进制与十进制转换,二进制与十六进制,八进制转换,(,help),Boolean algebra review,Boolean operators:,AND,.,OR,.,NOT,.,AND,operator,1,AND,1 = 1,1,AND,0 = 0,0,AND,1 = 0,0,AND,0 = 0,OR,operator,1,OR,1 = 1,1,OR,0 = 1,0,OR,1 = 1,0,OR,0 = 0,NOT,operator,NOT,1 = 0,NOT,0 = 1,Boolean algebra examples,1010,AND,0110 = 0010,1010,OR,0110 = 1110,IP,地址,什么是,IP,地址,它是一种协议地址,别的协议可能会有自己的地址,不叫,IP,地址,这种地址是此协议用来定位计算机时用的,IP,地址的分类(,A.B.C.D.E),A,类(1-126)即:1.,x.y.z-126.x.y.z,B,类(128-191)即:128.0.,y.z-191.255.y.z,C,类(192-223)即:192.0.0.,z-223.255.255.z,IP,地址的分类,A,类地址:头一位是0,(,w.x.y.z),B,类地址:头两位是10 (,w.x.y.z),C,类地址:头三位是110 (,w.x.y.z),网络,ID,和主机,ID,的作用(根据子网掩码来分的),地址分配原则:网络,ID,不能为127,主机,ID,不能全为0或者全为255,主机,ID,对于每个网络,ID,是唯一的。,eg:192.1 68.0.1/24,网络,ID (192.168.0),主机,ID ( 1),子网掩码(,subnet mask),IP,地址内的网络,ID,和主机,ID,用子网掩码区分。每个子网掩码都是一个 32 位数,使用连续的都是 1 的位组标识网络,ID,,都是 0 的位组标识,IP,地址的主机,ID。,例如,,IP,地址 131.107.16.200 通常使用子网掩码是以下 32 位二进制数:,11111111 11111111 00000000 00000000,该子网掩码是 16 个都是 1 的位,后跟 16 个都是 0 的位,表示,IP,地址的网络,ID,和主机,ID,长度上都是 16 位。通常,该子网掩码显示成带点的十进制符号 255.255.0.0。,A,类,11111111 00000000 00000000 00000000,255.0.0.0,B,类,11111111 11111111 00000000 00000000,255.255.0.0,C,类,11111111 11111111 11111111 00000000,255.255.255.0,地址类别小结,类别 十进制表示前8位 网络标识的数 主机标识,A 1-126 8 24,B 128-191 16 16,C 192-223 24 8,Example:,172.16.20.200,172.16.20.200,is Class B address,Network portion:,172.16,Host portion:,20.200,Network address:,172.16.0.0,Broadcast address:,172.16.255.255,SMIPLE,Host IP Address,Address Class,Network Address,Host Address,Broadcast Address,218.14.55.137,123.1.1.15,150.127.221.244,194.125.35.199,175.12.239.244,C,218.14.55,137,218.14.55.255,A,123,1.1.15,123.255.255.255,B,150.127,221.244,150.127.255.255,C,194.125.35,199,194.125.35.255,B,175.12,239.244,175.12.255.255,Default subnet mask:,Example,192.168.2.100 / 255.255.255.0.,11000000.10101000.00000010.01100100.,11111111.11111111.11111111.00000000.,11000000,.,10101000,.,00000010,.,01100100.,Class C network:,24 bits for network portion.,0 bits for subnet portion.,8 bits for host portion.,Subnet address: 192.168.2.0.,Subnet mask:,Example,172.16.65.100 / 255.255.240.0.,10101100.00010000.01000001.01100100.,11111111.11111111.11110000.00000000.,10101100,.,00010000,.,0100,0001,.,01100100.,Class B network:,16 bits for network portion.,4 bits for subnet portion.,12 bits for host portion.,Subnet address: 172.16.64.0.,TCP/IP,工作原理,将,IP,地址与子网掩码相互操作,得出网络,IP,若相同,表示在同一子网,直接通信,若不同,表示在不同子网,找路由器,路由再发出广播,.,Routing table,131.108.1.0,E0,131.108.2.0,E1,131.108.3.0,E2,Router function,Router function,Router function (cont.1),Strips off the data link header, carried by the frame.,(The data link header contains the MAC addresses of the source and destination.),Router function (cont.2),Examines the network layer address to determine the destination network.,Router function (cont.3),Consults its routing tables to determine which of its interfaces it will use to send the data, in order for it to reach its destination network.,Router function (cont.4),Send the data out interface B1, the router would encapsulate the data in the appropriate data link frame.,子网,为什么要子网?(子网,是,TCP/IP,环境中的一个物理段,划分子网可以克服当前技术的局限,例如超过每一段主机的最大数目。你可以重新定向网络流和减少广播,降低网络的拥挤程度。),子网掩码如何计算?,1,.,确定子网掩码 2. 将子网(主机)数量转换成二进制 3. 计算所使用的位数 4. 通过计算可得子网掩码 (举例),确定主机数量和子网数量,(举例),计算子网地址,(举例),计算主机地址,(举例),(举例),192.168.10.0, 需要13个子网来取代相互独立的网络,需要什么样的子网掩码呢?,192.168.15.0 ,划分31个不同的子网.,如果是,B,类地址呢?,TCP/IP,地址测试,PING,PING IP,地址,-TCP /IP,协议初始化正确,PING,本机地址,-,网卡,NDIS,绑定正确,PING,同一子网地址,-,本子网网络已通,PING,缺省网关,-,路由器配置正确,PING,对方不同子网地址,-,这一段网络已通,IP,地址,192.168.1.0,192.168.3.0,192.168.1.,100,192.168.2.,101,192.168.2.,100,192.168.3.,100,192.168.2.0,192.168.1.100,IP,Address,Host ID,Network ID,IP,地址分类-1,w,x,y,z,Class A,Network ID,Host ID,Class B,Network ID,Host ID,Class C,Network ID,Host ID,Class A:,Class B:,Class C:,Class D: Multicast,Class E: Research,IP,地址分类-2,Network,Host,Host,Host,Network,Network,Host,Host,Network,Network,Network,Host,8,bits,8,bits,8,bits,8,bits,IP,地址分类,3,1,A:,0,NNNNNNN,Host,Host,Host,8,9,16,17,24,25,32,Range (1-126),1,B:,10,NNNNNN,Network,Host,Host,8,9,16,17,24,25,32,Range (128-191),1,C:,110,NNNNN,Network,Network,Host,8,9,16,17,24,25,32,Range (192-223),1,D:,1110,MMMM,Multicast Group,Multicast Group,Multicast Group,8,9,16,17,24,25,32,Range (224-239),Address,Class,Network,Host,10.2.1.1,128.63.2.100,201.222.5.64,192.6.141.2,130.113.64.16,256.241.201.10,Nonexistent,A,10.0.0.0,0.2.1.1,B,128.63.0.0,0.0.2.100,C,201.222.5.0,0.0.0.64,C,192.6.141.0,0.0.0.2,B,130.113.0.0,0.0.64.16,IP,地址分类练习,子网划分,子网,子网掩码,判断本地主机、远程主机,子网,Router,Subnet 1,Subnet 2,1,2,Hub,Hub,一个子网是一个广播域,子网掩码,IP,Address,Host ID,Network ID,192.168.,2.200,Subnet,Mask,255.255.,0.0,192.168.,IP,Address,10.,50.100.200,Subnet,Mask,255.,0.0.0,Network,ID,10.,0.0.0,IP,Address,10.50.,100.200,Subnet,Mask,255.255.,0.0,Network,ID,10.50.,0.0,IP,Address,10.50.100.,200,Subnet,Mask,255.255.255.,0,Network,ID,10.50.100.,0,判断本地主机、远程主机,Example 1,1,192.168.1.100,Local Hosts,192.168.2.100,2,Router,255.255.0.0,Subnet Mask,A,B,C,D,E,F,Example 2,1,192.168.1.100,2,Remote Hosts,192.168.2.100,Router,255.255.255.0,Subnet Mask,A,B,C,D,E,F,比较:,源,NetID ,目的,NetID,相等:,Local,不相等:,Remote,规划,IP,地址,一般原则,指定,NetIDs,指定,Host IDs,一般原则,The Host ID,不能 全 0,The Host ID,不能全 255,Network ID,第一个字节不能是 127,本网络内,Host ID,必须唯一,特殊,IP,地址,类型,Host ID,例子,网络地址全 0 192.168.1.0,广播地址全 1 192.168.1.255,本地广播全 1 255.255.255.255,指定,NetIDs,1,2,3,Router,10.,0,.,0,.,0,192.168.2.,0,172.16.,0,.,0,指定,Host IDs,1,2,Router,172.16.,0.12,172.16.,0.11,172.16.,0.10,10,.0.0.12,10,.0.0.11,10,.0.0.10,192.168.2,.11,192.168.2,.10,192.168.2.,1,10.,0.0.1,172.16.,0.1,3,10.,0,.,0,.,0,192.168.2.,0,172.16.,0,.,0,在,WIN2000,中指定,IP,地址,静态,IP,地址,动态获得,IP,地址,查看,IP,地址配置,用,Ipconfig,查看,TCP/IP,配置,静态,IP,地址,Internet Protocol (TCP/IP) Properties,General,You can get IP settings assigned automatically if your network supports this capability. Otherwise, you need to ask your network administrator for the appropriate IP settings.,O,btain an IP address automatically,U,s,e the following IP address:,IP address:,Us,e,the following DNS server addresses:,P,referred DNS server:,Obtain DNS server address automatically,Ad,v,anced.,A,lternate DNS server:,192 . 168 . 1 . 200,192. 168 . 1 . 1,255 . 255 . 255. 0,Subnet mask :,Default gateway:,OK,Cancel,动态获得,IP,地址,Internet Protocol (TCP/IP) Properties,General,You can get IP settings assigned automatically if your network supports this capability. Otherwise, you need to ask your network administrator for the appropriate IP settings.,O,btain an IP address automatically,U,s,e the following IP address:,IP address:,Us,e,the following DNS server addresses:,P,referred DNS server:,Obtain DNS server address automatically,Ad,v,anced.,A,lternate DNS server:,Subnet mask :,Default gateway:,OK,Cancel,查看,IP,地址配置,Internet Protocol (TCP/IP) Properties,General,You can get IP settings assigned automatically if your network supports this capability. Otherwise, you need to ask your network administrator for the appropriate IP settings.,O,btain an IP address automatically,U,s,e the following IP address:,IP address:,Us,e,the following DNS server addresses:,P,referred DNS server:,Obtain DNS server address automatically,Ad,v,anced.,A,lternate DNS server:,192 . 168 . 1 . 200,192. 168 . 1 . 1,255 . 255 . 255. 0,Subnet mask :,Default gateway:,OK,Cancel,用,Ipconfig,查看,TCP/IP,配置,Command Prompt,Microsoft Windows 2000 version 5.00.2195,(C) Copyright 1985-1999 Microsoft Corp.,C:ipconfig,Windows 2000 IP Configuration,Ethernet adapter Local Area Connection:,Connection-specific DNS Suffix . :,IP Address. . . . . . . . . . . . : 192.168.1.200,Subnet Mask . . . . . . . . . . . : 255.255.255.0,Default Gateway . . . . . . . . . : 192.168.1.1,C:_,CIDR,概述,Classless Inter-Domain Routing (CIDR ),二进制,IP,地址,二进制子网掩码,用,CIDR,划分,IP,地址,Classless Inter-Domain Routing (CIDR),传统,A、B、C,类,IP,地址的划分的缺点,CIDR ,无类的,IP,地址划分,传统,A、B、C,类,IP,地址的划分的缺点,Wastes IP Addresses,Network of 2000 Computers,Assigned 65,534 IP Addresses,63,534,Wasted,2000,Allocated,Class B,w,x,y,z,Network ID,Host ID,255,0,0,255,Adds Multiple Entries to Routing Tables,Class C,w,x,y,z,Network ID,Host ID,0,255,255,255,192.168.1.0,192.168.2.0,192.168.3.0,192.168.4.0,192.168.5.0,192.168.6.0,192.168.7.0,192.168.8.0,Portion of Internet Routing Tables,192.168.1.0 255.255.255.0 192.168.1.1,192.168.2.0 255.255.255.0 192.168.2.1,192.168.3.0 255.255.255.0 192.168.3.1,192.168.4.0 255.255.255.0 192.168.4.1,192.168.5.0 255.255.255.0 192.168.5.1,192.168.6.0 255.255.255.0 192.168.6.1,192.168.7.0 255.255.255.0 192.168.7.1,192.168.8.0 255.255.255.0 192.168.8.1,Company Network IDs,Internet,CIDR,w,x,y,z,10.217.,123.7,00001010 11011001,01111011 00000111,IP Address in Dotted Decimal Notation,Network ID,Host ID,32,Values,4,Values,IP Address in Binary Notation,二进制,IP,地址,点分十进制,二进制,Converting to Binary Format Using a Calculator,十进制,二进制,8,Bits,Decimal Value 255,1,1,1,1,1,1,1,1,128,64,32,16,8,4,2,1,Decimal Notation (Base 10),10,4,10,3,10,2,10,1,10,0,10,000,1,000,100,10,1,Example,0,2,1,7,0*10,4,2*10,3,1*10,2,7*10,1,0,200,10,7,217,Binary Notation (Base 2),2,7,2,6,2,5,2,4,2,3,2,2,2,1,2,0,Example,1,1,0,1,1,0,0,1,1*128,1*64,0*32,1*16,1*8,0*4,0*2,1*1,128,64,32,16,8,4,2,1,128,64,0,16,8,0,0,1,217,Calculator,Edit View Help,Hex,Dec,Oct,Bin,Degrees,Radians,Grads,Inv,Hyp,Backspace,CE,C,Sta,Ave,Sum,s,Dat,Sta,F-E,dms,sin,cos,tan,Exp,In,xy,log,x3,x2,nl,1/,x,pi,M+,MS,MR,MC,7,8,9,4,5,6,1,2,3,0,+/-,.,A,B,C,D,E,F,/,*,-,+,=,Lsh,Or,Mod,And,Xor,Not,Int,0.,Converting to Binary Format Using a Calculator,Hex,Decimal,Octal,Binary,Degrees,Radians,Grads,Digit grouping,F5,F6,F7,F8,F2,F3,F4,Scientific,Standard,二进制子网掩码,子网掩码位,CIDR,表示掩码,计算,Net ID,判断本地主机、远程主机,子网掩码位,Network ID,Host ID,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,w,x,y,z,10 . 217 . 123,. 7,255 . 255 . 255,. 0,Binary Representation,Decimal Representation,11111111,255,11111110,254,11111100,252,11111000,248,11110000,240,11100000,224,11000000,192,10000000,128,00000000,0,CIDR,表示掩码,IP,Address,Subnet,Mask,Number of Subnet Mask Bits (ones),IP Address in,CIDR Notation,255 . 255 . 240 . 0,11111111 11111111 11110000 00000000,10 . 217 . 123 . 7,00001010 11011001 01111011 00000111,8 + 8 + 4 + 0 = 20,10.217.123.7/20,计算,Net ID,IP,Address,Subnet,Mask,Network,ID,Network ID in,CIDR Notation,10.217.112.0/20,255 . 255 . 240 . 0,11111111 11111111 11110000 00000000,10 . 217 . 123 . 7,00001010 11011001 01111011 00000111,00001010 11011001 01110000 00000000,IP Address in CIDR Notation: 10.217.123.7/20,判断本地主机、远程主机,Local Host Example,1,2,Router,A,B,C,D,E,F,00001010 11,011001 01111011 00000111,00001010,11,011010 01100110 00000011,10.217.123.7/10,10.218.102.31/10,Remote Host Example,1,2,Router,A,B,C,D,E,F,00001010,11011010 0110,0110 00000011,10.218.102.31/20,00001010 11011001 0111,1011 00000111,10.217.123.7/ 20,可用的,Host Ids,Number of Host IDs : 2,n,- 2,Subnet Mask,N,Network ID,Host ID,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,172,2,160,10101100,00010000,10100000,00000010,Host,Mask,Subnet,Broadcast,Last,First,172.16.2.160,255.255.255.192,4,1,IP,地址练习,10101100,11111111,00010000,11111111,11111111,10100000,11,000000,00000010,Host,Mask,Subnet,Broadcast,Last,First,172.16.2.160,255.255.255.192,1,2,16,172,2,160,IP,地址练习,10101100,11111111,00010000,11111111,11111111,10100000,11,000000,00000010,Host,Mask,Subnet,Broadcast,Last,First,172.16.2.160,255.255.255.192,1,2,3,7,16,172,2,160,IP,地址练习,10101100,11111111,00010000,11111111,11111111,10100000,11,000000,10,000000,00000010,Host,Mask,Subnet,Broadcast,Last,First,172.16.2.160,255.255.255.192,1,2,3,4,16,172,2,160,IP,地址练习,10101100,11111111,00010000,11111111,11111111,10100000,11,000000,10,000000,00000010,10,111111,Host,Mask,Subnet,Broadcast,Last,First,172.16.2.160,255.255.255.192,1,2,3,4,5,6,16,172,2,160,IP,地址练习,10101100,11111111,00010000,11111111,11111111,10100000,11,000000,10,000000,00000010,10,111111,10,000001,Host,Mask,Subnet,Broadcast,Last,First,172.16.2.160,255.255.255.192,1,2,3,4,5,6,16,172,2,160,IP,地址练习,10101100,11111111,00010000,11111111,11111111,10100000,11,000000,10,000000,00000010,10,111111,10,000001,10,111110,Host,Mask,Subnet,Broadcast,Last,First,172.16.2.160,255.255.255.192,1,2,3,4,5,6,7,16,172,2,160,IP,地址练习,10101100,11111111,10101100,00010000,11111111,00010000,11111111,00000010,10100000,11,000000,10,000000,00000010,10101100,00010000,00000010,10,111111,10101100,00010000,00000010,10,000001,10101100,00010000,00000010,10,111110,Host,Mask,Subnet,Broadcast,Last,First,172.16.2.160,255.255.255.192,1,2,3,4,5,6,7,8,16,172,2,160,IP,地址练习,10101100,11111111,10101100,00010000,11111111,00010000,11111111,00000010,10100000,11,000000,10,000000,00000010,10101100,00010000,00000010,10,111111,10101100,00010000,00000010,10,000001,10101100,00010000,00000010,10,111110,Host,Mask,Subnet,Broadcast,Last,First,172.16.2.160,255.255.255.192,172.16.2.128,172.16.2.191,172.16.2.129,172.16.2.190,1,2,3,4,5,6,7,8,9,16,172,2,160,IP,地址练习,Address,Class,Subnet,Broadcast,201.222.10.60,255.255.255.248,C,201.222.10.63,201.222.10.56,Subnet Mask,15.16.193.6,255.255.248.0,A,15.16.199.255,15.16.192.0,128.16.32.13,255.255.255.252,B,128.16.32.15,128.16.32.12,153.50.6.27,255.255.255.128,153.50.6.127,B,153.50.6.0,IP,地址练习-计算广播地址,
展开阅读全文