* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Packet Switching
Survey
Document related concepts
Net neutrality wikipedia , lookup
Multiprotocol Label Switching wikipedia , lookup
Distributed firewall wikipedia , lookup
Net neutrality law wikipedia , lookup
Asynchronous Transfer Mode wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Computer network wikipedia , lookup
Network tap wikipedia , lookup
Internet protocol suite wikipedia , lookup
Airborne Networking wikipedia , lookup
Deep packet inspection wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Transcript
Computer Networks 张辉 [email protected] 82317650 Textbook Computer Two exams 60% Project 20% Homework 10% Paper reviews 10% Networking: A Top-Down Approach Featuring the Internet by Kurose and Ross 计算机网络教程 谢希仁 人民邮电出版社(2002年5月) 1: Introduction 1 What Will We Cover? 网络简介 网络体系结构 网络物理层(传输媒介、接口、信号) 数据链路层(网络检错、同步、HDLC、PPP) 局域网技术(Ethernet、Token Ring、Token bus) 网络层(IP 编址、subnetting、VLSM、CIDR) 路由原理(RIP、OSPF、BGP) 传输层(TCP 、UDP) 流量控制、拥塞控制及网络性能 应用层(SMTP、ftp、Web、DNS等) 网络安全及网络管理 网络新技术(MPLS、IPv6、Multicasting等) 1: Introduction 2 Part I: Introduction Chapter goal: get context, overview, “feel” of networking more depth, detail later in course approach: descriptive use Internet as example Overview: what’s the Internet what’s a protocol? network edge network core access net, physical media performance: loss, delay protocol layers, service models backbones, NAPs, ISPs history ATM network 1: Introduction 3 What’s the Internet: “nuts and bolts” view millions of connected computing devices: hosts, end-systems pc’s workstations, servers PDA’s phones router server mobile local ISP running network apps communication links workstation regional ISP fiber, copper, radio, satellite routers: forward packets of data thru network company network 1: Introduction 4 What’s the Internet: “nuts and bolts” view protocols: control sending, receiving of msgs e.g., TCP, IP, HTTP, FTP, PPP Internet: “network of router server workstation mobile local ISP networks” loosely hierarchical public Internet versus private intranet Internet standards RFC: Request for comments IETF: Internet Engineering Task Force regional ISP company network 1: Introduction 5 What’s the Internet: a service view communication infrastructure enables distributed applications: WWW, email, games, ecommerce, database., voting, more? communication services provided: connectionless connection-oriented cyberspace [Gibson]: “a consensual hallucination experienced daily by billions of operators, in every nation, ...." 1: Introduction 6 What’s a protocol? human protocols: “what’s the time?” “I have a question” introductions … specific msgs sent … specific actions taken when msgs received, or other events network protocols: machines rather than humans all communication activity in Internet governed by protocols protocols define format, order of msgs sent and received among network entities, and actions taken on msg transmission, receipt 1: Introduction 7 What’s a protocol? a human protocol and a computer network protocol: Hi TCP connection req. Hi TCP connection reply. Got the time? Get http://gaia.cs.umass.edu/index.htm 2:00 <file> time Q: Other human protocol? 1: Introduction 8 Who is Who on the Internet ? Internet Engineering Task Force (IETF): The IETF is the protocol engineering and development arm of the Internet. Subdivided into many working groups, which specify Request For Comments or RFCs. IRTF (Internet Research Task Force): The Internet Research Task Force is a composed of a number of focused, long-term and small Research Groups. Internet Architecture Board (IAB): The IAB is responsible for defining the overall architecture of the Internet, providing guidance and broad direction to the IETF. The Internet Engineering Steering Group (IESG): The IESG is responsible for technical management of IETF activities and the Internet standards process. Standards. Composed of the Area Directors of the IETF working groups. 1: Introduction 9 Internet Standardization Process All standards of the Internet are published as RFC (Request for Comments). But not all RFCs are Internet Standards ! available: http://www.ietf.org A typical (but not only) way of standardization is: Internet RFC Drafts Proposed Standard Draft Standard (requires 2 working implementation) Internet Standard (declared by IAB) David Clark, MIT, 1992: "We reject: kings, presidents, and voting. We believe in: rough consensus and running code.” 1: Introduction 10 A closer look at network structure: network edge: applications and hosts network core: routers network of networks access networks, physical media: communication links 1: Introduction 11 The network edge: end systems (hosts): run application programs e.g., WWW, email at “edge of network” client/server model client host requests, receives service from server e.g., WWW client (browser)/ server; email client/server peer-peer model: host interaction symmetric e.g.: teleconferencing 1: Introduction 12 Network edge: connection-oriented service Goal: data transfer between end sys. handshaking: setup (prepare for) data transfer ahead of time Hello, hello back human protocol set up “state” in two communicating hosts TCP - Transmission Control Protocol Internet’s connectionoriented service TCP service [RFC 793] reliable, in-order byte- stream data transfer loss: acknowledgements and retransmissions flow control: sender won’t overwhelm receiver congestion control: senders “slow down sending rate” when network congested 1: Introduction 13 Network edge: connectionless service Goal: data transfer between end systems same as before! UDP - User Datagram Protocol [RFC 768]: Internet’s connectionless service unreliable data transfer no flow control no congestion control App’s using TCP: HTTP (WWW), FTP (file transfer), Telnet (remote login), SMTP (email) App’s using UDP: streaming media, teleconferencing, Internet telephony 1: Introduction 14 The Network Core mesh of interconnected routers the fundamental question: how is data transferred through net? circuit switching: dedicated circuit per call: telephone net packet-switching: data sent thru net in discrete “chunks” 1: Introduction 15 Network Core: Circuit Switching End-end resources reserved for “call” link bandwidth, switch capacity dedicated resources: no sharing circuit-like (guaranteed) performance call setup required 1: Introduction 16 Network Core: Circuit Switching network resources (e.g., bandwidth) divided into “pieces” pieces allocated to calls resource piece idle if not used by owning call (no sharing) dividing link bandwidth into “pieces” frequency division time division 1: Introduction 17 Circuit Switching Three phases 1. 2. 3. circuit establishment data transfer circuit termination If circuit not available: “Busy signal” Examples Telephone networks ISDN (Integrated Services Digital Networks) 1: Introduction 18 Circuit Switching A node (switch) in a circuit switching network incoming links Node outgoing links 1: Introduction 19 Network Core: Packet Switching each end-end data stream divided into packets user A, B packets share network resources each packet uses full link bandwidth resources used as needed, Bandwidth division into “pieces” Dedicated allocation Resource reservation resource contention: aggregate resource demand can exceed amount available congestion: packets queue, wait for link use store and forward: packets move one hop at a time transmit over link wait turn at next link 1: Introduction 20 Network Core: Packet Switching 10 Mbs Ethernet A B statistical multiplexing C 1.5 Mbs queue of packets waiting for output link D 45 Mbs E Packet-switching versus circuit switching: human restaurant analogy other human analogies? 1: Introduction 21 Packet Switching Data are sent as formatted bit-sequences, so- called packets. Packets have the following structure: Header Data Trailer • Header and Trailer carry control information (e.g., destination address, check sum) Each packet is passed through the network from node to node along some path (Routing) At each node the entire packet is received, stored briefly, and then forwarded to the next node (Store-and-Forward Networks) Typically no capacity is allocated for packets 1: Introduction 22 Packet Switching A node in a packet switching network incoming links Node outgoing links Memory 1: Introduction 23 Packet switching versus circuit switching Packet switching allows more users to use network! 1 Mbit link each user: 100Kbps when “active” active 10% of time circuit-switching: 10 users N users 1 Mbps link packet switching: with 35 users, probability > 10 active less that .004 1: Introduction 24 Packet switching versus circuit switching Is packet switching a “winner?” Great for bursty data resource sharing no call setup Excessive congestion: packet delay and loss protocols needed for reliable data transfer, congestion control Q: How to provide circuit-like behavior? bandwidth guarantees needed for audio/video apps still an unsolved problem 1: Introduction 25 Packet-switched networks: routing Goal: move packets among routers from source to destination we’ll study several path selection algorithms (chapter 4) datagram network: destination address determines next hop routes may change during session analogy: driving, asking directions virtual circuit network: each packet carries tag (virtual circuit ID), tag determines next hop fixed path determined at call setup time, remains fixed thru call routers maintain per-call state 1: Introduction 26 Packet Switching A Source B R2 R1 R3 Destination R4 It’s the method used by the Internet. Each packet is individually routed packet-by-packet, using the router’s local routing table. The routers maintain no per-flow state. Different packets may take different paths. Several packets may arrive for the same output link at the same time, therefore a packet switch has buffers. 1: Introduction 27 Why does the Internet usepacket switching? 1. Efficient use of expensive links: 2. The links are assumed to be expensive and scarce. Packet switching allows many, bursty flows to share the same link efficiently. “Circuit switching is rarely used for data networks, ... because of very inefficient use of the links” - Gallager Resilience to failure of links & routers: ”For high reliability, ... [the Internet] was to be a datagram subnet, so if some lines and [routers] were destroyed, messages could be ... rerouted” - Tanenbaum Source: Networking 101 1: Introduction 28 Packet Switching A B R2 Source R1 Destination R3 R4 Host A TRANSP1 TRANSP2 R1 “Store-and-Forward” at each Router PROP1 R2 TRANSP3 PROP2 TRANSP4 R3 Host B PROP3 PROP4 Minimum end to end latency (TRANSPi PROPi ) i 1: Introduction 29 Packet Switching Why not send the entire message in one packet? M/R M/R Host A Host A R1 R1 R2 R2 R3 R3 Host B Latency ( PROPi M / Ri ) i Host B Latency M / Rmin PROPi i Breaking message into packets allows parallel transmission across all links, reducing end to end latency. It also prevents a link from being “hogged” for a long time by one message. 1: Introduction 30 Access networks and physical media Q: How to connection end systems to edge router? residential access nets institutional access networks (school, company) mobile access networks Keep in mind: bandwidth (bits per second) of access network? shared or dedicated? 1: Introduction 31 Residential access: point to point access Dialup via modem up to 56Kbps direct access to router (conceptually) ISDN: intergrated services digital network: 128Kbps alldigital connect to router ADSL: asymmetric digital subscriber line up to 1 Mbps home-to-router up to 8 Mbps router-to-home 1: Introduction 32 Residential access: cable modems HFC: hybrid fiber coax asymmetric: up to 10Mbps upstream, 1 Mbps downstream network of cable and fiber attaches homes to ISP router shared access to router among home deployment: available via cable companies, e.g., MediaOne 1: Introduction 33 Institutional access: local area networks company/univ local area network (LAN) connects end system to edge router Ethernet: shared or dedicated cable connects end system and router 10 Mbs, 100Mbps, Gigabit Ethernet deployment: institutions, home LANs soon 1: Introduction 34 Wireless access networks shared wireless access network connects end system to router wireless LANs: radio spectrum replaces wire e.g., Lucent Wavelan 10 Mbps router base station wider-area wireless access CDPD: wireless access to ISP router via cellular network mobile hosts 1: Introduction 35 Physical Media physical link: transmitted data bit propagates across link guided media: signals propagate in solid media: copper, fiber unguided media: signals propagate freelye.g., radio Twisted Pair (TP) two insulated copper wires Category 3: traditional phone wires, 10 Mbps ethernet Category 5 TP: 100Mbps ethernet 1: Introduction 36 Physical Media: coax, fiber Coaxial cable: wire (signal carrier) within a wire (shield) baseband: single channel on cable broadband: multiple channel on cable bidirectional common use in 10Mbs Fiber optic cable: glass fiber carrying light pulses high-speed operation: 100Mbps Ethernet high-speed point-to-point transmission (e.g., 5 Gps) low error rate Ethernet 1: Introduction 37 Physical media: radio signal carried in electromagnetic spectrum no physical “wire” bidirectional propagation environment effects: reflection obstruction by objects interference Radio link types: microwave e.g. up to 45 Mbps channels LAN (e.g., waveLAN) 2Mbps, 11Mbps wide-area (e.g., cellular) e.g. CDPD, 10’s Kbps satellite up to 50Mbps channel (or multiple smaller channels) 270 Msec end-end delay geosynchronous versus LEOS 1: Introduction 38 Delay in packet-switched networks packets experience delay on end-to-end path four sources of delay at each hop transmission A nodal processing: check bit errors determine output link queueing time waiting at output link for transmission depends on congestion level of router propagation B nodal processing queueing 1: Introduction 39 Delay in packet-switched networks Transmission delay: R=link bandwidth (bps) L=packet length (bits) time to send bits into link = L/R transmission A Propagation delay: d = length of physical link s = propagation speed in medium (~2x108 m/sec) propagation delay = d/s Note: s and R are very different quantitites! propagation B nodal processing queueing 1: Introduction 40 Queueing delay (revisited) R=link bandwidth (bps) L=packet length (bits) a=average packet arrival rate traffic intensity = La/R La/R ~ 0: average queueing delay small La/R -> 1: delays become large La/R > 1: more “work” arriving than can be serviced, average delay infinite! 1: Introduction 41 Protocol “Layers” Networks are complex! many “pieces”: hosts routers links of various media applications protocols hardware, software Question: Is there any hope of organizing structure of network? Or at least our discussion of networks? 1: Introduction 42 Organization of air travel ticket (purchase) ticket (complain) baggage (check) baggage (claim) gates (load) gates (unload) runway takeoff runway landing airplane routing airplane routing airplane routing a series of steps 1: Introduction 43 Organization of air travel: a different view ticket (purchase) ticket (complain) baggage (check) baggage (claim) gates (load) gates (unload) runway takeoff runway landing airplane routing airplane routing airplane routing Layers: each layer implements a service via its own internal-layer actions relying on services provided by layer below 1: Introduction 44 Layered air travel: services Counter-to-counter delivery of person+bags baggage-claim-to-baggage-claim delivery people transfer: loading gate to arrival gate runway-to-runway delivery of plane airplane routing from source to destination 1: Introduction 45 ticket (purchase) ticket (complain) baggage (check) baggage (claim) gates (load) gates (unload) runway takeoff runway landing airplane routing airplane routing arriving airport Departing airport Distributed implementation of layer functionality intermediate air traffic sites airplane routing airplane routing airplane routing 1: Introduction 46 Why layering? Dealing with complex systems: explicit structure allows identification, relationship of complex system’s pieces layered reference model for discussion modularization eases maintenance, updating of system change of implementation of layer’s service transparent to rest of system e.g., change in gate procedure doesn’t affect rest of system layering considered harmful? 1: Introduction 47 An Example: No Layering Application Transmission Media Telnet coaxial cable FTP fiber optic HTTP packet radio No layering: each new application has to be re-implemented for every network technology! 1: Introduction 48 An Example: Benefit of Layering Solution: introduce an intermediate layer that provides a common abstraction for various network technologies Application Telnet HTTP FTP Transport & Network Transmission Media coaxial cable fiber optic packet radio 1: Introduction 49 ISO OSI Reference Model Seven layers lower three layers are hop-by-hop next four layers are end-to-end Application Presentation Session Transport Network Datalink Physical Network Datalink Physical Physical medium Application Presentation Session Transport Network Datalink Physical 1: Introduction 50 Internet Layering and OSI Layering OSI: conceptually define: service, interface, protocol Internet: provide a successful implementation Application Presentation Session Transport Network Datalink Physical Application Transport Internet Host-tonetwork Telnet FTP DNS TCP UDP IP LAN Packet radio 1: Introduction 51 Internet protocol stack application: supporting network applications ftp, smtp, http transport: host-host data transfer tcp, udp network: routing of datagrams from source to destination ip, routing protocols link: data transfer between neighboring network elements ppp, ethernet application transport network link physical physical: bits “on the wire” 1: Introduction 52 Layering: logical communication Each layer: distributed “entities” implement layer functions at each node entities perform actions, exchange messages with peers application transport network link physical application transport network link physical network link physical application transport network link physical application transport network link physical 1: Introduction 53 Layering: logical communication E.g.: transport take data from app add addressing, reliability check info to form “datagram” send datagram to peer wait for peer to ack receipt analogy: post office data application transport transport network link physical application transport network link physical ack data network link physical application transport network link physical data application transport transport network link physical 1: Introduction 54 Layering: physical communication data application transport network link physical application transport network link physical network link physical application transport network link physical data application transport network link physical 1: Introduction 55 Protocol layering and data Each layer takes data from above adds header information to create new data unit passes new data unit to layer below source M Ht M Hn Ht M Hl Hn Ht M application transport network link physical destination application Ht transport Hn Ht network Hl Hn Ht link physical M message M segment M M datagram frame 1: Introduction 56 Internet structure: network of networks roughly hierarchical national/international local ISP backbone providers (NBPs) e.g. BBN/GTE, Sprint, AT&T, IBM, UUNet interconnect (peer) with each other privately, or at public Network Access Point (NAPs) regional ISPs connect into NBPs local ISP, company connect into regional ISPs regional ISP NBP B NAP NAP NBP A regional ISP local ISP 1: Introduction 57 National Backbone Provider e.g. BBN/GTE US backbone network 1: Introduction 58 Internet History 1961-1972: Early packet-switching principles 1961: Kleinrock - queueing theory shows effectiveness of packetswitching 1964: Baran - packetswitching in military nets 1967: ARPAnet conceived by Advanced Reearch Projects Agency 1969: first ARPAnet node operational 1972: ARPAnet demonstrated publicly NCP (Network Control Protocol) first hosthost protocol first e-mail program ARPAnet has 15 nodes 1: Introduction 59 A Brief History of the Internet 1969 ARPANET commissioned: 4 nodes, 50kbps 1: Introduction 60 Initial Expansion of the ARPANET Dec. 1969 July 1970 Apr. 1972 March 1971 Sep. 1972 1: Introduction 61 Internet History 1972-1980: Internetworking, new and proprietary nets 1970: ALOHAnet satellite network in Hawaii 1973: Metcalfe’s PhD thesis proposes Ethernet 1974: Cerf and Kahn architecture for interconnecting networks late70’s: proprietary architectures: DECnet, SNA, XNA late 70’s: switching fixed length packets (ATM precursor) 1979: ARPAnet has 200 nodes Cerf and Kahn’s internetworking principles: minimalism, autonomy no internal changes required to interconnect networks best effort service model stateless routers decentralized control define today’s Internet architecture 1: Introduction 62 Internet History 1980-1990: new protocols, a proliferation of networks 1983: deployment of TCP/IP 1982: smtp e-mail protocol defined 1983: DNS defined for name-to-IPaddress translation 1985: ftp protocol defined 1988: TCP congestion control new national networks: Csnet, BITnet, NSFnet, Minitel 100,000 hosts connected to confederation of networks 1: Introduction 63 Internet History 1990’s: commercialization, the WWW Early 1990’s: ARPAnet decomissioned 1991: NSF lifts restrictions on commercial use of NSFnet (decommissioned, 1995) early 1990s: WWW hypertext [Bush 1945, Nelson 1960’s] HTML, http: Berners-Lee 1994: Mosaic, later Netscape late 1990’s: commercialization of the Late 1990’s: est. 50 million computers on Internet est. 100 million+ users backbone links runnning at 1 Gbps WWW 1: Introduction 64 Internet主干结构 1: Introduction 65 1: Introduction 66 租用至亚洲的 的线路 美国主干 地区网 租用横穿大西 洋的线路 隧道 欧洲主干 国家网 1 IP令牌总线局域网 2 IP令牌环局域网 IP以太局域网 1: Introduction 67 Internet Physical Infrastructure Local/Regional ISP Residential Access Modem DSL Cable modem Campus network access Ethernet FDDI Wireless Access to ISP, Backbone transmission Local/Regional ISP Backbone: National ISP Internet Service T1/T3, OC-3, OC-12 ATM, SONET, WDM Providers Point of Presence (POP) 1: Introduction 68 Growth of the Internet in Terms of Number of Hosts Number of Hosts on the Internet: Aug. 1981 213 Oct. 1984 1,024 Dec. 1987 28,174 Oct. 1990 313,000 Oct. 1993 2,056,000 Apr. 1995 5,706,000 Jul. 1997 19,540,000 Jul. 2000 93,047,000 Jul. 2001 125,888,000 1,000,000,000 100,000,000 10,000,000 1,000,000 100,000 10,000 1,000 100 10 1 1981 1984 1987 1990 1993 1996 1999 1: Introduction 69 Chapter 1: Summary Covered a “ton” of material! Internet overview what’s a protocol? network edge, core, access network performance: loss, delay layering and service models backbones, NAPs, ISPs history ATM network You now hopefully have: context, overview, “feel” of networking more depth, detail later in course 1: Introduction 70