1、计算机网络全册配套计算机网络全册配套完整教学课件完整教学课件312Computer Networking3What is networkrThe architecture of interconnecting end systems rmultiple networks:mTelecommunication networksmTV networksmComputer networksr21 century is information time centralized on networkmDigitalizing, networking, informationmIndustry econo
2、my knowledge based economyrInternet is the greatest innovation of human communication from printing4What is this course about?Introductory (first) course in computer networkingrlearn concepts of computer networkingrlearn principles of computer networkingrlearn practice of computer networkingrInterne
3、t architecture/protocols as case study by the time you are finished Goals:rlearn a lot (not just concepts, but principles and practice)rhave fun (well, it should be interesting, at least)5Course InformationrIntroductory (first) course in computer networkingrWho is this course for?mUndergrads, MS stu
4、dentsrPrerequisites:mAlgorithms, Operating Systems, programming skillsrCourse materials:mtext: Computer Networking: A Top Down Approach, J. Kurose & Keith Ross, Addison Wesley, 2009m4th edition6About the Examprojects and homework assn: 20%Participation: 10%final exam 70%7Course Overview:Part 1: Intr
5、oduction What is the Internet, What is a protocol? rNetwork edge, network core, network access rPhysical media rDelay, loss in packet-switched networks rProtocol layers, service models rInternet backbones, NAPs and ISPs rA brief history of networking, Internet8A top-down approach:Well cover networki
6、ng top-downrend-system applications, end-end transportrnetwork core: routing, hooking nets togetherrlink-level protocols, e.g., Ethernetrother stuff: security, management, multimedia9Course Overview:Part 2: Application Layer rPrinciples of application-layer protocols rThe World Wide Web: HTTP rFile
7、transfer: FTP rElectronic mail in the Internet rThe Internets directory service: DNS rSocket programming PROGRAMMING ASSIGNMENT 1 10Course Overview:Part 3: Transport Layer rTransport-layer services and principles rMultiplexing and demultiplexing applications rConnectionless transport: UDP rPrinciple
8、s of reliable of data transfer rTCP case study PROGRAMMING ASSIGNMENT 2rPrinciples of congestion control rTCP congestion control 11Course Overview:Part 4: Network Layer rIntroduction and network service model rRouting principles PROGRAMMING ASSIGNMENT 3 rHierarchical routing rIP: the Internet Protoc
9、olrIPv6 rRouting in the Internet rWhats inside a router?rMulticasting 12Course Overview:Part 5: Link Layer, LANs rIntroduction, services rError detection, correction rMultiple access protocols, LANs rLAN addresses, ARP rEthernet rHubs, bridges, switches rWireless LANs: IEEE 802.11 rPPP: the Point-to
10、-Point protocol rATM networks13Course Overview:Part 6: Wireless and Mobile Networksm CDMAmWLANmCellular Internet AccessmMobility management principlemMobile IPmManaging mobility in cellular Networks14Course Overview:Part 7: Multimedia Networking rMultimedia Networking Applications rStreaming Stored
11、Audio and Video rMaking the Best of the Best-Effort ServicerBeyond Best Effort rScheduling and Policing MechanismsrIntegrated Services rRSVP rDifferentiated Services15Course Overview:Part 8: Network Security rWhat is network security? rPrinciples of cryptography rAuthentication: Who are you? rIntegr
12、ity rKey distribution, certification rFirewallsrAttacks, countermeasuresrCase studies: secure e-mail, SSL, IPsec, 16Course Overview:Part 9: Network Management rWhat is Network Management? rInternet Network Management Framework, SNMP rASN.1 17Course Overview:FINAL EXAM 1-18Chapter 1 Computer Networks
13、 and the InternetComputer Networking: A Top Down Approach ,4th edition. Jim Kurose, Keith RossAddison-Wesley, 2009. Zhu LiBased on Jim Kurose, Keith Rosss slides1-19Chapter 1: IntroductionOur goal: rget “feel” and terminologyrmore depth, detail later in courserapproach:muse Internet as exampleOvervi
14、ew:rwhats the Internet?rwhats a protocol?rnetwork edge; hosts, access net, physical mediarnetwork core: packet/circuit switching, Internet structurerperformance: loss, delay, throughputrsecurityrprotocol layers, service modelsrhistoryWhats the InternetrThe Internet is a world-wide computer networkrT
15、he Internet is a public networkmA network that interconnects millions of computing devices throughout the worldrInternet ArchitecturemHardware Ends system Cores linksmSoftware Protocols Networking OS1-201-21Whats the Internet: “nuts and bolts” viewrmillions of connected computing devices: hosts = en
16、d systems m running network appsHome networkInstitutional networkMobile networkGlobal ISPRegional ISProuterPCserverwirelesslaptopcellular handheldwiredlinksaccess pointsqcommunication linksvfiber, copper, radio, satellitevtransmission rate = bandwidthqrouters: forward packets (chunks of data) Introd
17、uction1-22“Cool” internet appliancesWorlds smallest web serverhttp:/www-ccs.cs.umass.edu/shri/iPic.htmlIP picture framehttp:/ toaster +weather forecasterInternet phones1-23Whats the Internet: “nuts and bolts” viewrprotocols control sending, receiving of msgsme.g., TCP, IP, HTTP, Skype, EthernetrInte
18、rnet: “network of networks”mloosely hierarchicalmpublic Internet versus private intranetrInternet standardsmRFC: Request for commentsmIETF: Internet Engineering Task ForceHome networkInstitutional networkMobile networkGlobal ISPRegional ISP1-24Whats the Internet: a service viewrcommunication infrast
19、ructure enables distributed applications:mWeb, VoIP, email, games, e-commerce, file sharingrcommunication services provided to apps:mreliable data delivery from source to destinationm“best effort” (unreliable) data delivery1-25Whats a protocol?network protocols:rmachines rather than humansrall commu
20、nication activity in Internet governed by protocolsrProtocols are running everywhere in the Internet, different protocols are used to accomplish different communication tasksprotocols define format, order of msgs and actions taken on msg transmission, receipt 1-26A closer look at network structure:r
21、network edge: applications and hostsqaccess networks, physical media: wired, wireless communication links qnetwork core: vinterconnected routersvnetwork of networks1-27The network edge:rend systems (hosts):mrun application programsme.g. Web, emailmat “edge of network”client/serverpeer-peerqclient/se
22、rver modelvclient host requests, receives service from always-on serverve.g. Web browser/server; email client/serverqpeer-peer model:v minimal (or no) use of dedicated serversve.g. Skype, BitTorrent1-28Access networks and physical mediaQ: How to connect end systems to edge router?rresidential access
23、 netsrinstitutional access networks (school, company)rmobile access networksKeep in mind: rbandwidth (bits per second) of access network?rshared or dedicated?telephonenetworkInternethomedial-upmodemISPmodem(e.g., AOL)homePCcentral officevUses existing telephony infrastructurevHome is connected to ce
24、ntral officevup to 56Kbps direct access to router (often less)vCant surf and phone at same time: not “always on”Dial-up Modem1-29telephonenetworkDSLmodemhomePChomephoneInternetDSLAMExisting phone line:0-4KHz phone; 4-50KHz upstream data; 50KHz-1MHz downstream datasplittercentralofficeAsymmetric Digi
25、tal Subscriber Line (ADSL)vAlso uses existing telephone infrastruturevup to 1 Mbps upstream (today typically 256 kbps)vup to 8 Mbps downstream (today typically 10 active at same time is less than .0004Packet switching allows more users to use network!N users1 Mbps linkQ: how did we get value 0.0004?
26、1-52Packet switching versus circuit switchingrgreat for bursty datamresource sharingmsimpler, no call setuprMore users carriedrexcessive congestion: packet delay and lossmprotocols needed for reliable data transfer, congestion controlrPoor real timemStore and forwardIs packet switching a “slam dunk
27、winner?”1-53Internet structure: network of networksrroughly hierarchicalrat center: “tier-1” ISPs (e.g., Verizon, Sprint, AT&T, Cable and Wireless), national/international coveragemtreat each other as equalsTier 1 ISPTier 1 ISPTier 1 ISPTier-1 providers interconnect (peer) privately1-54Tier-1 ISP: e
28、.g., Sprintto/from customerspeering to/from backbone.POP: point-of-presence1-55Internet structure: network of networksr“Tier-2” ISPs: smaller (often regional) ISPsmConnect to one or more tier-1 ISPs, possibly other tier-2 ISPsTier 1 ISPTier 1 ISPTier 1 ISPTier-2 ISPTier-2 ISPTier-2 ISPTier-2 ISPTier
29、-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.1-56Internet structure: network of networksr“Tier-3” ISPs and local ISPs mlast hop (“access”) network (closest to end systems)Tier 1 ISPTier
30、1 ISPTier 1 ISPTier-2 ISPTier-2 ISPTier-2 ISPTier-2 ISPTier-2 ISPlocalISPlocalISPlocalISPlocalISPlocalISPTier 3ISPlocalISPlocalISPlocalISPLocal and tier- 3 ISPs are customers ofhigher tier ISPsconnecting them to rest of Internet1-57Internet structure: network of networksra packet passes through many
31、 networks!Tier 1 ISPTier 1 ISPTier 1 ISPTier-2 ISPTier-2 ISPTier-2 ISPTier-2 ISPTier-2 ISPlocalISPlocalISPlocalISPlocalISPlocalISPTier 3ISPlocalISPlocalISPlocalISP1-58How do loss and delay occur?packets queue in router buffers rpacket arrival rate to link exceeds output link capacityrpackets queue,
32、wait for turnABpacket being transmitted (delay)packets queueing (delay)free (available) buffers: arriving packets dropped (loss) if no free buffers1-59Delay in packet-switched networksr1. nodal processing: mcheck bit errorsmdetermine output linkABpropagationtransmissionnodalprocessingqueueingq2. que
33、ueingvtime waiting at output link for transmission vdepends on congestion level of routerq3. Transmission delay:vR=link bandwidth (bps)vL=packet length (bits)vtime to send bits into link = L/Rq4. Propagation delay :vd = length of physical linkvs = propagation speed in medium (2x108 m/sec)vpropagatio
34、n delay = d/s1-60Nodal delayrdproc = processing delaymtypically a few microsecs or lessrdqueue = queuing delaymdepends on congestionrdtrans = transmission delaym= L/R, significant for low-speed linksrdprop = propagation delayma few microsecs to hundreds of msecsproptransqueueprocnodalddddd1-61Queuei
35、ng delay (revisited)rR=link bandwidth (bps)rL=packet length (bits)ra=average packet arrival ratetraffic intensity = La/RqLa/R 0: average queueing delay smallqLa/R - 1: delays become largeqLa/R 1: more “work” arriving than can be serviced, average delay infinite!1-62Experiment1: Internet delays and r
36、outesrping hostname or IP addressrTracert 202.117.1.13 rFor all i:msends three packets that will reach router i on path towards destinationmrouter i will return packets to sendermsender times interval between transmission and reply.3 probes3 probes3 probes1-63Throughputrthroughput: rate (bits/time u
37、nit) at which bits transferred between sender/receiverminstantaneous: rate at given point in timemaverage: rate over longer period of timeserver, withfile of F bits to send to clientlink capacity Rs bits/seclink capacity Rc bits/sec pipe that can carryfluid at rate Rs bits/sec) pipe that can carryfl
38、uid at rate Rc bits/sec)server sends bits (fluid) into pipe1-64Throughput (more)rRs Rc What is average end-end throughput?Rs bits/sec Rc bits/seclink on end-end path that constrains end-end throughputbottleneck link1-65Throughput: Internet scenario10 connections (fairly) share backbone bottleneck li
39、nk R bits/secRsRsRsRcRcRcRrper-connection end-end throughput: min(Rc,Rs,R/10)rin practice: R or Rs is often bottleneck1-66Protocol “Layers”Networks are complex! rmany “pieces”:mhostsmroutersmlinks of various mediamapplicationsmprotocolsmhardware, softwareHierarchical Organizing1-67Why layering?Deali
40、ng with complex systems:rexplicit structure allows identification, relationship of complex systems piecesrmodularization eases maintenance, updating of systemmchange of implementation of layers service transparent to rest of systemrlayering considered harmful?1-68Internet protocol stackrapplication:
41、 supporting network applicationsmFTP, SMTP, HTTPrtransport: process-process data transfermTCP, UDPrnetwork: routing of datagrams from source to destinationmIP, routing protocolsrlink: data transfer between neighboring network elementsmPPP, Ethernetrphysical: bits “on the wire”applicationtransportnet
42、worklinkphysical1-69ISO/OSI reference modelrpresentation: allow applications to interpret meaning of data, e.g., encryption, compression, machine-specific conventionsrsession: synchronization, checkpointing, recovery of data exchangerInternet stack “missing” these layers!mthese services, if needed,
43、must be implemented in applicationmneeded?applicationpresentationsessiontransportnetworklinkphysical Introduction1-70sourceapplicationtransportnetworklinkphysicalHtHnMsegmentHtdatagramdestinationapplicationtransportnetworklinkphysicalHtHnHlMHtHnMHtMMnetworklinkphysicallinkphysicalHtHnHlMHtHnMHtHnMHt
44、HnHlMrouterswitchEncapsulationmessageMHtMHnframebit1-71Network SecurityrThe field of network security is about:mhow bad guys can attack computer networksmhow we can defend networks against attacksmhow to design architectures that are immune to attacksrInternet not originally designed with (much) sec
45、urity in mindmoriginal vision: “a group of mutually trusting users attached to a transparent network” mInternet protocol designers playing “catch-up” security considerations in all layers!1-72Bad guys can put malware into hosts via InternetrMalware can get in host from a virus, worm, or trojan horse
46、.rSpyware malware can record keystrokes, web sites visited, upload info to collection site.rInfected host can be enrolled in a botnet, used for spam and DDoS attacks.rMalware is often self-replicating: from an infected host, seeks entry into other hosts1-73Bad guys can put malware into hosts via Int
47、ernetrTrojan horsemHidden part of some otherwise useful softwaremToday often on a Web page (Active-X, plugin)rVirusminfection by receiving object (e.g., e-mail attachment), actively executingmself-replicating: propagate itself to other hosts, usersqWorm:vinfection by passively receiving object that
48、gets itself executedvself- replicating: propagates to other hosts, usersSapphire Worm: aggregate scans/sec in first 5 minutes of outbreak (CAIDA, UWisc data)1-74Bad guys can attack servers and network infrastructurerDenial of service (DoS): attackers make resources (server, bandwidth) unavailable to
49、 legitimate traffic by overwhelming resource with bogus traffic1.select target2.break into hosts around the network (see botnet)3.send packets toward target from compromised hoststarget1-75The bad guys can sniff packetsPacket sniffing: mbroadcast media (shared Ethernet, wireless)mpromiscuous network
50、 interface reads/records all packets (e.g., including passwords!) passing byABCsrc:B dest:A payloadvWireshark software, SniffervFree softwareExperiment2: traffic capturing rWireshark,SniffermFree softwarer Downloading any one and learn to use it Introduction1-77The bad guys can use false source addr