为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

OSI七层模型

2017-03-27 43页 ppt 2MB 109阅读

用户头像

is_060881

暂无简介

举报
OSI七层模型1第一章OSI七层模型Purpos:ThischaptrriwsgnralntworkingthoryandintroducsstudntstosomofCisco’sproductlinTiming:Thischaptrtaksapproximatly15hourstoprsntNot:ThissctionhasaproductslctiontoollaboratoryxrcisatthndContnts:Objctis—Thissctionxplainswhatthstudntwillbabltod...
OSI七层模型
1第一章OSI七层模型Purpos:ThischaptrriwsgnralntworkingthoryandintroducsstudntstosomofCisco’sproductlinTiming:Thischaptrtaksapproximatly15hourstoprsntNot:ThissctionhasaproductslctiontoollaboratoryxrcisatthndContnts:Objctis—ThissctionxplainswhatthstudntwillbabltodoatthndofthischaptrDfiningNtworkComponnts—ThissctiondisplayswhrdicsarplacdinthntworkMappingBusinssNdstoaHirarchicalModl—ThissctiondscribsthhirarchicalmodlusdinntworkdsignOSIModlOriw—ThissctionriwsthOSImodlCommunicatingBtwnLayrs—ThissctiondscribsncapsulationanddncapsulationWrittnExrcis1—Thissctionhasawrittnxrcistotstthstudnts’knowldgofthOSImodlPhysicalLayrFunctions—ThissctiondscribsthphysicallayrofthOSIModlDataLinkLayrFunctions—ThissctiondscribsthdatalinklayrofthOSIModlNtworkLayrFunctions—ThissctiondscribsthntworklayrofthOSIModlTransportLayrFunctions—ThissctiondscribsthtransportlayrofthOSIModlwwwciscocomBSCN10—1本章目标描述数据在源和目标设备间的传送过程了解集线器、交换机和路由器在网络中担当的角色和功能;懂得在什么情况下该用什么样的设备根据网络需求选择恰当的Cisco设备Purpos:thisfigurstatsthchaptrobjctisEmphasiz:RadorstatachobjctisoachstudnthasaclarundrstandingofthchaptrobjctiswwwciscocomBSCN10—1OSI参考模型概述数据流层传输层数据链路层网络层物理层应用层(高)会话层示层应用层Layr2of2:Purpos:ThisfigurorintsthstudntstothnxtstofconcptsEmphasiz:ThDataLinklayrofthOSIrfrncmodlisimplmntdbySwitchsandBridgsThsdicsncapsulatdatin“frams”ThNtworklayrofthOSIrfrncmodlisimplmntdbyRoutrsThsdicsncapsulatdatain‘packts’ThTransportlayrofthOSIrfrncmodlisimplmntdbyariousprotocols;onofwhichisTCPTCPussportsandncapsulatsthdatain‘sgmnts’wwwciscocomBSCN10—1OSI模型概述1为什么引入OSI模型2为什么OSI要分层wwwciscocomBSCN10—1应用层作用TlntHTTPDNSFTPTFTPSNMP用户接口例子应用层Slid1of4:Purpos:ThisfigurorintsthstudntstothapplicationlayrEmphasiz:ThislayrdiscusssntworkapplicationsrathrthancomputrapplicationsSo,applicationssuchasspradshts,wordprocssors,orprsntationgraphicsarnotthapplicationsbingdscribdhrNtworkapplicationsmaybapplicationsthatsupport,lctronicmail,filtransfr,rmotaccss,ntworkmanagmnt,andsoonTransition:ThfollowingdiscusssthprsntationlayrwwwciscocomBSCN10—1TlntHTTPASCIIJPEGMP3EBCDIC用户接口 数据表示 加密等特殊处理过程例子表示层应用层表示层作用Slid2of4:Purpos:ThisfigurorintsthstudntstothprsntationlayrEmphasiz:Thislayrdiscussscodformatting,dataprsntationstandards,andconrsionTransition:ThfollowingdiscusssthsssionlayrwwwciscocomBSCN10—1TlntHTTPASCIIJPEGEBCDIC保证不同应用程序的数据独立用户接口 数据表示 加密等特殊处理过程SQLRPC例子会话层表示层应用层会话层作用Slid3of4:Purpos:ThisfigurorintsthstudntstothsssionlayrEmphasiz:ThislayrcoordinatsapplicationsasthyintractondiffrnthostsExamplsofsssionlayrprotocolsinclud:NFS,SQL,RPC,andsoonTransition:ThfollowingdisplaysthlowrlayrswwwciscocomBSCN10—1保证不同应用程序间的数据独立用户接口 数据表示 加密等特殊处理过程传输层数据链路层网络层物理层例子会话层表示层应用层应用高)层作用Slid4of4:Purpos:ThisfigurorintsthstudntstothntirOSImodlstackEmphasiz:ThlowrlayrssitblowthupprthrlayrsThrmaindrofthiscoursisfocusdonthlowrlayrsTransition:ThfollowingdiscusssthphysicallayrofthOSIrfrncmodlwwwciscocomBSCN10—1物理层的作用EIATIA232V35例子物理层 设备间接收或发送比特流 说明电压、线速和线缆等Slid1of5Purpos:ThisfigurorintsthstudntstothphysicallayrofthOSIModlEmphasiz:Thphysicallayrspcifisthlctrical,mchanicalprocdural,andfunctionalrquirmntsforactiating,maintaining,anddactiatingthphysicallinkbtwnsystmsCrtainphysicalstandardsarassociatdwithcrtaindatalinkstandardsForxampl,8023isusdwithdatalinkstandard8022forEthrntItisnotusdinWANconnctionsThisiscordmorindpthlatrinthcoursTransition:ThfollowingdiscusssLayr2,thDataLinklayr,ofthOSIrfrncmodlwwwciscocomBSCN10—180238022HDLCEIATIA232V35例子数据链路层物理层 将比特组合成字节进而组合成帧 用MAC地址访问介质 设备间接收或发送比特流 说明电压、线速和线缆等数据链路层的作用Slid2of5:Purpos:ThisfigurorintsthstudntstothdatalinklayrEmphasiz:Thdatalinklayrproidsdatatransportacrossaphysicallink8023isandphysicalanddatalinkEthrntprotocolItisusdwithth8022standardTransition:ThfollowingdiscusssLayr3,thntworklayr,ofthOSIrfrncmodlwwwciscocomBSCN10—180238022HDLCEIATIA232V35IPIPX例子网络层数据链路层物理层 将比特组合成字节进而组合成帧 用MAC地址访问介质 设备间接收或发送比特流 说明电压、线速和线缆等提供路由器用来决定路径的逻辑寻址网络层的作用Slid3of5:Purpos:ThisfigurorintsthstudntstothntworklayrEmphasiz:NtworklayriswhrIPoccursTransition:ThfollowingdiscusssLayr4,thtransportlayr,ofthOSIrfrncmodlwwwciscocomBSCN10—1TCPUDPSPX80238022HDLCEIATIA232V35IPIPX例子传输层数据链路层物理层 可靠或不可靠的数据传输 数据重传前的错误纠正 将比特组合成字节进而组合成帧 用MAC地址访问介质 设备间接收或发送比特流 说明电压、线速和线缆等网络层提供路由器用来决定路径的逻辑寻址传输层的作用Slid4of5:Purpos:ThisfigurorintsthstudntstothtransportlayrEmphasiz:ThTransportlayrofthOSIrfrncmodlisimplmntdbyariousprotocols;onofwhichisTCPTCPussportsandncapsulatsthdatain‘sgmnts’TCPisconnctionorintdsoitoffrsrliablsricThothrmajortransportlayrprotocoldiscussdinthiscoursisUDPItoffrsspdbutnorliabilitybcausitisconnctionlssTransition:ThfollowingprsntsthntirOSIstackagainwwwciscocomBSCN10—1TCPUDPSPX80238022HDLCEIATIA232V35IPIPX表示层应用层会话层例子 可靠或不可靠的数据传输 数据重传前的错误纠正 将比特组合成字节进而组合成帧 用MAC地址访问介质 设备间接收或发送比特流 说明电压、线速和线缆等传输层数据链路层物理层网络层提供路由器用来决定路径的逻辑寻址数据流层的作用Slid5of5:Purpos:ThisfigurriwsthntirOSImodlstackEmphasiz:ThupprlayrssitabothlowrlayrsTransition:ThfollowingdiscusssncapsulationanddncalsulationwwwciscocomBSCN10—1传输层数据链路层物理层网络层上层数据上层数据TCP头数据IP头数据LLC头0101110101001000010数据MAC头表示层应用层会话层段包比特帧PDU数据封装Purpos:ThisfigurillustratsncapsulationEmphasiz:Thprotocoldataunits(PDUs)arthtrmsusdinthindustryandinthiscourstodscribdataatthdiffrntlayrsEncapuslationisakyconcptthatillustratshowdataisformattdpriortobingsntacrossalinkThisxamplisanillustrationisEthrnt(ortoknring)atthdatalinkandphysicallayrandTCPIPatthntworkandtransportlayrsTransition:ThfollowingdiscusssdncalsulationFCS:FramChckSqunc帧校验序列帧的外加字段,用于rrorcontrol,通常用于HDLC,FR,以及其它的一些链路层wwwciscocomBSCN10—1上层数据LLC头+IP+TCP+上层数据MAC头IP+TCP+上层数据LLC头TCP+上层数据IP头上层数据TCP头0101110101001000010传输层数据链路层物理层网络层表示层应用层会话层数据解封装Purpos:ThisfigurillustratsdncapsulationEmphasiz:Atthdstination,thhadrsatachlayrarstrippdoffasthdatamosbackupthstackwwwciscocomBSCN10—1应用层表示层会话层传输层网络层数据链路层物理层OSI层PDU功能例子练习:OSI模型Purpos:ThisxrcisisintnddtornforcstudntsundrstandingofthOSImodlNot:StudntsshouldfillinthmptyspacstocompltthtablAnswrsarinth“Answrs”appndixwwwciscocomBSCN10—1定义 介质类型 连接器类型 信号类型Ethrnt8023V35物理层EIATIA232物理层功能Purpos:ThissctiondscribsthphysicallayrinmordtailNot:8023isrsponsiblforLANsbasdonthcarrirsnsmultiplaccsscollisiondtct(CSMACD)accssmthodologyEthrntisanxamplofaCSMACDntworkEIATIA232andV35arphysicalstandardsthatsupportsynchronoussrialwwwciscocomBSCN10—1物理层—介质类型10Bas2—细缆10Bas5—粗缆10BasT—双绞线1000M光纤无线电波Emphasiz:NtworktopologyisnotncssarilyconnctdtontworktchnologyForxampl,manyEthrntntworkshaabackbonbustopologyHowr,addingaswitchorahubtoanEthrntntworkchangsittoastartopologyIEEE8023udfinsthstandardforaCSMACDLANopratingat100Mbps,FastEthrntInthcasofEthrnt,suchas10BasT,thfirstpartdscribsthspdofthcabl,thscondpartdscribswhthritisbasbandorbroadbandcabl,thfinalpartdscribsthmdiaSo,10BasTis10Mbpsbasbandtwistdpaircabl线缆类型:1同轴电缆,coaxialcabl:细缆,粗缆2双绞线,twistdpair:UTP,STP3光纤,fibr:多模,单模4无线电波,wirlssradiowwwciscocomBSCN10—1物理层—连接器类型AUIDB9RJ45wwwciscocomBSCN10—1物理层 所有设备在同一冲突域 所有设备在同一广播域 所有设备共享相同的带宽物理层设备HubEmphasiz:AlldicsattachdtoahubaronthsamcollisionandbroadcastdomainAhubisalayrondicwwwciscocomBSCN10—1CSMACD技术 Hub连接的设备在同一个冲突域 接入设备越多冲突机率越大 用CSMACD技术解决Purpos:ThisfigurcomparshubsinaCSMACDnironmnttoahighwaywithmultiplaccsspointsEmphasiz:Thmorntrancpointsontothhighway,thgratrthliklihoodforacollisiontooccurLikwis,thmorndstationsonahubtryingtoaccssthlin,thmorcollisionsoccurCSMA技术:总线有两个状态:空闲和忙每个站点在使用总线发送数据帧之前,首先侦听总线,查看总线状态,如果忙,就继续侦听,知道空闲时,发数据帧CD技术:在使用CSMA协议时,可能会有2个以上的站点同时监听到空闲的情况,此时这些站点将同时开始发送数据帧,倒是总线冲突,帧破损,从而所有的数据发送失败所以,每个站点在发送数据后必须检测是否发生了冲突,如果有冲突,那么就过一个随机数时间(us)后再发送数据Ethrnt和IEEE8023都采用CSMACD技术wwwciscocomBSCN10—1定义 源和目标的物理地址 与帧关联的高层协议(SricAccssPoint) 帧校验序列FCS数据链路层物理层EIATIA23235EthrntFramRlayHDLC80228023数据链路层功能Purpos:ThisfigurcomparsphysicalstandardstodatalinkstandardsEmphasiz:Asillustratd,crtainphysicalstandardsarassociatdwithcrtaindatalinkstandardsForxampl,8023isusdwithdatalinkstandard8022forEthrntItisnotusdinWANconnctionsFCS:当一个网卡接受到一个8023的帧时,第一件事就是检查FCS,验证此帧是否有效,然后才检查8023帧中的目的MAC地址数据链路层基本的功能是将源主机来的二进制数据流可靠地传输到相邻节点的目的主机数据链路层必须具备相应的功能:如何将数据组合成数据帧;保证帧的发送和接收次序,如何控制帧在物理信道上的传输;如何检测帧的传输差错,对于有差错的帧如何处理;如何调节发送端的发送速率,使接收方能来得及接收发送端发送的数据;在两个网络链路实体之间对数据链路进行建立、维持和释放等方面的管理等,这些都是链路层所要完成的最基本的功能311帧同步数据链路层将物理层的比特流组织成以帧为单位进行传送,这样能够将物理上连续的二进制流分成一块一块的数据帧,数据链路层将每一个帧作为数据传输的基本单位帧的组织必须能使接收方能明确地从物理层收到的比特流中对其进行识别,能从连续的比特流中识别出帧的起始与终止,这是帧同步所要解决的问题常用的帧同步有:(1)字节计数法这种帧同步方法以一个特殊字符来表示一帧的起始,以一个特定的字段来标明帧内的字节数接收方通过帧起始字符识别出二进制流中帧的开始,并从帧长度字段中获知该帧中的数据长度,确定出帧的终止位置这种对帧进行识别和同步的方法称为字节计数法,它的不足之处在于只能传输字符(2)字符填充的首尾定界符法此方法用一些特定的字符来界定一帧的起始与终止为了不使数据信息位中出现与这些界定字符相同的字符被误认为成帧的首尾定界符,可在这种数据字符前填充一个转义控制字符,从而达到数据传输的透明性(3)比特填充的首尾定界符法此方法用一组特定的二进制模式(如在HDLC协议和PPP协议中是01111110)来标志一帧的起始与终止如果数据串中出现与特定比特模式相同的串,如帧中数据字段也出现01111110,则对数据中的连续出现的5个“1”后,发送方自动在其后插入一个“0”,接受方在接收过程中对该过程做逆操作,即每收到连续5个“1”,自动会删去其后所跟的“0”,恢复原始数据信息,实现数据传输的透明性比特填充方法很容易由硬件来实现,性能优于字符填充方法,它可以传送任意的二进制串的数据(4)违法编码法此方法在物理层采用特定的编码方法时采用例如,曼彻斯特编码方法,是将数据“1”编码成“高低”电平对,将数据0编码成“低高”电平对而“高高”电平对和“低低”电平对在数据比特中是违法的在帧的生成过程中,利用这些违法编码序列来定界帧的起始与终止位置,IEEE802采用了这种方法进行帧同步违法编码法不需要任何填充技术便能实现数据的透明性,但它只适用于有冗余编码的特殊编码环境目前较普遍使用帧同步方法有比特填充法和违法编码法312链路管理链路两端的节点要进行通信之前,先确认对方已处于就绪状态,并交换必要的信息以对帧序号进行初始化,然后才能建立连接在传输过程中要维持该连接,传输结束后要释放连接数据链路层的连接建立、维持和释放等过程称为链路管理313差错控制物理信道上传输的数据难免受到各种不可靠因素的影响而产生差错,例如,由于噪声干扰、传输距离等而引起的信号失真等同时,数据在传输过程中可能会出现一连串数据也称为帧)中的某位出错,或者整个帧丢失、帧重复、帧的达到顺序出错等,这些现象都称为帧产生差错物理层并不能解决由于传输信道问题而产生的差错,差错控制要在链路层以上的协议层次开始解决数据链路层的差错控制方法主要有前向纠错((ForwardErrorCorrct,FEC)和差错检测(ErrorDtcting,ED)所谓前向纠错,就是在接收方发现有差错的数据帧时,能够根据差错检测算法自动找出差错所在位置,并将差错纠正过来,但这种方法的开销和冗余比较大差错检测方法是指接收方可以检测出接收到的帧有无差错,但并不知道差错所在的位置,不能进行纠错当检测出有差错的帧后,应当将其丢弃接收方通过对差错编码的检查,判定一帧在传输过程中是否发生了差错,一旦发现差错,可以采用反馈重发的方法来纠正,这要求接受方收完一帧后,向发送方反馈一个接收是否正确的信息,即对帧进行应答,使发送方做出是否需要重发的判断发送方收到接收方传的正确接收的反馈信号后才认为该帧已经正确发送完毕,否则需要重发此帧帧在传输过程中可能会丢失如果整个数据帧或应答帧丢失,将导致发送方永远收不到接受方发来的信息,从而使传输过程处于停滞状态为避免出现这种情况,通常引入超时计时器来限定接收方发反馈消息的时间间隔,发送方发送一帧的同时也启动计时器,若在限定时间内未能收到接接收方的反馈信息,计时器出现超时,这时可认为传出的帧出错或丢失,要重新发送由于需要重发或定时超时等现象,同一帧数据可能被重复发送多次,接收方将多次收到同一帧并将其递交给其上层,这会产生错误为了避免这种情况,采用对发送的帧进行编号的方法,赋予每帧一个序号,使接收方能从该序号来区分是新发送来的帧还是已经接受但又重发来的帧,以此来正确处理重复的数据帧在数据链路层通过使用计数器和序号来保证每帧能正确传送到目的主机并且只被接收一次314流量控制  由于收发双方各自使用的设备工作速率和缓冲存储空间的差异存在,可能出现发送方发送能力大于接收方接收能力的现象,若此时不对发送方的发送速率做适当的限制,先前来不及接收的帧将会被丢失流量控制实际上是对发送方数据流量的控制,使其发送的速率不致超过接收方接收的速率流量控制规则使发送方知道在什么情况下可以接着发送下一帧,在什么情况下必须暂停发送,以等待收到反馈信息后再继续发送流量控制在很多协议层都有,如传输层等,数据链路层也有流量控制的功能wwwciscocomBSCN10—1数据源地址FCS长度目标地址可变长266400000Cxxxxxx厂商自己分配IEEE分配MAC子层8023前导符EthrntII在这里用“Typ”指明上层协议,8022帧没有此项MAC地址8字节数据链路层功能—物理地址Emphasiz:AllMACaddrsssonaLANmustbuniquTwodicswiththsamMACaddrsscannotbonthsamdatalinkNot:ThIEEEassigndndorcodisjustonofCisco’smanyMACndorcodsCiscohasmanymor,manyofwhichcamwithCisco’sacquisitionswwwciscocomBSCN10—1数据目标SAP源SAP数据源地址FCS长度目标地址可变长118022(SAP)MAC子层8023Ctrl1or232前导符数据目标SAP0xAA源SAP0xAA可变长118022(SNAP)Ctrl0x031or2OROUIID类型数据链路层功能SAPNot:DiffrntupprlayrprotocolsusithrSNAPorSAPSAP,虽然有1byt用来标示上层协议,但是实际上,只有6bit可用所以,对于SAP来讲就只能支持64种上层协议而SNAP用typ字段标示上层协议,分给了它2byt,也就是16bit,那么从理论上就可以支持65536种上层协议wwwciscocomBSCN10—1数据链路层或12312数据链路层设备交换机网桥Emphasiz:Torducthnumbrofcollisions,aswitchcanbsplitintomultiplsgmnts,achinasparatcollisiondomainNotthatallsgmntsarinthsambroadcastdomainwwwciscocomBSCN10—1交换机的域 每个端口有自己的冲突域 广播包向所有段转发缓冲区交换Purpos:ThisfigurcomparsthswitchtoahighwaywwwciscocomBSCN10—1 定义与指定协议相关联的源和目标逻辑地址 定义通过网络的路径 连接不同类型的介质网络层IP,IPX数据链路层物理层EIATIA23235Ethrnt帧中继HDLC80228023网络层功能Purpos:ThisfigurmapsthlowrlayrstothntworklayrEmphasiz:RoutingoccursatthntworklayrMostofthiscoursussthIPntworklayrprotocolItsupportsmultipllowrlayrprotocolsIPXwillalsobcordinasinglchaptrinthiscoursRoutrsarntworklayrdicswwwciscocomBSCN10—1数据源地址目标地址IP头1721511主机号网络号 逻辑地址网络层端接设备的数据包网络层功能—逻辑地址Emphasiz:RoutdtrminationoccursatthislayrsoapacktmustincludasourcanddstinationaddrssNtworklayraddrssshatwocomponnts,antworkcomponntforintrntworkroutingandanodnumbrforadicspcificaddrssThxamplinthfigurisanxamplofanIPpacktandaddrsswwwciscocomBSCN10—1路由表目标网络端口距离124S0S0E0100104013E043S022E021S041421112路由表目标网络端口距离124E0S0S0001 逻辑地址提供分层结构的网络 需要配置 利用配置信息来识别到达目标网络的路径网络层功能—路由选路Emphasiz:RoutrsmaintainroutsinroutingtablsBforanyroutingcanbdonanadministratormustconfiguraroutrwithcrtainkyinformationsuchasaddrsssandtllthroutrhowtodtrminthbstrouttousThisisdiffrntthanaswitchwhichisaplugandplaydicwwwciscocomBSCN10—1网络层设备广播控制逻辑寻址路径选择提供WAN连接流量控制Emphasiz:RoutrsprformthntworklayrfunctionsdpictdinthfigurwwwciscocomBSCN10—1路由器WAN连接因特网家庭办公用户分部调制解调器或ISDN适配卡移动用户公司总部Purpos:RoutrsproidaccssintothcorporatntworkiaWANconnctionsEmphasiz:AmainofficmustbabltosupportmultipltypsofconnctionsNot:ThlightningboltrprsntsaWANconnctionThdottdlinsrprsntDDRconnctionsThsolidboltscanbpacktswitchdorlasdlinswwwciscocomBSCN10—1 支持不同的上层应用 建立应用间的端到端连接 为数据传输提供可靠或不可靠的连接服务 定义流量控制window 网络层IPXIP传输层SPXTCPUDP传输层功能Purpos:ThisfigurdscribsthtransportlayrEmphasiz:TwotransportlayrprotocolsinthIPstackarTCPandUDPTCPwilloffrmorrliabilitybcausitisconnctionorintdUDPguarantsnorliabilitySquncPacktExchang(SPX)isthtransportlayrprotocolusdbyIPXItisalsoconnctionorintdNwrrsionsofIPXsupportTCPandUDPaswllwwwciscocomBSCN10—1同步请求应同步请求,同步请求应同步请求数据传输(传输数据段)发送方接收方连接建立传输层功能—端到端可靠连接Purpos:ThisfigurillustratsaTCPconnctionbingstablishdEmphasiz:Thxchangissomtimsrfrrdtoasth“thrwayhandshak”ThinitiatinghostrqustsasynchronizationThrciracknowldgsthsynchronizationandspcifysynchronizationparamtrsinthoppositdirctionThrciracknowldgsthsynchronizationandaconnctionisstablishdwwwciscocomBSCN10—1集线器桥交换机路由器冲突域广播域网络设备的域Emphasiz:ThisfigursummarizsthdiffrntcollisiondomainsandbroadcastdomainsonariousntworkdicsItisimportantthatstudntsundrstandthdiffrncbtwnthtwodomainswwwciscocomBSCN10—1本章总结描述数据在源和目标设备间的传送过程清楚集线器、交换机和路由器在网络中担当的角色和功能;懂得在什么情况下该用什么样的设备根据网络需求选择恰当的Cisco设备Purpos:RiwthsummaryitmswithyourstudntsEmphasiz:RadorrstatthsummarystatmntsBynow,yourprsntationandclassroomdiscussionshouldhastudntsabltomtthchaptrlarningobjctiswwwciscocomBSCN10—1问题顾1简述OSI模型及各层功能2描述数据封装与解封装的过程3一个交换机有多少个广播域和冲突域4Hub,交换机,路由器的功能Purpos:RiwthchaptrwithopnnddqustionsNot:ThqustionsinthissctionaropnnddqustionsdsigndtofostrfurthrdiscussionAnswrsththriwqustionsarinth“Answrs”appndix1第二章TCPIP协议栈wwwciscocomBSCN10—1TCPIP协议栈7654325432应用层表达层会话层传输层网络层数据链路层物理层1应用层传输层Intrnt层数据链路层物理层1Purpos:ThisfigurshowsthprotocollayrsandcomparsthmwiththlayrsofthOSIrfrncmodl Emphasiz:ThisfigurshowsthTCPIPconcptuallayrtitlsThprotocolstackisusdsraltimsinthischaptr,andthlowrtwolayrsmaybsomtimscalldthntworkintrfaclayrThtrms“packt”and“datagram”arnarlyintrchangablHowr,adatagramisaunitofdata,whilapacktisaphysicalntitythatapparsonantworkInmostcass,apacktcontainsadatagramInsomprotocols,though,adatagramisdiiddintoanumbrofpacktstoaccommodatarquirmntforsmallrtransmittablpics Not:CrationanddocumntationofthIntrntprotocolscloslyrsmblsanacadmicrsarchprojctThprotocolsarspcifidindocumntscalldRFCsRFCsarpublishd,riwd,andanalyzdbythIntrntcommunity wwwciscocomBSCN10—1应用层概述路由器使用应用层传输层Intrnt层数据链路层物理层文件传输 TFTP FTP NFSEMail SMTP远程登陆 Tlnt rlogin网络管理 SNMP名称管理 DNSPurpos:ThisfigurdiscusssapplicationlayrprotocolsEmphasiz:Thcommonntworkapplicationstodayincludfiltransfr,rmotlogin,ntworkmanagmnt,andmailWfocusonTCPIPinthiscoursforsralrasons:TCPIPisaunirsallyaailablprotocolandyouwillusitatworkTCPIPisausfulrfrncforundrstandingothrprotocols,bcausitincludslmntsthatarrprsntatiofothrprotocolsTCPIPisimportantbcausthroutrussitasaconfigurationtoolThroutrussTlntforrmotconfiguration,TFTPtotransfrconfigurationfilsandopratingsystmimags,andSNMPforntworkmanagmnt Transition:Thnxtsctionmosdownthmodltodiscussthtransportlayr wwwciscocomBSCN10—1传输层概述TransmissionControlProtocol(TCP)UsrDatagramProtocol(UDP)应用层传输层Intrnt层数据链路层物理层面向连接非面向连接两大功能:A流量控制windowB可靠连接sqncackPurpos:Thisfigurintroducsthprotocolsusdatthtransportlayr Emphasiz:TCPisonprotocolwithinthprotocolsuitofTCPIPTCPisanacknowldgdtransportlayrprotocolHowr,TCPhasalarghadrsothrismuchorhadUDPisunacknowldgdByliminatingallofthacknowldgmntmchanisms,UDPisfastandfficintUDPdosnotdiidapplicationdataintopicsRliabilityisassumdtobhandldbythupprlayrprotocols,byarliabllowrlayrprotocol,orbyanrrortolrantapplicationUDPdoshaasmallrhadrandlssorhad wwwciscocomBSCN10—1TCP数据格式Sourcport(16)Dstinationport(16)Squncnumbr(32)Hadrlngth(4)Acknowldgmntnumbr(32)Rsrd(6)Codbits(6)Window(16)Chcksum(16)Urgnt(16)Options(0or32ifany)Data(aris)20BytsBit0Bit15Bit16Bit31Purpos:ThisfigurxplainswhatiscontaindinaTCPsgmnt Emphasiz:SourcPortandDstinationPortarthconnctionstothupprlayrprotocolSquncandAcknowldgmntnumbrsarthpositioninthusr’sbytstramofthissgmntSquncnumbrsarusdforstablishingrliabilityHLENisthhadrlngthIttllsuswhrthdatabginsSixbitsarrsrdforfuturusCodBitsdistinguishsssionmanagmntmssagsfromdataWindowisatrmwwillcombacktoinafwslidsFornow,considritthsizofthrcirsbuffrsChcksumisacyclicrdundancychck(CRC)ItrifisthatthdatagramarridintactUrgntPointrisusdtosignifyoutofbanddataOptionsarusdbyndorstonhancthirprotocoloffringThdataportionofthframcontainsthupprlayrprotocoldatawwwciscocomBSCN10—1端口号TCP端口号FTP传输层TELNETDNSSNMPTFTPSMTPUDP应用层2123255369161RIP520Purpos:ThisfigurxplainshowTCPussportnumbrstoconnctapplicationsEmphasiz:ThsportnumbrswrstandardizdinRFC1340ThisRFChasbnobsoltdbyRFC1700Howr,manyofthportnumbrsoutlindinRFC1340arstillbingusdasstandardsItispossibltofiltronTCPportnumbrsThTCPportnumbr,combindwithothrinformation,iswhatUNIXClanguagdloprscallasocktHowr,worksocktshadiffrntmaningsinXNSandNoll,whrthyarsricaccsspointabstractionsorprogrammingintrfacsrathrthansricaccsspointidntifirs wwwciscocomBSCN10—1TCP端口号源端口目标端口HostA102823SPDPHostZTlntZ目标端口=23Purpos:ThisfigurcontinustoxplainhowTCPussportnumbrs Emphasiz:,tInmostcassthTCPportnumbrononsidofaconrsationisthsamonthothrsidForxampl,whnafiltransfrtaksplachsoftwarononhostiscommunicatingwithaprapplicationonanothrhostInthisxamplwsaTlnt(TCPport23)sssionItispossibltohamultiplTlntsssionsrunningsimultanouslyonahostorroutrTlntslctsanunusdportnumbrabo1023torprsntthsourcportforachindpndntsssionNoticthatthdstinationportisstill23PortnumbringisimportanttoundrstandinordrtoconfigurIPxtnddaccsslistsThlackofsymmtryinportnumbrusisacriticalfactorinstablishingffctiscurity wwwciscocomBSCN10—1发送SYN(sq=100ctl=SYN)接收SYNHostAHostBTCP三次握手机制Layr1of3:HostAbginsbysndingaSYNsgmntindicatingthathostAwillussquncnumbrsstartingwithsquncnumbr100Emphasiz:TCPisasimplprotocolintrmsofconnctionstablishmntSomprotocolshadoznsofngotiationmssagsthatartransmittdpriortosssioninitializationTCPimplmntsastratgythatisbothncssaryandsufficintwwwciscocomBSCN10—1发送SYN(sq=100ctl=SYN)接收SYN发送SYN,ACK(sq=300ack=101ctl=syn,ack)HostAHostB接收SYNTCP三次握手Layr2of3:HostBsndsanACKandacknowldgsthSYNitrcidfromhostAHostBalsosndsaSYNNotthatthacknowldgmntfildindicatshostBisnowxpctingtoharsqunc101,acknowldgingthSYNthatoccupidsqunc100wwwciscocomBSCN10—1发送SYN(sq=100ctl=SYN)接收SYN发送SYN,ACK(sq=300ack=101ctl=syn,ack)建立会话(sq=101ack=301ctl=ack)HostAHostB接收SYNTCP三次握手Layr3of3:Inthnxtsgmnt,hostAsndssomdataNotthatthsquncnumbrofthsgmntinstp3isthsamasasthACKinstp2 Emphasiz:ThissquncisliktwopopltalkingThfirstprsonwantstotalktothscond,soshsays,“Iwouldliktotalkwithyou”(SYN)Thscondprsonrsponds,“GoodIwanttotalkwithyou”(SYN,ACK)Thfirstprsonthnsays,“Fin—ltustalkHriswhatIhatosay”(SYN,ACK,DATA)AtthispointithrsidcanbgincommunicatingandithrsidcanbrakthconnctionTCPisaprtopr(balancd)communicationmthod(noprimaryscondary)Not:ThisfigurxplainsTCPconnctionstablishmntFormorinformationrgardingththrwayhandshakinstablishingaTCPconnction,rfrtoRFC793 wwwciscocomBSCN10—1TCP简单确认滑动窗口=1发送方接收方Layr1of7:ThwindowsizisthnumbrofmssagstransmittdbforthsndrmustwaitforanacknowldgmntWindowsizwasprsntdarlirinthcours,sothisslidisariwThinitialstat,nomssagsbingsntwwwciscocomBSCN10—1TCP简单确认滑动窗口=1发送方接收方发送1接收1Layr2of7:Datamssag1snt(Snd1,Rci1)wwwciscocomBSCN10—1滑动窗口=1发送方接收方发送1接收1接收ACK2发送ACK2TCP简单确认Layr3of7:Acknowldgmntmssag2snt(SndACK2,RciACK2)wwwciscocomBSCN10—1滑动窗口=1发送方接收方发送1接收1接收ACK2发送ACK2发送2接收2TCP简单确认Layr4of7:Datamssag2snt(Snd2,Rci2)wwwciscocomBSCN10—1滑动窗口=1发送方接收方发送1接收1接收ACK2发送ACK2发送2接收2接收ACK3发送ACK3TCP简单确认Layr5of7:ACKformssag2(SndACK3,RciACK3)wwwciscocomBSCN10—1滑动窗口=1发送方接收方发送1接收1接收ACK2发送ACK2发送2接收2接收ACK3发送ACK3发送3接收3TCP简单确认Layr6of7:Snd3,Rci3wwwciscocomBSCN10—1发送方接收方发送1接收1接收ACK2发送ACK2发送2接收2接收ACK3发送ACK3发送3接收3接收ACK4发送ACK4TCP简单确认滑动窗口=1Layr1of7:ACKformssag3(SndACK4,RciACK4)ThissqunchlpstoconythdlayassociatdwithawindowsizofonNot:TCPacknowldgmntsarxpctationalandarsomtimscalldforwardrfrncd,whichmansthatthyrfrtothsgmntthyarxpctingtorci,notthonjustsnt AcknowldgmntfildsizscanbcomanissuwhntransmittingdataatFDDIandATMspdswwwciscocomBSCN10—1TCP顺序号和确认号源端口目标端口顺序号确认号SourcDstSqAck102823101我发送10Layr1of4:Layr1showsthSquncnumbris10wwwciscocomBSCN10—1TCP顺序号和确认号我已收到10,现在我需要11源端口目标端口顺序号确认号102823SourcDst10Sq1Ack102823SourcDst11Sq1Ack我发送10Layr2of4:Layr2showsthacknowldgmntnumbris11wwwciscocomBSCN10—1TCP顺序号和确认号源端口目标端口顺序号确认号102823SourcDst11Sq2Ack102823SourcDst10Sq1Ack102823SourcDst11Sq1Ack我已收到10,现在我需要11我发送10Layr3of4:Layr3showsthnxtsquncnumbris11 wwwciscocomBSCN10—1TCP顺序号和确认号源端口目标端口顺序号确认号102823SourcDst11Sq2Ack102823SourcDst10Sq1Ack102823SourcDst11Sq1Ack102823SourcDst12Sq2Ack我已收到11,现在我需要12我发送11Layr4of4:Layr4showsthacknowldgmntnumbris12 Emphasiz:ThSquncandAcknowldgmntnumbrsardirctionalThslidhighlightsthcommunicationgoinginondirctionThsquncandacknowldgmntstakplacwiththsndronthrightTCPproidsfullduplxcommunication wwwciscocomBSCN10—1Windowsiz=3Snd2TCP窗口发送方Windowsiz=3Snd1Windowsiz=3Snd3ACK3Windowsiz=2数据3被丢弃接收方Layr3of5:Inlayr3,thrciingdicacknowldgsthtwofirstbyts,drops3,andadrtissitswindowsizas2wwwciscocomBSCN10—1Windowsiz=3Snd2TCP窗口发送方Windowsiz=3Snd1Windowsiz=3Snd3ACK3Windowsiz=2数据3被丢弃Windowsiz=3Snd4Windowsiz=3Snd3接收方Layr4of5:Inlayr3thsndingdictransmits2bytsbutmaintainsawindowsizof2wwwciscocomBSCN10—1Windowsiz=3Snd2TCP窗口发送方Windowsiz=3Snd1Windowsiz=3Snd3ACK3Windowsiz=2数据3被丢弃Windowsiz=3Snd4Windowsiz=3Snd3ACK5Windowsiz=2接收方Layr5of5:Inlayr5,thrciingdicacknowldgsth2bytsandstilladrtissitswindowsizas2wwwciscocomBSCN10—1UDP数据格式Sourcport(16)Dstinationport(16)Lngth(16)Data(ifany)1Bit0Bit15Bit16Bit31Chcksum(16)8Byts没有顺序号和确认号Purpos:ThisgraphicxplainsthformatofUDP Emphasiz:UDPissimplandfficintbutnotrliablThUDPsgmntformatincludsasourcport,adstinationport,alngthfild,andanoptionalchcksumfildIthasnosquncing,acknowldgmnts,orwindowing Exampl:TFTPussachcksumAtthndofthtransfrifthchcksumdosnotmatchthnthfildidnotmakitThusrisnotifidandmusttypinthcommandagainAsarsult,thusrhasbcomthrliabilitymchanismTransition:ThnxtsctiondiscusssthntworklayrofthOSImodlandhowitcorrspondstothTCPIPintrntlayr wwwciscocomBSCN10—1TCPsUDPSourcport(16)Dstinationport(16)Lngth(16)Data(ifany)Chcksum(16)Sourcport(16)Dstinationport(16)Squncnumbr(32)Hadrlngth(4)Acknowldgmntnumbr(32)Rsrd(6)Codbits(6)Window(16)Chcksum(16)Urgnt(16)Options(0or32ifany)Data(aris)wwwciscocomBSCN10—1Intrnt层概述IntrntProtocol(IP)IntrntControlMssagProtocol(ICMP)AddrssRsolutionProtocol(ARP)RrsAddrssRsolutionProtocol(RARP)应用层传输层Intrnt层数据链路层物理层OSI网络层对应的是TCPIP的Intrnt层Purpos:ThisfigurprsntsalistofthprotocolsopratingatthIntrntlayrEmphasiz:RiwthprotocolsbriflyThyarcordindtailonthcomingpagsRoutingprotocolsarusuallyconsidrdlayrmanagmntprotocolsthatsupportthntworklayr wwwciscocomBSCN10—1IP数据包格式Vrsion(4)DstinationIPAddrss(32)Options(0or32ifany)Data(arisifany)1Bit0Bit15Bit16Bit31HadrLngth(4)PriorityTypofSric(8)TotalLngth(16)Idntification(16)Flags(3)Fragmntoffst(13)Timtoli(8)Protocol(8)Hadrchcksum(16)SourcIPAddrss(32)20BytsPurpos:ThisfigurxplainswhatiscontaindinanIPdatagram Emphasiz:DiscussthformatofthIPdatagramThcurrntgnrationofIPisrsion4WndthHadrLngth(HLEN)andthTotalLngthinthisxamplbcausthIPOptionsfildallowsaariabllngthTimToLi(TTL)isacountdownfildErystationmustdcrmntthisnumbrbyonorbythnumbrofscondsitholdsontothpacktWhnthcountrrachszro,thtimtolixpirsandthpacktisdroppdTTLkpspacktsfromndlsslywandringthintrntinsarchofnonxistntdstinationsThnxtgnrationofIP(calldIPng)isIPrsion6ItiscordinRFC1752 GoodrfrncsforthistopicarDouglasComr’sbooksonTCPIP wwwciscocomBSCN10—1协议域TransportLayrIntrntLayrTCPUDPProtocolNumbrsIP176决定上层协议Purpos:Thisfigurxplainsthusofthprotocolfild Emphasiz:Protocolnumbrsconnct,ormultiplx,IPtothtransportlayrThsnumbrsarstandardizdinRFC1700Ciscoussthsnumbrsinfiltringwithxtnddaccsslists wwwciscocomBSCN10—1ICMP协议ApplicationTransportIntrntDataLinkPhysicalDstinationUnrachablEcho(Ping)OthrICMP1Purpos:ThisfigurxplainswhichmssagsarICMPmssags Emphasiz:DscribICMPmssagsandping wwwciscocomBSCN10—1ARP协议17216311721632IP:1721632=我需要知道1761632的物理地址Layr1of4:Purpos:ThisfigurshowshowARPisusdtodtrminanIPaddrss Inlayr1,host1721631ndsthMACaddrssofhost1721632ItsndsanARPrqustmssagwwwciscocomBSCN10—1ARP协议17216311721632IP:1721632=Layr2of4:Inlayr2,host1721632isonthsamwirandrcisthARPrqustmssag wwwciscocomBSCN10—1ARP协议1721631IP:1721632Ethrnt:0800002011111721632IP:1721632=Layr3of4:Inlayr3,host1721632sndsanARPrplywithitsMACaddrsstohost1721631wwwciscocomBSCN10—1ARP协议1721631IP:1721632Ethrnt:0800002011111721632IP:1721632=映射IP EthrntLayr4of4:Inlayr4,thbulltditmsatthbottomofthslidappar Emphasiz:ARPproidstranslationbtwnntworkanddatalinklayrsDiscusswhyitisncssarytohaamchanismlikARPDscribARPoprationNotallprotocolsusARPSomusothrmthodsforaddrsstranslationNot:Forthmssagtobtransmittduniqulytoasinglintrfaconthmultiaccsslink,itisncssarytobuildaframwiththuniquMACaddrssofthintrfacwwwciscocomBSCN10—1RARP协议Ethrnt:080000201111IP=我的地址是多少Layr1of4:Purpos:ThisfigurxplainshowRARPworks Inlayr1,thhostonthlftndsitsIPaddrssItsndsaRARPrqustwithitsMACaddrsswwwciscocomBSCN10—1RARP协议Ethrnt:080000201111IP=我的地址是多少我听到了广播你的地址是17216325Layr2of4:Inlayr2,thhostonthright,functioningasaRARPsrr,mapsthMACaddrsstoanIPaddrsswwwciscocomBSCN10—1RARP协议Ethrnt:080000201111IP:17216325Ethrnt:080000201111IP=我的地址是多少我听到了广播你的地址是17216325Layr3of4:Inlayr3,thhostonthrightsndsthIPaddrsstothrqustrinaRARPrplymssagwwwciscocomBSCN10—1RARP协议Ethrnt:080000201111IP:17216325Ethrnt:080000201111IP=我的地址是多少我听到了广播你的地址是17216325映射Ethrnt IPLayr4of4:Inlayr4,thbulltditmsapparatthbottomofthslid Emphasiz:RARPisusdtobootdisklssworkstationsorantwork Purpos:ThischaptrriwsgnralntworkingthoryandintroducsstudntstosomofCisco’sproductlinTiming:Thischaptrtaksapproximatly15hourstoprsntNot:ThissctionhasaproductslctiontoollaboratoryxrcisatthndContnts:Objctis—ThissctionxplainswhatthstudntwillbabltodoatthndofthischaptrDfiningNtworkComponnts—ThissctiondisplayswhrdicsarplacdinthntworkMappingBusinssNdstoaHirarchicalModl—ThissctiondscribsthhirarchicalmodlusdinntworkdsignOSIModlOriw—ThissctionriwsthOSImodlCommunicatingBtwnLayrs—ThissctiondscribsncapsulationanddncapsulationWrittnExrcis1—Thissctionhasawrittnxrcistotstthstudnts’knowldgofthOSImodlPhysicalLayrFunctions—ThissctiondscribsthphysicallayrofthOSIModlDataLinkLayrFunctions—ThissctiondscribsthdatalinklayrofthOSIModlNtworkLayrFunctions—ThissctiondscribsthntworklayrofthOSIModlTransportLayrFunctions—ThissctiondscribsthtransportlayrofthOSIModlPurpos:thisfigurstatsthchaptrobjctisEmphasiz:RadorstatachobjctisoachstudnthasaclarundrstandingofthchaptrobjctisLayr2of2:Purpos:ThisfigurorintsthstudntstothnxtstofconcptsEmphasiz:ThDataLinklayrofthOSIrfrncmodlisimplmntdbySwitchsandBridgsThsdicsncapsulatdatin“frams”ThNtworklayrofthOSIrfrncmodlisimplmntdbyRoutrsThsdicsncapsulatdatain‘packts’ThTransportlayrofthOSIrfrncmodlisimplmntdbyariousprotocols;onofwhichisTCPTCPussportsandncapsulatsthdatain‘sgmnts’Slid1of4:Purpos:ThisfigurorintsthstudntstothapplicationlayrEmphasiz:ThislayrdiscusssntworkapplicationsrathrthancomputrapplicationsSo,applicationssuchasspradshts,wordprocssors,orprsntationgraphicsarnotthapplicationsbingdscribdhrNtworkapplicationsmaybapplicationsthatsupport,lctronicmail,filtransfr,rmotaccss,ntworkmanagmnt,andsoonTransition:ThfollowingdiscusssthprsntationlayrSlid2of4:Purpos:ThisfigurorintsthstudntstothprsntationlayrEmphasiz:Thislayrdiscussscodformatting,dataprsntationstandards,andconrsionTransition:ThfollowingdiscusssthsssionlayrSlid3of4:Purpos:ThisfigurorintsthstudntstothsssionlayrEmphasiz:ThislayrcoordinatsapplicationsasthyintractondiffrnthostsExamplsofsssionlayrprotocolsinclud:NFS,SQL,RPC,andsoonTransition:ThfollowingdisplaysthlowrlayrsSlid4of4:Purpos:ThisfigurorintsthstudntstothntirOSImodlstackEmphasiz:ThlowrlayrssitblowthupprthrlayrsThrmaindrofthiscoursisfocusdonthlowrlayrsTransition:ThfollowingdiscusssthphysicallayrofthOSIrfrncmodlSlid1of5Purpos:ThisfigurorintsthstudntstothphysicallayrofthOSIModlEmphasiz:Thphysicallayrspcifisthlctrical,mchanicalprocdural,andfunctionalrquirmntsforactiating,maintaining,anddactiatingthphysicallinkbtwnsystmsCrtainphysicalstandardsarassociatdwithcrtaindatalinkstandardsForxampl,8023isusdwithdatalinkstandard8022forEthrntItisnotusdinWANconnctionsThisiscordmorindpthlatrinthcoursTransition:ThfollowingdiscusssLayr2,thDataLinklayr,ofthOSIrfrncmodlSlid2of5:Purpos:ThisfigurorintsthstudntstothdatalinklayrEmphasiz:Thdatalinklayrproidsdatatransportacrossaphysicallink8023isandphysicalanddatalinkEthrntprotocolItisusdwithth8022standardTransition:ThfollowingdiscusssLayr3,thntworklayr,ofthOSIrfrncmodlSlid3of5:Purpos:ThisfigurorintsthstudntstothntworklayrEmphasiz:NtworklayriswhrIPoccursTransition:ThfollowingdiscusssLayr4,thtransportlayr,ofthOSIrfrncmodlSlid4of5:Purpos:ThisfigurorintsthstudntstothtransportlayrEmphasiz:ThTransportlayrofthOSIrfrncmodlisimplmntdbyariousprotocols;onofwhichisTCPTCPussportsandncapsulatsthdatain‘sgmnts’TCPisconnctionorintdsoitoffrsrliablsricThothrmajortransportlayrprotocoldiscussdinthiscoursisUDPItoffrsspdbutnorliabilitybcausitisconnctionlssTransition:ThfollowingprsntsthntirOSIstackagainSlid5of5:Purpos:ThisfigurriwsthntirOSImodlstackEmphasiz:ThupprlayrssitabothlowrlayrsTransition:ThfollowingdiscusssncapsulationanddncalsulationPurpos:ThisfigurillustratsncapsulationEmphasiz:Thprotocoldataunits(PDUs)arthtrmsusdinthindustryandinthiscourstodscribdataatthdiffrntlayrsEncapuslationisakyconcptthatillustratshowdataisformattdpriortobingsntacrossalinkThisxamplisanillustrationisEthrnt(ortoknring)atthdatalinkandphysicallayrandTCPIPatthntworkandtransportlayrsTransition:ThfollowingdiscusssdncalsulationFCS:FramChckSqunc帧校验序列帧的外加字段,用于rrorcontrol,通常用于HDLC,FR,以及其它的一些链路层协议Purpos:ThisfigurillustratsdncapsulationEmphasiz:Atthdstination,thhadrsatachlayrarstrippdoffasthdatamosbackupthstackPurpos:ThisxrcisisintnddtornforcstudntsundrstandingofthOSImodlNot:StudntsshouldfillinthmptyspacstocompltthtablAnswrsarinth“Answrs”appndixPurpos:ThissctiondscribsthphysicallayrinmordtailNot:8023isrsponsiblforLANsbasdonthcarrirsnsmultiplaccsscollisiondtct(CSMACD)accssmthodologyEthrntisanxamplofaCSMACDntworkEIATIA232andV35arphysicalstandardsthatsupportsynchronoussrialEmphasiz:NtworktopologyisnotncssarilyconnctdtontworktchnologyForxampl,manyEthrntntworkshaabackbonbustopologyHowr,addingaswitchorahubtoanEthrntntworkchangsittoastartopologyIEEE8023udfinsthstandardforaCSMACDLANopratingat100Mbps,FastEthrntInthcasofEthrnt,suchas10BasT,thfirstpartdscribsthspdofthcabl,thscondpartdscribswhthritisbasbandorbroadbandcabl,thfinalpartdscribsthmdiaSo,10BasTis10Mbpsbasbandtwistdpaircabl线缆类型:1同轴电缆,coaxialcabl:细缆,粗缆2双绞线,twistdpair:UTP,STP3光纤,fibr:多模,单模4无线电波,wirlssradioEmphasiz:AlldicsattachdtoahubaronthsamcollisionandbroadcastdomainAhubisalayrondicPurpos:ThisfigurcomparshubsinaCSMACDnironmnttoahighwaywithmultiplaccsspointsEmphasiz:Thmorntrancpointsontothhighway,thgratrthliklihoodforacollisiontooccurLikwis,thmorndstationsonahubtryingtoaccssthlin,thmorcollisionsoccurCSMA技术:总线有两个状态:空闲和忙每个站点在使用总线发送数据帧之前,首先侦听总线,查看总线状态,如果忙,就继续侦听,知道空闲时,发数据帧CD技术:在使用CSMA协议时,可能会有2个以上的站点同时监听到空闲的情况,此时这些站点将同时开始发送数据帧,倒是总线冲突,帧破损,从而所有的数据发送失败所以,每个站点在发送数据后必须检测是否发生了冲突,如果有冲突,那么就过一个随机数时间(us)后再发送数据Ethrnt和IEEE8023都采用CSMACD技术Purpos:ThisfigurcomparsphysicalstandardstodatalinkstandardsEmphasiz:Asillustratd,crtainphysicalstandardsarassociatdwithcrtaindatalinkstandardsForxampl,8023isusdwithdatalinkstandard8022forEthrntItisnotusdinWANconnctionsFCS:当一个网卡接受到一个8023的帧时,第一件事就是检查FCS,验证此帧是否有效,然后才检查8023帧中的目的MAC地址数据链路层基本的功能是将源主机来的二进制数据流可靠地传输到相邻节点的目的主机数据链路层必须具备相应的功能:如何将数据组合成数据帧;保证帧的发送和接收次序,如何控制帧在物理信道上的传输;如何检测帧的传输差错,对于有差错的帧如何处理;如何调节发送端的发送速率,使接收方能来得及接收发送端发送的数据;在两个网络链路实体之间对数据链路进行建立、维持和释放等方面的管理等,这些都是链路层所要完成的最基本的功能311帧同步数据链路层将物理层的比特流组织成以帧为单位进行传送,这样能够将物理上连续的二进制流分成一块一块的数据帧,数据链路层将每一个帧作为数据传输的基本单位帧的组织必须能使接收方能明确地从物理层收到的比特流中对其进行识别,能从连续的比特流中识别出帧的起始与终止,这是帧同步所要解决的问题常用的帧同步方法有:(1)字节计数法这种帧同步方法以一个特殊字符来表示一帧的起始,以一个特定的字段来标明帧内的字节数接收方通过帧起始字符识别出二进制流中帧的开始,并从帧长度字段中获知该帧中的数据长度,确定出帧的终止位置这种对帧进行识别和同步的方法称为字节计数法,它的不足之处在于只能传输字符(2)字符填充的首尾定界符法此方法用一些特定的字符来界定一帧的起始与终止为了不使数据信息位中出现与这些界定字符相同的字符被误认为成帧的首尾定界符,可在这种数据字符前填充一个转义控制字符,从而达到数据传输的透明性(3)比特填充的首尾定界符法此方法用一组特定的二进制模式(如在HDLC协议和PPP协议中是01111110)来标志一帧的起始与终止如果数据串中出现与特定比特模式相同的串,如帧中数据字段也出现01111110,则对数据中的连续出现的5个“1”后,发送方自动在其后插入一个“0”,接受方在接收过程中对该过程做逆操作,即每收到连续5个“1”,自动会删去其后所跟的“0”,恢复原始数据信息,实现数据传输的透明性比特填充方法很容易由硬件来实现,性能优于字符填充方法,它可以传送任意的二进制串的数据(4)违法编码法此方法在物理层采用特定的编码方法时采用例如,曼彻斯特编码方法,是将数据“1”编码成“高低”电平对,将数据0编码成“低高”电平对而“高高”电平对和“低低”电平对在数据比特中是违法的在帧的生成过程中,利用这些违法编码序列来定界帧的起始与终止位置,IEEE802标准采用了这种方法进行帧同步违法编码法不需要任何填充技术便能实现数据的透明性,但它只适用于有冗余编码的特殊编码环境目前较普遍使用帧同步方法有比特填充法和违法编码法312链路管理链路两端的节点要进行通信之前,先确认对方已处于就绪状态,并交换必要的信息以对帧序号进行初始化,然后才能建立连接在传输过程中要维持该连接,传输结束后要释放连接数据链路层的连接建立、维持和释放等过程称为链路管理313差错控制物理信道上传输的数据难免受到各种不可靠因素的影响而产生差错,例如,由于噪声干扰、传输距离等而引起的信号失真等同时,数据在传输过程中可能会出现一连串数据也称为帧)中的某位出错,或者整个帧丢失、帧重复、帧的达到顺序出错等,这些现象都称为帧产生差错物理层并不能解决由于传输信道问题而产生的差错,差错控制要在链路层以上的协议层次开始解决数据链路层的差错控制方法主要有前向纠错((ForwardErrorCorrct,FEC)和差错检测(ErrorDtcting,ED)所谓前向纠错,就是在接收方发现有差错的数据帧时,能够根据差错检测算法自动找出差错所在位置,并将差错纠正过来,但这种方法的开销和冗余比较大差错检测方法是指接收方可以检测出接收到的帧有无差错,但并不知道差错所在的位置,不能进行纠错当检测出有差错的帧后,应当将其丢弃接收方通过对差错编码的检查,判定一帧在传输过程中是否发生了差错,一旦发现差错,可以采用反馈重发的方法来纠正,这要求接受方收完一帧后,向发送方反馈一个接收是否正确的信息,即对帧进行应答,使发送方做出是否需要重发的判断发送方收到接收方传的正确接收的反馈信号后才认为该帧已经正确发送完毕,否则需要重发此帧帧在传输过程中可能会丢失如果整个数据帧或应答帧丢失,将导致发送方永远收不到接受方发来的信息,从而使传输过程处于停滞状态为避免出现这种情况,通常引入超时计时器来限定接收方发反馈消息的时间间隔,发送方发送一帧的同时也启动计时器,若在限定时间内未能收到接接收方的反馈信息,计时器出现超时,这时可认为传出的帧出错或丢失,要重新发送由于需要重发或定时超时等现象,同一帧数据可能被重复发送多次,接收方将多次收到同一帧并将其递交给其上层,这会产生错误为了避免这种情况,采用对发送的帧进行编号的方法,赋予每帧一个序号,使接收方能从该序号来区分是新发送来的帧还是已经接受但又重发来的帧,以此来正确处理重复的数据帧在数据链路层通过使用计数器和序号来保证每帧能正确传送到目的主机并且只被接收一次314流量控制  由于收发双方各自使用的设备工作速率和缓冲存储空间的差异存在,可能出现发送方发送能力大于接收方接收能力的现象,若此时不对发送方的发送速率做适当的限制,先前来不及接收的帧将会被丢失流量控制实际上是对发送方数据流量的控制,使其发送的速率不致超过接收方接收的速率流量控制规则使发送方知道在什么情况下可以接着发送下一帧,在什么情况下必须暂停发送,以等待收到反馈信息后再继续发送流量控制在很多协议层都有,如传输层等,数据链路层也有流量控制的功能Emphasiz:AllMACaddrsssonaLANmustbuniquTwodicswiththsamMACaddrsscannotbonthsamdatalinkNot:ThIEEEassigndndorcodisjustonofCisco’smanyMACndorcodsCiscohasmanymor,manyofwhichcamwithCisco’sacquisitionsNot:DiffrntupprlayrprotocolsusithrSNAPorSAPSAP,虽然有1byt用来标示上层协议,但是实际上,只有6bit可用所以,对于SAP来讲就只能支持64种上层协议而SNAP用typ字段标示上层协议,分给了它2byt,也就是16bit,那么从理论上就可以支持65536种上层协议Emphasiz:Torducthnumbrofcollisions,aswitchcanbsplitintomultiplsgmnts,achinasparatcollisiondomainNotthatallsgmntsarinthsambroadcastdomainPurpos:ThisfigurcomparsthswitchtoahighwayPurpos:ThisfigurmapsthlowrlayrstothntworklayrEmphasiz:RoutingoccursatthntworklayrMostofthiscoursussthIPntworklayrprotocolItsupportsmultipllowrlayrprotocolsIPXwillalsobcordinasinglchaptrinthiscoursRoutrsarntworklayrdicsEmphasiz:RoutdtrminationoccursatthislayrsoapacktmustincludasourcanddstinationaddrssNtworklayraddrssshatwocomponnts,antworkcomponntforintrntworkroutingandanodnumbrforadicspcificaddrssThxamplinthfigurisanxamplofanIPpacktandaddrssEmphasiz:RoutrsmaintainroutsinroutingtablsBforanyroutingcanbdonanadministratormustconfiguraroutrwithcrtainkyinformationsuchasaddrsssandtllthroutrhowtodtrminthbstrouttousThisisdiffrntthanaswitchwhichisaplugandplaydicEmphasiz:RoutrsprformthntworklayrfunctionsdpictdinthfigurPurpos:RoutrsproidaccssintothcorporatntworkiaWANconnctionsEmphasiz:AmainofficmustbabltosupportmultipltypsofconnctionsNot:ThlightningboltrprsntsaWANconnctionThdottdlinsrprsntDDRconnctionsThsolidboltscanbpacktswitchdorlasdlinsPurpos:ThisfigurdscribsthtransportlayrEmphasiz:TwotransportlayrprotocolsinthIPstackarTCPandUDPTCPwilloffrmorrliabilitybcausitisconnctionorintdUDPguarantsnorliabilitySquncPacktExchang(SPX)isthtransportlayrprotocolusdbyIPXItisalsoconnctionorintdNwrrsionsofIPXsupportTCPandUDPaswllPurpos:ThisfigurillustratsaTCPconnctionbingstablishdEmphasiz:Thxchangissomtimsrfrrdtoasth“thrwayhandshak”ThinitiatinghostrqustsasynchronizationThrciracknowldgsthsynchronizationandspcifysynchronizationparamtrsinthoppositdirctionThrciracknowldgsthsynchronizationandaconnctionisstablishdEmphasiz:ThisfigursummarizsthdiffrntcollisiondomainsandbroadcastdomainsonariousntworkdicsItisimportantthatstudntsundrstandthdiffrncbtwnthtwodomainsPurpos:RiwthsummaryitmswithyourstudntsEmphasiz:RadorrstatthsummarystatmntsBynow,yourprsntationandclassroomdiscussionshouldhastudntsabltomtthchaptrlarningobjctisPurpos:RiwthchaptrwithopnnddqustionsNot:ThqustionsinthissctionaropnnddqustionsdsigndtofostrfurthrdiscussionAnswrsththriwqustionsarinth“Answrs”appndixPurpos:ThisfigurshowsthprotocollayrsandcomparsthmwiththlayrsofthOSIrfrncmodl Emphasiz:ThisfigurshowsthTCPIPconcptuallayrtitlsThprotocolstackisusdsraltimsinthischaptr,andthlowrtwolayrsmaybsomtimscalldthntworkintrfaclayrThtrms“packt”and“datagram”arnarlyintrchangablHowr,adatagramisaunitofdata,whilapacktisaphysicalntitythatapparsonantworkInmostcass,apacktcontainsadatagramInsomprotocols,though,adatagramisdiiddintoanumbrofpacktstoaccommodatarquirmntforsmallrtransmittablpics Not:CrationanddocumntationofthIntrntprotocolscloslyrsmblsanacadmicrsarchprojctThprotocolsarspcifidindocumntscalldRFCsRFCsarpublishd,riwd,andanalyzdbythIntrntcommunity Purpos:ThisfigurdiscusssapplicationlayrprotocolsEmphasiz:Thcommonntworkapplicationstodayincludfiltransfr,rmotlogin,ntworkmanagmnt,andmailWfocusonTCPIPinthiscoursforsralrasons:TCPIPisaunirsallyaailablprotocolandyouwillusitatworkTCPIPisausfulrfrncforundrstandingothrprotocols,bcausitincludslmntsthatarrprsntatiofothrprotocolsTCPIPisimportantbcausthroutrussitasaconfigurationtoolThroutrussTlntforrmotconfiguration,TFTPtotransfrconfigurationfilsandopratingsystmimags,andSNMPforntworkmanagmnt Transition:Thnxtsctionmosdownthmodltodiscussthtransportlayr Purpos:Thisfigurintroducsthprotocolsusdatthtransportlayr Emphasiz:TCPisonprotocolwithinthprotocolsuitofTCPIPTCPisanacknowldgdtransportlayrprotocolHowr,TCPhasalarghadrsothrismuchorhadUDPisunacknowldgdByliminatingallofthacknowldgmntmchanisms,UDPisfastandfficintUDPdosnotdiidapplicationdataintopicsRliabilityisassumdtobhandldbythupprlayrprotocols,byarliabllowrlayrprotocol,orbyanrrortolrantapplicationUDPdoshaasmallrhadrandlssorhad Purpos:ThisfigurxplainswhatiscontaindinaTCPsgmnt Emphasiz:SourcPortandDstinationPortarthconnctionstothupprlayrprotocolSquncandAcknowldgmntnumbrsarthpositioninthusr’sbytstramofthissgmntSquncnumbrsarusdforstablishingrliabilityHLENisthhadrlngthIttllsuswhrthdatabginsSixbitsarrsrdforfuturusCodBitsdistinguishsssionmanagmntmssagsfromdataWindowisatrmwwillcombacktoinafwslidsFornow,considritthsizofthrcirsbuffrsChcksumisacyclicrdundancychck(CRC)ItrifisthatthdatagramarridintactUrgntPointrisusdtosignifyoutofbanddataOptionsarusdbyndorstonhancthirprotocoloffringThdataportionofthframcontainsthupprlayrprotocoldataPurpos:ThisfigurxplainshowTCPussportnumbrstoconnctapplicationsEmphasiz:ThsportnumbrswrstandardizdinRFC1340ThisRFChasbnobsoltdbyRFC1700Howr,manyofthportnumbrsoutlindinRFC1340arstillbingusdasstandardsItispossibltofiltronTCPportnumbrsThTCPportnumbr,combindwithothrinformation,iswhatUNIXClanguagdloprscallasocktHowr,worksocktshadiffrntmaningsinXNSandNoll,whrthyarsricaccsspointabstractionsorprogrammingintrfacsrathrthansricaccsspointidntifirs Purpos:ThisfigurcontinustoxplainhowTCPussportnumbrs Emphasiz:,tInmostcassthTCPportnumbrononsidofaconrsationisthsamonthothrsidForxampl,whnafiltransfrtaksplachsoftwarononhostiscommunicatingwithaprapplicationonanothrhostInthisxamplwsaTlnt(TCPport23)sssionItispossibltohamultiplTlntsssionsrunningsimultanouslyonahostorroutrTlntslctsanunusdportnumbrabo1023torprsntthsourcportforachindpndntsssionNoticthatthdstinationportisstill23PortnumbringisimportanttoundrstandinordrtoconfigurIPxtnddaccsslistsThlackofsymmtryinportnumbrusisacriticalfactorinstablishingffctiscurity Layr1of3:HostAbginsbysndingaSYNsgmntindicatingthathostAwillussquncnumbrsstartingwithsquncnumbr100Emphasiz:TCPisasimplprotocolintrmsofconnctionstablishmntSomprotocolshadoznsofngotiationmssagsthatartransmittdpriortosssioninitializationTCPimplmntsastratgythatisbothncssaryandsufficintLayr2of3:HostBsndsanACKandacknowldgsthSYNitrcidfromhostAHostBalsosndsaSYNNotthatthacknowldgmntfildindicatshostBisnowxpctingtoharsqunc101,acknowldgingthSYNthatoccupidsqunc100Layr3of3:Inthnxtsgmnt,hostAsndssomdataNotthatthsquncnumbrofthsgmntinstp3isthsamasasthACKinstp2 Emphasiz:ThissquncisliktwopopltalkingThfirstprsonwantstotalktothscond,soshsays,“Iwouldliktotalkwithyou”(SYN)Thscondprsonrsponds,“GoodIwanttotalkwithyou”(SYN,ACK)Thfirstprsonthnsays,“Fin—ltustalkHriswhatIhatosay”(SYN,ACK,DATA)AtthispointithrsidcanbgincommunicatingandithrsidcanbrakthconnctionTCPisaprtopr(balancd)communicationmthod(noprimaryscondary)Not:ThisfigurxplainsTCPconnctionstablishmntFormorinformationrgardingththrwayhandshakinstablishingaTCPconnction,rfrtoRFC793 Layr1of7:ThwindowsizisthnumbrofmssagstransmittdbforthsndrmustwaitforanacknowldgmntWindowsizwasprsntdarlirinthcours,sothisslidisariwThinitialstat,nomssagsbingsntLayr2of7:Datamssag1snt(Snd1,Rci1)Layr3of7:Acknowldgmntmssag2snt(SndACK2,RciACK2)Layr4of7:Datamssag2snt(Snd2,Rci2)Layr5of7:ACKformssag2(SndACK3,RciACK3)Layr6of7:Snd3,Rci3Layr1of7:ACKformssag3(SndACK4,RciACK4)ThissqunchlpstoconythdlayassociatdwithawindowsizofonNot:TCPacknowldgmntsarxpctationalandarsomtimscalldforwardrfrncd,whichmansthatthyrfrtothsgmntthyarxpctingtorci,notthonjustsnt AcknowldgmntfildsizscanbcomanissuwhntransmittingdataatFDDIandATMspdsLayr1of4:Layr1showsthSquncnumbris10Layr2of4:Layr2showsthacknowldgmntnumbris11Layr3of4:Layr3showsthnxtsquncnumbris11 Layr4of4:Layr4showsthacknowldgmntnumbris12 Emphasiz:ThSquncandAcknowldgmntnumbrsardirctionalThslidhighlightsthcommunicationgoinginondirctionThsquncandacknowldgmntstakplacwiththsndronthrightTCPproidsfullduplxcommunication Layr3of5:Inlayr3,thrciingdicacknowldgsthtwofirstbyts,drops3,andadrtissitswindowsizas2Layr4of5:Inlayr3thsndingdictransmits2bytsbutmaintainsawindowsizof2Layr5of5:Inlayr5,thrciingdicacknowldgsth2bytsandstilladrtissitswindowsizas2Purpos:ThisgraphicxplainsthformatofUDP Emphasiz:UDPissimplandfficintbutnotrliablThUDPsgmntformatincludsasourcport,adstinationport,alngthfild,andanoptionalchcksumfildIthasnosquncing,acknowldgmnts,orwindowing Exampl:TFTPussachcksumAtthndofthtransfrifthchcksumdosnotmatchthnthfildidnotmakitThusrisnotifidandmusttypinthcommandagainAsarsult,thusrhasbcomthrliabilitymchanismTransition:ThnxtsctiondiscusssthntworklayrofthOSImodlandhowitcorrspondstothTCPIPintrntlayr Purpos:ThisfigurprsntsalistofthprotocolsopratingatthIntrntlayrEmphasiz:RiwthprotocolsbriflyThyarcordindtailonthcomingpagsRoutingprotocolsarusuallyconsidrdlayrmanagmntprotocolsthatsupportthntworklayr Purpos:ThisfigurxplainswhatiscontaindinanIPdatagram Emphasiz:DiscussthformatofthIPdatagramThcurrntgnrationofIPisrsion4WndthHadrLngth(HLEN)andthTotalLngthinthisxamplbcausthIPOptionsfildallowsaariabllngthTimToLi(TTL)isacountdownfildErystationmustdcrmntthisnumbrbyonorbythnumbrofscondsitholdsontothpacktWhnthcountrrachszro,thtimtolixpirsandthpacktisdroppdTTLkpspacktsfromndlsslywandringthintrntinsarchofnonxistntdstinationsThnxtgnrationofIP(calldIPng)isIPrsion6ItiscordinRFC1752 GoodrfrncsforthistopicarDouglasComr’sbooksonTCPIP Purpos:Thisfigurxplainsthusofthprotocolfild Emphasiz:Protocolnumbrsconnct,ormultiplx,IPtothtransportlayrThsnumbrsarstandardizdinRFC1700Ciscoussthsnumbrsinfiltringwithxtnddaccsslists Purpos:ThisfigurxplainswhichmssagsarICMPmssags Emphasiz:DscribICMPmssagsandping Layr1of4:Purpos:ThisfigurshowshowARPisusdtodtrminanIPaddrss Inlayr1,host1721631ndsthMACaddrssofhost1721632ItsndsanARPrqustmssagLayr2of4:Inlayr2,host1721632isonthsamwirandrcisthARPrqustmssag Layr3of4:Inlayr3,host1721632sndsanARPrplywithitsMACaddrsstohost1721631Layr4of4:Inlayr4,thbulltditmsatthbottomofthslidappar Emphasiz:ARPproidstranslationbtwnntworkanddatalinklayrsDiscusswhyitisncssarytohaamchanismlikARPDscribARPoprationNotallprotocolsusARPSomusothrmthodsforaddrsstranslationNot:Forthmssagtobtransmittduniqulytoasinglintrfaconthmultiaccsslink,itisncssarytobuildaframwiththuniquMACaddrssofthintrfacLayr1of4:Purpos:ThisfigurxplainshowRARPworks Inlayr1,thhostonthlftndsitsIPaddrssItsndsaRARPrqustwithitsMACaddrssLayr2of4:Inlayr2,thhostonthright,functioningasaRARPsrr,mapsthMACaddrsstoanIPaddrssLayr3of4:Inlayr3,thhostonthrightsndsthIPaddrsstothrqustrinaRARPrplymssagLayr4of4:Inlayr4,thbulltditmsapparatthbottomofthslid Emphasiz:RARPisusdtobootdisklssworkstationsorantwork
/
本文档为【OSI七层模型】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
热门搜索

历史搜索

    清空历史搜索