Presentation is loading. Please wait.

Presentation is loading. Please wait.

Internet Applications. Basic procedures involved in visiting a web site 1.Get the IP address of the web server based on the URL that user provides URL:

Similar presentations


Presentation on theme: "Internet Applications. Basic procedures involved in visiting a web site 1.Get the IP address of the web server based on the URL that user provides URL:"— Presentation transcript:

1 Internet Applications

2 Basic procedures involved in visiting a web site 1.Get the IP address of the web server based on the URL that user provides URL: uniform resource locator of a resource (e.g., machine) – http://www.psu.edu IP address: a numerical identification of a resource – 146.186.157.6 (www.psu.edu) 2.Send requests to the server and receive HTML content Protocols: HTTP (over TCP) 3.Parse the HTML content and display it

3 Resolve IP Address of URL DNS: domain name system – A hierarchical system to resolve named addresses into IP addresses Root DNS Servers com DNS servers org DNS serversedu DNS servers psu.edu DNS servers mit.edu DNS servers yahoo.com DNS servers amazon.com DNS servers pbs.org DNS servers ist.psu.edu DNS servers cse.psu.edu DNS servers

4 DNS Servers DNS servers: distributed databases to keep information about URL and IP address pairs.

5 DNS root servers a. Verisign, Los Angeles CA (5 other sites) b. USC-ISI Marina del Rey, CA l. ICANN Los Angeles, CA (41 other sites) e. NASA Mt View, CA f. Internet Software C. Palo Alto, CA (and 48 other sites) i. Netnod, Stockholm (37 other sites) k. RIPE London (17 other sites) m. WIDE Tokyo (5 other sites) c. Cogent, Herndon, VA (5 other sites) d. U Maryland College Park, MD h. ARL Aberdeen, MD j. Verisign, Dulles VA (69 other sites ) g. US DoD Columbus, OH (5 other sites) 13 root name “servers” worldwide

6 In-Class Exercise: nslookup nslookup: an application to query DNS – Start "nslookup" Start  Run  cmd Type "nslookup" – Query DNS server Type URL or IP address Tasks – Find out IP address of www.psu.edu – Find out IP address(es) of www.google.com – Are psu.edu and www.psu.edu the same server? – What is the IP address of the DNS server? – Change the DNS server and repeat the queries "Server 130.203.1.4"

7 Use IP Address Directly http://146.186.157.6 – www.psu.edu www.psu.edu No DNS request involved.

8 Send Request to Server HTTP (hypertext transfer protocol): – The primary transfer protocol that a browser use to interact with a web server Establish connection, negotiate methods/parameters of data transmission, send/obtain data, close connection – Most URLs contain an explicit protocol reference: http:// – An application layer protocol which is above the TCP/IP protocols HTTP commands are encapsulated into TCP packets.

9 HTTP Commands GET, HEAD, POST, PUT, etc. These commands are often hidden from users.

10 Example: HTTP Requests via Telnet Start Command Prompt (Start  Run  cmd) and type telnet Call the HTTP service of the server. Open faculty.ist.psu.edu 80 Send HTTP command to get Zihan’s personal webpage GET /zzhou/Home.html HTTP/1.1 Host: faculty.ist.psu.edu Data received from the server – Anything available through the web service Even images and videos However, Telnet cannot parse non-text data. GET /zzhou/Home_files/psu_blue.png HTTP/1.1 Host: faculty.ist.psu.edu

11 Telnet A network application with command-line interface – Data is transparent. Password is transferred as text. – Very unsafe. Telnet was the dominant tool to access Unix servers to get email. – Unix-based email clients. SSH replaces telnet. – Data is encrypted.

12 A TCPA IP MAC ATCP IP ATCP A !_*#!#$!# IP MAC !_*#!#$!#TCP IP !_*#!#$!#TCP Client: Telnet Client: SSH Intended Server MAC IP ATCP MAC IP ATCP Unintended Server Data is encrypted

13 SMTP Protocol: Email SMTP (Simple Mail Transfer Protocol) commands – HELO, MAIL, RCPT, DATA, QUIT, VRFY… Example – Telnet mail.psu.edu 25 HELO zuz22.psu.edu VRFY zuz22

14 Example: Sending Email via Gmail using Command Line 1.Type openssl s_client -connect smtp.gmail.com:465 2.Type helo smtp.gmail.com 3.Type auth login and you will receive “334 VXNlcm5hbWU6”, which means “Username:” 4.Using a Base 64 encoder such as this one, encode your user name and enter it. Do the same for your password, which is requested next. If authenticated, you should see: “235 2.7.0 Accepted”this one 5.Type mail from: 6.Type rcpt to: 7.Type data, then enter your message 8.To finish entering the message, press ENTER, then press., then press ENTER again 9.Type quit Note: If you want to send email via PSU mail server, in step 1 type the following instead: openssl s_client -connect authsmtp.psu.edu:587 -starttls smtp

15 Other Protocols FTP (File Transfer Protocol) – Was a dominant tool for file transfer. Suffers the same security issues as Telnet. – Replaced with SFTP (Secured FTP). Email Access Protocol – POP3 Download email messages to a local client. – IMAP Keep email in email server.

16 After Class Exercise Just for exploration. No need to turn in anything. DNS – Use nslookup to resolve several different URLs. – Check the DNS server names in different places. IST, your dorm, coffee shop, etc. – Figure out which organizations these servers. – Think about what may happen if a DNS is hijacked. HTTP requests via Telnet – You need to find a system that allows “telnet”. – Use it to access a couple of web sites and see what may happen. Sending emails via Openssl – Find out how to use openssl to send emails through your favorite email service provider (hotmail, yahoo, gmail, aol, etc.)

17 Friday: group research assignment 1 Next Monday: Chapters 5 and 6 – Involving some math. Start earlier.


Download ppt "Internet Applications. Basic procedures involved in visiting a web site 1.Get the IP address of the web server based on the URL that user provides URL:"

Similar presentations


Ads by Google