您好,欢迎访问三七文档
2020/1/301Chapter2TheWayNetworksWorkSection2.1------Ethernet-------chapter4Section2.2------Internet--------chapter3Section2.3------ATM-------------chapter5Section2.4------OSImodelsThischapterisasurveyofdifferentnetworktechnologies.Ourobjectiveistointroducetheoperatingprinciplesofthesetechnologiesandtoprovidea“big-picture”lookatnetworks2020/1/3022.1Ethernet以太网Wefirstexplainhowthecomputersexchangepackets.Wethenexplorehowthecomputersdiscovertheaddressestheyneedforthepackets.Finally,weexaminetheinterconnectionofEthernets2020/1/3032.1.1SharedEthernet:HubsandCollisions共享型以太网layout布局(10BASE-TEthernet)Twistedwirepairsconnecteachcomputertoahub.Thecomputerattachedtothesamehubaresaidtobeinthesame“collisiondomain”(冲突域)Eachcomputerhasaname(域名),anetworkaddressandanEthernetaddress.ARPtablepacketWirepairsHubyEthernetaddress124NetworkaddressName“tse”x,ydata124:y105:zFigure2.12020/1/304HubHub:是一个信号再生转发设备,它使多个用户通过端口用双绞线与网络设备连结,一个Hub通常具有8个以上的连接端口。Hub的每个端口互相独立,即一个端口的故障不会影响其他端口的状态。ThehubrepeatsincomingpacketsonitsotherportsThehubInformsthecomputersof“collision”thatoccurswhentwoormorepacketsarriveatthehubatthesametime2020/1/305packetComputerstransmitinformationintheformofpacket(分组,数据包).Toidentifythesourceandthedestinationofapacket,thesendingcomputermarksthepacketwithitsEthernetaddressandwiththatofthedestination.Inthisway,thecomputersontheEthernetcansendpacketstooneanother.x,ydatapacketSourceEthernetaddress(48-bitstring)destinationEthernetaddress(48-bitstring)2020/1/306TransmissionrateThreeversions:differinhowtheytransmitthebitsEthernet:10MbpsFastEthernet:100MbpsGigabitEthernet(千兆位以太网):1Gbps实际上,不管是10Mbps的Ethernet或是100Mbps的FastEthernet,对于一个二进制位来说,从一个点传输到另一个点所花的时间基本上是相同的。主要的差别在于,与低速网络技术相比,高速网络每秒可以传输更多的二进制位。即在使用高速网络技术的情况下,电缆或光缆上传输的信息密度较大。2020/1/307Collision(冲突)SharedEthernet(共享式以太网):allthecomputerssharethesamewireallthenodessharethesametransmissionmediumPhysical:star-topologyLogic:bus-topologyThecomputerstaketurnstransmittingtheirpackets.serverworkstationHubHubtransmissionmedium2020/1/308Whathappensiftwocomputersstarttransmittingatthesametime?ThehubseestwopacketsarrivingatthesametimeontwodifferentportsThehubthenknowsthatitcannottransmitthesetwodifferentsignalsatthesametimeonitsotherportsbecausetheywouldclobbereachother.同一时刻,两个不同的信号不能在其他端口传输,否则它们相互之间会发生碰撞。2020/1/309Figure:asharedEthernetIfnodeAwantssendapackettonodeE,thehubreceivethepacketandsendthispackettoallnodes.Iftwonodestrytotransmitpacketatthesametime,thentheywouldclobbereachother.HubABCDE2020/1/3010Collision(冲突)Step1:Thehubsendsoutasignaltoallthecomputerstowarnthemthata“collision”isoccurring.Step2:Thecomputersthataretransmittingstopwhentheygetthecollisionwarning.2020/1/3011Step3:Thecomputerswaitforsomerandomtimebeforetheytryagaintotransmittheirpackets.结点应延迟等待一段随机时间,再重发刚才受损的信息。如果重发时又发生冲突,则应等待一段更长的时间,为的是尽量减少下一次冲突。各结点延迟的时间量采用随机数控制,只要随机数不同,各结点延迟的时间也就不同。延迟时间量最小的抢先占用传输介质,再次发送信息。2020/1/3012CSMA/CDMediaaccesscontrolprotocol---介质访问控制协议用来确定在任一给定时间内由哪个结点(工作站)来访问公共的传输介质。Ethernet-----CSMA/CD---carriersensemultipleaccesswithcollisiondetection(载波监听多路访问/冲突检测)多个工作站都监听传输介质,直到检测不到任何信号(载波监听),这时再访问传输介质(多路访问),边传输边检测看是否有多个信号存在(冲突检测),每个工作站在其认为网络空闲时进行信号传输。如果发生冲突,执行上面三步。2020/1/30133.1DiscoveringAddresses:ARPandRARPARP:AddressResolutionProtocol地址转换协议Whensendingapackettoanothercomputer,acomputerreferstothedestinationbyits“networkaddress”.2020/1/3014Networkaddress(IPaddress)Thenetworkaddressisbasedonthelocationofthecomputer.usedbythenetworktoforwardthepackettoitsdestination.isindependentoftheEthernetaddress.2020/1/3015However,tosendthepacketthesendingcomputermustattachthedestination’sEthernetaddress.nodenodepc/workstation/routerEthernetaddresspacketNetworkaddress:105Ethernetaddress:zARPmap2020/1/3016ARP当一台主机,不管是工作站还是路由器,把一个包发送到Ethernet网络上另一个结点时,包要发送的真正地址是Ethernet或物理地址。如果我们的主机即工作站和路由器,想要给网络地址(IP地址)发送一个包,那么主机必须确定具有指定网络地址的主机的Ethernet地址。这种映射IP地址到Ethernet地址的过程称为地址转换(addressresolution),所使用的协议称为ARP协议。2020/1/3017NaiveStrategy(procedure)Allocate“networkaddresses”tothecomputersonourEthernet----networkmanagerThenetworkmanagergoestoeachcomputerandrunsalittleprogramthatreadstheinternalEthernetaddressofthecomputer.Thenetworkmanagerthenwritesaconfigurationfile“My-Address”intoeachcomputerthattellsthecomputeritsnetworkaddress.2020/1/3018Thenetworkmanagergoesbacktoeachcomputerandcompletesaconfigurationfile“List”whichliststhenetworkaddressandEthernetaddressofeverycomputerattachedtotheEthernet.2020/1/3019ARP:improvethethirdstepEachcomputerhasafile”My-Address”withitsownnetworkaddressandafile“List”thatisinitiallyempty.37:xMy-addressemptylist124:yemptyMy-addresslist“37”x“124”y2020/1/3020Mycomputersendsabroadcastmessage(广播信息)ontheEthernetasking”ifyouare124,pleasereplytome”“37”xSendsabroadcastmessage(broadcastaddress)“ifyouare124,pleasereplytome”2020/1/3021Thecomputer”124”repliesto“37”whichwantstofindouttheEthernetaddressof“124”,sayy,byreadingtheEthernetsourceaddressofthatreply.Mycomputerthenwritesanentryintoitsfile”List”.Thatentrysays”124=y”37:xMy-address124:ylist124:yemptyMy-addr
本文标题:通信网基础新第2章
链接地址:https://www.777doc.com/doc-3390428 .html