22-InternetApplications1

22-InternetApplications1 - Data and Computer Communications...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Data and Computer Communications Communications Chapter 22 – Internet Applications Electronic Mail and Network Management Eighth Edition by William Stallings Lecture slides by Lawrie Brown Internet Applications Internet Applications Electronic Mail and Network Management One of the most exciting aspects of birds' lives is how they interact with others during such social activities as defending territories, courting mates, nesting, raising young, and flocking. Birds' level of sociability changes with the seasons; they may be gregarious at certain times of year yet highly territorial at others. Some of the most fascinating behavior occurs in spring and summer when birds are engaged in breeding. During a social interaction, an individual is coordinating its activities with those of another. This inevitably requires communication. —Secret Lives of Common Birds, Marie Read Electronic Mail Electronic most heavily used application on any network Simple Mail Transfer Protocol (SMTP) TCP/IP delivery of simple text messages delivery of other types of data voice, images, video clips Multi-purpose Internet Mail Extension (MIME) SMTP SMTP RFC 821 not concerned with format of messages or data covered in RFC 822 (see later) message header message body standardize message character set to 7 bit ASCII add log info to start of message SMTP uses info written on envelope of mail SMTP does not look at contents does except: Basic Operation Basic email message is created by user agent email program (mail client), and consists of: program header with recipient’s address and other info body containing user data messages queued and sent as input to messages SMTP sender program SMTP yypically a server process (daemon on UNIX) SMTP Mail Flow SMTP Mail Message Contents Mail each queued message has two parts message text RFC 822 header with envelope and list of recipients message body, composed by user derived by user agent from header may be listed in header may require expansion of mailing lists may need replacement of mnemonic names with may mailbox names mailbox list of mail destinations iif BCCs indicated, user agent needs to prepare f correct message format correct SMTP Sender SMTP takes message from queue transmits to proper destination host via SMTP transaction over one or more TCP connections to port 25 host may have multiple senders active host must create receivers on demand when delivery complete, sender deletes when destination from list for that message destination when all destinations processed, message is when deleted deleted Sending Optimizations Sending if message destined for multiple users on if a given host, it is sent only once given delivery to users handled at destination host if multiple messages ready for given host, if a single TCP connection can be used single saves overhead of setting up and dropping saves connection connection Possible Errors Possible host unreachable host out of operation TCP connection fail during transfer sender can re-queue mail give up after a period user error target user changed address redirect if possible inform user if not faulty destination address SMTP Protocol - Reliability used to transfer messages from sender to used receiver over TCP connection receiver attempts to provide reliable service no guarantee to recover lost messages no end to end acknowledgement to originator error indication delivery not guaranteed generally considered reliable SMTP Receiver SMTP accepts arriving message places in user mailbox or copies to outgoing places queue for forwarding queue receiver must: verify local mail destinations deal with errors sender responsible for message until receiver sender confirm complete transfer confirm indicates mail has arrived at host, not user SMTP Forwarding SMTP mostly direct transfer from sender host to mostly receiver host receiver may go through intermediate machine via may forwarding capability forwarding sender can specify route target user may have moved Conversation Conversation SMTP limited to conversation between SMTP sender and receiver sender main function is to transfer messages rest of mail handling beyond scope of rest SMTP and may differ between systems SMTP SMTP System Overview SMTP commands and responses exchanged between sender and receiver between initiative with sender establishes TCP connection e.g. HELO<SP><domain><CRLF> e.g. 250 requested mail action ok; completed sender sends a command to receiver generates exactly one reply SMTP Commands SMTP Name HELO MAIL RCPT DATA RSET NOOP QUIT SEND SOML SAML VRFY EXPN HELP TURN Description Send identification Identifies originator of mail Identifies recipient of mail Transfer message text Abort current mail transaction No operation Close TCP connection Send mail to terminal Send mail to terminal if possible; otherwise to mailbox Send mail to terminal and mailbox Confirm user name Return membership of mailing list Send system-specific documentation Reverse role of sender and receiver SMTP Replies SMTP positive completion reply (2xx) e.g. 220 <domain> Service ready e.g. e.g. 250 Requested mail action okay, completed e.g. e.g. 354 Start mail input; end with <CRLF>.<CRLF> e.g. e.g. 452 Requested action not taken: insufficient system e.g. storage e.g. 500 Syntax error, command unrecognized e.g. e.g. 550 Requested action not taken: mailbox unavailable e.g. (e.g., mailbox not found, no access) positive intermediate reply (3xx) transient negative completion reply (4xx) permanent negative completion reply (5xx) Connection Setup Connection sender opens TCP connection with receiver once connected, receiver identifies itself 220 <domain> service ready HELO 250 OK 421 service not available sender identifies itself receiver accepts sender’s identification if mail service not available, step 2 returns: Mail Transfer Mail sender may then send one or more messages sender MAIL command identifies originator gives reverse path to used for error reporting receiver returns 250 OK or fail/error message one or more RCPT commands identifies recipients for one the message the DATA command transfers message text end of message shown by line containing just period . Example SMTP Transfer Example S: MAIL FROM:<[email protected]> R: 250 OK S: RCPT TO:<[email protected]> R: 250 OK S: RCPT TO:<[email protected]> R: 550 No such user here S: RCPT TO:<[email protected]> R: 250 OK S: DATA R: 354 Start mail input; end with <CRLF>.<CRLF> S: Blah blah blah... S: ...etc. etc. etc. S: <CRLF>.<CRLF> R: 250 OK Closing Connection Closing two steps sender sends QUIT and waits for reply then initiate TCP close operation receiver initiates TCP close after sending receiver reply to QUIT reply RFC 882 Email Format RFC message has envelope and contents envelope contains information required to envelope transmit and deliver message transmit content defined by RFC822 message is sequence of lines of text uses general memo framework • multiple header lines, rigid format, then arbitrary multiple text body text each header line has form: • keyword: arguments Example Message Example Date:Tue, 16 Jan 1996 10:37:17 (EST) From: “William Stallings” <[email protected]> Subject:The syntax of RFC 822 To: [email protected] Cc: [email protected]_host.com This is the main text, delimited from the header by This a blank line. blank Multipurpose Internet Mail Extension (MIME) Extension extension to RFC822 to resolve issues like: SMTP can not transmit executables can not transmit text including international can characters (e.g. â, å, ä, è, é, ê, ë) characters servers may reject mail over certain size ASCII to EBCDIC translation not standard SMTP gateways to X.400 can not handle nontext data in X.400 messages some SMTP implementations do not adhere to some standard standard Overview of MIME Overview five new message header fields MIME version Content type Content transfer encoding Content Id Content Description number of content formats defines transfer encoding defined Content Type/Subtype Content Text body - in given character set Multipart - body contains multiple parts Message Image Video Audio Application Multipart MIME Example Multipart From: John Smith <[email protected]> To: Ned Jones <[email protected]> Subject: Sample message MIME-Version: 1.0 Content-type: multipart/mixed; boundary="simple boundary" This is the preamble. It is to be ignored, though it is a handy place for mail composers This to include an explanatory note to non-MIME conformant readers. to --simple boundary This is implicitly typed plain ASCII text. It does NOT end with a linebreak. --simple boundary Content-type: text/plain; charset=us-ascii This is explicitly typed plain ASCII text. It DOES end with a linebreak. --simple boundary-This is the epilogue. It is also to be ignored. MIME Transfer Encodings MIME reliable delivery over range of environments uses content transfer encoding field 3 specify bit interpretation, other 3 encodings data largely printable ASCII characters non-printing characters represented by hex code maps arbitrary binary input onto printable output named nonstandard encoding Quoted-printable Base64 X-token Network Management Network networks are becoming indispensable more complexity makes failure more likely require automatic network management tools standards required to allow multi-vendor networks covering: services protocols Management information base (MIB) Network Management Systems Systems collection of tools for network management single operator interface powerful, user friendly command set performing most or all management tasks minimal amount of separate equipment i.e. use existing equipment view entire network as unified architecture active elements provide regular feedback Simple Network Management Protocol (SNMP) Protocol SNMP v1 developed for managing TCP/IP SNMP (inter) networks (inter) defines protocol, database, other concepts basic concepts management station or manager agent management information base network management protocol Management Station Management stand alone system or part of shared system interface for human network manager set of management applications data analysis fault recovery interface to monitor and control network translate manager’s requirements into translate monitoring and control of remote elements monitoring data base of network management information data extracted from managed entities extracted Management Agent Agent equip key platforms with agent software e.g. hosts, bridges, hubs, routers e.g. allows their management by management allows station station respond to requests for information respond to requests for action asynchronously supply unsolicited asynchronously information information Management Information Base (MIB) Base representation of network resources as objects each object a variable representing one aspect each of managed object of MIB is collection of access points at agent for MIB management of station management objects standardized across class of system bridge, router etc. retrieves values of MIB objects to provide monitoring sets MIB object values to change configuration management station management Network Management Protocol Protocol link between management station & agent TCP/IP uses SNMP OSI uses Common Management Information OSI Protocol (CMIP) Protocol SNMPv2 (enhanced SNMP) for OSI & TCP/IP get - management station retrieves value set - management station sets value notify - agent sends event notification key capabilities Management Layout Management may be centralized in simple network may be distributed in large, complex may network network multiple management servers each manages pool of agents management may be delegated to management intermediate manager intermediate Distributed Network Management Example Management SNMP Architecture SNMP SNMP Architecture SNMP SNMP v1 SNMP August 1988 SNMP specification issued stand alone management stations and bridges, stand routers workstations etc supplied with agents routers defines limited, easily implemented MIB of scalar defines variables and two dimensional tables variables streamlined protocol limited functionality lack of security SNMP v2 1993, revised 1996 RFC 1901-1908 Network Management Framework Framework have framework on which network management have applications can be built applications e.g fault management, performance monitoring, e.g accounting accounting management protocol is used to exchange management management information management e.g. SNMP v1 & v2 each player maintains local MIB at least one system responsible for management houses management applications Exmple SNMP v2 Managed Config Config SNMP v2 SNMP support central or distributed management in distributed system, some elements in operate as manager and agent operate exchanges use SNMP v2 protocol simple request/response protocol typically uses UDP • ongoing reliable connection not required • reduces management overhead Structure of Management Information (SMI) Management defines general framework with which MIB defines defined and constructed defined identifies data types how resources are represented and named has scalars and two dimensional arrays of has scalars (tables) only scalars data types, objects, object identifiers encourages simplicity and extensibility three key elements: three SNMP v2 PDU Formats SNMP PDU type request-id 0 0 variable-bindings (a) GetRequest, GetNextRequest, SetRequest, SNMPv2-Trap, InformRequest PDU type request-id error-status (b) Response error-index variable-bindings PDU type request-id non-repeaters max-repetitions variable-bindings (c) GetBulkRequest name1 value1 name2 (d) variable-bindings value2 ¥¥¥ namen valuen SNMP v3 SNMP addresses security issues of SNMP v1/2 RFC 2570-2575 proposed standard January 1998 defines overall architecture and security defines capability capability to be used with SNMP v2 defines three security services authentication privacy access control SNMP v3 Services SNMP authentication assures that message is: from identified source, not altered, not delayed or from replayed replayed includes HMAC message authentication code encrypts messages using DES pre configure agents to provide a number of levels of pre access to MIB for different managers access restricting access to information limit operations privacy access control Summary Summary electronic mail SMTP (RFC821) mail exchange RFC822 & MIME mail content formats RFC822 elements and operation of SNMP v1, 2 & 3 network management ...
View Full Document

This note was uploaded on 04/06/2011 for the course EE 5363 taught by Professor Kang during the Spring '09 term at NYU Poly.

Ask a homework question - tutors are online