1、计算机网络全册配套完计算机网络全册配套完 整精品课件整精品课件 2 Computer Networking 3 What is network rThe architecture of interconnecting end systems rmultiple networks: mTelecommunication networks mTV networks mComputer networks r21 century is information time centralized on network mDigitalizing, networking, information mIndu
2、stry economy knowledge based economy rInternet is the greatest innovation of human communication from printing 4 What is this course about? Introductory (first) course in computer networking rlearn concepts of computer networking rlearn principles of computer networking rlearn practice of computer n
3、etworking rInternet 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) 5 Course Information rIntroductory (first) course in computer networking rWho is this course
4、 for? mUndergrads, MS students rPrerequisites: mAlgorithms, Operating Systems, programming skills rCourse materials: mtext: Computer Networking: A Top Down Approach, J. Kurose hosts, access net, physical media rnetwork core: packet/circuit switching, Internet structure rperformance: loss, delay, thr
5、oughput rsecurity rprotocol layers, service models rhistory Whats the Internet rThe Internet is a world-wide computer network rThe Internet is a public network mA network that interconnects millions of computing devices throughout the world rInternet Architecture mHardware Ends system Cores links mS
6、oftware Protocols Networking OS 1-20 1- 21 Whats the Internet: “nuts and bolts” view rmillions of connected computing devices: hosts = end systems m running network apps Home network Institutional network Mobile network Global ISP Regional ISP router PC server wireless laptop cellular handheld wired
7、 links access points qcommunication links vfiber, copper, radio, satellite vtransmission rate = bandwidth qrouters: forward packets (chunks of data) Introduction1- 22 “Cool” internet appliances Worlds smallest web server http:/www-ccs.cs.umass.edu/shri/iPic.html IP picture frame http:/ Web-enabled t
8、oaster + weather forecaster Internet phones 1- 23 Whats the Internet: “nuts and bolts” view rprotocols control sending, receiving of msgs me.g., TCP, IP, HTTP, Skype, Ethernet rInternet: “network of networks” mloosely hierarchical mpublic Internet versus private intranet rInternet standards mRFC: Re
9、quest for comments mIETF: Internet Engineering Task Force Home network Institutional network Mobile network Global ISP Regional ISP 1- 24 Whats the Internet: a service view rcommunication infrastructure enables distributed applications: mWeb, VoIP, email, games, e- commerce, file sharing rcommunicat
10、ion services provided to apps: mreliable data delivery from source to destination m“best effort” (unreliable) data delivery 1- 25 Whats a protocol? network protocols: rmachines rather than humans rall communication activity in Internet governed by protocols rProtocols are running everywhere in the I
11、nternet, different protocols are used to accomplish different communication tasks protocols define format, order of msgs and actions taken on msg transmission, receipt 1- 26 A closer look at network structure: rnetwork edge: applications and hosts qaccess networks, physical media: wired, wireless co
12、mmunication links qnetwork core: vinterconnected routers vnetwork of networks 1- 27 The network edge: rend systems (hosts): mrun application programs me.g. Web, email mat “edge of network” client/server peer-peer qclient/server model vclient host requests, receives service from always-on server ve.g
13、. Web browser/server; email client/server qpeer-peer model: v minimal (or no) use of dedicated servers ve.g. Skype, BitTorrent 1- 28 Access networks and physical media Q: How to connect end systems to edge router? rresidential access nets rinstitutional access networks (school, company) rmobile acce
14、ss networks Keep in mind: rbandwidth (bits per second) of access network? rshared or dedicated? telephone networkInternet home dial-up modem ISP modem (e.g., AOL) home PC central office vUses existing telephony infrastructure vHome is connected to central office vup to 56Kbps direct access to router
15、 (often less) vCant surf and phone at same time: not “always on” Dial-up Modem 1-29 telephone network DSL modem home PC home phone Internet DSLAM Existing phone line: 0-4KHz phone; 4-50KHz upstream data; 50KHz-1MHz downstream data splitter central office Asymmetric Digital Subscriber Line (ADSL) vAl
16、so uses existing telephone infrastruture vup to 1 Mbps upstream (today typically 256 kbps) vup to 8 Mbps downstream (today typically 10 active at same time is less than .0004 Packet switching allows more users to use network! N users 1 Mbps link Q: how did we get value 0.0004? 1- 52 Packet switching
17、 versus circuit switching rgreat for bursty data mresource sharing msimpler, no call setup rMore users carried rexcessive congestion: packet delay and loss mprotocols needed for reliable data transfer, congestion control rPoor real time mStore and forward Is packet switching a “slam dunk winner?” 1-
18、 53 Internet structure: network of networks rroughly hierarchical rat center: “tier-1” ISPs (e.g., Verizon, Sprint, AT password: foo Man-in-the-middle attack rBad guy is inserted into the communication path between two entities mDelete or modify msgs A B Introduction1- 80 Internet History r1961: Kle
19、inrock - queueing theory shows effectiveness of packet- switching r1964: Baran - packet- switching in military nets r1967: ARPAnet conceived by Advanced Research Projects Agency r1969: first ARPAnet node operational r1972: mARPAnet public demonstration mNCP (Network Control Protocol) first host-host
20、 protocol mfirst e-mail program mARPAnet has 15 nodes 1961-1972: Early packet-switching principles Introduction1- 81 Internet History r1970: ALOHAnet satellite network in Hawaii r1974: Cerf and Kahn - architecture for interconnecting networks r1976: Ethernet at Xerox PARC rate70s: proprietary archit
21、ectures: DECnet, SNA, XNA rlate 70s: switching fixed length packets (ATM precursor) r1979: ARPAnet has 200 nodes Cerf and Kahns internetworking principles: mminimalism, autonomy - no internal changes required to interconnect networks mbest effort service model mstateless routers mdecentralized contr
22、ol define todays Internet architecture 1972-1980: Internetworking, new and proprietary nets Introduction1- 82 Internet History r1983: deployment of TCP/IP r1982: smtp e-mail protocol defined r1983: DNS defined for name-to-IP- address translation r1985: ftp protocol defined r1988: TCP congestion cont
23、rol rnew national networks: Csnet, BITnet, NSFnet, Minitel r100,000 hosts connected to confederation of networks 1980-1990: new protocols, a proliferation of networks Introduction1- 83 Internet History rEarly 1990s: ARPAnet decommissioned r1991: NSF lifts restrictions on commercial use of NSFnet (de
24、commissioned, 1995) rearly 1990s: Web mhypertext Bush 1945, Nelson 1960s mHTML, HTTP: Berners-Lee m1994: Mosaic, later Netscape mlate 1990s: commercialization of the Web Late 1990s 2000s: rmore killer apps: instant messaging, P2P file sharing rnetwork security to forefront rest. 50 million host, 100
25、 million+ users rbackbone links running at Gbps 1990, 2000s: commercialization, the Web, new apps Introduction1- 84 Internet History 2007: r500 million hosts rVoice, Video over IP rP2P applications: BitTorrent (file sharing) Skype (VoIP), PPLive (video) rmore applications: YouTube, gaming rwireless,
26、 mobility Introduction1- 85 Introduction: Summary Covered a “ton” of material! rInternet overview rwhats a protocol? rnetwork edge, core, access network mpacket-switching versus circuit-switching mInternet structure rperformance: loss, delay, throughput rlayering, service models rsecurity rhistory Y
27、ou now have: rcontext, overview, “feel” of networking rmore depth, detail to follow! Exercises In a new network installation, the network administrator has decided to use a medium that is not affected by electrical noise. Which cable type will best meet this standard? qa) coaxial b) screened twisted
28、 pair c) shielded twisted pair d) unshielded twisted pair e) fiber optic Select the necessary information that is required to compute the estimated time it would take to transfer data from one location to another. (Choose two.) qa) file size b) data format c) network in use d) type of medium e) band
29、width of the link Which protocol functions at the internet layer of the TCP/IP protocol suite? q a) File Transfer Protocol (FTP) b) Trivial File Transfer Protocol (TFTP) c) Transmission Control Protocol (TCP) d) Internet Protocol (IP) e) User Datagram Protocol (UDP) f) Simple Mail Transport Protocol
30、 (SMTP) Exercises Which of the following is the Layer 4 PDU? q a) bit b) frame c) packet d) segment Which OSI layer encapsulates data into packets? q a) session b) transport c) network d) data link Why are internets necessary? (Choose three.) qa) to overcome LAN scalability limitations b) to overcom
31、e LAN speed limitations c) to overcome LAN distance limitations d) to prevent collision and congestion conditions e) to network networks Submitting Exercises qExplain precisely following abbreviations: vTCP, HTTP, SMTP,DNS,FTP,ATM,ISDN,ADSL,HFC,ISP,WAP, LAN,WAN,MAN,WLAN,ISO,OSI qExplain following co
32、ncepts: vTCP/IP vCircuit switching,Packet switching,Message switching,Virtual circuits qP93: review questions: 11,12,14,19; qP95:problems 5,12,14. 2: Application Layer89 Chapter 2: Application Layer Our goals: rconceptual, implementation aspects of network application protocols mtransport-layer serv
33、ice models mclient-server paradigm mpeer-to-peer paradigm rlearn about protocols by examining popular application-level protocols mHTTP mFTP mSMTP / POP3 / IMAP mDNS rprogramming network applications msocket API 2: Application Layer90 Some network apps re-mail rweb rinstant messaging rremote login r
34、P2P file sharing rmulti-user network games rstreaming stored video clips rsocial networks rvoice over IP rreal-time video conferencing rgrid computing 2: Application Layer91 Creating a network app write programs that mrun on (different) end systems mcommunicate over network me.g., web server softwar
35、e communicates with browser software No need to write software for network-core devices mNetwork-core devices do not run user applications mapplications on end systems allows for rapid app development, propagation application transport network data link physical application transport network data li
36、nk physical application transport network data link physical 2: Application Layer92 Application architectures rClient-server mIncluding data centers / cloud computing rPeer-to-peer (P2P) rHybrid of client-server and P2P 2: Application Layer93 Client-server architecture server: malways-on host mperma
37、nent IP address mserver farms for scaling clients: mcommunicate with server mmay be intermittently connected mmay have dynamic IP addresses client/server Google Data Centers rEstimated cost of data center: $600M rGoogle spent $2.4B in 2007 on new data centers rEach data center uses 50-100 megawatts
38、of power 2: Application Layer95 Pure P2P architecture rno always-on server rarbitrary end systems directly communicate rpeers are intermittently connected and change IP addresses Highly scalable but difficult to manage peer-peer 2: Application Layer96 Hybrid of client-server and P2P Skype mvoice-ove
39、r-IP P2P application mcentralized server: finding address of remote party: mclient-client connection: direct (not through server) Instant messaging mchatting between two users is P2P mcentralized service: client presence detection/location user registers its IP address with central server when it co
40、mes online user contacts central server to find IP addresses of buddies 2: Application Layer97 Processes communicating Process: program running within a host. rwithin same host, two processes communicate using inter-process communication (defined by OS). rprocesses in different hosts communicate by
41、exchanging messages Client process: process that initiates communication Server process: process that waits to be contacted 2: Application Layer98 Sockets rprocess sends/receives messages to/from its socket rsocket analogous to door msending process shoves message out door msending process relies on
42、 transport infrastructure on other side of door which brings message to socket at receiving process process TCP with buffers, variables socket host or server process TCP with buffers, variables socket host or server Internet controlled by OS controlled by app developer rAPI: (1) choice of transport
43、protocol; (2) ability to fix a few parameters 2: Application Layer99 Addressing processes rto receive messages, process must have identifier rhost device has unique 32-bit IP address rExercise: use ipconfig from command prompt to get your IP address (Windows) rQ: does IP address of host on which pro
44、cess runs suffice for identifying the process? mA: No, many processes can be running on same rIdentifier includes both IP address and port numbers associated with process on host. rExample port numbers: mHTTP server: 80 mMail server: 25 2: Application Layer100 App-layer protocol defines rTypes of me
45、ssages exchanged, me.g., request, response rMessage syntax: mwhat fields in messages transfer starting r425 Cant open data connection r452 Error writing file 2: Application Layer130 Electronic Mail Three major components: ruser agents rmail servers rsimple mail transfer protocol: SMTP User Agent ra.
46、k.a. “mail reader” rcomposing, editing, reading mail messages re.g., Eudora, Outlook, elm, Mozilla Thunderbird routgoing, incoming messages stored on server user mailbox outgoing message queue mail server user agent user agent user agent mail server user agent user agent mail server user agent SMTP
47、SMTP SMTP 2: Application Layer131 Electronic Mail: mail servers Mail Servers rmailbox contains incoming messages for user rmessage queue of outgoing (to be sent) mail messages rSMTP protocol between mail servers to send email messages mclient: sending mail server m“server”: receiving mail server mai
48、l server user agent user agent user agent mail server user agent user agent mail server user agent SMTP SMTP SMTP 2: Application Layer132 Electronic Mail: SMTP RFC 2821 ruses TCP to reliably transfer email message from client to server, port 25 rdirect transfer: sending server to receiving server rt
49、hree phases of transfer mhandshaking (greeting) mtransfer of messages mclosure rcommand/response interaction mcommands: ASCII text mresponse: status code and phrase rmessages must be in 7-bit ASCII 2: Application Layer133 Scenario: Alice sends message to Bob 1) Alice uses UA to compose message and “
50、to” bobsomeschool.edu 2) Alices UA sends message to her mail server; message placed in message queue 3) Client side of SMTP opens TCP connection with Bobs mail server 4) SMTP client sends Alices message over the TCP connection 5) Bobs mail server places the message in Bobs mailbox 6) Bob invokes his