第一章计算机网络体系结构与Internet2012.ppt
计算机网络体系结构与Internet史长琼长沙理工大学提纲u网络基本概念uInternet简介u协议分层和OSI参考模型提纲u网络基本概念网络基本概念uInternet简介u协议分层和OSI参考模型Whats a networkunetwork edge:millions of end-system devices:pcs workstations,serversPDAs,phones,toastersrunning network appsunetwork core:routers,switches forwarding datapackets:packet switchingcalls:circuit switchingucommunication linksfiber,copper,radio,local netcompanynetregional netrouterworkstationservermobile“Cool”Internet appliancesWorlds smallest web serverhttp:/www-ccs.cs.umass.edu/shri/iPic.htmlIP picture framehttp:/ toaster+weather forecasterWhats a protocol?a human protocol and a computer network protocol:HiHiGot thetime?2:00TCP connection req.TCP connectionreply.Get http:/ a protocol?human protocols:u“whats the time?”u“I have a question”uIntroductionsnetwork protocols:umachines rather than humansuall communication activity in Internet governed by protocols specific msgs sent specific actions taken when msgs received,or other eventsWhats a protocol?uprotocols define format,order of msgs sent and received among network entities,and actions taken on msg transmission,receipt A closer look at network structureunetwork edge:applications and hostsunetwork core:routersnetwork of networksuaccess networks,physical media:communication linksThe network edgeuend systems(hosts)run application programse.g.,WWW,emailat“edge of network”uclient/server modelclient host requests,receives service from servere.g.,WWW client(browser)/server;email client/serverupeer-peer modelhost interaction symmetrice.g.:BT,Maze,e-Donkey The network coreumesh of interconnected routersuthe fundamental question:how is data transferred through net?circuit switching:dedicated circuit per call:telephone netpacket-switching:data sent thru net in discrete“chunks”uCommunication networks can be classified based on the way in which the nodes exchange information:A Taxonomy of Communication NetworksCommunication Communication NetworkNetworkSwitchedSwitchedCommunication Communication NetworkNetworkBroadcastBroadcastCommunication Communication NetworkNetworkCircuit-SwitchedCircuit-SwitchedCommunication Communication NetworkNetworkPacket-SwitchedPacket-SwitchedCommunication Communication NetworkNetworkDatagramDatagram Network NetworkVirtual Circuit NetworkVirtual Circuit NetworkuBroadcast communication networksInformation transmitted by any node is received by every other node in the networkE.g.,LANs(Ethernet,Wavelan)Problem:coordinate the access of all nodes to the shared communication medium(Multiple Access Problem)uSwitched communication networksInformation is transmitted to a sub-set of designated nodesE.g.,WANs(Telephony Network,Internet)Problem:how to forward information to intended node(s)Done by special nodes(e.g.,routers,switches)running routing protocols Broadcast vs.Switched Communication Networks uCommunication networks can be classified based on the way in which the nodes exchange information:A Taxonomy of Communication NetworksCircuit-SwitchedCircuit-SwitchedCommunication Communication NetworkNetworkCommunication Communication NetworkNetworkSwitchedSwitchedCommunication Communication NetworkNetworkBroadcastBroadcastCommunication Communication NetworkNetworkPacket-SwitchedPacket-SwitchedCommunication Communication NetworkNetworkDatagramDatagram Network NetworkVirtual Circuit NetworkVirtual Circuit NetworkCircuit SwitchinguThree phases1.circuit establishment2.data transfer3.circuit terminationuIf circuit not available:“Busy signal”uExamplesTelephone networksISDN(Integrated Services Digital Networks)Timing in Circuit SwitchingDATACircuit Establishment Data Transmission Circuit Termination propagation delay between Host 1 and Node 1propagation delay between Host 2 and Node 1processing delay at Node 1Circuit SwitchinguA node(switch)in a circuit switching networkincoming linksoutgoing linksNodeuCommunication networks can be classified based on the way in which the nodes exchange information:A Taxonomy of Communication NetworksCommunication Communication NetworkNetworkSwitchedSwitchedCommunication Communication NetworkNetworkBroadcastBroadcastCommunication Communication NetworkNetworkCircuit-SwitchedCircuit-SwitchedCommunication Communication NetworkNetworkPacket-SwitchedPacket-SwitchedCommunication Communication NetworkNetworkDatagramDatagram Network NetworkVirtual Circuit NetworkVirtual Circuit NetworkPacket SwitchinguData are sent as formatted bit-sequences,so-called packetsuPackets have the following structure:Header and Trailer carry control information(e.g.,destination address,check sum)uEach packet is passed through the network from node to node along some path(Routing)uAt each node the entire packet is received,stored briefly,and then forwarded to the next node(Store-and-Forward Networks)uTypically no capacity is allocated for packetsPacket SwitchinguA node in a packet switching networkincoming linksoutgoing linksNodeMemoryHow do loss and delay occur?packets queue in router buffers upacket arrival rate to link exceeds output link capacityupackets queue,wait for turnABpacket being transmitted(delay)packets queueing(delay)free(available)buffers:arriving packets dropped(loss)if no free buffers提纲u网络基本概念uInternet简介简介u协议分层和OSI参考模型The InternetuGlobal scale,general purpose,heterogeneous-technologies,public,computer networkuInternet ProtocolOpen standard:Internet Engineering Task Force(IETF)as standard body(http:/www.ietf.org)Technical basis for other types of networksIntranet:enterprise IP networkuDeveloped by the research communityGrowth of the InternetuNumber of Hosts on the Internet:Aug.1981 213Oct.1984 1,024Dec.1987 28,174 Oct.1990 313,000 Oct.1993 2,056,000Apr.1995 5,706,000Jan.1997 16,146,000Jan.1999 56,218,000Jan.2001 109,374,000Jan.2003 171,638,297Jan.2006 394,991,609 Data available at:http:/www.isc.org/Services Provided by the InternetuShared access to computing resourcesTelnet(1970s)uShared access to data/filesFTP,NFS,AFS(1980s)uCommunication medium over which people interactEmail(1980s),on-line chat rooms(1990s)Instant messaging,IP Telephony(2000s)Services Provided by the InternetuA medium for information disseminationUSENET (1980s)WWW(1990s)Replacing newspaper,magazine?Audio,video(2000s)Replacing radio,CD,TVInternet structure:network of networksuroughly hierarchicaluat center:“tier-1”ISPs(e.g.,UUNet,BBN/Genuity,Sprint,AT&T),national/international coveragetreat each other as equalsTier 1 ISPTier 1 ISPTier 1 ISPTier-1 providers interconnect(peer)privatelyNAPTier-1 providers also interconnect at public network access points(NAPs)Tier-1 ISP:e.g.,SprintSprint US backbone networkSeattleAtlantaChicagoRoachdaleStocktonSan JoseAnaheimFort WorthOrlandoKansas CityCheyenneNew YorkPennsaukenRelayWash.DCTacomaDS3(45 Mbps)OC3(155 Mbps)OC12(622 Mbps)OC48(2.4 Gbps)to/from customerspeering to/from backbonePOP:point-of-presenceInternet structure:network of networksu“Tier-2”ISPs:smaller(often regional)ISPsConnect to one or more tier-1 ISPs,possibly other tier-2 ISPsTier 1 ISPTier 1 ISPTier 1 ISPNAPTier-2 ISPTier-2 ISPTier-2 ISPTier-2 ISPTier-2 ISPTier-2 ISP pays tier-1 ISP for connectivity to rest of Internetq tier-2 ISP is customer oftier-1 providerTier-2 ISPs also peer privately with each other,interconnect at NAPInternet structure:network of networksu“Tier-3”ISPs and local ISPs last hop(“access”)network(closest to end systems)Tier 1 ISPTier 1 ISPTier 1 ISPNAPTier-2 ISPTier-2 ISPTier-2 ISPTier-2 ISPTier-2 ISPlocalISPlocalISPlocalISPlocalISPlocalISPTier 3ISPlocalISPlocalISPlocalISPLocal and tier-3 ISPs are customers ofhigher tier ISPsconnecting them to rest of InternetInternet structure:network of networksua packet passes through many networks!Tier 1 ISPTier 1 ISPTier 1 ISPNAPTier-2 ISPTier-2 ISPTier-2 ISPTier-2 ISPTier-2 ISPlocalISPlocalISPlocalISPlocalISPlocalISPTier 3ISPlocalISPlocalISPlocalISPTry a traceroute!Internet GraphAccess NetworksQ:How to connect end systems to edge router?uresidential access netsuinstitutional access networks(school,company)umobile access networksKeep in mind:ubandwidth(bits per second)of access network?ushared or dedicated?Residential access:point to point accessuDialup via modemup to 56Kbps direct access to router(often less)uISDN:integrated services digital network128kbps+regular phone lineuADSL:asymmetric digital subscriber lineup to 1 Mbps upstream(today typically 256 kbps)up to 8 Mbps downstream(today typically 1 Mbps)FDM:50 kHz-1 MHz for downstreamResidential access:cable modemsuHFC:hybrid fiber coaxasymmetric:up to 10Mbps upstream,30 Mbps downstreamunetwork of cable and fiber attaches homes to ISP routershared access to router among homeissues:congestion,dimensioning udeployment:available via cable companies,e.g.,ComCastResidential access:cable modemsDiagram:http:/ Network Architecture:Overviewhomecable headendcable distributionnetwork(simplified)Typically 500 to 5,000 homesCable Network Architecture:Overviewhomecable headendcable distributionnetworkserver(s)Cable Network Architecture:Overviewhomecable headendcable distributionnetwork(simplified)Cable Network Architecture:Overviewhomecable headendcable distributionnetworkChannelsVIDEOVIDEOVIDEOVIDEOVIDEOVIDEODATADATACONTROL123456789FDM:Company access:local area networksucompany/univ local area network(LAN)connects end system to edge routeruEthernet:shared or dedicated link(switched Ethernet)connects end system and router10 Mbs,100Mbps,Gigabit Ethernetudeployment:institutions,home LANs happening nowTo/From ISPWireless access networksushared wireless access network connects end system to routervia base station aka“access point”uwireless LANs:802.11b:11 Mbps802.11g:54 Mbpsuwider-area wireless accessprovided by telecom operator3G 384 kbpsWill it happen?WAP/GPRS in EuropeGPRS/CDMA in ChinabasestationmobilehostsrouterHome networksTypical home network components:uADSL or cable modemurouter/firewall/NATuEthernetuwireless access pointwirelessaccess pointwirelesslaptopsrouter/firewallcablemodemto/fromcableheadendEthernet(switched)提纲u网络基本概念uInternet简介u协议分层和协议分层和OSI参考模型参考模型What is Layering?uA technique to organize a network system into a succession of logically distinct entities,such that the service provided by one entity is solely based on the service provided by the previous(lower level)entityWhy Layering?uNo layering:each new application has to be re-implemented for every network technology!Telnet FTPNFSPacketradioCoaxial cableFiberopticApplicationTransmissionMediaHTTPWhy Layering?uSolution:introduce an intermediate layer that provides a unique abstraction for various network technologiesTelnet FTPNFSPacketradioCoaxial cableFiberopticApplicationTransmissionMediaHTTPIntermediate layerLayeringuAdvantagesModularity protocols easier to manage and maintainAbstract functionality lower layer can be changed without affecting the upper layerReuse upper layer can reuse the functionality provided by lower layer uDisadvantagesInformation hiding inefficient implementations LayeringuLayer N software on the destination computer must receive exactly the message sent by layer N software on the sending computeruMathematically,if the sender applies a transformation T,the receiver must apply the inverse T-1uRecall the concept of“protocol”ISO OSI Reference ModeluISO International Standard OrganizationuOSI Open System InterconnectionuStarted to 1978;first standard 1979ARPANET started in 1969;TCP/IP protocols ready by 1974uGoal:a general open standard Allow vendors to enter the market by using their own implementation and protocols ISO OSI Reference ModeluSeven layersLower three layers are peer-to-peerNext four layers are end-to-endApplicationPresentationSessionTransportNetworkDatalinkPhysicalApplicationPresentationSessionTransportNetworkDatalinkPhysicalNetworkDatalinkPhysicalPhysical mediumData TransmissionuA layer can use only the service provided by the layer immediate below ituEach layer may change and add a header to data packetdatadatadatadatadatadatadatadatadatadatadatadatadatadataOSI Model ConceptsuService says what a layer doesuInterface says how to access the service uProtocol says how is the service implementedA set of rules and formats that govern the communication between two peersPhysical MediauBit:propagates betweentransmitter/rcvr pairsuphysical link:what lies between transmitter&receiveruguided media:signals propagate in solid media:copper,fiber,coaxuunguided media:signals propagate freely,e.g.,radioTwisted Pair(TP)utwo insulated copper wiresCategory 3:traditional phone wires,10 Mbps EthernetCategory 5 TP:100Mbps EthernetPhysical Media:coax,fiberCoaxial cable:utwo concentric copper conductorsubidirectionalubaseband:single channel on cablelegacy Ethernetubroadband:multiple channel on cableFiber optic cable:uglass fiber carrying light pulses,each pulse a bituhigh-speed operation:high-speed point-to-point transmission(e.g.,10 Gbps)ulow error rate:repeaters spaced far apart;immune to electromagnetic noisePhysical media:radiousignal carried in electromagnetic spectrumuno physical“wire”ubidirectionalupropagation environment effects:reflection obstruction by objectsinterferenceRadio link types:uterrestrial microwavee.g.up to 45 Mbps channelsuLAN(e.g.,WaveLAN)2Mbps,11Mbps,55Mbpsuwide-area(e.g.,cellular)e.g.3G:hundreds of kbpsusatelliteup to 50Mbps channel(or multiple smaller channels)270 msec end-end delaygeosynchronous versus LEOSPhysical media:radioPhysical LayeruService:move the information between two systems connected by a physical linkuInterface:specifies how to send a bit uProtocol:coding scheme used to represent a bit,voltage levels,duration of a bituExamples:coaxial cable,optical fiber links;transmitters,receivers 物理层的四个重要特性u机械特性(mechanical characteristics)主要定义物理连接的边界点,即接插装置规定物理连接所采用的规格、引脚的数量和排列u电气特性(electrical characteristics)规定传输二进制位时,线路上信号的电压高低、阻抗匹配、传输速率和距离限制u功能特性(functional characteristics)主要定义各条物理线路的功能u规程特性(procedural characteristics)主要定义各条物理线路的工作规程和时序关系Datalink Layer(2)uService:Framing,i.e.,attach frames separator Send data frames between peers attached to the same physical mediaOthers(optional):Arbitrate the access to common physical mediaEnsure reliable transmissionProvide flow controluInterface:send a data unit(packet)to a machine connected to the same physical mediauProtocol:layer addresses,implement Medium Access Control(MAC)(e.g.,CSMA/CD)Framingu将比特流分成离散的帧,并计算每个帧的校验和u成帧方法:字符计数法在帧头中用一个域来表示整个帧的字符个数缺点:若计数出错,对本帧和后面的帧有影响带字符填充的标记字符定界法标记字符FLAG字符填充缺点:局限于8位字符和ASCII字符传送FramingFraming带位填充的首尾标记定界法帧的起始和结束都用一个特殊的位串“01111110”,称为标记(flag)“0”比特插入删除技术,连续5个1后面加一个0Framing物理层编码违例法802 LAN 曼彻斯特编码或差分曼彻斯特编码用high-low pair/low-high pair表示1/0,high-high/low-low不表示数据,可以用来做定界符只适用于物理层编码有冗余的网络u注意:在很多数据链路协议中,使用字符计数法和一种其它方法的组合Random Access ProtocolsuWhen node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodesutwo or more transmitting nodes-“collision”urandom access MAC protocol specifies:how to detect collisionshow to recover from collisions(e.g.,via delayed retransmissions)uExamples of random access MAC protocols:ALOHA slotted ALOHACSMA,CSMA/CD,CSMA/CA局域网链路层协议u纯