Network Administration

1,160 views

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,160
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
76
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Network Administration

  1. 1. CMPE 151: Network Administration Lecture 5
  2. 2. Project Proposals <ul><li>Due by 05.13. </li></ul><ul><li>Samples will be posted on the Web page by later today. </li></ul>
  3. 3. More services… <ul><li>NFS and Samba. </li></ul>
  4. 4. Network File System (NFS)
  5. 5. File Systems <ul><li>Provide set of primitives that abstract users from details of storage access and management. </li></ul>
  6. 6. Distributed File Systems <ul><li>Promote sharing across machine boundaries. </li></ul><ul><li>Transparent access to files. </li></ul><ul><li>Make diskless machines viable. </li></ul><ul><li>Increase disk space availability by avoiding duplication. </li></ul><ul><li>Balance load among multiple servers. </li></ul>
  7. 7. Sun Network File System <ul><li>De facto standard: </li></ul><ul><ul><li>Mid 80’s. </li></ul></ul><ul><ul><li>Widely adopted in academia and industry. </li></ul></ul><ul><li>Provides transparent access to remote files. </li></ul><ul><li>Uses Sun RPC and XDR. </li></ul><ul><ul><li>NFS protocol defined as set of procedures and corresponding arguments. </li></ul></ul><ul><ul><li>Synchronous RPC: </li></ul></ul><ul><ul><ul><li>Client blocks until it gets results from server. </li></ul></ul></ul>
  8. 8. Stateless server <ul><li>Remote procedure calls are self-contained. </li></ul><ul><li>Servers don’t need to keep state about previous requests. </li></ul><ul><ul><li>Flush all modified data to disk before returning from RPC call. </li></ul></ul><ul><li>Robustness. </li></ul><ul><ul><li>No state to recover. </li></ul></ul><ul><ul><li>Clients retry. </li></ul></ul>
  9. 9. Location Transparency <ul><li>Client’s file name space includes remote files. </li></ul><ul><ul><li>Shared remote files are exported by server. </li></ul></ul><ul><ul><li>They need to be remote-mounted by client. </li></ul></ul>
  10. 10. File system hierarchy Client /root vmunix usr staff students Server 1 /root export users joe bob Server 2 /root nfs users ann eve
  11. 11. Achieving Transparency <ul><li>Mount service. </li></ul><ul><ul><li>Mount remote file systems in the client’s local file name space. </li></ul></ul><ul><ul><li>Mount service process runs on each node to provide RPC interface for mounting and unmounting file systems at client. </li></ul></ul><ul><ul><li>Runs at system boot time or user login time. </li></ul></ul>
  12. 12. Automounter <ul><li>Dynamically mounts file systems. </li></ul><ul><li>Runs as user-level process on clients (daemon). </li></ul><ul><li>Resolves references to unmounted pathnames by mounting them on demand. </li></ul><ul><li>Maintains a table of mount points and the corresponding server(s); sends probes to server(s). </li></ul><ul><li>Primitive form of replication. </li></ul>
  13. 13. Transparency? <ul><li>Early binding. </li></ul><ul><ul><li>Mount system call attaches remote file system to local mount point. </li></ul></ul><ul><ul><li>Client deals with host name once. </li></ul></ul><ul><ul><li>But, mount needs to happen before remote files become accessible. </li></ul></ul>
  14. 14. Other Functions <ul><li>NFS file and directory operations: </li></ul><ul><ul><li>read, write, create, delete, getattr, etc. </li></ul></ul><ul><li>Access control: </li></ul><ul><ul><li>File and directory access permissions. </li></ul></ul><ul><li>Path name translation: </li></ul><ul><ul><li>Lookup for each path component. </li></ul></ul><ul><ul><li>Caching. </li></ul></ul>
  15. 15. Implementation Unix FS NFS client VFS Client Unix Kernel NFS server Unix FS VFS Server Unix Kernel Client process RPC
  16. 16. Observations <ul><li>NFS didn’t change the file system API. </li></ul><ul><ul><li>Users access remote files with the same operations used for local ones. </li></ul></ul><ul><ul><li>If access is to remote file, NFS client makes a remote procedure call to NSF server where file resides. </li></ul></ul>
  17. 17. Remote Procedure Call (RPC) <ul><li>Builds on message passing. </li></ul><ul><li>Main idea: extend traditional (local) procedure call to perform transfer of control and data across network. </li></ul><ul><li>Easy to use: analogous to local calls. </li></ul><ul><li>But, procedure is executed by a different process, probably on a different machine. </li></ul><ul><li>Fits very well with client-server model. </li></ul>
  18. 18. RPC Mechanism <ul><li>1. Invoke RPC. </li></ul><ul><li>2. Calling process suspends. </li></ul><ul><li>3. Parameters passed across network to target machine. </li></ul><ul><li>4. Procedure executed remotely. </li></ul><ul><li>5. When done, results passed back to caller. </li></ul><ul><li>6. Caller resumes execution. </li></ul><ul><li>Is this synchronous or asynchronous? </li></ul>
  19. 19. RPC Advantages <ul><li>Easy to use. </li></ul><ul><li>Well-known mechanism. </li></ul><ul><li>Abstract data type </li></ul><ul><ul><li>Client-server model. </li></ul></ul><ul><ul><li>Server as collection of exported procedures on some shared resource. </li></ul></ul><ul><ul><li>Example: file server. </li></ul></ul><ul><li>Reliable. </li></ul>
  20. 20. RPC Semantics (1) <ul><li>Delivery guarantees. </li></ul><ul><li>“Maybe call”: </li></ul><ul><ul><li>Clients cannot tell for sure whether remote procedure was executed or not due to message loss, server crash, etc. </li></ul></ul><ul><ul><li>Usually not acceptable. </li></ul></ul>
  21. 21. RPC Semantics (2) <ul><li>“ At-least-once” call: </li></ul><ul><ul><li>Remote procedure executed at least once, but maybe more than once. </li></ul></ul><ul><ul><li>Retransmissions but no duplicate filtering. </li></ul></ul><ul><ul><li>Idempotent operations OK; e.g., reading data that is read-only. </li></ul></ul>
  22. 22. RPC Semantics (3) <ul><li>“ At-most-once” call </li></ul><ul><ul><li>Most appropriate for non-idempotent operations. </li></ul></ul><ul><ul><li>Remote procedure executed 0 or 1 time, ie, exactly once or not at all. </li></ul></ul><ul><ul><li>Use of retransmissions and duplicate filtering. </li></ul></ul><ul><ul><li>Example: Birrel et al. implementation. </li></ul></ul><ul><ul><ul><li>Use of probes to check if server crashed. </li></ul></ul></ul>
  23. 23. RPC Implementation (1) work Caller Callee Call packet Result User User stub RPC runtime RPC runtime Server stub Server call pck args xmit rcv unpk call return pck result xmit rcv unpk result return
  24. 24. RPC Implementation (2) <ul><li>RPC runtime mechanism responsible for retransmissions, acknowledgments. </li></ul><ul><li>Stubs responsible for data packaging and un-packaging; </li></ul><ul><ul><li>AKA marshalling and un-marshalling: putting data in form suitable for transmission. Example: Sun’s XDR. </li></ul></ul>
  25. 25. Binding <ul><li>How to determine where server is? Which procedure to call? </li></ul><ul><ul><li>“ Resource discovery” problem </li></ul></ul><ul><ul><ul><li>Name service: advertises servers and services. </li></ul></ul></ul><ul><ul><ul><li>Example: Birrel et al. uses Grapevine. </li></ul></ul></ul><ul><li>Early versus late binding. </li></ul><ul><ul><li>Early: server address and procedure name hard-coded in client. </li></ul></ul><ul><ul><li>Late: go to name service. </li></ul></ul>
  26. 26. Synchronous and Asynchronous RPC <ul><li>Synchronous Asynchronous </li></ul>Client Server Client Server
  27. 27. RPC Performance <ul><li>Sources of overhead </li></ul><ul><ul><li>data copying </li></ul></ul><ul><ul><li>scheduling and context switch. </li></ul></ul><ul><li>Light-Weight RPC </li></ul><ul><ul><li>Shows that most invocations took place on a single machine. </li></ul></ul><ul><ul><li>LW-RPC: improve RPC performance for local case. </li></ul></ul><ul><ul><li>Optimizes data copying and thread scheduling for local case. </li></ul></ul>
  28. 28. Transport protocol <ul><li>Originally used UDP. </li></ul><ul><ul><li>Better performance in LANs. </li></ul></ul><ul><ul><li>NFS and RPC do their own reliability checks. </li></ul></ul><ul><li>Most current implementations use TCP. </li></ul><ul><ul><li>WANs: congestion control. </li></ul></ul><ul><li>TCP officially integrated in NFS v.3. </li></ul>
  29. 29. Virtual File System (1) <ul><li>VFS added to UNIX kernel. </li></ul><ul><ul><li>Location-transparent file access. </li></ul></ul><ul><ul><li>Distinguishes between local and remote access. </li></ul></ul><ul><li>@ client: </li></ul><ul><ul><li>Processes file system system calls to determine whether access is local (passes it to UNIX FS) or remote (passes it to NFS client). </li></ul></ul><ul><li>@ server: </li></ul><ul><ul><li>NFS server receives request and passes it to local FS through VFS. </li></ul></ul>
  30. 30. VFS (2) <ul><li>If local, translates file handle to internal file id’s (in UNIX i-nodes). </li></ul><ul><li>V-node: </li></ul><ul><ul><ul><li>If file local, reference to file’s i-node. </li></ul></ul></ul><ul><ul><ul><li>If file remote, reference to file handle. </li></ul></ul></ul><ul><li>File handle: uniquely distinguishes file. </li></ul>File system id I-node # I-node generation #
  31. 31. NFS caching <ul><li>File contents and attributes. </li></ul><ul><li>Client versus server caching. </li></ul>Client Server $ $
  32. 32. Server caching <ul><li>Read: </li></ul><ul><ul><li>Same as UNIX FS. </li></ul></ul><ul><ul><li>Caching of file pages and attributes. </li></ul></ul><ul><ul><li>Cache replacement uses LRU. </li></ul></ul><ul><li>Write: </li></ul><ul><ul><li>Write through (as opposed to delayed writes of conventional UNIX FS). Why? </li></ul></ul><ul><ul><li>[Delayed writes: modified pages written to disk when buffer space needed, sync operation (every 30 sec), file close]. </li></ul></ul>
  33. 33. Client caching (1) <ul><li>Timestamp-based cache invalidation. </li></ul><ul><li>Read: </li></ul><ul><ul><li>Cached entries have TS with last-modified time. </li></ul></ul><ul><ul><li>Blocks assumed to be valid for TTL. </li></ul></ul><ul><ul><ul><li>TTL specified at mount time. </li></ul></ul></ul><ul><ul><ul><li>Typically 3 sec for files. </li></ul></ul></ul>
  34. 34. Client caching (2) <ul><li>Write: </li></ul><ul><ul><li>Modified pages marked and flushed to server at file close or sync (every 30 sec). </li></ul></ul><ul><li>Consistency? </li></ul><ul><ul><li>Not always guaranteed! </li></ul></ul><ul><ul><li>E.g., client modifies file; delay for modification to reach servers + 3-sec window for cache validation from clients sharing file. </li></ul></ul>
  35. 35. Cache validation <ul><li>Validation check performed when: </li></ul><ul><ul><li>First reference to file after TTL expires. </li></ul></ul><ul><ul><li>File open or new block fetched from server. </li></ul></ul><ul><li>Done for all files (even if not being shared). </li></ul><ul><li>Expensive! </li></ul><ul><ul><li>Potentially, every 3 sec get file attributes. </li></ul></ul><ul><ul><li>If needed invalidate all blocks. </li></ul></ul><ul><ul><li>Fetch fresh copy when file is next accessed. </li></ul></ul>
  36. 36. Network Information Service (NIS)
  37. 37. NIS <ul><li>Originally called Sun Yellow Pages. </li></ul><ul><ul><li>NIS commands still start with “yp”. </li></ul></ul><ul><li>Administrative database. </li></ul><ul><ul><li>Spans server and its clients. </li></ul></ul><ul><ul><li>Server keeps authoritative copies of system files. </li></ul></ul><ul><ul><li>Server propagates database over network. </li></ul></ul><ul><ul><li>Maps in /var/yp . </li></ul></ul>
  38. 38. Data files and the NIS database <ul><li>Data files edited with text editor. </li></ul><ul><li>Updated files are then converted into database format (hashing) using e.g., ypmake. </li></ul><ul><li>Example data file: /etc/passwd, /etc/group </li></ul>
  39. 39. Replication <ul><li>Slave servers can replicate network maps. </li></ul><ul><li>When master copy is updated, updated copy needs to be pushed out to slavs ( yppush and ypxfr ). </li></ul>
  40. 40. NIS Operation <ul><li>ypbind runs on every machine; detects a NIS server and returns its id to client. </li></ul><ul><li>Server used for all remaining queries. </li></ul><ul><li>ypserv runs on servers (master and slaves) accepting and answering queries by looking up NIS maps. </li></ul>
  41. 41. Samba
  42. 42. What is Samba? <ul><li>Allows resource sharing between Unix-based and MS Windows-based systems. </li></ul><ul><li>“ Samba is a freely available SMB server for Unix… Samba runs on a great many Unix variants (Linux, Solaris, …, FreeBSD, …, etc.)…” [ www.samba.org/cifs/docs/what-is-smb.html ] </li></ul>
  43. 43. How does it work? <ul><li>Set of UNIX applications running the Server Message Block (SMB) protocol. </li></ul><ul><ul><li>SMB is the protocol MS Windows use for client-server interactions over a network. </li></ul></ul><ul><ul><li>By running SMB, Unix systems appear as another MS Windows system. </li></ul></ul><ul><ul><li>smbd daemon. </li></ul></ul>
  44. 44. Samba Services <ul><li>File sharing. </li></ul><ul><li>Printer sharing. </li></ul><ul><li>Client authentication. </li></ul>
  45. 45. SMB Protocol <ul><li>Request/response. </li></ul><ul><li>Runs atop TCP/IP. </li></ul><ul><li>E.g., file and print operations. </li></ul><ul><ul><li>Open close, read, write, delete, etc. </li></ul></ul><ul><ul><li>Queuing/dequeing files in printer spool. </li></ul></ul>
  46. 46. SMB Message <ul><li>Header + command/response. </li></ul><ul><li>Header: protocol id, command code, etc. </li></ul><ul><li>Command: command parameters. </li></ul>
  47. 47. Establishing a SMB Connection <ul><li>Establish TCP connection. </li></ul><ul><li>Negotiate protocol variant. </li></ul><ul><ul><li>Client sends SMBnegprot. </li></ul></ul><ul><ul><li>Client sends lists of variants it can speak. </li></ul></ul><ul><ul><li>Server responds with index into client’s list. </li></ul></ul><ul><li>Set session and login parameters. </li></ul><ul><ul><li>Account name, passwd, workgroup name, etc. </li></ul></ul>
  48. 48. Security Levels <ul><li>“Share-wide”: authorized clients can access any file under that share. </li></ul><ul><li>“File-level”: before accessing any file, client needs to be authenticated; in fact, client authenticated once and uses UID for future accesses. </li></ul>
  49. 49. More servers: DNS and Mail
  50. 50. Domain Name System (DNS) <ul><li>Basic function: translation of names (ASCII strings) to network (IP) addresses and vice-versa. </li></ul><ul><li>Example: </li></ul><ul><ul><li>zephyr.isi.edu <-> 128.9.160.160 </li></ul></ul>
  51. 51. History <ul><li>Original approach (ARPANET, 1970’s): </li></ul><ul><ul><li>File hosts.txt listed all hosts and their IP addresses. </li></ul></ul><ul><ul><li>Every night every host fetches file from central repository. </li></ul></ul><ul><ul><li>OK for a few hundred hosts. </li></ul></ul><ul><ul><li>Scalability? </li></ul></ul><ul><ul><ul><li>File size. </li></ul></ul></ul><ul><ul><ul><li>Centrally managed. </li></ul></ul></ul>
  52. 52. DNS <ul><li>Hierarchical name space. </li></ul><ul><li>Distributed database. </li></ul><ul><li>RFCs 1034 and 1035. </li></ul>
  53. 53. How is it used? <ul><li>Client-server model. </li></ul><ul><ul><li>Client DNS (running on client hosts), or resolver. </li></ul></ul><ul><ul><li>Application calls resolver with name. </li></ul></ul><ul><ul><li>Resolver contacts local DNS server (using UDP) passing the name. </li></ul></ul><ul><ul><li>Server returns corresponding IP address. </li></ul></ul>
  54. 54. Namespace <ul><li>Flat versus hierarchical. </li></ul><ul><li>Flat: </li></ul><ul><ul><li>Sequence of characters with no structure. </li></ul></ul><ul><ul><li>Short, convenient names. </li></ul></ul><ul><ul><li>But, doesn’t scale! Why? </li></ul></ul><ul><ul><ul><li>Unique names. </li></ul></ul></ul><ul><ul><ul><li>Hard to decentralize. </li></ul></ul></ul><ul><li>Hierarchical: </li></ul><ul><ul><li>Name space partitioned and decentralized. </li></ul></ul><ul><ul><li>Portions delegated to different authorities. </li></ul></ul>
  55. 55. DNS Name Space <ul><li>Tree-based hierarchy. </li></ul>int com edu gov mil org net us ca … usc cs ee ibm eng sales
  56. 56. Name Space Structure <ul><li>Top-level domains: </li></ul><ul><ul><li>Generic. </li></ul></ul><ul><ul><li>Countries. </li></ul></ul><ul><li>Leaf domains: no sub-domains. </li></ul><ul><li>In practice all US organizations are under a generic domain, while everything outside the US is under the corresponding country domain. </li></ul>
  57. 57. DNS Names <ul><li>Domain names: </li></ul><ul><ul><li>Concatenation of all domain names starting from its own all the way to the root separated by “.”. </li></ul></ul><ul><ul><li>Refers to a tree node and all names under it. </li></ul></ul><ul><ul><li>Case insensitive. </li></ul></ul><ul><ul><li>Components up to 63 characters. </li></ul></ul><ul><ul><li>Full name less than 255 characters. </li></ul></ul>
  58. 58. Name Space Management <ul><li>Domains are autonomous. </li></ul><ul><ul><li>Organizational boundaries. </li></ul></ul><ul><ul><li>Each domain manages its own name space independently of other domains. </li></ul></ul><ul><li>Delegation: </li></ul><ul><ul><li>When creating new domain: register with parent domain. </li></ul></ul><ul><ul><ul><li>For name uniqueness. </li></ul></ul></ul><ul><ul><ul><li>For name resolution. </li></ul></ul></ul>
  59. 59. Resource Records <ul><li>Entry in the DNS database. </li></ul><ul><li>Several types of entries or RRs. </li></ul><ul><li>Example: RR “A” contains IP address. </li></ul><ul><li>Name <-> several resource records. </li></ul><ul><li>RR format: five-tuple. </li></ul><ul><ul><li>Name. </li></ul></ul><ul><ul><li>TTL (in seconds). </li></ul></ul><ul><ul><li>Class (usually “IN” for Internet info). </li></ul></ul><ul><ul><li>Type: type of RR. </li></ul></ul><ul><ul><li>Value. </li></ul></ul>
  60. 60. RR Types 1 <ul><li>SOA: start of authority. </li></ul><ul><ul><li>Marks beginning of zone’s database. </li></ul></ul><ul><ul><li>Provides general info about the zone: e-mail address of admin, default TTL, etc. </li></ul></ul><ul><li>A: address. </li></ul><ul><ul><li>Contains 32-bit IP address. </li></ul></ul><ul><ul><li>Single name <-> several A RRs. </li></ul></ul><ul><li>MX: mail exchange. </li></ul><ul><ul><li>Name of mail server for this domain. </li></ul></ul>
  61. 61. RR Types 2 <ul><li>NS: name server. </li></ul><ul><ul><li>Name of name server for this domain. </li></ul></ul><ul><li>CNAME: canonical name. </li></ul><ul><ul><li>Alias. </li></ul></ul><ul><li>HINFO: host description. </li></ul><ul><ul><li>Provides information about host, e.g., CPU type, OS, etc. </li></ul></ul><ul><li>TXT: arbitrary string of characters. </li></ul><ul><ul><li>Generic description of the domain, where it is located, etc. </li></ul></ul>
  62. 62. Name Servers <ul><li>Entire database in a single name server. </li></ul><ul><ul><li>Practical? </li></ul></ul><ul><ul><li>Why? </li></ul></ul><ul><li>DNS database is partitioned into zones . </li></ul><ul><li>Each zone contains part of the DNS tree. </li></ul><ul><li>Zone <-> name server. </li></ul><ul><ul><li>Each zone may be served by more than 1 server. </li></ul></ul><ul><ul><li>A server may serve multiple zones. </li></ul></ul><ul><li>Primary and secondary name servers. </li></ul>
  63. 63. Name Resolution 1 <ul><li>Application wants to resolve name. </li></ul><ul><li>Resolver sends query to local name server. </li></ul><ul><ul><li>Resolver configured with list of local name servers. </li></ul></ul><ul><ul><li>Select servers in round-robin fashion. </li></ul></ul><ul><li>If name is local, local name server returns matching authoritative RRs. </li></ul><ul><ul><li>Authoritative RR comes from authority managing the RR and is always correct. </li></ul></ul><ul><ul><li>Cached RRs may be out of date. </li></ul></ul>
  64. 64. Name Resolution 2 <ul><li>If information not available locally (not even cached), local NS will have to ask someone else. </li></ul><ul><ul><li>It asks the server of the top-level domain of the name requested. </li></ul></ul>
  65. 65. Recursive Resolution <ul><li>Recursive query: </li></ul><ul><ul><li>Each server that doesn’t have info forwards it to someone else. </li></ul></ul><ul><ul><li>Response finds its way back. </li></ul></ul><ul><li>Alternative: iterative resolution </li></ul><ul><ul><li>Name server not able to resolve query, sends back the name of the next server to try. </li></ul></ul><ul><ul><li>Some servers use this method. </li></ul></ul><ul><ul><li>More control for clients. </li></ul></ul>
  66. 66. Example <ul><li>Suppose resolver on flits.cs.vu.nl wants to resolve linda.cs.yale.edu. </li></ul><ul><ul><li>Local NS, cs.vu.nl, gets queried but cannot resolve it. </li></ul></ul><ul><ul><li>It then contacts .edu server. </li></ul></ul><ul><ul><li>.edu server forwards query to yale.edu server. </li></ul></ul><ul><ul><li>yale.edu contacts cs.yale.edu, which has the authoritative RR. </li></ul></ul><ul><ul><li>Response finds its way back to originator. </li></ul></ul><ul><ul><li>cs.vu.nl caches this info. </li></ul></ul><ul><ul><ul><li>Not authoritative (since may be out-of-date). </li></ul></ul></ul><ul><ul><ul><li>RR TTL determines how long RR should be cached. </li></ul></ul></ul>
  67. 67. Caching <ul><li>Name servers cache recent requests and corresponding mappings. </li></ul><ul><li>Also, cache server that provided mapping. </li></ul><ul><li>Cached information is non-authoritative. </li></ul><ul><li>Clients may choose to use them or go to authoritative server for fresh copy. </li></ul>
  68. 68. Cache consistency <ul><li>TTL: how long cached copy is valid. </li></ul><ul><li>Specified by original server. </li></ul><ul><li>May be different for each object. </li></ul><ul><li>Long versus short TTLs. </li></ul>
  69. 69. More details… <ul><li>RFC 1034 and 1035. </li></ul>
  70. 70. Electronic Mail <ul><li>Non-interactive. </li></ul><ul><ul><li>Deferred mail (e.g., destination temporarily unavailable). </li></ul></ul><ul><li>Spooling: </li></ul><ul><ul><li>Message delivery as background activity. </li></ul></ul><ul><ul><li>Mail spool: temporary storage area for outgoing mail. </li></ul></ul>
  71. 71. Mail system User interface User sends mail User reads mail Outgoing mail spool Mailboxes incoming mail Client (send) Server (receive) TCP connection (outgoing) TCP connection (incoming)
  72. 72. Observations <ul><li>When user sends mail, message stored is system spool area. </li></ul><ul><li>Client transfer runs on background. </li></ul><ul><li>Initiates transfer to remote machine. </li></ul><ul><li>If transfer succeeds, local copy of message removed; otherwise, tries again later (30 min) for a maximum interval (3 days). </li></ul>
  73. 73. Mail alias expansion <ul><li>Mapping of e-mail identifiers to mail addresses. </li></ul><ul><ul><li>Mail interface consults local alias database and performs mapping before passing message to outgoing mail spool. </li></ul></ul><ul><ul><li>One-to-many (e.g., mailing lists) and many-to-one (e.g., multiple ways to refer to a single user) mapping. </li></ul></ul><ul><ul><li>Incoming mail also goes through alias expansion before delivery. </li></ul></ul>
  74. 74. SMTP <ul><li>Simple Mail Transfer Protocol </li></ul><ul><li>How messages are transferred over a TCP/IP internet. </li></ul><ul><li>Defines commands used to exchange mail between mail clients and servers. </li></ul><ul><li>Problems reported to user by e-mail. </li></ul>
  75. 75. Example SMTP exchange User [email_address] sends message to jones, green, and [email_address] . S: 220 beta.gov ready C: Helo alpha.edu S: 250 beta.gov C: MAIL FROM [email_address] S: 250 OK C: RCPT TO: [email_address] S: 250 OK C: RCPT TO: [email_address] S: 550 no such user C: DATA …
  76. 76. Mail retrieval <ul><li>SMTP implies server is always listening. </li></ul><ul><li>What about machines with intermittent Internet access? </li></ul><ul><ul><li>2-stage delivery: message delivered to user permanent mailbox; then user connects to retrieve messages. </li></ul></ul><ul><ul><li>User needs protocol to retrieve messages from “permanent” mailboxes. </li></ul></ul>
  77. 77. Post Office Protocol version 3 <ul><li>POP3. </li></ul><ul><li>User invokes POP3 client; connects to POP3 server through TCP. </li></ul><ul><li>Requires authentication (user id and passwd). </li></ul><ul><li>Commands to retrieve and delete messages from permanent mailbox. </li></ul><ul><li>Mail server needs to run SMTP and POPP3. </li></ul><ul><ul><li>Mailbox a shared data. </li></ul></ul>
  78. 78. More details… <ul><li>RFC 821 and 822 specify SMTP and its message formats. </li></ul>

×