DOC PREVIEW
CMU 15441 Computer Networking - Lecture

This preview shows page 1-2-3-25-26-27-28-50-51-52 out of 52 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 52 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

15-441: Computer NetworkingLecture OverviewApplications and Application-Layer ProtocolsClient-Server ParadigmFtp: The File Transfer ProtocolFtp: Separate Control, Data ConnectionsFtp Commands, ResponsesWhat Transport Service Does an Application Need?Transport Service Requirements of Common AppsSlide 10Server and ClientUser Datagram Protocol(UDP): An AnalogyTransmission Control Protocol (TCP): An AnalogyNetwork Addressing AnalogyConcept of Port NumbersNames and AddressesInternet Addressing Data StructureByte OrderingByte Ordering FunctionsSlide 20What is a Socket?PowerPoint PresentationSlide 23Slide 24Socket I/O: listen()Socket I/O: accept()Socket I/O: accept() continued...Socket I/O: read()TCP ClientDealing with IP AddressesTranslating Names to AddressesSocket I/O: connect()Socket I/O: write()Review: TCP Client-Server InteractionUDP Server ExampleSocket I/O: socket()Socket I/O: bind()Socket I/O: recvfrom()Socket I/O: recvfrom() continued...UDP Client ExampleSocket I/O: sendto()Review: UDP Client-Server InteractionThe UDP ServerUDP Server: Servicing Two PortsSocket I/O: select()Slide 46Slide 47Slide 48Slide 49A Few Programming Notes: Representing PacketsA Few Programming Notes: Building a Packet in a BufferSocket Programming References15-441: Computer NetworkingLecture 3: Application Layer and Socket ProgrammingLecture 3: 9-4-01 2Lecture Overview•Application layer•Client-server•Application requirements•Background•TCP vs. UDP•Byte ordering •Socket I/O•TCP/UDP server and client•I/O multiplexingLecture 3: 9-4-01 3Applications and Application-Layer Protocols•Application: communicating, distributed processes•Running in network hosts in “user space”•Exchange messages to implement app•e.g., email, file transfer, the Web•Application-layer protocols•One “piece” of an app•Define messages exchanged by apps and actions taken•User services provided by lower layer protocolsapplicationtransportnetworkdata linkphysicalapplicationtransportnetworkdata linkphysicalapplicationtransportnetworkdata linkphysicalLecture 3: 9-4-01 4Client-Server ParadigmTypical network app has two pieces: client and serverapplicationtransportnetworkdata linkphysicalapplicationtransportnetworkdata linkphysicalClient:•Initiates contact with server (“speaks first”)•Typically requests service from server, •For Web, client is implemented in browser; for e-mail, in mail readerServer:•Provides requested service to client•e.g., Web server sends requested Web page, mail server delivers e-mailrequestreplyLecture 3: 9-4-01 5Ftp: The File Transfer Protocol•Transfer file to/from remote host•Client/server model•Client: side that initiates transfer (either to/from remote)•Server: remote host•ftp: RFC 959•ftp server: port 21file transferFTPserverFTPuserinterfaceFTPclientlocal filesystemremote filesystemuser at hostLecture 3: 9-4-01 6Ftp: Separate Control, Data Connections•Ftp client contacts ftp server at port 21, specifying TCP as transport protocol•Two parallel TCP connections opened:•Control: exchange commands, responses between client, server.“out of band control”•Data: file data to/from server•Ftp server maintains “state”: current directory, earlier authenticationFTPclientFTPserverTCP control connectionport 21TCP data connectionport 20Lecture 3: 9-4-01 7Ftp Commands, ResponsesSample Commands:•sent as ASCII text over control channel•USER username•PASS password•LIST return list of files in current directory•RETR filename retrieves (gets) file•STOR filename stores (puts) file onto remote hostSample Return Codes•status code and phrase•331 Username OK, password required•125 data connection already open; transfer starting•425 Can’t open data connection•452 Error writing fileLecture 3: 9-4-01 8What Transport Service Does an Application Need?Data loss•Some apps (e.g., audio) can tolerate some loss•Other apps (e.g., file transfer, telnet) require 100% reliable data transfer Timing•Some apps (e.g., Internet telephony, interactive games) require low delay to be “effective”Bandwidth•Some apps (e.g., multimedia) require minimum amount of bandwidth to be “effective”•Other apps (“elastic apps”) make use of whatever bandwidth they getLecture 3: 9-4-01 9Transport Service Requirements of Common Appsno lossno lossno lossloss-tolerantloss-tolerantloss-tolerantno losselasticelasticelasticaudio: 5Kb-1Mbvideo:10Kb-5Mbsame as above few Kbpselasticnononoyes, 100’s msecyes, few secsyes, 100’s msecyes and nofile transfere-mailweb documentsreal-time audio/videostored audio/videointeractive gamesfinancial appsApplicationData lossBandwidthTime SensitiveLecture 3: 9-4-01 10Lecture Overview•Application layer•Client-server•Application requirements•Background•TCP vs. UDP•Byte ordering •Socket I/O•TCP/UDP server and client•I/O multiplexingLecture 3: 9-4-01 11Server and ClientTCP/UDPIPEthernet AdapterServerTCP/UDPIPEthernet AdapterClientsServer and Client exchange messages over the network through a common Socket APISocket APIhardwarekernel spaceuser spaceportsLecture 3: 9-4-01 12User Datagram Protocol(UDP): An AnalogyPostal Mail•Single mailbox to receive messages•Unreliable  •Not necessarily in-order delivery•Each letter is independent•Must address each replyExample UDP applicationsMultimedia, voice over IPUDP•Single socket to receive messages•No guarantee of delivery•Not necessarily in-order delivery•Datagram – independent packets•Must address each packetPostal Mail•Single mailbox to receive letters•Unreliable •Not necessarily in-order delivery•Letters sent independently •Must address each replyLecture 3: 9-4-01 13Transmission Control Protocol (TCP): An Analogy TCP•Reliable – guarantee delivery•Byte stream – in-order delivery•Connection-oriented – single socket per connection•Setup connection followed by data transferTelephone Call•Guaranteed delivery•In-order delivery•Connection-oriented •Setup connection followed by conversationExample TCP applicationsWeb, Email, TelnetLecture 3: 9-4-01 14Network Addressing Analogy412-268-8000 ext.123Central NumberApplications/ServersWebPort 80MailPort 25ExchangeArea Code412-268-8000 ext.654IP AddressNetwork No.Host NumberTelephone No15-441 Students ClientsProfessors at CMUNetwork ProgrammingTelephone CallPort No.ExtensionLecture 3: 9-4-01 15Concept of Port Numbers•Port numbers are used to identify “entities”


View Full Document

CMU 15441 Computer Networking - Lecture

Documents in this Course
Lecture

Lecture

14 pages

Lecture

Lecture

19 pages

Lecture

Lecture

14 pages

Lecture

Lecture

78 pages

Lecture

Lecture

35 pages

Lecture

Lecture

4 pages

Lecture

Lecture

4 pages

Lecture

Lecture

29 pages

Lecture

Lecture

40 pages

Lecture

Lecture

44 pages

Lecture

Lecture

41 pages

Lecture

Lecture

38 pages

Lecture

Lecture

40 pages

Lecture

Lecture

13 pages

Lecture

Lecture

47 pages

Lecture

Lecture

49 pages

Lecture

Lecture

7 pages

Lecture

Lecture

18 pages

Lecture

Lecture

15 pages

Lecture

Lecture

74 pages

Lecture

Lecture

35 pages

Lecture

Lecture

17 pages

lecture

lecture

13 pages

Lecture

Lecture

21 pages

Lecture

Lecture

14 pages

Lecture

Lecture

53 pages

Lecture

Lecture

52 pages

Lecture

Lecture

40 pages

Lecture

Lecture

11 pages

Lecture

Lecture

20 pages

Lecture

Lecture

39 pages

Lecture

Lecture

10 pages

Lecture

Lecture

40 pages

Lecture

Lecture

25 pages

lecture

lecture

11 pages

lecture

lecture

7 pages

Lecture

Lecture

10 pages

lecture

lecture

46 pages

lecture

lecture

7 pages

Lecture

Lecture

8 pages

lecture

lecture

55 pages

lecture

lecture

45 pages

lecture

lecture

47 pages

lecture

lecture

39 pages

lecture

lecture

33 pages

lecture

lecture

38 pages

lecture

lecture

9 pages

midterm

midterm

16 pages

Lecture

Lecture

39 pages

Lecture

Lecture

14 pages

Lecture

Lecture

46 pages

Lecture

Lecture

8 pages

Lecture

Lecture

40 pages

Lecture

Lecture

11 pages

Lecture

Lecture

41 pages

Lecture

Lecture

38 pages

Lecture

Lecture

9 pages

Lab

Lab

3 pages

Lecture

Lecture

53 pages

Lecture

Lecture

51 pages

Lecture

Lecture

38 pages

Lecture

Lecture

42 pages

Lecture

Lecture

49 pages

Lecture

Lecture

63 pages

Lecture

Lecture

7 pages

Lecture

Lecture

51 pages

Lecture

Lecture

35 pages

Lecture

Lecture

29 pages

Lecture

Lecture

65 pages

Lecture

Lecture

47 pages

Lecture

Lecture

41 pages

Lecture

Lecture

41 pages

Lecture

Lecture

32 pages

Lecture

Lecture

35 pages

Lecture

Lecture

15 pages

Lecture

Lecture

52 pages

Lecture

Lecture

16 pages

Lecture

Lecture

4 pages

lecture

lecture

27 pages

lecture04

lecture04

46 pages

Lecture

Lecture

46 pages

Lecture

Lecture

13 pages

lecture

lecture

41 pages

lecture

lecture

38 pages

Lecture

Lecture

40 pages

Lecture

Lecture

25 pages

Lecture

Lecture

38 pages

lecture

lecture

11 pages

Lecture

Lecture

42 pages

Lecture

Lecture

12 pages

Lecture

Lecture

36 pages

Lecture

Lecture

46 pages

Lecture

Lecture

35 pages

Lecture

Lecture

34 pages

Lecture

Lecture

9 pages

lecture

lecture

49 pages

class03

class03

39 pages

Lecture

Lecture

8 pages

Lecture 8

Lecture 8

42 pages

Lecture

Lecture

20 pages

lecture

lecture

29 pages

Lecture

Lecture

9 pages

lecture

lecture

46 pages

Lecture

Lecture

12 pages

Lecture

Lecture

24 pages

Lecture

Lecture

41 pages

Lecture

Lecture

37 pages

lecture

lecture

59 pages

Lecture

Lecture

47 pages

Lecture

Lecture

34 pages

Lecture

Lecture

38 pages

Lecture

Lecture

28 pages

Exam

Exam

17 pages

Lecture

Lecture

21 pages

Lecture

Lecture

15 pages

Lecture

Lecture

9 pages

Project

Project

20 pages

Lecture

Lecture

40 pages

L13b_Exam

L13b_Exam

17 pages

Lecture

Lecture

48 pages

Lecture

Lecture

10 pages

Lecture

Lecture

52 pages

21-p2p

21-p2p

16 pages

lecture

lecture

77 pages

Lecture

Lecture

18 pages

Lecture

Lecture

62 pages

Lecture

Lecture

25 pages

Lecture

Lecture

24 pages

Project

Project

20 pages

Lecture

Lecture

47 pages

Lecture

Lecture

38 pages

Lecture

Lecture

35 pages

Roundup

Roundup

45 pages

Lecture

Lecture

47 pages

Lecture

Lecture

39 pages

Lecture

Lecture

13 pages

Midterm

Midterm

22 pages

Project

Project

26 pages

Lecture

Lecture

11 pages

Project

Project

27 pages

Lecture

Lecture

10 pages

Lecture

Lecture

50 pages

Lab

Lab

9 pages

Lecture

Lecture

30 pages

Lecture

Lecture

6 pages

r05-ruby

r05-ruby

27 pages

Lecture

Lecture

8 pages

Lecture

Lecture

28 pages

Lecture

Lecture

30 pages

Project

Project

13 pages

Lecture

Lecture

11 pages

Lecture

Lecture

12 pages

Lecture

Lecture

48 pages

Lecture

Lecture

55 pages

Lecture

Lecture

36 pages

Lecture

Lecture

17 pages

Load more
Download Lecture
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?