Applications CPSC 363 Computer Networks Ellen Walker Hiram College Includes figures from Computer Networking by Kurose Ross Addison Wesley 2002 Review of Layers Layer 5 Application messages Implemented on hosts Layer 4 Transport segments Connection oriented service connects hosts Layer 3 Network datagrams packets Routing service packets between hosts Layer 2 Link frames Layer 1 Physical bits electric or light Layers 2 1 in network card Accurate transmission of bit sequences across physical links wires cable radio etc Application Layer point of view Client requests establishes a connection with server via the network layer Client sends and receives messages across the connection Client or server closes the connection again via the network layer A host can maintain multiple connections at the same time Multiple ports Multiple processes Application vs Protocol Network application can consist of many components Data storage retrieval Data formatting presentation Encoding decoding encrypted data Messages between client server or peers Only the last of these uses network application protocol Not all standards are protocols Web services Browser server communication HTTP Document formatting standard HTML or XML or PDF or JPG or Email services Client server communication SMTP IMAP POP Message attachment formatting MIME Protocols define What types of messages are exchanged How is the message formatted into fields Syntax What do the fields mean Semantics What are legal messages and responses to messages Rules Finding Internet Protocols Internet protocols are defined in RFC Request for Comments documents A searchable database of these documents is available at http www rfc editor org Not all RFC documents are standards some are informational experimental etc Client and Server Client Where the user sits usually Initiates the conversation in nearly all cases Server Responds to client s requests Provides services such as file storage database query etc Peer to Peer Both hosts play both roles Process Communication A process is a running program with its own program counter registers and memory Most modern operating systems run many processes simultaneously Processes communicate with each other through sockets also called APIs Limited interaction with network layer Establish type of transport protocol and a few parameters e g segment size only Message Addressing Which host is this message going to IP address e g 143 206 149 21 We ll discuss in detail later network layer Which process on that host will receive the message Port number e g 80 for HTTP Standard port numbers have been assigned see http www iana org assignments port numbers We ll discuss ports in detail later transport layer Applications Demands on Transport Layer Reliable Data Transfer How much loss is acceptable None e g financial applications vs some e g multimedia Bandwidth What transmission rate is necessary Minimum requirements e g streaming video vs use whatever is available e g web file transfer Timing What end to end delay is acceptable Some applications e g telephony have strict constraints Transport Layer Services TCP Connection oriented handshake Reliable transmission Congestion control throttling No guaranteed minimum transmission rate UDP Connectionless no handshake Unreliable no guarantee of receipt or ordering No guaranteed minimum transmission rate Examples fig 2 5 Application App Layer Protocol SMTP Transport Protocol TCP Remote terminal Web Telnet TCP HTTP TCP File Transfer FTP TCP Streaming MM Proprietary UDP or TCP Internet Telephony Proprietary UDP E mail Telnet Perhaps the simplest protocol Opens a TCP connection between two hosts through a specified port Whatever you type is sent through the connection Typically used for terminal connection now superseded by SSH for secure connections Can telnet to any port telnet cs hiram edu 23 terminal connection default telnet cs hiram edu 80 web server connection The WorldWide Web Basis in hyperlinks and hypertext documents Proposed by Vannevar Bush Memex 1945 Hypertext coined by Ted Nelson 1965 Hypertext in education at Brown FRESS 1966 198x Hypercard Apple 1987 See http ei cs vt edu book chap1 htx hist html Historical path FTP file transfer protocol files aren t displayed Gopher displays directories text files Web embedded links can link to any document Search engines Multimedia indexes Front ends to databases ETC Web Application Vocabulary Web page document collection of objects Usually base HTML file several referenced objects Object any file addressable by a single URL URL Uniform Resource Locator how to reach an object Host address object s path name Browser user agent client for the web Web server houses objects HyperText Transfer Protocol HTTP Request response protocol Client requests an object URL Server provides the object s corresponding to that URL Non persistent 1 object only vs persistent explicit close Stateless protocol The server doesn t store any knowledge state of the client E g server doesn t remember what pages client looked at HTTP Uses TCP Client initiates TCP connection to server port 80 Server accepts connection Client sends HTTP message Server responds one or more times TCP connection closed Non persistent HTTP conversation Client to server address I d like to talk to you Server to client OK I will talk with you Client to server Thanks Please send me path Server to Client Here s the object you asked for Object Goodbye Client to server Got it Goodbye If the object contains embedded links an additional complete conversation is needed for each How long does it take Define RTT Round Trip Time as time for one message to travel from client to server server to client includes all delays Total time is 2 RTT file transmission Beginning of handshake 1 RTT End of handshake transmit request first packet of response 1 RTT Transmit the rest of the file depends on file size If file has 10 images 22 RTT file times Persistent Transmission TCP connection remains open until explicitly closed Previous example now takes 2 RTT for setup plus 1 RTT per request plus file time 12RTT file time With pipelining new requests are sent as files are received so server is never idle Only 1RTT for setup plus 1 RTT for all objects Example now takes 2RTT file time Message Format Request Request line command addr protocol GET walkerel cs363 index html HTTP 1 1 Header lines fields values Host cs hiram edu Connection close nonpersistent User agent Mozilla 4 0 browser id Accept
View Full Document
Unlocking...