Application Layer, Client/Server Computing and Socket Programming (II)
|
|
- Thomas Sims
- 8 years ago
- Views:
Transcription
1 CS 455/555 / Spring 2014 Intro to Networks and Communications Application Layer, Client/Server Computing and Socket Programming (II) Dr. Tamer Nadeem
2 The Web & HTTP Outline } Terminology (KR 2.2.1) } HTTP protocol } message format (KR 2.23) } non-persistent and persistent connections (KR 2.2.2) } pipelining } Authentication } Cookies (KR 2.2.4) } Web caches (KR ) } Security (KR ) 2 CS 455/555 - Spring Nadeem
3 HTTP Protocol Design Non-persistent connections } The default browser/server behavior in HTTP/1.0 is for the connection to be closed after the completion of the request } Server parses request, responds, and closes TCP connection } The Connection: keep-alive header allows for persistent connections u With non-persistent connections at least 2 RTTs are required to fetch every object» 1 RTT for TCP handshake» 1 RTT for request/response Browser Web Server 3 CS 455/555 - Spring Nadeem
4 HTTP Protocol Design Persistent v. non-persistent connections } Non-persistent } HTTP/1.0 } Server parses request, responds, and closes TCP connection } At least 2 RTTs to fetch every object } Persistent } Default for HTTP/1.1 (negotiable in 1.0) } Client sends requests for multiple objects on one TCP connection } Server, parses request, responds, parses next request, responds... } Fewer RTTs 4 CS 455/555 - Spring Nadeem
5 Non-Persistent vs. Persistent Connections Performance Example } A base page with five embedded images located on the same web server } How many TCP connections to download the page with non-persistent connections? } How many round-trip times (RTTs)? } How many TCP connections to download the page with persistent connections? } How many RTTs? 5 CS 455/555 - Spring Nadeem
6 Non-Persistent vs. Persistent Connections Performance Example u A base page with five embedded images located on the same web server u How many TCP connections to download the page with non-persistent connections? } 1 TCP connection to download the base page } 1 TCP connection to download each of the 5 embedded images } Total: 6 TCP connections u How many round-trip times (RTTs)? } Each TCP connection requires a handshake: 1 RTT } Once connection is setup, it takes 1 RTT to download an object (send HTTP request, receive HTTP response) } Can only download one object per connection (non-persistent), so 2 RTTs per connection } Total: 2 RTTs * 6 connections = 12 RTTs 6 CS 455/555 - Spring Nadeem
7 Non-Persistent vs. Persistent Connections Performance Example } A base page with five embedded images located on the same web server } How many TCP connections to download the page with persistent connections? } 1 TCP connection to download the base page } Since all 5 embedded images are at the same web server as the base page, no more TCP connections are needed } Total: 1 TCP connection } How many round-trip times (RTTs)? } Each TCP connection requires a handshake: 1 RTT } Once connection is setup, it takes 1 RTT to download an object (send HTTP request, receive HTTP response) } There are 6 objects (base page + 5 images) to download } Total: 1 RTT (TCP handshake) + 6 RTTs (download all objects) = 7 RTTs 7 CS 455/555 - Spring Nadeem
8 Non-Persistent Connections Performance A transmission propagation B nodal processing queueing u Example: A 1 KByte base page with five 1.5 KByte embedded images coming from the West coast on an OC-48 link (R=2.486 Gbps)» 1 RTT for TCP handshake = 50 ms» 1 RTT for request/response = 50 ms u Page download time with non-persistent connections? u Page download time with a persistent connection? 8 CS 455/555 - Spring Nadeem
9 Non-Persistent vs. Persistent Connections Your Turn } A base page with 3 embedded images located on the same web server } RTT from client to web server is 50 ms } slowest link on the path is 2 Mbps } other links are high-speed, so transmission delay is negligible } base page is 1000 bytes } each image is 3000 bytes } What is the total time (propagation + transmission delays) needed to download the entire web page with non-persistent HTTP connections? 9 CS 455/555 - Spring Nadeem
10 Non-Persistent vs. Persistent Connections Your Turn } A base page with 3 embedded images located on the same web server } RTT from client to web server is 50 ms } slowest link on the path is 2 Mbps } other links are high-speed, so transmission delay is negligible } base page is 1000 bytes } each image is 3000 bytes } What is the total time (propagation + transmission delays) needed to download the entire web page with persistent HTTP connections? 10 CS 455/555 - Spring Nadeem
11 Non-Persistent Connections Parallel connections } To improve performance a browser can issue multiple requests in parallel to a server (or servers) } Server parses request, responds, and closes TCP connection Web Server Web Server Browser 11 CS 455/555 - Spring Nadeem
12 Persistent Connections Persistent connections with pipelining Persistent without pipelining: } Client issues new request only when previous response has been received } At least one RTT for each embedded object Persistent with pipelining: } Default in HTTP/1.1 } Client sends requests as soon as it encounters a embedded object } As little as one RTT for all the embedded objects 12 CS 455/555 - Spring Nadeem
13 Persistent Connections Without Pipelining } Client issues new request only when previous response has been received Client HTTP request msg base HTTP response msg HTTP request msg (1st embedded object) Server } At least one RTT for each embedded object HTTP response msg (1st embedded object) HTTP request msg (2nd embedded object) HTTP response msg (2nd embedded object) Time 13 CS 455/555 - Spring Nadeem
14 Persistent Connections With Pipelining } Default in HTTP/1.1 } Client sends requests as soon as it encounters an embedded object } As little as one RTT for all the embedded objects Client HTTP request msg base HTTP response msg HTTP request msg (1st HTTP embedded request object) msg (2nd embedded object) HTTP response msg (1st HTTP embedded response object) msg (2nd embedded object) Server Time 14 CS 455/555 - Spring Nadeem
15 The Web & HTTP Outline } Terminology (KR 2.2.1) } HTTP protocol } message format (KR 2.23) } non-persistent and persistent connections (KR 2.2.2) } pipelining } Authentication } Cookies (KR 2.2.4) } Web caches (KR ) } Security (KR ) 15 CS 455/555 - Spring Nadeem
16 HTTP User-Server Interaction Authentication } Problem: How to limit access to server documents? } Servers provide a means to require users to authenticate themselves } HTTP includes a header tag for user to specify name and password (on a GET request) } If no authorization presented, server refuses access, sends WWW authenticate: header line in response } Stateless: client must send authorization for each request } A stateless design } (But browser may cache credentials) Client 16 CS 455/555 - Spring Nadeem usual HTTP request msg 401: authorization WWW authenticate: usual HTTP request msg + authorization: usual HTTP response msg usual HTTP request msg + authorization: usual HTTP response msg Server Time
17 HTTP User-Server Interaction Cookies } Server sends "cookie" to browser in response message Set-cookie:<value> } Browser presents cookie in later requests to same server cookie: <value> } Server matches cookie with server-stored information } Provides authentication } Client-side state maintenance (remembering user preferences, previous choices, ) Client usual HTTP request msg usual HTTP response + Set-cookie: S1 usual HTTP request msg cookie: S1 usual HTTP response msg usual HTTP request msg cookie: S1 usual HTTP response + Set-cookie: S2 Server cookiespecific action cookiespecific action 17 CS 455/555 - Spring Nadeem
18 The Web & HTTP Outline } Terminology (KR 2.2.1) } HTTP protocol } message format (KR 2.23) } non-persistent and persistent connections (KR 2.2.2) } pipelining } Authentication } Cookies (KR 2.2.4) } Web caches (KR ) } Security (KR ) 18 CS 455/555 - Spring Nadeem
19 Caching on the Web Web caches (Proxy servers) u Web caches are used to satisfy client requests without contacting the origin server } Users configure browsers to send all requests through a shared proxy server } Proxy server is a large cache of web objects u Browsers send all HTTP requests to proxy» If object in cache, proxy returns object in HTTP response» Else proxy requests object from origin server, then returns it in HTTP response to browser client client Proxy server Origin server Open research question: How does the proxy hit ratio change with the population of users sharing it? 19 CS 455/555 - Spring Nadeem
20 Why do Proxy Caching? The performance implications of caching } Consider a cache that is "close" to client } E.g., on the same LAN public Internet origin servers } Nearby caches mean: } Smaller response times } Decreased traffic on egress link to institutional ISP (often the primary bottleneck) To improve Web response times should one buy a 10 Mbps access link or a proxy server? 1.5 Mbps access link 10 Mbps LAN proxy server campus network 20 CS 455/555 - Spring Nadeem
21 Why Do Proxy Caching? Delay in packet-switched networks (review) A transmission propagation B nodal processing queueing u Packets experience variable delays along the path from source to destination u Four sources of delay at each hop» Queuing delay depends on the load ("traffic intensity") on the network 21 CS 455/555 - Spring Nadeem
22 Why Do Proxy Caching? Traffic Intensity, or Utilization L = packet length (bits/packet) R = link speed (bps) a = average packet arrival rate (packets/second) La = average bit arrival rate (bits/second) La/R = traffic intensity = number of bits arriving per second / number of bits that can be transmitted per second What happens when La/R > 1? 22 CS 455/555 - Spring Nadeem
23 Why do Proxy Caching? The performance implications of caching } Web performance without caching: } Mean object size (L) = 50 Kbits } Mean request (object) rate = 29/sec } Mean origin server access time = 1 sec Average response time =?? public Internet origin servers u Average response time is» average access time over access link + average access time over public Internet 1.5 Mbps access link 10 Mbps LAN campus network u Average access time over access link is CS 455/555 - Spring Nadeem
24 Why do Proxy Caching? The performance implications of caching origin servers } Web performance without caching: } Mean object size (L) = 50 Kbits } Mean request (object) rate (a) = 29/sec } Mean origin server access time = 1 sec Average response time =?? u Traffic intensity on the access link: La = (50,000 bits/obj) (29 obj/sec) = 1,450,000 b/sec R = 1.5 Mbps La/R = 1,450,000 bits 1 sec X" 1 sec 1,500,000 bits = 0.96 public Internet 1.5 Mbps access link 10 Mbps LAN campus network 24 CS 455/555 - Spring Nadeem
25 Why do Proxy Caching? The performance implications of caching origin servers } Web performance without caching: } Mean object size = 50 Kbits } Mean request (object) rate (a) = 29/sec } Mean origin server access time = 1 sec Average response time =?? u Average response time is» average access time over access link + average access time over Internet» a long time (w/traffic intensity = 0.96) ms public Internet 1.5 Mbps access link 10 Mbps LAN campus network Rule of thumb: If traffic intensity < 60%, ignore queuing delay. If traffic intensity >= 60%, assume queuing delay is large. 25 CS 455/555 - Spring Nadeem
26 Why Do Proxy Caching? Delay in packet-switched networks (review) } Understand queuing delay in terms of traffic intensity La/R } R = link transmission speed (bps) } L = packet length (bits/packet) } a = average packet arrival rate (packets/second) u If La/R ~ 0: Average queuing delay small u As La/R 1: Delays become large u If La/R > 1: Work arrives faster than it can be serviced» Average delay goes to infinity! 26 CS 455/555 - Spring Nadeem Average Queuing Delay! 1! La/R
27 Why Do Proxy Caching? The performance implications of caching origin servers } Web performance without caching: } Mean object size = 50 Kbits } Mean request (object) rate = 29/sec } Mean origin server access time = 1 sec } Average response time =?? } What is traffic intensity on LAN? public Internet 1.5 Mbps access link 10 Mbps LAN campus network 27 CS 455/555 - Spring Nadeem
28 Why Do Proxy Caching? The performance implications of caching origin servers } Upgrade the access link to 10 Mbps } Response time =?? } Queuing is negligible hence response time ~ 1 s } Leave access link at 1.5 Mbps but add a proxy cache with 40% hit ratio and 10 ms access time } Cache access time includes time to send request to proxy, time to search cache, and time to send response back to client } Response time =?? } Traffic intensity on access link = Response time = 0.4 x 10 ms x 1,010 ms = 610 ms 0.6 x 0.97 = 0.58 public Internet 1.5 Mbps access link 10 Mbps LAN campus network A proxy cache lowers response time, lowers access link utilization, and saves money! 28 CS 455/555 - Spring Nadeem
29 Cache Performance for HTTP Requests What determines the hit ratio? } Cache size } Locality of references } How often the same web object is requested } How long objects remain "fresh" (unchanged) } Object references that can't be cached at all } Dynamically generated content } Protected content } Content purchased for each use } Content that must always be up-to-date } Advertisements ("pay-per-click" issues) 29 CS 455/555 - Spring Nadeem
30 Why Do Proxy Caching? The case for proxy caching } Lower latency for user's web requests } Reduced traffic at all network levels } Reduced load on servers } Some level of fault tolerance (network, servers) } Reduced costs to ISPs, content providers, etc., as web usage continues to grow exponentially } More rapid distribution of content 1.5 Mbps access link 10 Mbps LAN proxy server public Internet origin servers campus network 30 CS 455/555 - Spring Nadeem
31 HTTP User-Server Interaction The conditional GET } Goal: don t send object if cache has up-to-date cached version } no object transmission delay } lower link utilization } Proxy specifies the date of cached copy in HTTP request If-modified-since:<date> Proxy HTTP request If-modified-since: <date> HTTP response HTTP/ Not Modified Server object not modified } Server's response contains the object only if it has been changed since the cached date } Otherwise server returns: HTTP/ Not Modified HTTP request If-modified-since: <date> HTTP response HTTP/ OK <data> object modified 31 CS 455/555 - Spring Nadeem
32 HTTP Message Format Telnet example Connect to HTTP server port Telnet output Type GET command plus blank line HTTP response status line HTTP response headers plus blank line Object content Telnet output % telnet 80 Trying Connected to xenon.cs.odu.edu. Escape character is '^]'. GET /~nadeem/files/foo.txt HTTP/1.0 HTTP/ OK Date: Wed, 30 Jan :44:23 GMT Server: Apache/ (Unix) PHP/ Last-Modified: Thu, 19 May :23:43 GMT ETag: "5c-4a3a5f178cdd0" Accept-Ranges: bytes Content-Length: 92 Connection: close Content-Type: text/plain This test file is stored in the UNIX file system at /home/nadeem/public_html/files/foo.txt Connection closed by foreign host. 32 CS 455/555 - Spring Nadeem
33 The Web & HTTP Outline } Terminology (KR 2.2.1) } HTTP protocol } message format (KR 2.23) } non-persistent and persistent connections (KR 2.2.2) } pipelining } Authentication } Cookies (KR 2.2.4) } Web caches (KR ) } Security (KR ) 33 CS 455/555 - Spring Nadeem
34 Security HTTPS } HTTP over Secure Socket Layer } Secure version of HTTP } Encrypts the session data } Using either the SSL (Secure Socket Layer) protocol or the TLS (Transport Layer Security) protocol } SSL and TLS work above TCP but below application protocols (HTTP, SMTP, etc.) } Transferred using HTTP, encrypted } with default TCP/IP port 443 } For Web pages, the URL begins with } Provides server authentication and encrypted communication 34 CS 455/555 - Spring Nadeem
35 Security Authentication vs. Encryption } Authentication } to confirm the sender is who they say they are } using a digital certificate issued by a trusted third party } Encryption } to prevent others from reading the message } using a cipher (encryption-decryption algorithm) } with symmetric or asymmetric (related public and private) keys 35 CS 455/555 - Spring Nadeem
36 Security Encryption and Decryption } Symmetric cryptography } Same key for encryption and decryption } would be efficient as long as the key is pre-agreed and secure } Not suitable for the Web } Asymmetric-key cryptography (also called Public-key cryptography) } Using a pair of related public and private keys. Encryption and decryption are asymmetric. } Used in HTTPS 36 CS 455/555 - Spring Nadeem
37 Principles of Cryptography The language of cryptography "crypto" - secret "graphy" - writing symmetric key crypto: sender, receiver keys identical public-key crypto: encryption key public, decryption key secret 37 CS 455/555 - Spring Nadeem
38 Principles of Cryptography Symmetric key cryptography Substitution cipher: substituting one thing for another } Caesar cipher: substitute one letter for another by shifting alphabet k letters plaintext: abcdefghijklmnopqrstuvwxyz ciphertext: lmnopqrstuvwxyzabcdefghijk E.g.: Plaintext: bob. i love you. alice ciphertext: mzm. t wzgp jzf. lwtnp 38 CS 455/555 - Spring Nadeem
39 Principles of Cryptography Symmetric key cryptography Substitution cipher: substituting one thing for another } monoalphabetic cipher: substitute one letter for another plaintext: abcdefghijklmnopqrstuvwxyz ciphertext: mnbvcxzasdfghjklpoiuytrewq E.g.: Plaintext: bob. i love you. alice ciphertext: nkn. s gktc wky. mgsbc 39 CS 455/555 - Spring Nadeem
40 Principles of Cryptography Symmetric key cryptography K A-B K A-B plaintext message, m encryption algorithm ciphertext K A-B (m) decryption algorithm plaintext m = K ( K (m)) A-B A-B Symmetric key crypto: Bob and Alice know same key, K A-B E.g.: Key is knowing substitution pattern in monoalphabetic substitution cipher 40 CS 455/555 - Spring Nadeem
41 Principles of Cryptography Public Key Cryptography } Symmetric key cryptography } requires sender and receiver to know shared secret key } Public key cryptography } sender and receiver do not share secret key } public encryption key known to all } private decryption key known only to receiver 41 CS 455/555 - Spring Nadeem
42 Principles of Cryptography Public Key Cryptography 42 CS 455/555 - Spring Nadeem
43 Public Key Cryptography Algorithms Requirements Need K + B (m) and K- B (m) such that 1. K - B (K+ B (m)) = m 2. Given public key K + B, it should be impossible to compute private key K - B RSA: Rivest, Shamir, Adelson algorithm 43 CS 455/555 - Spring Nadeem
44 RSA Another Important Property The following property will be very useful later: - + K (K (m)) = m B B = + - B B K (K (m)) use public key first, followed by private key use private key first, followed by public key Result is the same! 44 CS 455/555 - Spring Nadeem
45 Public Key Cryptography How To Bind a Public Key to Its User? } Public-key infrastructure (PKI) } Provide a trusted third party (Certifying Authority) to use identity certificates to bind public keys to users } PKI may refer to the software that manages certificates in a large-scale setting } A certificate may be revoked } check the certificate revocation list (CRL) 45 CS 455/555 - Spring Nadeem
46 Public Key Cryptography How to Generate a Certificate? } Generate a public-private key pair from a large random number } Keep the private key, send the public key and identifying information to a Certificate Authority (CA) } Pay a fee to the CA } The CA verifies the identity } The CA creates a certificate (including all ID information and the URL of the web site) } The CA signs the certificate (encoded with its own private key) and sends the signed certificate to you 46 CS 455/555 - Spring Nadeem
47 Key Distribution and Certification Certification Authorities } Binds public key to particular entity, E. private } E registers its public key with CA. } E provides "proof of identity" to CA. } CA creates certificate binding E to its public key. } Certificate containing E's public key digitally signed by CA CA says "this is E's public key" Certification Authority (CA) 47 CS 455/555 - Spring Nadeem
48 Key Distribution and Certification Certification Authorities When Alice wants Bob's public key: } get Bob's certificate (Bob or elsewhere). } apply CA's public key to Bob's certificate, get Bob's public key } web browsers and other apps are pre-loaded with public keys for various CAs digital signature (decrypt) Bob's public key, K B + K CA - (K B+ ) 48 CS 455/555 - Spring Nadeem
49 HTTPS Putting Everything Together } Server has obtained a certificate validating that it is who it says it is. } certificate contains: CA - (S +, ID information) } Server sends: m, S - (m), CA - (S +, ID information) } Client uses CA's public key to open certificate, then gets server's public key. } Client uses server's public key S + to open encrypted message S - (m) } Client compares message to unencrypted message m } Once authenticated, client can encrypt its messages with the server's public key, S CS 455/555 - Spring Nadeem
50 The Web & HTTP Outline } Terminology (KR 2.2.1) } HTTP protocol } message format (KR 2.23) } non-persistent and persistent connections (KR 2.2.2) } pipelining } Authentication } Cookies (KR 2.2.4) } Web caches (KR ) } Security (KR ) 50 CS 455/555 - Spring Nadeem
51 Application-Layer Protocols Outline } The architecture of distributed systems } Client/Server computing } P2P computing } Hybrid (Client/Server and P2P) systems } The programming model used in constructing distributed systems } Socket programming } Example client/server systems and their application-layer protocols } The World-Wide Web (HTTP) } Reliable file transfer (FTP) } (SMTP & POP) } Internet Domain Name System (DNS) 51 CS 455/555 - Spring Nadeem application application transport network link physical local ISP company network regional ISP
52 Application-Layer Protocols FTP: The Internet file transfer protocol (RFC 959) User at host FTP! user! interface! FTP! client! File Transfer FTP! server! Local file system Remote file system } FTP is used to transfer a file to/from remote host } FTP uses a client/server model } Client: side that initiates transfer (either to/from remote) } Server: remote host } FTP server listens for connections on port CS 455/555 - Spring Nadeem
53 FTP Protocol Design Control and data sockets FTP client TCP control connection" (port 21)" TCP data connection" FTP server } FTP client contacts FTP server on port 21, using TCP as the transport protocol } Two parallel TCP connections opened: } A single control connection for exchanging commands, responses ("out of band control") } n data connections for transferring file data to/from server } FTP server maintains "state" } Remembers current directory, earlier authentication 53 CS 455/555 - Spring Nadeem
54 FTP Protocol Design Active vs. Passive FTP } Traditional use of FTP is "active" } client contacts server on control port } server uses data port to contact client and transfer data } Use of firewalls has made "passive" more common } client contacts server on control port } client and server agree on a new server port for data } client contacts server on data port for data transfer 54 CS 455/555 - Spring Nadeem
55 FTP Protocol Design Active FTP } The client connects from a random unprivileged port (N > 1023) to the FTP server's command port, port 21 } The client starts listening to port N+1 and sends the FTP command PORT N+1 to the FTP server } The server will then connect back to the client's specified data port from its local data port, which is port CS 455/555 - Spring Nadeem
56 FTP Protocol Design Passive FTP } The client initiates both connections to the server } When opening an FTP connection, the client opens two random unprivileged ports locally (N > 1023 and N+1). } The first port is used to contact the server on port 21 } The client then issues the PASV command. } The server then opens a random unprivileged port (P > 1023) and sends the PORT P command back to the client. } The client then initiates the connection from port N+1 to port P on the server to transfer data. 56 CS 455/555 - Spring Nadeem
57 FTP Protocol Design FTP commands, responses } Sample commands: } Sent as ASCII text on control socket USER <username> PASS <password> LIST Return list of file in current directory RETR <filename> Retrieves (gets) file STOR <filename> Stores (puts) file onto remote host } Sample return codes } Status code and phrase (as in HTTP) 331 Username OK, password required 125 Data connection already open; transfer starting 425 Can't open data connection 452 Error writing file 57 CS 455/555 - Spring Nadeem
58 Application-Layer Protocols Outline } The architecture of distributed systems } Client/Server computing } P2P and Hybrid computing } The programming model used in constructing distributed systems } Socket programming } Example client/server systems and their application-layer protocols } The World-Wide Web (HTTP) } Reliable file transfer (FTP) } (SMTP & POP) } Internet Domain Name System (DNS) 58 CS 455/555 - Spring Nadeem application application transport network link physical local ISP company network regional ISP
59 Application-Layer Protocols Electronic mail } Major components: } User agents } Mail servers } Mailboxes } Protocols: } Simple Mail Transfer Protocol (SMTP) delivers mail to servers } From clients to local mail server } Inter-mail server delivery Post Office Protocol (POP) for user access to delivered mail server SMTP" mail server SMTP" user agent SMTP" SMTP" SMTP" mail server user agent outgoing message queue POP" SMTP" POP" user mailbox user agent SMTP" user agent 59 CS 455/555 - Spring Nadeem
60 Electronic Mail Mail servers } Servers maintain: } A message queue of outgoing messages } A mailbox containing incoming messages for each user outgoing message queue user mailbox POP" user agent } SMTP protocol is run between mail agents and servers to send messages } Client the sending mail server or agent } Server the receiving mail server mail server SMTP" SMTP" mail server user agent SMTP" SMTP" POP" user agent 60 CS 455/555 - Spring Nadeem
61 Electronic Mail The delivery process Protocol flow flow user agent mail server mail server SMTP SMTP POP IMAP user agent Mail Sender Local Mail Server Remote Mail Server } User's mail agent contacts its local mail server u Local mail server contacts the destination mail server(s) Mail Recipient u Destination mail server places the mail into the appropriate user's mailbox u User retrieves mail via a mail access protocol 61 CS 455/555 - Spring Nadeem
62 The Delivery Process SMTP [RFC 2821] } SMTP uses a TCP socket on port 25 to transfer reliably from client to server } is temporarily stored on the local server and eventually transferred directly to receiving server } Intermediate relay is a special case } Three phases of the protocol: } Handshaking ("greeting") } Transfer of messages } Closure } Client/server interaction follows a command/response paradigm } Commands are plain ASCII text } Responses are a status code and an optional phrase } Command and response lines terminated with CRLF 62 CS 455/555 - Spring Nadeem
63 The Delivery Process Sample SMTP interaction u SMTP client establishes TCP connection to server hamburger.edu at port 25» (SMTP is non-standard in that the server "talks first") Server: 220 hamburger.edu Client: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: <alice@crepes.fr> S: 250 alice@crepes.fr... Sender ok C: RCPT TO: <bob@hamburger.edu> S: 250 bob@hamburger.edu... Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: Do you like ketchup? C: How about pickles? Line with single '.' is C:. the message delimiter S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection 63 CS 455/555 - Spring Nadeem
64 Electronic Mail Mail message format (RFC 2822) } Header lines, e.g., } From: } To: } Subject: these are different from SMTP commands! header body blank line } Body } The "message", ASCII characters only 64 CS 455/555 - Spring Nadeem
65 Electronic Mail Mail message format example Server: 220 hamburger.edu Client: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: S: 250 Sender ok C: RCPT TO: S: 250 Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: From: alice@crepes.fr C: To: bob@hamburger.edu C: Subject: food C: C: Do you like ketchup? C: How about pickles? C:. S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection 65 CS 455/555 - Spring Nadeem
66 Mail Message Format MIME Multimedia mail extensions (RFC 2045, 2056) } SMTP requires all data to be 7-bit ASCII characters } All non-ascii data must be encoded as ASCII strings } Additional lines in the message header declare MIME content type MIME version Method used to encode data Multimedia data type, subtype, parameter declaration ASCII encoded data From: alice@crepes.fr To: bob@hamburger.edu Subject: Picture of yummy crepe. MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data base64 encoded data 66 CS 455/555 - Spring Nadeem
67 MIME Multimedia Mail Extensions MIME types Content-Type: <type>/<subtype>[; <parameters>] Content-Type: text/plain; charset=us-ascii (optional, type-dependent) Content-Type: application/pdf; filename=foo.pdf } Text } Subtypes: plain, html } Image } Subtypes: jpeg, gif } Audio } Subtypes: basic (8-bit µ-law encoded), 32kadpcm (32 kbps ADPCM) } Video } Subtypes: mpeg, quicktime } Application } Other data that must be processed by reader before it is "viewable" } Subtypes: msword, octet-stream 67 CS 455/555 - Spring Nadeem
68 MIME Types Multipart Type MIME version" Indicates multiple, mixed types" 1 part " 1 part " From: alice@crepes.fr To: bob@hamburger.edu Subject: Picture of yummy crepe. MIME-Version: 1.0 Content-Type: multipart/mixed; boundary= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Dear Bob, Please find a picture of a crepe Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data base64 encoded data Header/Body separators" Defines parts separator " Encoding & type" specified for each part" 68 CS 455/555 - Spring Nadeem
69 Electronic Mail SMTP notes } SMTP uses persistent connections } SMTP is a "push" protocol } SMTP requires that message (header & body) be in 7-bit ASCII } All binary objects must be ASCII encoded } Certain character strings are not permitted in a message } Message has to be encoded if these strings are used } With MIME extensions, multiple objects can be sent in a single multipart message } SMTP server uses CRLF.CRLF to determine end of message 69 CS 455/555 - Spring Nadeem
70 Application-Layer Protocols HTTP v. SMTP } HTTP is a "pull" protocol, SMTP is a "push" protocol } Persistence: } SMTP uses persistent connections } HTTP may or may not } Message/object content: } Both have ASCII command/response interaction and status codes } SMTP requires that messages be in 7-bit ASCII multiple objects message sent in a multipart message } HTTP can transfer anything each object is encapsulated in its own response headers 70 CS 455/555 - Spring Nadeem
71 Electronic Mail Mail access protocols user agent SMTP mail server SMTP mail server POP IMAP user agent HTTP Mail Sender" Local Mail Server" Remote Mail Server" Mail Recipient" } SMTP: Delivery to receiver's server } Mail access protocol: Retrieval from server by a user } POP [RFC 1939] Authorization and download } IMAP (Internet Mail Access Protocol) [RFC 2060] } More features (more complex) } Manipulation of stored messages on server } HTTP: Gmail, Yahoo! Mail, etc. 71 CS 455/555 - Spring Nadeem
72 Mail Access Protocols The POP-3 protocol } Authorization phase } Client commands: } user: declare username } pass: password } Server responses } +OK } -ERR } Transaction phase } list: list message numbers and sizes } retr: retrieve message by number } dele: delete } quit 72 CS 455/555 - Spring Nadeem S: +OK POP3 server ready C: user alice S: +OK C: pass hungry S: +OK user logged on C: list S: S: S:. C: retr 1 S: <message 1 contents> S:. C: dele 1 C: retr 2 S: <message 2 contents> S:. C: dele 2 C: quit S: +OK POP server sign off
73 Mail Access Protocols POP-3 and IMAP More about POP3 } Previous example uses "download and delete" mode. } Bob cannot re-read if he changes client } "Download-and-keep": copies of messages on different clients } POP3 is stateless across sessions IMAP } Keep all messages in one place: the server } Allows user to organize messages in folders } IMAP keeps user state across sessions: } names of folders and mappings between message IDs and folder name 73 CS 455/555 - Spring Nadeem
74 Mail Access Protocols Web-Based } User agent is a web browser } User communicates with remote mailbox via HTTP } When recipient wants to access a message } message is sent from mail server to browser using HTTP } When sender wants to send a message } is sent from browser to mail server using HTTP } mail server still uses SMTP to communicate with other mail servers 74 CS 455/555 - Spring Nadeem
75 Application-Layer Protocols Outline } The architecture of distributed systems } Client/Server computing } P2P and Hybrid computing } The programming model used in constructing distributed systems } Socket programming } Example client/server systems and their application-layer protocols } The World-Wide Web (HTTP) } Reliable file transfer (FTP) } (SMTP & POP) } Internet Domain Name System (DNS) 75 CS 455/555 - Spring Nadeem application application transport network link physical local ISP company network regional ISP
76 Application-Layer Protocols The Domain Name System (DNS) } Computers (hosts, routers) connected to the Internet have two forms of names: } IP address a 32 bit identifier used for addressing hosts and routing data to them } Hostname an ASCII string used by applications } The DNS is an Internet-wide service that provides mappings between IP addresses and hostnames } The DNS is a distributed database implemented in a hierarchy of name servers } The DNS is also an application-layer protocol } Hosts and routers use name servers to resolve names (address/name translation) } Name resolution is an essential Internet function implemented as applicationlayer protocol 76 CS 455/555 - Spring Nadeem
77 The Domain Name System Name Hierarchy in DNS com" edu" net" org" npr" gov" yahoo" amazon" odu" cornell" sprint" bellsouth" srv" ads" } hostname = "dot" separated concatenation of domain names along path toward the root } odu.edu } cs.odu.edu cs" ece" cs"» atria.cs.odu.edu 77 CS 455/555 - Spring Nadeem
78 Name Hierarchy in the DNS Top level domains com" edu" net" org" gov" } Generic domains: }.com,.org,.net,.edu,.gov,.mil,.int }.biz,.info,.name,.pro } Special sponsored names }.aero,.coop,.museum } Country code domains }.uk,.de,.jp,.us, etc. 78 CS 455/555 - Spring Nadeem
79 DNS Overview } } } Applications need IP address to open connection Use DNS to find the IP address given a hostname Steps: 1. Application invokes DNS (gethostbyname() in C) 2. DNS application in host sends query into network (UDP port 53) 3. DNS application in host receives reply with IP address (after some delay) 4. IP address passed up to the application DNS is a black box as far as the application is concerned. 79 CS 455/555 - Spring Nadeem
80 The Domain Name System Designing a distributed service } Why not centralize the DNS } A server process on a big, well connected supercomputer? } Centralized systems do not scale! } Poor reliability: centralized = single point of failure } Poor performance: centralized = "remote access" for most users } Difficult to manage: centralized = all traffic goes to one location, a large staff has to be present to handle registrations } A centralized system is not politically feasible in an international network 80 CS 455/555 - Spring Nadeem
81 DNS Name Servers Distributed, Hierarchical database Root DNS Servers com DNS servers org DNS servers edu DNS servers yahoo.com DNS servers amazon.com DNS servers pbs.org DNS servers poly.edu umass.edu DNS servers DNS servers client wants IP for 1 st approx: } client queries root server to find com DNS server } client queries.com DNS server to get amazon.com DNS server } client queries amazon.com DNS server to get IP address for 81 CS 455/555 - Spring Nadeem
82 Designing a Distributed Service DNS Name Servers } No server has every hostname-to-ip address mapping } Authoritative name server: } Every host is registered with at least one authoritative server that stores that host's IP address and name } The authoritative name server can perform name/address translation for that host's name/address } Local authoritative name servers: } Each ISP, university, company, has a local (default) name server authoritative for its own hosts } Resolvers always query a name server local to it to resolve any host name Local authoritative server cruzan.cs.odu.edu Name resolution: Query and Reply Local host atria.cs.odu.edu What if the name is not a local host (e.g., 82 CS 455/555 - Spring Nadeem
83 DNS Name Servers Root name servers e NASA Mt View, CA f Internet Software C. Palo Alto, CA (and 36 other locations) a Verisign, Dulles, VA c Cogent, Herndon, VA (also LA) d U Maryland College Park, MD g US DoD Vienna, VA h ARL Aberdeen, MD j Verisign, ( 21 locations) k RIPE London (also 16 other locations) i Autonomica, Stockholm (plus 28 other locations) m WIDE Tokyo (also Seoul, Paris, SF) b USC-ISI Marina del Rey, CA l ICANN Los Angeles, CA } A root name server is contacted when a local name server can't resolve a name } The root server either resolves the name or provides pointers to authoritative servers at lower level of name hierarchy } There are 13 root name servers worldwide } a.root-servers.org m.root-servers.org 83 CS 455/555 - Spring Nadeem
84 DNS Name Servers Using a server hierarchy for resolving names } Host atria.cs.odu.edu wants to know the IP address of } atria contacts its local DNS server cruzan.cs.odu.edu } To resolve a non-local name, the local name server queries the root server } The root server responds with the TLD for.com } The local DNS server contacts the TLD server } The local DNS server contacts the authoritative server dns.yahoo.com } Results feed back to atria } atria can now use the IP address of to make a connection 84 CS 455/555 - Spring Nadeem Root DNS server a.root-servers.net 2 TLD DNS server Authoritative DNS server dns.yahoo.com Requesting host atria.cs.odu.edu 7 Target host Local DNS server cruzan.cs.odu.edu
85 DNS Name Servers Recursive vs. Iterative Queries u The DNS supports two paradigms of queries:» Recursive queries» Iterative queries u Recursive queries place the burden of name resolution (recursively) on the contacted server u In an iterated query the contacted server simply replies with the name of the server to contact» "I don't know; trying asking X" 2 Root DNS server a.root-servers.net TLD DNS server 5 4 Authortative DNS server dns.cs.odu.edu Local DNS server dns.yahoo.com 85 CS 455/555 - Spring Nadeem Requesting host estore.yahoo.com
86 DNS Name Servers Recursive vs. Iterative Queries } Any query can be recursive or iterative } Iterative and recursive queries can be combined } Typically, the query from the requesting host to the local DNS server is recursive and the remaining queries are iterative Root DNS server a.root-servers.net 2 TLD DNS server Authoritative DNS server dns.yahoo.com Target host Local DNS server cruzan.cs.odu.edu 86 CS 455/555 - Spring Nadeem Requesting host atria.cs.odu.edu
87 DNS Name Servers Caching and updating DNS entries u Every server caches all the mappings it learns» Cache entries are "soft state"» They timeout (are deleted) after some time period u DNS cache update/notify mechanisms under design by the IETF» See RFC 2136 Root DNS server a.root-servers.net 2 TLD DNS server Authoritative DNS server dns.yahoo.com Target host Local DNS server cruzan.cs.odu.edu 87 CS 455/555 - Spring Nadeem Requesting host atria.cs.odu.edu
88 DNS Name Servers DNS resource records } The DNS is a distributed database storing resource records (RRs) u Type = NS } } } RR format: <name, value, type, time_to_live> u Type = A» name is a hostname» value is hostname's IP address u Type = CNAME» name is an alias name for some "canonical" (the real) name» (relay1.west-coast.yahoo.com, , A)» value is canonical name name is a domain value is name of authoritative name server for this domain (yahoo.com, dns.yahoo.com, NS)» (yahoo.com, relay1.west-coast.yahoo.com, CNAME) u Type = MX» value is name of mail server host associated with name» (yahoo.com, mail.yahoo.com, MX) 88 CS 455/555 - Spring Nadeem
89 DNS Inserting Records into DNS } Example: new startup "Network Utopia" } Register name networkuptopia.com at DNS registrar (e.g., Network Solutions) } provide names, IP addresses of authoritative name server (primary and secondary) } registrar inserts two RRs into com TLD server: (networkutopia.com, dns1.networkutopia.com, NS) (dns1.networkutopia.com, , A) } Create on authoritative server Type A record for Type MX record for networkutopia.com } How do people get IP address of your Web site? 89 CS 455/555 - Spring Nadeem
90 DNS Protocol DNS query and reply messages } DNS query and reply messages both have the same message format u Messages have a fixed length message header» Identification 16 bit query/reply identifier used to match relies to queries» Flags: v Query/Reply bit v "Reply is authoritative" bit v "Recursion desired" bit v... Identification Number of questions Number of authority RRs Flags Number of answer RRs Number of additional RRs Questions (variable number) Answers (variable number of records) Authority (variable number of records) Additional Information (variable number of records) 12 bytes" variable" 90 CS 455/555 - Spring Nadeem
91 DNS Protocol DNS query and reply messages } Messages have a variable-length "question & answer" body u Questions:» The name and type fields (type A or MX) for a query hotmail.com MX u Answers:» One RR for each IP address answering query u Authority:» Resource records of other authoritative servers Identification Number of questions Number of authority RRs Flags Number of answer RRs Number of additional RRs Questions (variable number) Answers (variable number of records) Authority (variable number of records) Additional Information (variable number of records) 12 bytes" variable" 91 CS 455/555 - Spring Nadeem
92 DNS Resource Records dig query/reply message example atria:[~]% /usr/bin/dig ; <<>> DiG P1 <<>> ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: ;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ; IN A ;; ANSWER SECTION: 33 IN A IN A IN A IN A IN A IN A CS 455/555 - Spring Nadeem
93 dig /usr/bin/dig on CS Linux machines } man dig } at Unix command line } or see } +norecurse } run an iterative query } ask the specified server (instead of your local authoritative server) } +trace } make iterative queries and show results each time } MX, CNAME, NS } indicate type of query (default is A) 93 CS 455/555 - Spring Nadeem
94 DNS Example Empty Cache } Resolve the hostname in QUERY:! QUERY: QUERY: REPLY: com (NS) REPLY: cnn.com (NS)! com root edu net REPLY:! ! Local Server QUERY: REPLY: (A)! cnn com NS A.GTLD-SERVERS.NET cnn.com NS DNS.CNN.COM A CS 455/555 - Spring Nadeem
95 DNS Example Empty Cache - Steps } Client sends query to local server } Local server looks in cache, cache is empty } Local server contacts root server } root server responds with NS of.com domain } Local server contacts.com NS }.com NS responds with NS of cnn.com domain } Local server contacts cnn.com NS } cnn.com NS responds with A of } At every step, the information sent to the local server is stored in its cache 95 CS 455/555 - Spring Nadeem
96 DNS Example Warm Cache } Resolve the hostname www2.cnn.com with a warm cache root QUERY:! www2.cnn.com! com edu net REPLY:! ! Local Server QUERY: www2.cnn.com! REPLY: (A)! cnn com NS A.GTLD-SERVERS.NET cnn.com NS DNS.CNN.COM A www2.cnn.com A CS 455/555 - Spring Nadeem
97 DNS Example Warm Cache - Steps } Client sends query www2.cnn.com to local server } Local server looks in cache } doesn't find www2.cnn.com, but does find cnn.com NS } Local server contacts cnn.com NS } cnn.com NS responds with A of www2.cnn.com } At every step, the information sent to the local server is stored in its cache 97 CS 455/555 - Spring Nadeem
98 The Domain Name System Summary u F gets 270,000,000+ hits per day } Other servers have comparable load u The Verisign TLD servers answer 5,000,000,000 queries per day u Clearly the DNS would collapse without: } Hierarchy } Distributed processing } Caching u If DNS fails, Internet services stop working! 98 CS 455/555 - Spring Nadeem
99 The Domain Name System For More Info } DNS Specification } RFC 1034, RFC 1035 } DNS Caching } RFC 2136 } DNS Attacks } CAIDA, Nameserver DoS Attack October 2002 analysis 99 CS 455/555 - Spring Nadeem
100 Application-Layer Protocols Outline } The architecture of distributed systems } } } Client/Server computing P2P computing Hybrid (Client/Server and P2P) systems } The programming model used in constructing distributed systems } Socket programming } Example client/server systems and their application-level protocols } } } } The World-Wide Web (HTTP) Reliable file transfer (FTP) (SMTP & POP) Internet Domain Name System (DNS) 100 CS 455/555 - Spring Nadeem application transport network link physical local ISP company network regional ISP
FTP: the file transfer protocol
File Transfer: FTP FTP: the file transfer protocol at host FTP interface FTP client local file system file transfer FTP remote file system transfer file to/from remote host client/ model client: side that
More informationCPSC 360 - Network Programming. Email, FTP, and NAT. http://www.cs.clemson.edu/~mweigle/courses/cpsc360
CPSC 360 - Network Programming E, FTP, and NAT Michele Weigle Department of Computer Science Clemson University mweigle@cs.clemson.edu April 18, 2005 http://www.cs.clemson.edu/~mweigle/courses/cpsc360
More informationDATA COMMUNICATOIN NETWORKING
DATA COMMUNICATOIN NETWORKING Instructor: Ouldooz Baghban Karimi Course Book: Computer Networking, A Top-Down Approach By: Kurose, Ross Introduction Course Overview Basics of Computer Networks Internet
More informationFTP: the file transfer protocol
FTP: the file transfer protocol at host FTP interface FTP client local file system file transfer FTP remote file system transfer file to/from remote host client/ model client: side that initiates transfer
More informationCours du 22 novembre
Cours du 22 novembre Couche application DNS Application Layer 2-2 DNS: domain name system people: many identifiers: SSN, name, passport # Internet hosts, routers: IP address (32 bit) - used for addressing
More informationThe Application Layer: DNS
Recap SMTP and email The Application Layer: DNS Smith College, CSC 9 Sept 9, 0 q SMTP process (with handshaking) and message format q Role of user agent access protocols q Port Numbers (can google this)
More informationDomain Name System Richard T. B. Ma
Domain Name System Richard T. B. Ma School of Computing National University of Singapore CS 3103: Compute Networks and Protocols Names Vs. Addresses Names are easier for human to remember www.comp.nus.edu.sg
More informationDomain Name System (or Service) (DNS) Computer Networks Term B10
Domain Name System (or Service) (DNS) Computer Networks Term B10 DNS Outline DNS Hierarchial Structure Root Name Servers Top-Level Domain Servers Authoritative Name Servers Local Name Server Caching and
More informationFTP and email. Computer Networks. FTP: the file transfer protocol
Computer Networks and email Based on Computer Networking, 4 th Edition by Kurose and Ross : the file transfer protocol transfer file to/from remote host client/ model client: side that initiates transfer
More information1 Introduction: Network Applications
1 Introduction: Network Applications Some Network Apps E-mail Web Instant messaging Remote login P2P file sharing Multi-user network games Streaming stored video clips Internet telephone Real-time video
More informationApplications & Application-Layer Protocols: The Domain Name System and Peerto-Peer
CPSC 360 Network Programming Applications & Application-Layer Protocols: The Domain Name System and Peerto-Peer Systems Michele Weigle Department of Computer Science Clemson University mweigle@cs.clemson.edu
More informationinternet technologies and standards
Institute of Telecommunications Warsaw University of Technology 2015 internet technologies and standards Piotr Gajowniczek Andrzej Bąk Michał Jarociński Internet application layer the email service The
More informationDNS: Domain Name System
DNS: Domain Name System People: many identifiers: SSN, name, passport # Internet hosts, routers: IP address (32 bit) - used for addressing datagrams name, e.g., ww.yahoo.com - used by humans Q: map between
More informationChapter 2 Application Layer. Lecture 5 FTP, Mail. Computer Networking: A Top Down Approach
Chapter 2 Application Layer Lecture 5 FTP, Mail Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Application Layer 2-1 Chapter 2: outline 2.1 principles
More informationApplication Layer. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross
Application Layer Abusayeed Saifullah CS 5600 Computer Networks These slides are adapted from Kurose and Ross Web caches (proxy server) goal: satisfy client request without involving origin server v user
More informationProtocolo FTP. FTP: Active Mode. FTP: Active Mode. FTP: Active Mode. FTP: the file transfer protocol. Separate control, data connections
: the file transfer protocol Protocolo at host interface local file system file transfer remote file system utilizes two ports: - a 'data' port (usually port 20...) - a 'command' port (port 21) SISTEMAS
More informationChapter 2 Application Layer
Chapter 2 Application Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you see the animations;
More informationDigital Communication in the Modern World Application Layer cont. DNS, SMTP
Digital Communication in the Modern World Application Layer cont. DNS, http://www.cs.huji.ac.il/~com com@cs.huji.ac.il Some of the slides have been borrowed from: Computer Networking: A Top Down Approach
More informationDomain Name System (DNS) RFC 1034 RFC 1035 http://www.ietf.org
Domain Name System (DNS) RFC 1034 RFC 1035 http://www.ietf.org TCP/IP Protocol Suite Application Layer DHCP DNS SNMP HTTP SMTP POP Transport Layer UDP TCP ICMP IGMP Network Layer IP Link Layer ARP ARP
More informationHow To Map Between Ip Address And Name On A Domain Name System (Dns)
Computer Networks: Domain Name Service (DNS) CS 3516 D- term 2013 Instructor: Krishna Venkatasubramanian Quiz 2 DNS: domain name system people: many identifiers: SSN, name, passport # Internet hosts, routers:
More informationComputer Networks. Instructor: Niklas Carlsson Email: niklas.carlsson@liu.se
Computer Networks Instructor: Niklas Carlsson Email: niklas.carlsson@liu.se Notes derived from Computer Networking: A Top Down Approach, by Jim Kurose and Keith Ross, Addison-Wesley. The slides are adapted
More informationCMPE 80N: Introduction to Networking and the Internet
CMPE 80N: Introduction to Networking and the Internet Katia Obraczka Computer Engineering UCSC Baskin Engineering Lecture 10 CMPE 80N Fall'10 1 Announcements Forum assignment #2 posted. Due Nov. 5 th.
More informationCMPE 80N: Introduction to Networking and the Internet
CMPE 80N: Introduction to Networking and the Internet Katia Obraczka Computer Engineering UCSC Baskin Engineering Lecture 11 CMPE 80N Spring'10 1 Announcements Guest lecture on intellectual property and
More informationCS 355. Computer Networking. Wei Lu, Ph.D., P.Eng.
CS 355 Computer Networking Wei Lu, Ph.D., P.Eng. Chapter 2: Application Layer Overview: Principles of network applications? Introduction to Wireshark Web and HTTP FTP Electronic Mail: SMTP, POP3, IMAP
More informationCSCI-1680 SMTP Chen Avin
CSCI-1680 Chen Avin Based on Computer Networking: A Top Down Approach - 6th edition Electronic Three major components: s s simple transfer protocol: User Agent a.k.a. reader composing, editing, reading
More informationDNS and P2P File Sharing
Computer Networks DNS and P2P File Sharing Based on Computer Networking, 4 th Edition by Kurose and Ross DNS: Domain Name System People: many identifiers: SSN, name, passport # Internet hosts, routers:
More informationDNS and electronic mail. DNS purposes
DNS and electronic mail Section 9.1.3 in the textbook DNS purposes Originally purpose was to translate hostnames into IP addresses www.csd. is easier to remember than 129.100.23.247 Lets us do load balancing
More informationCS 43: Computer Networks Naming and DNS. Kevin Webb Swarthmore College September 17, 2015
CS 43: Computer Networks Naming and DNS Kevin Webb Swarthmore College September 17, 2015 Agenda Identifiers and addressing Domain Name System History Query sequences Record types Load balancing Recall:
More informationNames vs. Addresses. Flat vs. Hierarchical Space. Domain Name System (DNS) Computer Networks. Lecture 5: Domain Name System
Names vs. Addresses Computer Networks Lecture 5: Domain Name System Names are easier for human to remember www.umich.edu vs. 141.213.4.4 Addresses can be changed without changing names move www.umich.edu
More informationApplication layer Protocols application transport
Application layer Protocols application transport data link physical Network Applications and Application Layer Protocols Network applications: running in end systems (hosts) distributed, communicating
More informationDomain Name System DNS
CE443 Computer Networks Domain Name System DNS Behnam Momeni Computer Engineering Department Sharif University of Technology Acknowledgments: Lecture slides are from Computer networks course thought by
More informationNetwork Technologies
Network Technologies Glenn Strong Department of Computer Science School of Computer Science and Statistics Trinity College, Dublin January 28, 2014 What Happens When Browser Contacts Server I Top view:
More informationDomain Name System (DNS)
Domain Name System (DNS) Instructor: Anirban Mahanti Office: ICT 745 Email: mahanti@cpsc.ucalgary.ca Class Location: ICT 121 Lectures: MWF 12:00 12:50 Notes derived from Computer Networking: A Top Down
More informationCS43: Computer Networks Email. Kevin Webb Swarthmore College September 24, 2015
CS43: Computer Networks Email Kevin Webb Swarthmore College September 24, 2015 Three major components: mail (MUA) mail transfer (MTA) simple mail transfer protocol: SMTP User Agent a.k.a. mail reader composing,
More informationEvolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP Abstract Message Format. The Client/Server model is used:
Evolution of the WWW Communication in the WWW World Wide Web (WWW) Access to linked documents, which are distributed over several computers in the History of the WWW Origin 1989 in the nuclear research
More informationCommunicating Applications
Communicating Applications Network Applications The raison d'être of computer networks Innovation happens in the application layer There is always a killer application Remote login -> Email -> Web -> P2P
More informationDNS. Spring 2016 CS 438 Staff 1
DNS Spring 2016 CS 438 Staff 1 Host Names vs. IP addresses Host names Mnemonic name appreciated by humans Variable length, full alphabet of characters Provide little (if any) information about physical
More informationThe Application Layer. CS158a Chris Pollett May 9, 2007.
The Application Layer CS158a Chris Pollett May 9, 2007. Outline DNS E-mail More on HTTP The Domain Name System (DNS) To refer to a process on the internet we need to give an IP address and a port. These
More informationComputer Networks & Security 2014/2015
Computer Networks & Security 2014/2015 IP Protocol Stack & Application Layer (02a) Security and Embedded Networked Systems time Protocols A human analogy All Internet communication is governed by protocols!
More informationEvolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP - Message Format. The Client/Server model is used:
Evolution of the WWW Communication in the WWW World Wide Web (WWW) Access to linked documents, which are distributed over several computers in the History of the WWW Origin 1989 in the nuclear research
More informationDistributed Systems. Naming
Distributed Systems Naming Some slides here are adapted from DNS slide material by Kurose and Ross for their textbook: Computer Networking: A Top Down Approach Featuring the Internet Any problem in computer
More informationChapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP
Chapter 2: outline 2.1 principles of network applications app architectures app requirements 2.2 Web and HTTP 2.3 FTP 2.4 electronic mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications 2.7 socket programming
More informationThe Web: some jargon. User agent for Web is called a browser: Web page: Most Web pages consist of: Server for Web is called Web server:
The Web: some jargon Web page: consists of objects addressed by a URL Most Web pages consist of: base HTML page, and several referenced objects. URL has two components: host name and path name: User agent
More informationDATA COMMUNICATOIN NETWORKING
DATA COMMUNICATOIN NETWORKING Instructor: Ouldooz Baghban Karimi Course Book: Computer Networking, A Top-Down Approach By: Kurose, Ross Introduction Course Overview Basics of Computer Networks Internet
More informationDomain Name System (DNS) Reading: Section in Chapter 9
Domain Name System (DNS) Reading: Section in Chapter 9 RFC 1034, STD 13 Name Syntax and rules for delegating authority over names Specify implementation of a distributed system that maps names to addresses
More informationInternet Technology 2/13/2013
Internet Technology 03r. Application layer protocols: email Email: Paul Krzyzanowski Rutgers University Spring 2013 1 2 Simple Mail Transfer Protocol () Defined in RFC 2821 (April 2001) Original definition
More informationDNS: Domain Name System
DNS: Domain Name System CMPSCI 491G: Computer Networking Lab V. Arun Slides adapted from Liebeherr & Zarki, Kurose & Ross, Kermani DNS: domain name system people: many identifiers: SSN, name, passport
More informationComputer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ MEng. Nguyễn CaoĐạt
Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ MEng. Nguyễn CaoĐạt 1 Lecture 10: Application Layer 2 Application Layer Where our applications are running Using services provided by
More informationDNS: Distributed Name System
Distributed Name System Slides adapted from: Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2002. All material copyright 1996-2002
More informationEmail Electronic Mail
Email Electronic Mail Electronic mail paradigm Most heavily used application on any network Electronic version of paper-based office memo Quick, low-overhead written communication Dates back to time-sharing
More informationNaming and the DNS. Focus. How do we name hosts etc.? Application Presentation Topics. Session Domain Name System (DNS) Email/URLs
Naming and the DNS Focus How do we name hosts etc.? Application Presentation Topics Session Domain Name System (DNS) Email/URLs Transport Network Data Link Physical Ldns.1 Names and Addresses 43 name address
More informationEmail. Daniel Zappala. CS 460 Computer Networking Brigham Young University
Email Daniel Zappala CS 460 Computer Networking Brigham Young University How Email Works 3/25 Major Components user agents POP, IMAP, or HTTP to exchange mail mail transfer agents (MTAs) mailbox to hold
More informationCh 6: Networking Services: NAT, DHCP, DNS, Multicasting
Ch 6: Networking Services: NAT, DHCP, DNS, Multicasting Magda El Zarki Prof. of CS Univ. of CA, Irvine Email: elzarki@uci.edu http: www.ics.uci.edu/~magda Overivew of NAT NAT: Network Address Translation
More informationDomain Name System (DNS)
Chapter 18 CSC465 Computer Networks Spring 2004 Dr. J. Harrison These slides are based on the text TCP/IP Protocol Suite (2 nd Edition) Domain Name System (DNS) CONTENTS NAME SPACE DOMAIN NAME SPACE DISTRIBUTION
More information2- Electronic Mail (SMTP), File Transfer (FTP), & Remote Logging (TELNET)
2- Electronic Mail (SMTP), File Transfer (FTP), & Remote Logging (TELNET) There are three popular applications for exchanging information. Electronic mail exchanges information between people and file
More information2.5 DNS The Internet s Directory Service
130 CHAPTER 2 APPLICATION LAYER e-mail is also provided by Google, Yahoo!, as well as just about every major university and corporation. With this service, the user agent is an ordinary Web browser, and
More informationHTTP. Internet Engineering. Fall 2015. Bahador Bakhshi CE & IT Department, Amirkabir University of Technology
HTTP Internet Engineering Fall 2015 Bahador Bakhshi CE & IT Department, Amirkabir University of Technology Questions Q1) How do web server and client browser talk to each other? Q1.1) What is the common
More information2- Electronic Mail (SMTP), File Transfer (FTP), & Remote Logging (TELNET)
2- Electronic Mail (SMTP), File Transfer (FTP), & Remote Logging (TELNET) There are three popular applications for exchanging information. Electronic mail exchanges information between people and file
More information1. The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; e-mail: SMTP.
Chapter 2 Review Questions 1. The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; e-mail: SMTP. 2. Network architecture refers to the organization of the communication process
More informationCS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol
CS640: Introduction to Computer Networks Aditya Akella Lecture 4 - Application Protocols, Performance Applications FTP: The File Transfer Protocol user at host FTP FTP user client interface local file
More informationComputer Networks - CS132/EECS148 - Spring 2013 ------------------------------------------------------------------------------
Computer Networks - CS132/EECS148 - Spring 2013 Instructor: Karim El Defrawy Assignment 2 Deadline : April 25 th 9:30pm (hard and soft copies required) ------------------------------------------------------------------------------
More informationINF3190 Application Layer DNS, Web, Mail
INF3190 Application Layer DNS, Web, Mail Carsten Griwodz Email: griff@ifi.uio.no Application layer Introduction What is it? Internet view everything above the socket interface is application layer function
More informationCh 6: Networking Services: NAT, DHCP, DNS, Multicasting, NTP
Ch 6: Networking Services: NAT, DHCP, DNS, Multicasting, NTP Magda El Zarki Prof. of CS Univ. of CA, Irvine Email: elzarki@uci.edu http: www.ics.uci.edu/~magda Network Address Translation - NAT Private
More informationDomain Name System (DNS)
Application Layer Domain Name System Domain Name System (DNS) Problem Want to go to www.google.com, but don t know the IP address Solution DNS queries Name Servers to get correct IP address Essentially
More informationEmail, SNMP, Securing the Web: SSL
Email, SNMP, Securing the Web: SSL 4 January 2015 Lecture 12 4 Jan 2015 SE 428: Advanced Computer Networks 1 Topics for Today Email (SMTP, POP) Network Management (SNMP) ASN.1 Secure Sockets Layer 4 Jan
More informationNetwork programming, DNS, and NAT. Copyright University of Illinois CS 241 Staff 1
Network programming, DNS, and NAT Copyright University of Illinois CS 241 Staff 1 Today Network programming tips Domain name system Network Address Translation Bonus slides (for your reference) Timers
More informationProtocolo HTTP. Web and HTTP. HTTP overview. HTTP overview
Web and HTTP Protocolo HTTP Web page consists of objects Object can be HTML file, JPEG image, Java applet, audio file, Web page consists of base HTML-file which includes several referenced objects Each
More informationApplication-layer Protocols and Internet Services
Application-layer Protocols and Internet Services Computer Networks Lecture 8 http://goo.gl/pze5o8 Terminal Emulation 2 Purpose of Telnet Service Supports remote terminal connected via network connection
More informationApplication-layer protocols
Application layer Goals: Conceptual aspects of network application protocols Client server paradigm Service models Learn about protocols by examining popular application-level protocols HTTP DNS Application-layer
More informationDomain Name System E-mail WWW. Application Layer. Mahalingam Ramkumar Mississippi State University, MS. September 15, 2014.
Application Layer Mahalingam Mississippi State University, MS September 15, 2014 Outline 1 DNS Records DNS Components 2 Message Transfer Fetching Emails 3 Applications We will focus on 3 applications DNS
More informationApplication Example: WWW. Communication in the WWW. WWW, HTML, URL and HTTP. Loading of Web Pages. The Client/Server model is used in the WWW
Application Example WWW Communication in the WWW In the following application protocol examples for WWW and E-Mail World Wide Web (WWW) Access to linked documents, which are distributed over several computers
More informationChakchai So-In, Ph.D.
Application Layer Functionality and Protocols Chakchai So-In, Ph.D. Khon Kaen University Department of Computer Science Faculty of Science, Khon Kaen University 123 Mitaparb Rd., Naimaung, Maung, Khon
More informationHW2 Grade. CS585: Applications. Traditional Applications SMTP SMTP HTTP 11/10/2009
HW2 Grade 70 60 CS585: Applications 50 40 30 20 0 0 2 3 4 5 6 7 8 9 0234567892022223242526272829303323334353637383940442 CS585\CS485\ECE440 Fall 2009 Traditional Applications SMTP Simple Mail Transfer
More informationNetworking Applications
Networking Dr. Ayman A. Abdel-Hamid College of Computing and Information Technology Arab Academy for Science & Technology and Maritime Transport Electronic Mail 1 Outline Introduction SMTP MIME Mail Access
More informationSecurity Analysis of DNS & Applications/Email
Security Analysis of DNS & Applications/Email EE 122: Intro to Communication Networks Fall 2007 (WF 4-5:30 in Cory 277) Vern Paxson TAs: Lisa Fowler, Daniel Killebrew & Jorge Ortiz http://inst.eecs.berkeley.edu/~ee122/
More informationHomework 2 assignment for ECE374 Posted: 02/20/15 Due: 02/27/15
1 Homework 2 assignment for ECE374 Posted: 02/20/15 Due: 02/27/15 ote: In all written assignments, please show as much of your work as you can. Even if you get a wrong answer, you can get partial credit
More informationMotivation. Domain Name System (DNS) Flat Namespace. Hierarchical Namespace
Motivation Domain Name System (DNS) IP addresses hard to remember Meaningful names easier to use Assign names to IP addresses Name resolution map names to IP addresses when needed Namespace set of all
More informationSECURITY IN NETWORKS
SECURITY IN NETWORKS GOALS Understand principles of network security: Cryptography and its many uses beyond confidentiality Authentication Message integrity Security in practice: Security in application,
More informationOverview. SSL Cryptography Overview CHAPTER 1
CHAPTER 1 Note The information in this chapter applies to both the ACE module and the ACE appliance unless otherwise noted. The features in this chapter apply to IPv4 and IPv6 unless otherwise noted. Secure
More informationFundamentals of the Internet 2009/10. 1. Explain meaning the following networking terminologies:
Fundamentals of Internet Tutorial Questions (2009) 1. Explain meaning the following networking terminologies: Client/server networking, Coax, twisted pair, protocol, Bit, Byte, Kbps, KBps, MB, KB, MBps,
More informationNetwork Fundamentals. 2010 Carnegie Mellon University
Network Fundamentals What We Will Cover Introduction Your Network Fundamentals of networks, flow, and protocols Malicious traffic External Events & Trends Malware Networks in the Broad Working Together
More informationComputer System Management: Hosting Servers, Miscellaneous
Computer System Management: Hosting Servers, Miscellaneous Amarjeet Singh October 22, 2012 Partly adopted from Computer System Management Slides by Navpreet Singh Logistics Any doubts on project/hypo explanation
More informationChapter 17. Transport-Level Security
Chapter 17 Transport-Level Security Web Security Considerations The World Wide Web is fundamentally a client/server application running over the Internet and TCP/IP intranets The following characteristics
More informationSecurity. Friends and Enemies. Overview Plaintext Cryptography functions. Secret Key (DES) Symmetric Key
Friends and Enemies Security Outline Encryption lgorithms Protocols Message Integrity Protocols Key Distribution Firewalls Figure 7.1 goes here ob, lice want to communicate securely Trudy, the intruder
More information19531 - Telematics. 13th Tutorial - Application Layer Protocols
19531 - Telematics 13th Tutorial - Application Layer Protocols Bastian Blywis Department of Mathematics and Computer Science Institute of Computer Science 03. February, 2011 Institute of Computer Science
More informationWhat is network security?
Network security Network Security Srinidhi Varadarajan Foundations: what is security? cryptography authentication message integrity key distribution and certification Security in practice: application
More informationProject #2. CSE 123b Communications Software. HTTP Messages. HTTP Basics. HTTP Request. HTTP Request. Spring 2002. Four parts
CSE 123b Communications Software Spring 2002 Lecture 11: HTTP Stefan Savage Project #2 On the Web page in the next 2 hours Due in two weeks Project reliable transport protocol on top of routing protocol
More informationHomework 2 assignment for ECE374 Posted: 02/21/14 Due: 02/28/14
1 Homework 2 assignment for ECE374 Posted: 02/21/14 Due: 02/28/14 Note: In all written assignments, please show as much of your work as you can. Even if you get a wrong answer, you can get partial credit
More informationNET0183 Networks and Communications
NET0183 Networks and Communications Lecture 25 DNS Domain Name System 8/25/2009 1 NET0183 Networks and Communications by Dr Andy Brooks DNS is a distributed database implemented in a hierarchy of many
More informationCS 356 Lecture 27 Internet Security Protocols. Spring 2013
CS 356 Lecture 27 Internet Security Protocols Spring 2013 Review Chapter 1: Basic Concepts and Terminology Chapter 2: Basic Cryptographic Tools Chapter 3 User Authentication Chapter 4 Access Control Lists
More informationCONTENT of this CHAPTER
CONTENT of this CHAPTER v DNS v HTTP and WWW v EMAIL v SNMP 3.2.1 WWW and HTTP: Basic Concepts With a browser you can request for remote resource (e.g. an HTML file) Web server replies to queries (e.g.
More informationRemote login (Telnet):
SFWR 4C03: Computer Networks and Computer Security Feb 23-26 2004 Lecturer: Kartik Krishnan Lectures 19-21 Remote login (Telnet): Telnet permits a user to connect to an account on a remote machine. A client
More informationGoals of Today s Lecture. Separating Naming and Addressing. Host Names vs. IP addresses. Domain Name System (DNS) EE 122: Domain Name System
Goals of Today s Lecture EE : Domain Name System Ion Stoica TAs: Junda Liu, DK Moon, David Zats http://inst.eecs.berkeley.edu/~ee/ (Materials with thanks to Vern Paxson, Jennifer Rexford, and colleagues
More informationNetwork Security. HIT Shimrit Tzur-David
Network Security HIT Shimrit Tzur-David 1 Goals: 2 Network Security Understand principles of network security: cryptography and its many uses beyond confidentiality authentication message integrity key
More informationNetwork Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1
Network Security Abusayeed Saifullah CS 5600 Computer Networks These slides are adapted from Kurose and Ross 8-1 Goals v understand principles of network security: cryptography and its many uses beyond
More informationApplications and Services. DNS (Domain Name System)
Applications and Services DNS (Domain Name Service) File Transfer Protocol (FTP) Simple Mail Transfer Protocol (SMTP) Malathi Veeraraghavan Distributed database used to: DNS (Domain Name System) map between
More informationApplication Layer. CMPT371 12-1 Application Layer 1. Required Reading: Chapter 2 of the text book. Outline of Chapter 2
CMPT371 12-1 Application Layer 1 Application Layer Required Reading: Chapter 2 of the text book. Outline of Chapter 2 Network applications HTTP, protocol for web application FTP, file transfer protocol
More informationCornerstones of Security
Internet Security Cornerstones of Security Authenticity the sender (either client or server) of a message is who he, she or it claims to be Privacy the contents of a message are secret and only known to
More informationChapter 7: Network security
Chapter 7: Network security Foundations: what is security? cryptography authentication message integrity key distribution and certification Security in practice: application layer: secure e-mail transport
More informationIntroduction to Computer Networks
Introduction to Computer Networks Chen Yu Indiana University Basic Building Blocks for Computer Networks Nodes PC, server, special-purpose hardware, sensors Switches Links: Twisted pair, coaxial cable,
More information