18 1
play

18-1 Client-Server Computing Protocols Communications protocol : a - PDF document

Overview Topics Packet switched networks TCP/IP CSE 143 Java Autumn 2001 Name servers - DNS Higher-level protocols: file transfer (FTP), mail (SMTP, POP), news (NNTP), web (HTTP) For further information The


  1. Overview • Topics • Packet switched networks • TCP/IP CSE 143 Java – Autumn 2001 • Name servers - DNS • Higher-level protocols: file transfer (FTP), mail (SMTP, POP), news (NNTP), web (HTTP) • For further information… The Internet From 50,000 Feet • Internet section of your favorite bookstore • The Internet Book by Douglas Comer (P-H, 3 rd ed, 2000) 12/12/2001 (c) 2001, University of Washington 18-1 12/12/2001 (c) 2001, University of Washington 18-2 Browsing the Web Circuit Switching & Packet Switching • Enter a web address in a browser • Circuit switching • Web page appears • End-to-end circuit set up for communication • Traditional analog telephone system • What just happened? • Packet switching • How did your machine find the machine on the net with the page? • How did the packets get transferred across the net? • Digital messages • What’s going on here? • Bits of message are chopped up into short packets • Packets are shipped from source to destination independently of each other • Wires are shared by different sessions simultaneously • Method used by the internet (dates back to ARPANet in late 60’s) Now replacing traditional circuit switching for voice, etc. 12/12/2001 (c) 2001, University of Washington 18-3 12/12/2001 (c) 2001, University of Washington 18-4 Local Area Networks Internet • Computers connected in a small area (office, house) • Idea: Local networks are connected to internet a router • Network is high-bandwidth, reliable • Packets are transmitted by injecting them into the network • Packets are self-identifying (source/destination addresses, etc.) • Typical connection technology • Network is responsible for forwarding packets – routers • Ethernet • Wireless Internet 12/12/2001 (c) 2001, University of Washington 18-5 12/12/2001 (c) 2001, University of Washington 18-6 18-1

  2. Client-Server Computing Protocols • Communications protocol : a standard specifying the kinds of • Much of the communication on the net is some sort of client- messages exchanged between particular kinds of clients and server computing servers • Server : a program that runs continuously, waiting for • Examples: requests (directory lookup, email, web server) • SMTP (outgoing mail), POP (incoming mail) • Client : program that sends a request to a server • IMAP (different email protocol) • LDAP (directory lookup) • FTP (file transfers) send me my email • HTTP (web server requests) client server • HTTPS (secure web server) here it is • SSL (Secure Sockets Layer) 12/12/2001 (c) 2001, University of Washington 18-7 12/12/2001 (c) 2001, University of Washington 18-8 Protocol Stack IP – Internet Protocol • Actual communication is done via intermediate protocols • Packet delivery from one internet host to another • Fundamental ones: • Packet size is fairly small – few thousand bytes • IP: Internet protocol – basic packet delivery • IP handles details of routing from source to destination • TCP: Transmission Control Protocol – message transmission • Each router in the net has routing tables with its current best guess Virtual (software) connection of how to forward packets to move them towards their destinations • Packet delivery is on a “best efforts” basis Application Application • No guarantees – packets will be discarded if something goes wrong TCP TCP (transmission errors, router unable to keep up with traffic volume, IP IP etc.) Hardware Hardware Hardware connection 12/12/2001 (c) 2001, University of Washington 18-9 12/12/2001 (c) 2001, University of Washington 18-10 Internet Addresses TCP – Transmission Control Protocol • Every machine on the internet has a unique IP address • Provides reliable delivery of arbitrary length messages • Current IP addresses are 32-bits • Sending TCP agent breaks message up into packets and • Typically written as 4 decimal numbers, one per byte. Examples transmits via IP 128.95.4.112 (www.cs.washington.edu) • Packets contain time stamps, serial numbers, and other header info 208.48.26.246 (www.nytimes.com) in addition to message data • IP addresses may be • Receiving TCP agent reassembles packets into messages • static – fixed address assignment and acknowledges receipt • dynamic – assigned when computer establishes connection to the net (DHCP) • TCP handles retransmission of missed packets • IP addresses are assigned in blocks • Packets may arrive out of order & there may be duplicates • 128.95.4.nnn belong to cs.washington.edu • Most basic internet services are built on TCP 12/12/2001 (c) 2001, University of Washington 18-11 12/12/2001 (c) 2001, University of Washington 18-12 18-2

  3. Naming Computers Name Lookup - DNS • Numeric IP addresses are fine for computers; not people • A domain name must be translated to an IP address before • Computers on the internet typically have names communication can be established • Each machine has (at least one) name • Every domain on the net runs a Domain Name Server (DNS) perkins-pc.cs.washington.edu • Handles translation requests for that domain (both local & outside) www.amazon.com • To translate a non-local name, contact its domain server • Names are organized into domains – typically allocated to an organization or part of an organization • Contact DNS for cnn.com to get IP address for www.cnn.com washington.edu; cs.washington.edu; amazon.com; sun.com; java.sun.com • If all-else fails, contact top-level domain servers to get whitehouse.gov organization domain server IP address • Each name is associated with an IP address • com, edu, net, org, gov, etc. • No particular connection between names and specific IP addresses; up to organization to assign addresses 12/12/2001 (c) 2001, University of Washington 18-13 12/12/2001 (c) 2001, University of Washington 18-14 Higher-Level Protocols URLs • Many basic protocols are built on top of TCP • A Uniform Resource Locator is a naming convention that uniquely specifies a resource on the web • Protocols describe detailed formats of messages specific to that protocol • Specifies the protocol • Non-TCP protocols exist for other uses (streaming media, • Specifies the domain name datagrams, etc) • May specify a specific item in that domain ftp://ftp.cs.washington/edu/ directorynames/filename • An IP connection can specify a port-number http://www.washington.edu/computing/index.html • Common protocols have “well-known” port numbers • Web browsers and other programs that understand URLs 21 (ftp) 25 (smtp) 80 (http) 110 (pop3) 119 (nntp) contain client software to handle the appropriate protocols • When a server process starts up, it specifies the port number it responds to 12/12/2001 (c) 2001, University of Washington 18-15 12/12/2001 (c) 2001, University of Washington 18-16 HTTP HTML • One of the most widely used protocols on the web • HyperText Markup Language • Example <HTML> • Simple formatting language that • HyperText Transfer Protocol <HEAD> has text and control codes • Simple protocol built on top of TCP – uses port 80 <TITLE>A Simple Web Page</TITLE> • Browser interprets control codes </HEAD> telnet www.washington.edu 80 when it renders the page <BODY> GET /index.html • One particular kind of control code: <P>Here are some words</P> hyperlink that specifies another page <P>For more words, see the on the web by giving its URL <A HREF=“www.washington.edu> UW web site</A></P> </BODY> </HTML> 12/12/2001 (c) 2001, University of Washington 18-17 12/12/2001 (c) 2001, University of Washington 18-18 18-3

Recommend


More recommend