对于ip地址范围以及划分和子网掩码的关系是怎样_第1页
对于ip地址范围以及划分和子网掩码的关系是怎样_第2页
对于ip地址范围以及划分和子网掩码的关系是怎样_第3页
对于ip地址范围以及划分和子网掩码的关系是怎样_第4页
对于ip地址范围以及划分和子网掩码的关系是怎样_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

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

文档简介

对于IP地址范围以及子网划分,IP地址和子网掩码的关系是怎样的 组态事项6GK7343-1EX30-0XE0-CIDRw wwwPLCworldCPU319-3PN/DP-CIDRCPU414-3PN/DP-CIDRCPU416-3PN/DPCPU416F-3PN/DP-CIDRTCP/IP协议的工业以太网CP模板CPU,可以STEP7硬件组态中IP地址和相关的子IP地址和相应的子网掩码可以在CPCPU的以太网接口的属性窗口中设置。在硬件组态插入CP模板或CPU后,在它们的属性窗口会得到下面的默认设置(图.01)。IP地址子网掩码w IP地址和子网掩码分类关系类表示类的位子网掩码网络节点A0.x.x.x13B128.0.x.x22C31D&--A网地址。所以A类网络由以下的子网掩码定义:=11111111000000000000000000000000。IP地址的后3个字节(24位)用于识别网络上的主机。A类网络按照下面方法计算节点个数:22416777216图02AB类网络BIP1-0-...开始,IP128.0.x.x191.255.x.xB类网络,头两个字16IPB类网络由以下的子网掩码定义:11111111111111110000000000000000IP2个字节(16位)用于识别网络上的主机。B类网络按照下面方法计算子网个数:B类网络按照下面方法计算节点个数:21665536w图03BC类网络

wwwPLCworld字节,也就是头24位对应IP地址的子网地址。所以C类网络由以下的子网掩码定义:=11111111111111111111111100000000。IP1个字节(8位)用于识别224-32212097152(CIP1-1-0开始)B类网络按照下面方法计算节点个数:28256图04CD类子网对于子网部分,A类网络的子网数是大大少于C类网络的。127IP地址仅用于计算机的内部测试。---划分子网100000000000000000000000)子网掩码后的第一位为相同的值(这里"0")。ww 仅地址到86.255.255 在子网掩码后的第一位为相同的值(这里"1")结论超网11000000(11111111.11111111.10110000.000054(11111111.11111111.10110011.1111要求"超网的使用要求网络中有支持"无类别域间路由CIDR)功能的模块。STEP7STEP(见图05"STEP7错误信息")。11111111000001010000000000000000这种形式出现。这里用很多错误,强烈建议不使用这样的子网掩码。STEP7在组态CP卡以太网接口属性中不允许设置这样w wwwPLCworld图05STEP7ww.91HMI.co目号Scrolldownfor

wwwPLCworldcn:2009-01-WhatWhatistheconnectionbetweensubnetmasksandIPaddressesintheIPaddressarea,alsowithregardtosubnetting?WithCIDR,thereisnofixedassignmentofanIPaddresstoanetworkclassandpossiblesubnettinginothernetworksorsupernettingofseveralnetworksinaclass.ThereisonlyonenetworkmaskthatsplitstheIPaddressintoanetworkpartandahostpart.TheCIDRfunction(classlessinter routing)thusincludessubnettingandsupernetting.ThefollowinglistshowsyouwhichIndustrialEthernetCPssupportthetwofunctionsofsubnettingandsupernetting:6GK7343-1EX11-0XE0-doesnotsupporttheCIDR6GK7343-1EX20-0XE0-supportstheCIDR6GK7343-1EX21-0XE0-supportstheCIDRfunctionfromfirmwareV1.26GK7343-1EX30-0XE0-supportstheCIDR6GK7343-1GX20-0XE0-doesnotsupporttheCIDR6GK7343-1GX21-0XE0-supportstheCIDRfunctionfromfirmwareV1.16GK7343-1GX30-0XE0-supportstheCIDR6GK7343-1CX00-0XE0-doesnotsupporttheCIDR6GK7343-1CX10-0XE0-supportstheCIDR6GK7443-1EX10-0XE0-doesnotsupporttheCIDR6GK7443-1EX11-0XE0-doesnotsupporttheCIDR6GK7443-1EX20-0XE0-supportstheCIDR6GK7443-1EX40-0XE0-supportstheCIDRfunctionfromfirmwareV2.46GK7443-1EX41-0XE0-supportstheCIDR6GK7443-1GX20-0XE0-supportstheCIDRandfortheS7-300andS7-400CPUswithintegratedPROFINETCPU315-2PN/DPandCPU315F-2PN/DP-supportCIDRfromfirmwareV2.3CPU317-2PN/DPandCPU317F-2PN/DP-supportCIDRfromfirmwareV2.3CPU319-3PN/DP-supportsCPU414-3PN/DP-supportsCPU416-3PN/DPandCPU416F-3PN/DP-supportThefollowingIndustrialEthernetPCmodulessupportthefunctionsofsubnettingandCP1616fromCP1604fromItisonlypossibletoconfigurethe"Subnetting"functionfortheremainingIndustrialEthernetPCmoduleslikeIEgeneral,CP1613(A2),CP1623,CP1612andCP1512.Itisnotpossibletoconfigurethe"Supernetting"functioninSTEP7/NCMPCforthesemodules.ThisispreventedinSTEP7/NCMPCbyanerrormessage(seeFig.05).InthesemodulesthatsupporttheTCP/IPprotocolitispossibletosetboththeIPaddressandtheassociatedsubnetmaskinthehardwareconfigurationofSTEP7.TheIPaddressandassociatedsubnetmaskareenteredinthePropertieswindowoftheCP'sorCPU'sEthernetinterface.AfterinsertingtheIndustrialEthernetCPorCPUwithintegratedPNinterfaceinthehardwareconfiguration,youareofferedthefollowingdefaultsettings(seeFig.01)inthePropertieswindowoftheCP'sorCPU'sEthernetinterface.IPaddress: Subnetmask:

wwwPLCworldFig.01:PropertieswindowofaCP'sEthernetIfyouwishtochangethesedefaultsettingsfortheIPaddressandsubnetmask,youneedinformationontheconnectionbetweenclassesofIPaddressesandsubnetmasks.ThefollowingmakescleartheconnectionbetweenclassesofIPaddressesandsubnetmasks.ConnectionbetweenclassoftheIPaddressandsubnetInprinciplethereare5classesofIPaddresses.ThesearetheclassesAtoE.Eachclasshasitsownsubnetmask.Theconnectionsaregiveninthetablebelow.ClassIPnetworkaddressSubnetNetworkA0.x.x.x-13B128.0.x.x-22C192.0.0.x-31D&--ClassAIPaddressesfromClassAbeginwiththebitsequence0-...,e.g.theIPaddressrangelies0.x.x.xandThesubnetmaskidentifiestherangethatincludestheaddressinformationforidentifyingthesubnet.InClassAnetworksthefirstbyte,thatistosaythefirst8bitscorrespondtotheIPaddressofthesubnetaddress.ThusClassAnetworksaredefinedbythefollowingsubnetmask:=11111111000000000000000000000000.Thelastthreebytes(24bits)oftheIPaddressidentifyanodeinthissubnet.ThetotalnumberofClassAnetworkscanbecalculatedas28-1-2=27-2=126networks(sincetheIPaddressalwaysbeginswiththebitsequence0-...,andarenotpermitted)ThenumberofcomputersinaClassAnetworkcanbecalculatedasw wwwPLCworld224-2=16777214computers(x.0.0.0->networkaddressandx.255.255.255->broadcastaddressarenotpermitted)Fig.02:ClassAClassBIPaddressesfromClassBbeginwiththebitsequence1-0-...andtheaddressrangelies128.0.x.xand191.255.x.x.InClassBnetworksthefirsttwobytes,thatistosaythefirst16bitscorrespondtotheIPaddressofthesubnetaddress.ThusClassBnetworksaredefinedbythefollowingsubnetmask:=11111111111111110000000000000000.Thelasttwobytes(16bits)identifyanodeinthissubnet.ThetotalnumberofClassBnetworkscanbecalculatedas216-2=214=16384networks(sincetheIPaddressalwaysbeginswiththebitsequence1-ThenumberofcomputersinaClassBnetworkcanbecalculatedas216-2=65534computers(x.x.0.0->networkaddressandx.x.255.255->broadcastaddressarenotpermitted)Fig.03:ClassBClassCIPaddressesfromClassCbeginwiththebitsequence1-1-0...andtheaddressrangelies192.0.0.xand223.255.255.x.InClassCnetworksthefirstthreebytes,thatistosaythefirst24bitscorrespondtotheIPaddressofthesubnetaddress.ThusClassCnetworksaredefinedbythefollowingsubnetmask:=11111111111111111111111100000000.Thelastbyte(8bits)identifiesanodeinthissubnet.ThetotalnumberofClassCnetworkscanbecalculatedas224-3=221=2097152networks(sincetheIPaddressalwaysbeginswiththebitsequenceThenumberofcomputersinaClassCnetworkcanbecalculatedas28-2=254computers(x.x.x.0->networkaddressandx.x.x.255->broadcastaddressarenotpermitted)w wwwPLCworldFig.04:ClassCClassDTheclassDsubnetworkconsistsofspecialaddressesthatareusedformulticastaddressing.ThissplittingupofIPaddressesinnetworkshareandcomputershareleadstothefollowingAClassAnetworkislargerthanaClassCnetwork,becausethereisamuchgreateraddressareaavailableforaddressingthecomputers.TherearemuchlessClassAnetworksthanClassCnetworksbecausetheaddressareaofthesubnetsismuchsmaller.TheClassAnetworkaddress127.x.x.xis fortheLoopbackfunctionofallcomputers,i.e.:allIPaddressesthathavethevalue127inthefirstbytemayonlybeusedforinternaltestsofcomputers.The255valuesare asbroadcastaddresses.Thus,forexample,theaddress55isabroadcastaddresstoallcomputersintheClassBnetwork.Thefollowingrangesare forprivatenetworks.AllIPaddressesintheserangesarenotroutedintheInternet.---Untilnow,theconnectionbetweentheclassoftheIPaddressandsubnetmaskhasbeenexined.Furthermore,itispossibletoextendthesubnetmaskwiththeso-called"subnetting"procedure.SubnettingcanbeimplementedinaClassAnetwork,forexample.ItispossibletodividethecomputersofthisClassAnetworkintofurtherlogicalunits(subnets).WewillobservetheClassAnetwork86.x.x.xasanexample.ThesubnetmaskofthisClassAnetworkis(11111111000000000000000000000000).Theaddressareacanbedividedfurtherintologicalsubnetsextendingthesubnetmaskby1bit.Thesubnetmaskisthen(111111111000000000000000ThismeansthefollowingforOnlytheaddressesto54cancommunicatedirectlywitheachi.e.withoutrouter,becausethesecomputershavethesamevalue(inthiscase"0")inthefirstbitafterthesubnetmask.Onlytheaddressesto54cancommunicatedirectlywitheachi.e.withoutrouter,becausethesecomputershavethesamevalue(inthiscase"1")inthefirstbitafterthesubnetmask.TheaddressareaofthecomputersinthisClassAnetworkhasbeendividedintotwoByextendingthesubnetmaskyoucandividetheaddressareaofthecomputersintomorelogicalunits(subnets).Theaddressareahasbeendividedintotwosubnetsintheexample.Byaddingmorebitsyoucanquicklymultiplythenumberofsubnets.Youcanextendasubnetasyouwish.Supernettingisthegroutogetherofmultiplenetworkswithpartiallythesamenetworkshareinonesingleroute.Theunderlyingtechnologyistheoppositetosubnettingandinprinciplemeans.91HMI.ocedurrlshareofanetworkclassisincreased.Thusthenetworkshareofthisnetworkclassisdecreased.WewillobservetheClassCnetworkasanexample.ThesubnetmaskofthisClassCnetworkis(11111111111111111111111100000000).Now2bitsareaddedtohostshare.Thesubnetmaskisthen(1111111111111111111111000000ThelowestIPaddressofthenetworktobeassignedis(11111111.11111111.10110000.00000001)ThehighestIPaddressofthenetworktobeassignedis54(11111111.11111111.10110011.111

温馨提示

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

评论

0/150

提交评论