internet applications chapter 8b electronic mail and network management

44
Internet Applications Internet Applications Chapter 8b Electronic Mail and Chapter 8b Electronic Mail and Network Management Network Management

Upload: anthony-may

Post on 31-Dec-2015

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Internet Applications Chapter 8b Electronic Mail and Network Management

Internet ApplicationsInternet ApplicationsChapter 8b Electronic Mail andChapter 8b Electronic Mail and

Network Management Network Management

Page 2: Internet Applications Chapter 8b Electronic Mail and Network Management

Electronic MailElectronic Mail

most heavily used application on any networkmost heavily used application on any network Simple Mail Transfer Protocol (SMTP)Simple Mail Transfer Protocol (SMTP)

TCP/IPTCP/IP delivery of simple text messagesdelivery of simple text messages

Multi-purpose Internet Mail Extension (MIME)Multi-purpose Internet Mail Extension (MIME) delivery of other types of datadelivery of other types of data voice, images, video clipsvoice, images, video clips

22

Page 3: Internet Applications Chapter 8b Electronic Mail and Network Management

SMTPSMTP

RFC 821RFC 821 not concerned with format of messages or datanot concerned with format of messages or data

covered in RFC 822covered in RFC 822 SMTP uses info written on envelope of mail SMTP uses info written on envelope of mail

message headermessage header does not look at contents does not look at contents

message bodymessage body except:except:

standardize message character set to 7 bit ASCIIstandardize message character set to 7 bit ASCII add log info to start of messageadd log info to start of message

33

Page 4: Internet Applications Chapter 8b Electronic Mail and Network Management

Basic OperationBasic Operation

email message is created by user agent email message is created by user agent program (mail client), and consists of:program (mail client), and consists of: header with recipient’s address and other infoheader with recipient’s address and other info body containing user databody containing user data

messages queued and sent as input to messages queued and sent as input to SMTP sender programSMTP sender program typically a server process (daemon on UNIX)typically a server process (daemon on UNIX)

44

Page 5: Internet Applications Chapter 8b Electronic Mail and Network Management

SMTP Mail FlowSMTP Mail Flow

55

Page 6: Internet Applications Chapter 8b Electronic Mail and Network Management

Mail Message ContentsMail Message Contents

each queued message has two partseach queued message has two parts message textmessage text

RFC 822 header with envelope and list of recipientsRFC 822 header with envelope and list of recipients message body, composed by usermessage body, composed by user

list of mail destinationslist of mail destinations derived by user agent from headerderived by user agent from header may be listed in headermay be listed in header may require expansion of mailing listsmay require expansion of mailing lists may need replacement of mnemonic names with mailbox may need replacement of mnemonic names with mailbox

namesnames if BCCs indicated, user agent needs to prepare if BCCs indicated, user agent needs to prepare

correct message formatcorrect message format66

Page 7: Internet Applications Chapter 8b Electronic Mail and Network Management

SMTP SenderSMTP Sender

takes message from queuetakes message from queue transmits to proper destination hosttransmits to proper destination host

via SMTP transactionvia SMTP transaction over one or more TCP connections to port 25over one or more TCP connections to port 25

host may have multiple senders activehost may have multiple senders active host must create receivers on demandhost must create receivers on demand when delivery complete, sender deletes when delivery complete, sender deletes

destination from list for that messagedestination from list for that message when all destinations processed, message is when all destinations processed, message is

deleteddeleted77

Page 8: Internet Applications Chapter 8b Electronic Mail and Network Management

Sending OptimizationsSending Optimizations

if message destined for multiple users on if message destined for multiple users on a given host, it is sent only oncea given host, it is sent only once delivery to users handled at destination hostdelivery to users handled at destination host

if multiple messages ready for given host, if multiple messages ready for given host, a single TCP connection can be useda single TCP connection can be used saves overhead of setting up and dropping saves overhead of setting up and dropping

connectionconnection

88

Page 9: Internet Applications Chapter 8b Electronic Mail and Network Management

Possible ErrorsPossible Errors

host unreachablehost unreachable host out of operationhost out of operation TCP connection fail during transferTCP connection fail during transfer sender can re-queue mailsender can re-queue mail

give up after a periodgive up after a period faulty destination addressfaulty destination address

user erroruser error target user changed addresstarget user changed address redirect if possibleredirect if possible inform user if notinform user if not

99

Page 10: Internet Applications Chapter 8b Electronic Mail and Network Management

SMTP Protocol - Reliability SMTP Protocol - Reliability

used to transfer messages from sender to used to transfer messages from sender to receiver over TCP connectionreceiver over TCP connection

attempts to provide reliable serviceattempts to provide reliable service no guarantee to recover lost messagesno guarantee to recover lost messages no end to end acknowledgement to originatorno end to end acknowledgement to originator error indication delivery not guaranteederror indication delivery not guaranteed generally considered reliablegenerally considered reliable

1010

Page 11: Internet Applications Chapter 8b Electronic Mail and Network Management

SMTP ReceiverSMTP Receiver

accepts arriving messageaccepts arriving message places in user mailbox or copies to outgoing places in user mailbox or copies to outgoing

queue for forwardingqueue for forwarding receiver must:receiver must:

verify local mail destinationsverify local mail destinations deal with errorsdeal with errors

sender responsible for message until receiver sender responsible for message until receiver confirm complete transferconfirm complete transfer indicates mail has arrived at host, not userindicates mail has arrived at host, not user

1111

Page 12: Internet Applications Chapter 8b Electronic Mail and Network Management

SMTP ForwardingSMTP Forwarding

mostly direct transfer from sender host to mostly direct transfer from sender host to receiver hostreceiver host

may go through intermediate machine via may go through intermediate machine via forwarding capabilityforwarding capability sender can specify routesender can specify route target user may have movedtarget user may have moved

1212

Page 13: Internet Applications Chapter 8b Electronic Mail and Network Management

ConversationConversation

SMTP limited to conversation between SMTP limited to conversation between sender and receiversender and receiver

main function is to transfer messagesmain function is to transfer messages rest of mail handling beyond scope of rest of mail handling beyond scope of

SMTP and may differ between systemsSMTP and may differ between systems

1313

Page 14: Internet Applications Chapter 8b Electronic Mail and Network Management

SMTP System OverviewSMTP System Overview

commands and responses exchangedcommands and responses exchanged between sender and receiverbetween sender and receiver

initiative with senderinitiative with sender establishes TCP connectionestablishes TCP connection

sender sends a command to receiversender sends a command to receiver e.g. HELO<SP><domain><CRLF>e.g. HELO<SP><domain><CRLF>

generates exactly one replygenerates exactly one reply e.g. 250 requested mail action ok; completede.g. 250 requested mail action ok; completed

1414

Page 15: Internet Applications Chapter 8b Electronic Mail and Network Management

SMTP CommandsSMTP Commands

Name Description

HELO Send identification

MAIL Identifies originator of mail

RCPT Identifies recipient of mail

DATA Transfer message text

RSET Abort current mail transaction

NOOP No operation

QUIT Close TCP connection

SEND Send mail to terminal

SOML Send mail to terminal if possible; otherwise to mailbox

SAML Send mail to terminal and mailbox

VRFY Confirm user name

EXPN Return membership of mailing list

HELP Send system-specific documentation

TURN Reverse role of sender and receiver1515

Page 16: Internet Applications Chapter 8b Electronic Mail and Network Management

SMTP RepliesSMTP Replies positive completion reply (2xx)positive completion reply (2xx)

e.g. 220 e.g. 220 <domain> Service ready e.g. 250 e.g. 250 Requested mail action okay, completed

positive intermediate reply (3xx)positive intermediate reply (3xx) e.g. 354 e.g. 354 Start mail input; end with <CRLF>.<CRLF>

transient negative completion reply (4xx)transient negative completion reply (4xx) e.g. 452 e.g. 452 Requested action not taken: insufficient system

storage permanent negative completion reply (5xx)permanent negative completion reply (5xx)

e.g. 500 e.g. 500 Syntax error, command unrecognized e.g. 550 e.g. 550 Requested action not taken: mailbox unavailable

(e.g., mailbox not found, no access) 1616

Page 17: Internet Applications Chapter 8b Electronic Mail and Network Management

Connection SetupConnection Setup

sender opens TCP connection with receiversender opens TCP connection with receiver once connected, receiver identifies itselfonce connected, receiver identifies itself

220 <domain> service ready220 <domain> service ready

sender identifies itselfsender identifies itself HELOHELO

receiver accepts sender’s identificationreceiver accepts sender’s identification 250 OK250 OK

if mail service not available, step 2 returns:if mail service not available, step 2 returns: 421 service not available421 service not available

1717

Page 18: Internet Applications Chapter 8b Electronic Mail and Network Management

Mail TransferMail Transfer

sender may then send one or more messages sender may then send one or more messages MAIL command identifies originatorMAIL command identifies originator

gives reverse path to used for error reportinggives reverse path to used for error reporting receiver returns 250 OK or fail/error messagereceiver returns 250 OK or fail/error message

one or more RCPT commands identifies recipients for one or more RCPT commands identifies recipients for the messagethe message

DATA command transfers message textDATA command transfers message text end of message shown by line containing just period .end of message shown by line containing just period .

1818

Page 19: Internet Applications Chapter 8b Electronic Mail and Network Management

Example SMTP TransferExample SMTP Transfer S: MAIL FROM:<[email protected]>S: MAIL FROM:<[email protected]> R: 250 OKR: 250 OK S: RCPT TO:<[email protected]>S: RCPT TO:<[email protected]> R: 250 OKR: 250 OK S: RCPT TO:<[email protected]>S: RCPT TO:<[email protected]> R: 550 No such user hereR: 550 No such user here S: RCPT TO:<[email protected]>S: RCPT TO:<[email protected]> R: 250 OKR: 250 OK S: DATAS: DATA R: 354 Start mail input; end with <CRLF>.<CRLF>R: 354 Start mail input; end with <CRLF>.<CRLF> S: Blah blah blah...S: Blah blah blah... S: ...etc. etc. etc.S: ...etc. etc. etc. S: <CRLF>.<CRLF>S: <CRLF>.<CRLF> R: 250 OKR: 250 OK

1919

Page 20: Internet Applications Chapter 8b Electronic Mail and Network Management

Closing ConnectionClosing Connection

two stepstwo steps sender sends QUIT and waits for replysender sends QUIT and waits for reply then initiate TCP close operationthen initiate TCP close operation receiver initiates TCP close after sending receiver initiates TCP close after sending

reply to QUITreply to QUIT

2020

Page 21: Internet Applications Chapter 8b Electronic Mail and Network Management

RFC 882 Email FormatRFC 882 Email Format

message has envelope and contentsmessage has envelope and contents envelope contains information required to envelope contains information required to

transmit and deliver messagetransmit and deliver message content defined by RFC822content defined by RFC822 message is sequence of lines of textmessage is sequence of lines of text

uses general memo frameworkuses general memo framework• multiple header lines, rigid format, then arbitrary multiple header lines, rigid format, then arbitrary

text bodytext body each header line has form:each header line has form:

• keyword: argumentskeyword: arguments2121

Page 22: Internet Applications Chapter 8b Electronic Mail and Network Management

Example MessageExample Message

Date:Tue, 16 Jan 1996 10:37:17 (EST)Date:Tue, 16 Jan 1996 10:37:17 (EST)From: “William Stallings” <[email protected]>From: “William Stallings” <[email protected]>Subject:The syntax of RFC 822Subject:The syntax of RFC 822To: [email protected]: [email protected]: Jones@Yet-another_host.comCc: Jones@Yet-another_host.com

This is the main text, delimited from the header by This is the main text, delimited from the header by a blank line.a blank line.

2222

Page 23: Internet Applications Chapter 8b Electronic Mail and Network Management

Multipurpose Internet Mail Multipurpose Internet Mail Extension (MIME)Extension (MIME)

extension to RFC822 to resolve issues like:extension to RFC822 to resolve issues like: SMTP can not transmit executablesSMTP can not transmit executables can not transmit text including international can not transmit text including international

characters (e.g. â, å, ä, è, é, ê, ë)characters (e.g. â, å, ä, è, é, ê, ë) servers may reject mail over certain sizeservers may reject mail over certain size ASCII to EBCDIC translation not standardASCII to EBCDIC translation not standard SMTP gateways to X.400 can not handle non-SMTP gateways to X.400 can not handle non-

text data in X.400 messagestext data in X.400 messages some SMTP implementations do not adhere to some SMTP implementations do not adhere to

standardstandard2323

Page 24: Internet Applications Chapter 8b Electronic Mail and Network Management

Overview of MIMEOverview of MIME

five new message header fieldsfive new message header fields MIME versionMIME version Content typeContent type Content transfer encodingContent transfer encoding Content IdContent Id Content DescriptionContent Description

number of content formats definesnumber of content formats defines transfer encoding definedtransfer encoding defined

2424

Page 25: Internet Applications Chapter 8b Electronic Mail and Network Management

Content Type/SubtypeContent Type/Subtype

Text body - in given character setText body - in given character set Multipart - body contains multiple partsMultipart - body contains multiple parts MessageMessage ImageImage VideoVideo AudioAudio ApplicationApplication

2525

Page 26: Internet Applications Chapter 8b Electronic Mail and Network Management

Network ManagementNetwork Management

networks are becoming indispensablenetworks are becoming indispensable more complexity makes failure more likelymore complexity makes failure more likely require automatic network management toolsrequire automatic network management tools standards required to allow multi-vendor networksstandards required to allow multi-vendor networks covering:covering:

servicesservices protocolsprotocols Management information base (MIB)Management information base (MIB)

2626

Page 27: Internet Applications Chapter 8b Electronic Mail and Network Management

Network Management Network Management SystemsSystems

collection of tools for network managementcollection of tools for network management single operator interfacesingle operator interface powerful, user friendly command setpowerful, user friendly command set performing most or all management tasksperforming most or all management tasks minimal amount of separate equipmentminimal amount of separate equipment

i.e. use existing equipmenti.e. use existing equipment

view entire network as unified architectureview entire network as unified architecture active elements provide regular feedbackactive elements provide regular feedback

2727

Page 28: Internet Applications Chapter 8b Electronic Mail and Network Management

Simple Network Management Simple Network Management Protocol (SNMP)Protocol (SNMP)

SNMP v1 developed for managing TCP/IP SNMP v1 developed for managing TCP/IP (inter) networks(inter) networks

defines protocol, database, other conceptsdefines protocol, database, other concepts basic conceptsbasic concepts

management station or managermanagement station or manager agentagent management information basemanagement information base network management protocolnetwork management protocol

2828

Page 29: Internet Applications Chapter 8b Electronic Mail and Network Management

Management StationManagement Station

stand alone system or part of shared systemstand alone system or part of shared system interface for human network managerinterface for human network manager set of management applicationsset of management applications

data analysisdata analysis fault recoveryfault recovery

interface to monitor and control networkinterface to monitor and control network translate manager’s requirements into translate manager’s requirements into

monitoring and control of remote elementsmonitoring and control of remote elements data base of network management information data base of network management information

extracted from managed entitiesextracted from managed entities2929

Page 30: Internet Applications Chapter 8b Electronic Mail and Network Management

Management Management AgentAgent

equip key platforms with agent softwareequip key platforms with agent software e.g. hosts, bridges, hubs, routers e.g. hosts, bridges, hubs, routers

allows their management by management allows their management by management stationstation

respond to requests for informationrespond to requests for information respond to requests for actionrespond to requests for action asynchronously supply unsolicited asynchronously supply unsolicited

informationinformation

3030

Page 31: Internet Applications Chapter 8b Electronic Mail and Network Management

Management Information Management Information Base (MIB)Base (MIB)

representation of network resources as objectsrepresentation of network resources as objects each object a variable representing one aspect each object a variable representing one aspect

of managed objectof managed object MIB is collection of access points at agent for MIB is collection of access points at agent for

management of stationmanagement of station objects standardized across class of systemobjects standardized across class of system

bridge, router etc.bridge, router etc.

management station management station retrieves values of MIB objects to provide monitoringretrieves values of MIB objects to provide monitoring sets MIB object values to change configurationsets MIB object values to change configuration

3131

Page 32: Internet Applications Chapter 8b Electronic Mail and Network Management

Network Management Network Management ProtocolProtocol

link between management station & agentlink between management station & agent TCP/IP uses SNMPTCP/IP uses SNMP OSI uses Common Management Information OSI uses Common Management Information

Protocol (CMIP)Protocol (CMIP) SNMPv2 (enhanced SNMP) for OSI & TCP/IPSNMPv2 (enhanced SNMP) for OSI & TCP/IP

key capabilitieskey capabilities get - management station retrieves valueget - management station retrieves value set - management station sets valueset - management station sets value notify - agent sends event notificationnotify - agent sends event notification

3232

Page 33: Internet Applications Chapter 8b Electronic Mail and Network Management

Management LayoutManagement Layout

may be centralized in simple networkmay be centralized in simple network may be distributed in large, complex may be distributed in large, complex

networknetwork multiple management serversmultiple management servers each manages pool of agentseach manages pool of agents management may be delegated to management may be delegated to

intermediate managerintermediate manager

3333

Page 34: Internet Applications Chapter 8b Electronic Mail and Network Management

Distributed Network Distributed Network Management ExampleManagement Example

3434

Page 35: Internet Applications Chapter 8b Electronic Mail and Network Management

SNMP ArchitectureSNMP Architecture

3535

Page 36: Internet Applications Chapter 8b Electronic Mail and Network Management

SNMP ArchitectureSNMP Architecture

3636

Page 37: Internet Applications Chapter 8b Electronic Mail and Network Management

SNMP v1SNMP v1

August 1988 SNMP specification issuedAugust 1988 SNMP specification issued stand alone management stations and bridges, stand alone management stations and bridges,

routers workstations etc supplied with agentsrouters workstations etc supplied with agents defines limited, easily implemented MIB of scalar defines limited, easily implemented MIB of scalar

variables and two dimensional tablesvariables and two dimensional tables streamlined protocolstreamlined protocol limited functionalitylimited functionality lack of securitylack of security SNMP v2 1993, revised 1996SNMP v2 1993, revised 1996

RFC 1901-1908RFC 1901-19083737

Page 38: Internet Applications Chapter 8b Electronic Mail and Network Management

Network Management Network Management FrameworkFramework

have framework on which network management have framework on which network management applications can be builtapplications can be built e.g fault management, performance monitoring, e.g fault management, performance monitoring,

accountingaccounting management protocol is used to exchange management protocol is used to exchange

management informationmanagement information e.g. SNMP v1 & v2e.g. SNMP v1 & v2

each player maintains local MIBeach player maintains local MIB at least one system responsible for managementat least one system responsible for management

houses management applicationshouses management applications

3838

Page 39: Internet Applications Chapter 8b Electronic Mail and Network Management

Exmple Exmple SNMP v2 SNMP v2 Managed Managed

ConfigConfig

3939

Page 40: Internet Applications Chapter 8b Electronic Mail and Network Management

SNMP v2SNMP v2

support central or distributed managementsupport central or distributed management in distributed system, some elements in distributed system, some elements

operate as manager and agentoperate as manager and agent exchanges use SNMP v2 protocolexchanges use SNMP v2 protocol

simple request/response protocolsimple request/response protocol typically uses UDPtypically uses UDP

• ongoing reliable connection not requiredongoing reliable connection not required• reduces management overheadreduces management overhead

4040

Page 41: Internet Applications Chapter 8b Electronic Mail and Network Management

Structure of Structure of Management Information (SMI)Management Information (SMI) defines general framework with which MIB defines general framework with which MIB

defined and constructeddefined and constructed identifies data typesidentifies data types how resources are represented and namedhow resources are represented and named

encourages simplicity and extensibilityencourages simplicity and extensibility has scalars and two dimensional arrays of has scalars and two dimensional arrays of

scalars (tables) onlyscalars (tables) only three key elements: three key elements:

data types, objects, object identifiersdata types, objects, object identifiers4141

Page 42: Internet Applications Chapter 8b Electronic Mail and Network Management

SNMP v3SNMP v3

addresses security issues of SNMP v1/2addresses security issues of SNMP v1/2 RFC 2570-2575RFC 2570-2575 proposed standard January 1998proposed standard January 1998 defines overall architecture and security defines overall architecture and security

capabilitycapability to be used with SNMP v2to be used with SNMP v2 defines three security servicesdefines three security services

authenticationauthentication privacyprivacy access controlaccess control

4242

Page 43: Internet Applications Chapter 8b Electronic Mail and Network Management

SNMP v3 ServicesSNMP v3 Services

authentication assures that message is:authentication assures that message is: from identified source, not altered, not delayed or from identified source, not altered, not delayed or

replayedreplayed includes HMAC message authentication codeincludes HMAC message authentication code

privacyprivacy encrypts messages using DESencrypts messages using DES

access controlaccess control pre configure agents to provide a number of levels of pre configure agents to provide a number of levels of

access to MIB for different managersaccess to MIB for different managers restricting access to informationrestricting access to information limit operationslimit operations 4343

Page 44: Internet Applications Chapter 8b Electronic Mail and Network Management

SummarySummary

electronic mailelectronic mail SMTP (RFC821) mail exchangeSMTP (RFC821) mail exchange RFC822 & MIME mail content formats RFC822 & MIME mail content formats

network managementnetwork management elements and operation of SNMP v1, 2 & 3elements and operation of SNMP v1, 2 & 3

4444