网络通信基础_第1页
网络通信基础_第2页
网络通信基础_第3页
网络通信基础_第4页
网络通信基础_第5页
已阅读5页,还剩218页未读 继续免费阅读

下载本文档

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

文档简介

网络通信基础

workshop智能软件研究所LiXC@ext:65262/6/20231AmoiCorporation前言沧海一粟网络需要“网络人才”Allinterconnecting…任何问题大家都可以参与讨论2/6/20232AmoiCorporation内容综述通信技术网络结构TCP/IP协议总结2/6/20233AmoiCorporation网络通讯发展趋势一个目标:建成完善的信息基础设施,使得任何人在任何地点、任何时间都可以接入声音、多媒体、信息等服务。两个支撑:微电子和光技术三个融合:计算机、通信、信息内容的融合四个热点:多媒体、宽带网、移动通信、信息安全2/6/20234AmoiCorporation现有的媒体服务http://www.ebu.ch/trev_293-ribas.pdf2/6/20235AmoiCorporation移动通信的发展趋势 系统、业务和覆盖的无缝性移动性、高用户容量、宽带化、IP化2/6/20236AmoiCorporation内容综述通信技术传输技术交换技术网络结构TCP/IP协议总结2/6/20237AmoiCorporation传输技术种类:模拟,数字三个组成部分数据信号传输方式2/6/20238AmoiCorporation模拟数据传输http://sunsite.queensu.ca/rmc/BUSADM/desc384/Slides/Week2-B.PPT2/6/20239AmoiCorporation对模拟信号的数字编码脉冲编码调制(pulse-codemodulation,PCM)基于采样定理当然还有其他的编码:非线性编码2/6/202310AmoiCorporation数字数据传输http://sunsite.queensu.ca/rmc/BUSADM/desc384/Slides/Week2-B.PPT2/6/202311AmoiCorporation对数字信号的数字编码最简单的方式用不同的电平来表示二进制:负电平=1,正电平=0(NRZ-Lnonreturn-to-zerolevel)问题:难以决定一位的结束和开始无法定时或同步有累积的直流分量(电腐蚀等)2/6/202312AmoiCorporation数字编码方式UsedinToken-ringUsedinEthernet自同步码http://sunsite.queensu.ca/rmc/BUSADM/desc384/Slides/Week2-B.PPT2/6/202313AmoiCorporation问题Ethernet?GSM?ADSL?2/6/202314AmoiCorporationServerInternetCORENetworkADSLExistingCopperADSL64Kbps-1.5to8Mbps16to768kbpsADSLConnection/pub/people/laf/Talks-2000-nonames/ADSL.PPTAsymmetricDigitalSubscriberLine

(ADSL)2/6/202315AmoiCorporationADSL简介Fullratestandard:

G.dmt=ITUG.992.1=ANSIT1.413,Iss.2Downstream(DS):64kbps-8.192MbpsUpstream(US):16kbps-768kbps"Splitterless",lowpowerstandard:

G.lite=ITUG.992.2DS:64kbps-1.5MbpsUS:16kbps-368kbps2/6/202316AmoiCorporationADSL接入框图/lyii/lyii/kuanp/11-1-03.htm2/6/202317AmoiCorporationFDMPOTSPOTSUpstreamUpstreamDownstreamDownstreamEchoCancellationFrequencyFrequency1Mhz1MhzCreateMultipleChannel/pub/people/laf/Talks-2000-nonames/ADSL.PPTADSL频谱示意图2/6/202318AmoiCorporationADSL信道分配图/products/adsl/techappqa.html2/6/202319AmoiCorporation信道带宽BandwidthsPOTS:300Hzto3.4kHzISDN70kHz(2B1Q)140kHz(4B3T)G.dmtUS:25kHzto138kHz(7to31DMTtones)DS:138kHzto1.1MHz(FDM,32-255DMTtones)

25kHzto1.1MHz(EchoCancellation,7-255DMTtones)G.liteUS:25kHzto138kHzDS:138kHzto550kHz

2/6/202320AmoiCorporationADSL调制技术目前被广泛采用的ADSL调制技术有3种:QAM(quadatureampli-tudemodulation)CAP(carrierlessamplitude-phasemodulation)DMT(discretemultitone)其中DMT调制技术被ANSI标准化小组T1E1.4制订的国家标准所采用。2/6/202321AmoiCorporationSplitterADSLmodemPhonePhoneTelephonelineVoice+ADSLVoice(only)ADSL(only)ADSL连接(1)/pub/people/laf/Talks-2000-nonames/ADSL.PPT2/6/202322AmoiCorporationADSL连接(2)http://rs1.szif.hu/~heckenas/okt/ADSL.pdf2/6/202323AmoiCorporation交换技术电路交换(circuitswitch)Telephoneswitch,2Gmobileswitch分组交换(packetswitch)Ethernetswitch,ATMswitch面向连接(虚电路,virtualcircuit)无连接(数据报,datagram)2/6/202324AmoiCorporation电路交换2/6/202325AmoiCorporation电路交换优缺点优点固定带宽(保证容量)延迟变换小(基本不变)一般用于图像和声音的传输缺点线路利用率低,浪费资源扩展性差2/6/202326AmoiCorporation包交换2/6/202327AmoiCorporation包交换优缺点优点利用率高无需事先建立链路灵活缺点延时和带宽无法保证(qualityofservice,QoS)2/6/202328AmoiCorporation内容综述通信技术网络结构局域网(LAN)广域网(WAN)因特网(Internet)通信协议TCP/IP协议总结2/6/202329AmoiCorporation网络概述网络的作用:通过网络来连接计算机,提供不同的服务网络中的计算机起着不同的作用,来完成一个任务他们之间的关系可以是对等的,也可以是服务/客户的模式常见的网络结构:局域网和广域网局域网的互联构成广域网2/6/202330AmoiCorporation局域网(LANs)

局域网的覆盖范围相对有限,如家庭,办公室或者校园速度较快通常采用广播的方式可以按照它的拓扑结构,使用的协议和传输介质来分类/~enda/ITFN1501/chapter07.ppt2/6/202331AmoiCorporation局域网络的拓扑图拓扑:局域网的组成分布,它定义了网络的结构物理拓扑:物理连接逻辑拓扑:存取传输介质的方式2/6/202332AmoiCorporation总线结构/~enda/ITFN1501/chapter07.ppt2/6/202333AmoiCorporation星形结构/~enda/ITFN1501/chapter07.ppt2/6/202334AmoiCorporationStar-WiredRing

混合结构

/~enda/ITFN1501/chapter07.ppt2/6/202335AmoiCorporation逻辑拓扑/~enda/ITFN1501/chapter07.ppt2/6/202336AmoiCorporation局域网(LANs)

局域网的覆盖范围相对有限,如家庭,办公室或者校园速度较快通常采用广播的方式可以按照它的拓扑结构,使用的协议和传输介质来分类/~enda/ITFN1501/chapter07.ppt2/6/202337AmoiCorporation协议?定义:协议是两个或多个系统为了完成特定的任务而定义并交换的一系列消息(等价于通用语言)协议规范定义了这一消息序列,以及消息的格式/schools/nkhs/staff/jim_viner/A+/IT%201%20presentations/ITE-I-PPTs/ITE-I-ch09.ppt2/6/202338AmoiCorporationInternetworkPacket

Exchange/SequencedPacketExchangeInternetworkPacketExchange/SequencedPacketExchange(IPX/SPX)是由Novell公司提出的用于NovellNetware网络IPX/SPX分别和IP/TCP对应NWLink协议是微软版IPX/SPX协议,从而可以和Novell网络兼容2/6/202339AmoiCorporationNetBEUINetBIOSExtendedUserInterface(NetBEUI)主要用于小型网络NetBEUI是一个简单的协议,只需配置它的计算机名字NetBEUI不具有路由功能2/6/202340AmoiCorporationAppleTalkAppleTalkiscomprisedofaesetofprotocolsthatspanthesevenlayersoftheOSIreferencemodel.AppleTalk可以运行在Ethernet,TokenRing和Apple公司的LocalTalk网络上/schools/nkhs/staff/jim_viner/A+/IT%201%20presentations/ITE-I-PPTs/ITE-I-ch09.ppt2/6/202341AmoiCorporationNetBIOSNetBIOS(网络基本输入/输出系统):最初由IBM开发,MS利用NetBIOS作为构建LAN的上层协议NetBIOS使得程序和网络之间有了标准的接口,方便应用程序的开发。并且可以移植到其他的网络中NetBIOS位于OSI模型的会话层,也位于TCP/IP之上NetBIOS有两种通讯模式–会话模式,一对一进行通讯,LAN中的机器之间建立会话,可以传输较多的信息,并且可以检查传输错误–数据报模式。可以进行广播或者一对多的通讯,传输数据大小受限制,没有错误检查机制,也不必建立通讯会话•NetBIOSoverTCP/IP,支持三种服务–名字服务–会话服务–数据包服务2/6/202342AmoiCorporationNetBIOS和WINSWINS是名字服务它是实现NetBIOS名字解析的一种方式(P-node)NetBIOS实现名字解析方式:B-node,P-node,M-node,H-mode2/6/202343AmoiCorporationIEEE802/~enda/ITFN1501/chapter07.ppt2/6/202344AmoiCorporationIEEE802.3帧结构帧结构描述数据包的格式/~enda/ITFN1501/chapter07.ppt2/6/202345AmoiCorporationEthernet标准一览/~enda/ITFN1501/chapter07.ppt2/6/202346AmoiCorporation以太网:10Base210:10Mbps;2:under200metersmaxcablelength采用细缆传输,总线拓扑结构repeatersusedtoconnectuptomultiplesegmentsrepeaterrepeatsbitsithearsononeinterfacetoitsotherinterfaces:physicallayerdeviceonly!http://www.swen.uwaterloo.ca/~kostas/ECE428/supporting-docs/chapter5-lan.ppt2/6/202347AmoiCorporation10BaseT和100BaseT10/100Mbps传输速率;后者称为“快速以太网”;T代表双绞线(Twistedpair)它通常采用HubSwitch来连接不同的节点,因此是星形结构(startopology)CSMA/CDimplementedathubMaxdistancefromnodetoHubis100meters2/6/202348AmoiCorporation局域网中要用到的设备2/6/202349AmoiCorporationEthernetHub物理层设备,和Repeater的功能类似连接计算机和其他Ethernet网段无法阻止冲突/~cs458/slides/module16-lanswitchingV2.ppt2/6/202350AmoiCorporationEthernetHubsvs.EthernetSwitchesAnEthernetswitch是以太网的帧交换机Bufferingofframespreventscollisions.EachportisisolatedandbuildsitsowncollisiondomainAnEthernetHubdoesnotperformbuffering:Collisionsoccuriftwoframesarriveatthesametime.HubSwitch2/6/202351AmoiCorporation网桥(Bridges)网桥工作在DataLinkLayer(Layer2)层/~cs458/slides/module16-lanswitchingV2.ppt2/6/202352AmoiCorporation路由器(router)路由器工作在NetworkLayer(Layer3)层用于互联IP网络/~cs458/slides/module16-lanswitchingV2.ppt2/6/202353AmoiCorporation网关(Gateway)“Gateway”具有多重含义“Gateway”一般指路由器(Level3),比如:defaultgateway“Gateway”也指用于连接具有不同第三层协议的多协议路由器,此时它还负责不同协议间的转换(“Multi-protocolrouter”)。/~cs458/slides/module16-lanswitchingV2.ppt2/6/202354AmoiCorporation组网的趋势1980s:LANs通过网桥互联80年代末到90年代初:大量使用路由器90年代中期:LAN交换机取代了大多数的路由器2/6/202355AmoiCorporationInternet采用路由器组网RouterHubFDDIFDDI/~cs458/slides/module16-lanswitchingV2.ppt2/6/202356AmoiCorporationInternet采用交换机/网桥组网RouterSwitch/~cs458/slides/module16-lanswitchingV2.ppt2/6/202357AmoiCorporation原因?交换机vs.路由器Routers每个计算机的IPaddress必须配置如果网络重构,所有的IP地址都需要重新设定通过路由协议来建立路由表,如RIP或OSPF每个路由器都要处理数据包头(如减少TTL域)Bridges/switchMAC地址是固化在硬件中无需网络配置不需要路由协议learningbridgealgorithmspanningtreealgorithm无需对帧进行操作2/6/202358AmoiCorporation无线局域网(WLAN).au/documents/040120%20Wireless%20LAN.pdf2/6/202359AmoiCorporation802.11LANarchitecture无线主机和通过基站建立连接基站=接入点(AP)BasicServiceSet(BSS)(aka“cell”蜂窝)在基站模式下:无线主机接入点(AP)adhoc模式:只包含主机Multi-cell构成了ExtendedServiceSet(ESS)BSS1BSS2Internethub,switchorrouterAPAPAllmaterialcopyright1996-2004,J.FKuroseandK.W.Ross,AllRightsReserved2/6/202360AmoiCorporationAd-hoc/~enda/ITFN1501/chapter07.ppt2/6/202361AmoiCorporation内容综述通信技术网络结构局域网(LAN)广域网(WAN)移动性(Mobility)因特网(Internet)TCP/IP协议总结2/6/202362AmoiCorporation广域网(WANs)WAN是一个数据通信网络,它的覆盖范围较大,因此通常采用一些广域的通信方式一般涵盖OSI的低三层,即:物理层,链路层,网络层通过WAN接入方式互联,可以是固定的或者是临时的由于传输范围较大,因此必须使用modem或CSU/DSU来建立连接2/6/202363AmoiCorporationWide-AreaNetwork(WAN)接入方式调制解调器ModemsIntegratedServicesDigitalNetwork(ISDN)Digitalsubscriberline(DSL):AsymmetricDSL(ADSL)HighDataRateDSL(HDSL)SymmetricDSL(SDSL)VeryHighDataRateDSL(VDSL)帧中继FrameRelayAsynchronousTransferMode(ATM)TheT(US)andE(Europe)Carrierseries(T1,E1,T3,E3,andsoon)SynchronousOpticalNetwork(SONET)SDHGPRS,EGDE,3G数字微波2/6/202364AmoiCorporationWAN接入技术图Allmaterialcopyright1996-2004,J.FKuroseandK.W.Ross,AllRightsReserved2/6/202365AmoiCorporationUMTS远景Seamlessend-to-endServiceInternetworkRoamingSatelliteGlobalSuburbanUrbanIn-BuildingPico-CellMicro-CellMacro-CellAudio/visualTerminalsHome-Cell

Source:ITUAllmaterialcopyright1996-2004,J.FKuroseandK.W.Ross,AllRightsReserved2/6/202366AmoiCorporation无线标准384Kbps56Kbps54Mbps5-11Mbps1Mbps802.15802.11b802.11{a,g}IS-95CDMA,GSMUMTS/WCDMA,CDMA2000

.11p-to-plink2G3GIndoor10–30mOutdoor50–200mMidrangeoutdoor200m–4KmLongrangeoutdoor5Km–20KmAllmaterialcopyright1996-2004,J.FKuroseandK.W.Ross,AllRightsReserved2/6/202367AmoiCorporationPAN(PersonalAreaNetwork)LAN(LocalAreaNetwork)WAN(WideAreaNetwork)MAN(MetropolitanAreaNetwork)PANLANMANWANStandardsBluetooth802.11HiperLAN2802.11MMDS,LMDSGSM,GPRS,CDMA,2.5-3GSpeed<1Mbps11to54Mbps11to100+Mbps10to384KbpsRangeShortMediumMedium-LongLongApplicationsPeer-to-PeerDevice-to-DeviceEnterprisenetworksT1replacement,lastmileaccessMobilePhones,cellulardataWirelessTechnologiesProvidedbyCisco,Inc.©Copyright20032/6/202368AmoiCorporation移动性?从网络角度看移动性:没有移动性高移动性用户使用一个AP用户在移动中保持连接(经过多个AP)用户从网络连接/断开,并通过DHCP获得IP设置数据连接会中断Allmaterialcopyright1996-2004,J.FKuroseandK.W.Ross,AllRightsReserved2/6/202369AmoiCorporation移动性的构成单元homenetwork:

移动终端固定的家(e.g.,128.119.40/24)Permanentaddress:

固定的IP地址,永远有效e.g.,86homeagent:当移动终端不在home时,代替其执行的单元wideareanetworkcorrespondentAllmaterialcopyright1996-2004,J.FKuroseandK.W.Ross,AllRightsReserved2/6/202370AmoiCorporation移动性的构成单元Care-of-address:

在访问网络中的地址(e.g.,79,129.13.2)wideareanetworkvisitednetwork:

移动终端目前所在网络(e.g.,79.129.13/24)Permanentaddress:

保持不变(e.g.,86)foreignagent:访问网络中累似homeagent的单元correspondent:希望和移动终端通信的主机Allmaterialcopyright1996-2004,J.FKuroseandK.W.Ross,AllRightsReserved2/6/202371AmoiCorporation注册结果:Foreignagent知道移动终端存在Homeagent知道移动终端目前的CoA通信采用UDPwideareanetworkhomenetworkvisitednetwork1ICMP路由通告移动终端选择CoA并注册2foreignagent联系homeagent通知移动终端的位置,homeagent确认注册Allmaterialcopyright1996-2004,J.FKuroseandK.W.Ross,AllRightsReserved2/6/202372AmoiCorporationIndirectRouting传输wideareanetworkhomenetworkvisitednetwork3241correspondent采用移动终端Permanentaddress作为目的地址homeagent把整个IP包封装进另一个IP包发给foreignagentforeignagent取出原来的IP包,转发给移动终端移动终端采用correspondent地址直接回复,源地址仍为PAAllmaterialcopyright1996-2004,J.FKuroseandK.W.Ross,AllRightsReserved2/6/202373AmoiCorporationDirectRouting传输wideareanetworkhomenetworkvisitednetwork4251correspondent请求并得到FA地址correspondent转发至foreignagentforeignagent转发给移动终端移动终端直接回复correspondent3Allmaterialcopyright1996-2004,J.FKuroseandK.W.Ross,AllRightsReserved2/6/202374AmoiCorporationMobileIPv4:indirectrouting(RFC3220)Permanentaddress:86Care-ofaddress:dest:86packetsentbycorrespondentdest:dest:86packetsentbyhomeagenttoforeignagent:apacketwithinapacketdest:86foreign-agent-to-mobilepacketAllmaterialcopyright1996-2004,J.FKuroseandK.W.Ross,AllRightsReserved2/6/202375AmoiCorporationCareofAddress(CoA,RFC3220)有两种CoAforeignagentcare-ofaddressanIPaddressoftheforeignagentInthismode,theforeignagentistheendpointofthetunnelGood:don’tplaceunnecessarydemandsonthealreadylimitedIPv4addressspaceBad:amobilenodeandthecurrentforeignagentMUSTbeabletoexchangedatagramswithoutrelyingonstandardIProutingmechanismsco-locatedcare-ofaddressacare-ofaddressacquiredbythemobilenodeasalocalIPaddress,suchasthroughDHCPthemobilenodeservesastheendpointofthetunnelGood:functionwithoutaforeignagentBad:placeadditionalburdenontheIPv4addressspace2/6/202376AmoiCorporation内容综述通信技术网络结构局域网(LAN)广域网(WAN)因特网(Internet)通信协议TCP/IP协议总结2/6/202377AmoiCorporation因特网(Internet)使用TCP/IP协议广域网发展阶段:20世纪70年代初期ARPANET20世纪80年代NSFNET1987年以后,引进一些商业网络(如UUNET等)1994,进入大规模商业运作2/6/202378AmoiCorporationInternet的发展历史1958:ARPA(高级研究规划署)formedwithintheUSDept.ofDefensetofostertechnologicaladvanceswithmilitaryapplications1961:LeonardKleinrock’sPh.Dthesisdiscussespacketswitchingtheory1960-1965:PaulBaranconductsresearchonsurvivable,packetswitchednetworks1966-1967:ARPANET,thefirstwide-areapacketswitchednetwork,isproposed1971:23hostsonARPANET1972:Firstemailprogramisabighit1973:InternationalARPANETconnectionstoEnglandandNorwayBobMetcalfeinventsEthernetFTPspecification2/6/202379AmoiCorporationInternet的发展历史(cont)1974:AnearlyversionofTCP/IPspecifiedbyVintCerfandRobertKahn1981:TCP/IPdistributedwithBSDUNIX1983:TCP/IPstandardizedforallARPANEThosts“Internet”termused1984:1000hostsonARPANETDNSintroduced1986:NSFNETcreated(usingTCP/IP)tolink5USsupercomputercenters(T1=1.544Mb/s)IETFcreated(Firstmeetinghad15attendees)2/6/202380AmoiCorporationInternet的发展历史(cont)1990:ARPANETturnedoffFirstcommercialconsumerorientedISPfounded(TheWorld;)1991:NSFNETupgradedtoT3WWWreleasedbyCERN1993:NCSAMosaicreleasedasfirstgraphicalWWWbrowser1994:Firstwaveofmassivecommercialization1995:NSFNETturnedoffCommercialbackboneproviders(e.g.,MCI,Sprint,UUNET,etc.)replaceit2/6/202381AmoiCorporation今天的Internet架构(概念)/mike/MITP432/01%20introduction.pdf2/6/202382AmoiCorporationExampleBackbone:AT&T2/6/202383AmoiCorporation加入Internet/mike/MITP432/01%20introduction.pdf2/6/202384AmoiCorporationInternet的规模(保守估计)/mike/MITP432/01%20introduction.pdf2/6/202385AmoiCorporation我们需要标准和协议标准就是一致同意的规则,包括设计、处理和通信目的:确保不同厂家设备在数据处理、通信上的互操作性Internet要求使用TCP/IP协议族Internet的标准都是由InternetEngineeringTaskForce(IETF)制定的,并且是开放的主要制定Layer3到Layer72/6/202386AmoiCorporationInternet管理结构ICANNIANAISOC(Internet协会)IESG(工程指导小组)IRTFIETFIABFundingReview.au/DTF/talks/ArnoldProtocols.ppt#258,6,Structure域名和地址管理长期研究项目技术顾问工程部2/6/202387AmoiCorporation主要的标准制定组织IETF:–Internetprotocolsandapplications()–RequestForComments(RFCs)whichdescribehowtheInternetprotocolsworkITU(formerlyCCITT):–Manyaspectsoftelecommunications()IEEE:–Mostlyphysicalanddatalink;e.g.,802.xseries()3GPP,3GPP2,OMA:–WirelessRFandIPstandards,leveragingIETFworkManyothers…–Cablelabs,DSLForum,ATMForum,SoftswitchForum,etc.2/6/202388AmoiCorporationhttp://www.cs.ucy.ac.cy/courses/EPL653/papers/IETF%20standards%20process.ppt2/6/202389AmoiCorporation一些重要的RFCRFC768–UserDatagramProtocol(UDP)RFC791–InternetProtocol(IP)RFC792–InternetControlMessageProtocol(ICMP)RFC793–TransmissionControlProtocol(TCP)RFC826–AddressResolutionProtocol(ARP)RFC1035–DomainNames–ImplementationandSpecificationRFC1112–HostExtensionsforIPMulticasting(IGMP)RFC2131–DynamicHostConfigurationProtocol(DHCP)RFC2616–HypertextTransferProtocol(HTTP)…andmanymore/rfcs2/6/202390AmoiCorporation内容综述通信技术网络结构TCP/IP协议TCP/IP基础HTTP示例DNS/DHCP应用工具Socket编程IPv6总结2/6/202391AmoiCorporationTCP/IPSuiteandOSIReferenceModel/schools/nkhs/staff/jim_viner/A+/IT%201%20presentations/ITE-I-PPTs/ITE-I-ch09.ppt2/6/202392AmoiCorporationOSI各层简介物理层(PhysicalLayer):主要功能为定义了网络的物理结构,传输的电磁标准,Bit流的编码及网络的时间原则,如分时复用及分频复用。决定了网络连接类型(端到端或多端连接)及物理拓扑结构。说的通俗一些,这一层主要负责实际的信号传输。据链路层(DataLinkReview):在两个主机上建立数据链路连接,向物理层传输数据信号,并对信号进行处理使之无差错并合理的传输。

网络层(NetworkLayer):主要负责路由,选择合适的路径,进行阻塞控制等功能。

传输层(TransferLayer):最关键的一层,向拥护提供可靠的端到端(End-to-End)服务,它屏蔽了下层的数据通信细节,让用户及应用程序不需要考虑实际的通信方法。

会话层(SessionLayer):主要负责两个会话进程之间的通信,即两个会话层实体之间的信息交换,管理数据的交换。

表示层(PresentationLayer):处理通信信号的表示方法,进行不同的格式之间的翻译,并负责数据的加密解密,数据的压缩与恢复。

应用层(ApplicationLayer):保持应用程序之间建立连接所需要的数据记录,为用户服务。2/6/202393AmoiCorporation分层的益处便于讨论和学习协议规范的细节。标准化层之间的界面,使得不同的产品可以在相同的层相同的功能。建立更好的互操作性。降低了复杂性。易于排错。每一层都在用户数据周围加上头和尾,排错失可以察看这些信息。每一层都给其上一层提供服务。所以,可以清晰的区分每一层的功能。2/6/202394AmoiCorporationTCP/IP分层模型TCP/IP采用分层模型四层:应用层传输层网络层(IP层)网络接口层每个主机会实现所有的四层功能,中间结点(如Gateways/Routers)只实现低两层的功能/~cs458/slides/module02-reviewV2.ppt2/6/202395AmoiCorporation每层的功能DataLinkLayer:Service: 提供可靠的帧传输和媒体控制协议(没有指定,因此它可 以基于LAN,MAN,WAN中的技术)Functions: 组帧,媒体接入控制,纠错NetworkLayer:Service: 将包从源端发到接收端Functions: 路由,地址TransportLayer:Service: 提供端到端的数据传输Functions: 建立连接/终止连接,流控和错误控制ApplicationLayer:Service: 特定的应用(收发email,存取HTML文件,交换文件Functions: 和特定的应用相关2/6/202396AmoiCorporation协议族和分层模型相对应/~cs458/slides/module02-reviewV2.ppt2/6/202397AmoiCorporationTCP/IP所使用的地址端口地址IP地址物理地址2/6/202398AmoiCorporation端口地址定义:给计算机上的进程所指派的标号(16位长)Internet上的许多服务都有特定的端口号,称为well-knownports,例如:ftp 21 finger 79telnet 23 http 80smtp 25 nntp 119TheWellKnownPorts是由IANA来指定和管理的,它的范围是0-1023.Well-knowports的RFC17002/6/202399AmoiCorporation90012085“OntheInternet…”

youarenothingbutanIPAddress!42/resources/data/WoN/itu-seminar-20040211-1.ppt2/6/2023100AmoiCorporationIPv4AddressesFixedlength:32bits(IPv6128bits)Initialclassfulstructure(1981)TotalIPaddresssize:4billion=232ClassA:128networks,16MhostsClassB:16Knetworks,64KhostsClassC:2Mnetworks,256hostsHighOrderBits010110Format7bitsofnet,24bitsofhost14bitsofnet,16bitsofhost21bitsofnet,8bitsofhostClassABC2/6/2023101AmoiCorporationIPAddressClasses

(SomeareObsolete)NetworkIDHostIDNetworkIDHostID816ClassA320ClassB10ClassC110MulticastAddressesClassD1110ReservedforexperimentsClassE111124/afs/cs/academic/class/15441-f01/www/lectures/lecture07.ppt2/6/2023102AmoiCorporation子网划分RFC917(1984)ForclassB&CnetworksVeryfewLANshavecloseto64KhostsNeedsimplewaytogetmultiple“networks”Usebridging,multipleIPnetworksorsplitupsinglenetworkaddressranges(subnet)Mustreducethetotalnumberofnetworkaddressesthatareassigned2/6/2023103AmoiCorporationSubnettingVariablelengthsubnetmasksCouldsubnetaclassBintoseveralchunksSupernetting?NetworkHostNetworkHostSubnet1111..00000000..1111Mask/afs/cs/academic/class/15441-f01/www/lectures/lecture07.ppt2/6/2023104AmoiCorporationsubnetting/cs143/slides/2004-10-05-ip-addressing-and-dns.pdf2/6/2023105AmoiCorporationSupernettingAsupernetisablockofconsecutivenetworkaddresses/cs143/slides/2004-10-05-ip-addressing-and-dns.pdf2/6/2023106AmoiCorporation地址管理–1990’sEarly1990’s:InternetscalingproblemsAddressdepletionduetoclassfularchitecture(A,B,C)RoutingtableoverloadDuetolackofrouteaggregation2/6/2023107AmoiCorporation地址管理–1990’sInternetwidelyprojectedtofailGrowthwouldstopbymid-’90sUrgentmeasuresrequiredActiontakenbyIETF/Internetcommunity1993:Developmentof“CIDR”addressedbothtechnicalproblemsAddressdepletionThroughmoreaccurateassignmentRoutingtableoverloadThroughaddressspaceaggregationRFC1519RFC1518RFC15172/6/2023108AmoiCorporationNetworkboundariesmayoccuratanybitClassful&Classlessaddressing16Knetworksx64Khosts

128networksx16MhostsAB2Mnetworksx256hostsCObsolete

inefficientdepletionofBspacetoomanyroutesfromCspaceClassfulClasslessBestCurrentPracticeHostsPrefixClassful.........8/2916/2832/2764/26128/25256/241C.........4096/2016C8192/1932C163843276865536

/18/17

/1664C128C1B........./afs/cs/academic/class/15441-f01/www/lectures/lecture07.ppt2/6/2023109AmoiCorporationIPAddresses:Howtodistribute?Network(networkportion):GetallocatedportionofISP’saddressspace:ISP'sblock11001000000101110001000000000000/20Organization011001000000101110001000000000000/23Organization111001000000101110001001000000000/23Organization211001000000101110001010000000000/23...…..….….Organization711001000000101110001111000000000/23

2/6/2023110AmoiCorporation一些特殊的IP地址:localhost(a.k.a.theloopbackaddressHostbits全0:网络地址Hostbits全1:广播地址(直接广播)32bit全为1的地址用于本网广播(启动时使用)为专用网使用的地址10.0.0172.16–172.31192.168.0–192.168.2552/6/2023111AmoiCorporation问题地址2/27的网络地址?假设公司申请的地址是150.100,下面网络的子网掩码?H1H2H3H4R128547629ToInternet542/6/2023112AmoiCorporationMAC地址LAN上的每个网卡都有全球唯一的MAC地址Broadcastaddress=FF-FF-FF-FF-FF-FF=adapter1A-2F-BB-76-09-AD58-23-D7-FA-20-B00C-C4-11-6F-E3-9871-65-F7-2B-08-53

LAN(wiredorwireless)http://www.ia.hiof.no/datane/3rdEditionChapter5-del3.ppt2/6/2023113AmoiCorporationMAC地址MAC地址由IEEE管理每个网卡制造商占用一部分的MAC地址空间(从而确保唯一性)MACflataddress➜可移植性好网卡可以加入任何一个同型的网络2/6/2023114AmoiCorporationARP和RARP要点:Internet是基于IP地址Datalink层的协议(Ethernet,FDDI,ATM)具有不同的MAC地址ARP和RARP协议用来转换IP和MAC地址/~cs458/bookslides/module06-arpV2.ppt2/6/2023115AmoiCorporationARP/RARP协议(RFC826/903)/~cs458/bookslides/module06-arpV2.ppt2/6/2023116AmoiCorporationARP的地址查找过程ARPRequest:

它的请求是通过广播发送,回答是单播发送2/6/2023117AmoiCorporationARP的地址查找过程ARPReply:

Router137respondswithanARPReplywhichcontainsthehardwareaddress2/6/2023118AmoiCorporationARP包的格式2/6/2023119AmoiCorporationARP/RARPPacketHardwaretype(1=Ethernet)Protocoltype(sameasEthertypefield:0x0806=ARP

request/reply,0x8035=RARPrequest/reply RFC960)HLEN:Hardwareaddresslength:(Ethernet=6)PLEN:Protocoladdresslength(IP=4)Operation:(1=ARPrequest,2=ARPreply,

3=RARPrequest,4=RARPreply)SenderHardwareAddress(RequestedEthernetaddressinARPreply)SenderIPaddressTargetHATargetIP(IPaddressneedingresolutioninARPrequest)2/6/2023120AmoiCorporationARPrequestB.AForouzan,TCP/IPProtocolSuite2/6/2023121AmoiCorporationARPreplyB.AForouzan,TCP/IPProtocolSuite2/6/2023122AmoiCorporationARP2/6/2023123AmoiCorporation例子00105cf6531f000d656c687f08004500MACaddress(Dest)MACaddress(source)Eth.Tp.(IP)0030865d40007f06cdbf0a64fb440a64979e1f90042d3d9c5018d9cd046770124470074e0000020405b4010104022/6/2023124AmoiCorporationIPHeader格式(RFC791).tw/TANet/info/06.ppt2/6/2023125AmoiCorporationTOS格式Bits0-2:Precedence.0~7.資料傳送的優先順序Bits3:0=NormalDelay,1=LowDelayBits4:0=NormalThroughput,1=HighThroughputBits5:0=NormalReliability1=HighReliabilityBits6-7:保留未來使用2/6/2023126AmoiCorporationAssignedProtocolNumber(RFC790)十进制表示:1ICMP6TCP14Telenet17UserDatagram(UDP)2/6/2023127AmoiCorporationFlagsFlags:3bits(VariousControlFlags)Bit0:reserved,mustbezeroBit1:(DF)0=MayFragment,1=Don'tFragment.Bit2:(MF)0=LastFragment,1=MoreFragments.2/6/2023128AmoiCorporation例子00105cf6531f000d656c687f08004500MACaddress(Dest)MACaddress(source)Eth.Tp.(IP)V420tos0030865d40007f06cdbf0a64fb440a64Totl.48BytesId:34397DF=1FrmoffTTL=127TCPChk.sum.8SourceIPaddr.58979e1f90042d3d9c5018d9cd04677012Dest.Addr.4470074e0000020405b4010104022/6/2023129AmoiCorporationTCP:OverviewRFCs:793,1122,1323,2018,2581fullduplexdata:bi-directionaldataflowinsameconnectionMSS:maximumsegmentsize(option)connection-oriented:

handshaking(exchangeofcontrolmsgs)init’ssender,receiverstatebeforedataexchangeflowcontrolled:senderwillnotoverwhelmreceiverpoint-to-point:onesender,onereceiver

reliable,in-orderbytesteam:no“messageboundaries”pipelined:TCPcongestionandflowcontrolsetwindowsizesend&receivebuffershttp://www.cs.tau.ac.il/~natali/OS/OStcp.ppt2/6/2023130AmoiCorporationTCPsegmentstructuresourceport#destport#32bitsapplicationdata(variablelength)sequencenumberacknowledgementnumberrcvrwindowsizeptrurgentdatachecksumFSRPAUheadlennotusedOptions(variablelength)URG:urgentdata(generallynotused)ACK:ACK#validPSH:pushdatanow(generallynotused)RST,SYN,FIN:connectionestab(setup,teardowncommands)#bytesrcvrwillingtoacceptcountingbybytesofdata(notsegments!)Internetchecksum(asinUDP)http://www.cs.tau.ac.il/~natali/OS/OStcp.ppt2/6/2023131AmoiCorporationFlags域ControlBits6bits(fromlefttoright):URG:UrgentPointerfieldsignificantACK:AcknowledgmentfieldsignificantPSH:PushFunctionRST:ResettheconnectionSYN:SynchronizesequencenumbersFIN:Nomoredatafromsender2/6/2023132AmoiCorporation例子00105cf6531f000d656c687f08004500MACaddress(Dest)MACaddress(source)Eth.Tp.(IP)V420tos0030865d40007f06cdbf0a64fb440a64Totl.48BytesId:34397DF=1Frmoff=0TTL=127TCPChk.sum.8SourceIPaddr.58979e1f90042d3d9c5018d9cd04677012Dest.Addr.8080s.port1069d.port1033654296Seq.num3654091879Ack.numDataoffset=28BytesAcksyn4470074e0000020405b401010402Window=17520Chk.Sum.Urg.Ptr.Opt.maxseg=1460…..2/6/2023133AmoiCorporationTCPHandshakeSYNRQSTSYNACKclientserverACKSeq=2121323ACK=2121324,Seq=122222http://www.cs.tau.ac.il/~natali/OS/OStcp.ppt2/6/2023134AmoiCorporationTCPseq.#’sandACKsSeq.#’s:bytestream“number”offirstbyteinsegment’sdataACKs:seq#ofnextbyteexpectedfromothersidecumulativeACKHostAHostBSeq=42,ACK=79,data=‘C’Seq=79,ACK=43,data=‘C’S

温馨提示

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

评论

0/150

提交评论