کامپیوتر و IT و اینترنتعلوم مهندسی

(Distributed applications (chapter 19

صفحه 1:
William Stallings Data and Computer Communications Chapter 19 Distributed Applications

صفحه 2:
Abstract Syntax Notation One ASN.1 I Used to define format of PDUs 0 Representation of distributed information 0 Representation of operations performed on transmitted data

صفحه 3:
Terms Relevant to ANS.1 I Abstract Syntax I Describes generic structure of data ‘ Data Type ! Named set of values 4 Encoding I Sequence of octets used to represent data value 1 Encoding Rules 1 Mapping from one syntax to another 0 Transfer Syntax | Way data represented in bit patterns while in transit

صفحه 4:
Use of Abstract and Transfer Syntaxes USER USER user presentation user presentation local storage (ete, MIB) local mapping local storage (ets MIB) local mapping encoding encoding rales rales Data transfer Data transfer

صفحه 5:
ASN.1 Concepts 0 Module definition I Structured definition of a data structure using ASN.1 I Name of module used as abstract syntax name

صفحه 6:
Form of Modules I <modulereference>DEFINITIONS::= BEGIN EXPORTS IMPORTS AssignmentsList End 0 EXPORTS 1 Definitions which may be imported by other modules 0 IMPORTS 1 Definitions to be imported from other modules 0 AssignmentList 1 Type assignments, value assignments, macro definitions 1 <name>::=<description>

صفحه 7:
Lexical Conventions I Layout not significant 1 Comments delimited by pair of hyphens (--) at start and pair of hyphens or end of line end of comment 1 Identifiers, type references and module names consist of upper and lower case letters, digits and hyphens Identifier starts with lower case letter 1 Type reference or module name begins with upper case letter 1 Built in type consists of all upper case letters

صفحه 8:
Abstract Data Types I Collection of values 0 Simple 1١ Atomic 1 No components 0 Structured 1 Has components U Tagged | Derived from other types 0 Other 1١ Include CHOICE and ANY types (see later)

صفحه 9:
Tag Classes (1) 0 Every data type (except CHOICE and ANY) has associated tag 0 Universal ! Generally useful I Application independent I Defined in standard 1١ e.g. Boolean, Integer, Real

صفحه 10:
Tag Classes (2) 0 Application wide I Relevant to particular application 0 Context specific | Relevant to particular application I Applicable in limited context Private I User defined

صفحه 11:
CHOICE and ANY 0 Data types without tags I When value assigned, type also assigned I Type assigned at run time 0 CHOICE I List of alternative known types I Only one type used to create value 0 ANY I Arbitrary value I Arbitrary type

صفحه 12:
Subtypes (1) I Derived from parent type D Restricted subset of values d May be nested J Single value subtype I Explicit listing of all valid values 1 Contained subtype I Used to form new subtype from existing subtypes I Includes all values of subtypes it contains J Value range subtype I Real and Integer only I Specify endpoints of range

صفحه 13:
Subtypes (2) 1 Permitted alphabet constraint 1 Only character string | All values that can be constructed using sub-alphabet 1 Size constrained 1 Limits number of items in type ! e.g. number of bits in bit type 1 Inner type constraint | Applied to SEQUENCE, SEQUENCE OF, SET, SET OF, CHOICE ! Only values from parent that satisfy one or more contraints

صفحه 14:
PDU Example (part 1) SNMP¥2.PDU DEFINITIONS PDUs = CHOICE [get-request GetRequest-PDU, nexterequest GetNextRequest-PDU, gethulk-request — GetBulkRequest-PDU, response Response-PDU set-request SeiReques-PDU, inform-request _InformRequest-PDU, ‏مسلامسد‎ SNMP¥2-Trap-PDU, report Report-PDU ١ ~Pbus (0) IMPLICTT PDU jextReques-PDU == [I] IMPLICIT PDU Response-PDU (2) IMPLICTr PDU SeiReques-PDU ‏عد‎ [3] IMPLICIT PDU GetBulkRequest-PDU [5] IMPLICIT BulkPDU [6] IMPLICIT PDU, (7) IMpLicrr ‏تامام‎ ‎imax-bindings INTEGER ::= 2147483647

صفحه 15:
PDU Example (part 2) ICE [request-id Integer’: error-status INTEGER | -sometimes ignored nok 0 (0), ‏اناد‎ ۱ PDU ::= SEQUE? ‘noSuchName (2), -for proxy compatibility badValve (3), for proxy compatibility readOnly (4), -for proxy compatibility genk ror (5), noAeeess (6). wrong ype (7) wrongLength (8), wrongEncoding (9), wrongValue (10). noCreation (11), consistent Value (1 resourceUnavailable (1 <commmitFailed (14), undoFailed (15) authorization sror (16). notWeitabe (17). inconsistentName (18) ), error-index INTEGER (O..max-binsings}, __~sometimes ignored Variable-binding VarBindList ) —values are sometimes ignored

صفحه 16:
PDU Example (part 3) BulkPDU ::= SEQUENCE ( -MUST be identical in stracture to PDU request-id Integer32. non-repeaters INTEGER (0..max-bindings) nax-repetitions INTEGER (0..max-bindings), variahle-hinding ‏سا‎ ۱ ~vallues are ignored ~-variable binding VarBind ::= SEQUENCE {name ObjectName, CHOICE (value ObjectSyntax, unspecified NULL, ‏مذ‎ retrieval requests exceptions in responses: noSuchOhject [0] IMPLICIT NULL, noSuchinstance (1) IMPLICIT NULL. endOIMibView [2] IMPLICIT NULL) } ~-variable-binding list ‘VarBindList = SEQUENCE (SIZE (@.max-bindings)) OF VarBind END

صفحه 17:
Network Management - SNMP Simple Network Management Protocol Networks are becoming indispensable More complexity makes failure more likely Require automatic network management tools Standards required to allow multi-vendor networks ! Covering: I Services I Protocols I Management information base (MIB) لهت نأض كر أ

صفحه 18:
Network Management 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 i.e. use existing equipment 0 View entire network as unified architecture U Active elements provide regular feedback ص نص — كح بج

صفحه 19:
Key Elements 0 Management station or manager 0 Agent 0 Management information base 0 Network management protocol

صفحه 20:
Management Station I Stand alone system or part of shared system 0 Interface for human network manager 0 Set of management applications I Data analysis I Fault recovery | Interface to monitor and control network Translate manager's requirements into monitoring and control of remote elements Data base of network management information extracted from managed entities 3 c a a

صفحه 21:
Agent ص Hosts, bridges, hubs, routers equipped with agent software Allow them to be managed from management station Respond to requests for information Respond to requests for action Asynchronously supply unsolicited information ص 2-1-1

صفحه 22:
Management Information Base Imi Representation of network resources as objects Each object a variable representing one aspect of managed object MIB is collection of access points at agent for management of station Objects standardized across class of system ! Bridge, router etc. a a a oa

صفحه 23:
Network Management Protocol ص Link between management station and agent TCP/IP uses SNMP OSI uses Common Management Information Protocol (CMIP) SNMPv2 (enhanced SNMP) for OSI and TCP/IP oo ص

صفحه 24:
Protocol Capabilities 0 Get 0 Set 0 Notify

صفحه 25:
Management Layout 0 May be centralized in simple network 0 May be distributed in large, complex network I Multiple management servers I Each manages pool of agents I Management may be delegated to intermediate manager

صفحه 26:
Example of Distributed Network Management coatigtiation

صفحه 27:
SNMP v1 I August 1988 SNMP specification issued 1 Stand alone management stations and bridges, routers workstations etc supplied with agents 1 Defines limited, easily implemented MIB of scalar variables and two dimensional tables Streamlined protocol Limited functionality Lack of security SNMP v2 1993, revised 1996 1 RFC 1901-1908 جص حرا

صفحه 28:
SNMP v2 (1) I Framework on which network management applications can be built ! e.g fault management, performance monitoring, accounting 0 Protocol used to exchange management information 0 Each player maintains local MIB ! Structure defined in standard 0 At least one system responsible for management 1 Houses management applications

صفحه 29:
SNPM v2 (2) 0 Support central or distributed management In distributes system, some elements operate as manager and agent 0 Exchanges use SNMP v2 protocol I Simple request/response protocol I Typically uses UDP | Ongoing reliable connection not required 0 Reduces management overhead

صفحه 30:
Manager Server SNMP v2 Managed Configuration

صفحه 31:
Structure of Management Information 0 SMI Defines general framework with which MIB defined and constructed Identifies data types How resources are represented and named Encourages simplicity and extensibility Scalars and two dimensional arrays of scalars (tables) only ص oo ا

صفحه 32:
Protocol Operation 0 Exchange of messages 0 Outer message header deals with security 0 Seven types of PDU

صفحه 33:
SNMP v2 PDU Formats variable-bindings Trap-PDU, InformRequest variable-bindings variable-bindings -PDU, SetRRequest-PDU, SNMP9; (b) Response PDU smay-repetitions (6) GewBulkRequest-PDU (@) sariable-bindings an-repeaters requestid GetRequest-PDU, reaquestid| PDU type @ PDU type PDU type

صفحه 34:
SNMP v3 Addresses security issues of SNMP v1/2 RFC 2570-2575 Proposed standard January 1998 Defines overall architecture and security capability To be used with SNMP v2 Sy mo eis oa

صفحه 35:
SNMP v3 Services ‘Thuthenticatlon ‏أذ‎ I Part of User-Based Security (UBS) I Assures that message: | Came from identified source 1 Has not been altered 7 Has not been delayed or replayed o Privacy I Encrypted messages using DES 5 Access control | Can configure agents to provide a number of levels of access to MIB | Access to information I Limit operations

صفحه 36:
Electronic Mail 0 Most heavily used application on any network 0 Simple Mail Transfer Protocol (SMTP) 1 TCP/IP | Delivery of simple text messages 0 Multi-purpose Internet Mail Extension (MIME) I Delivery of other types of data I Voice, images, video clips

صفحه 37:
SMTP ۱ 821 1 Not concerned with format of messages or data I Covered in RFC 822 (see later) 1 SMTP uses info written on envelope of mail 1 Message header J Does not look at contents I Message body 0 Except: 1 Standardize message character set to 7 bit ASCII | Add log info to start of message | Shows path taken

صفحه 38:
Basic Operation 0 Mail created by user agent program (mail client) I Message consists of: 0 Header containing recipient’s address and other info 0 Body containing user data 0 Messages queued and sent as input to SMTP sender program I Typically a server process (daemon on UNIX)

صفحه 39:
Mail Message Contents 0 Each queued message has: I Message text | RFC 822 header with message envelope and list of recipients Message body, composed by user ! A list of mail destinations Derived by user agent from header May be listed in header O May require expansion of mailing lists 1 May need replacement of mnemonic names with mailbox names If BCCs indicated, user agent needs to prepare correct message format

صفحه 40:
SMTP Sender 1 Takes message from queue 1 Transmits to proper destination host I Via SMTP transaction 1 Over one or more TCP connections to port 25 1 Host may have multiple senders active 0 Host should be able to create receivers on demand 1 When delivery complete, sender deletes destination from list for that message 1 When all destinations processed, message is deleted

صفحه 41:
Optimization 0 If message destined for multiple users on a given host, it is sent only once I Delivery to users handled at destination host 0 If multiple messages ready for given host, a single TCP connection can be used I Saves overhead of setting up and dropping connection

صفحه 42:
Possible Errors I Host unreachable 0 Host out of operation 0 TCP connection fail during transfer 0 Sender can re-queue mail I Give up after a period O Faulty destination address I User error I Target user changed address ! Redirect if possible I Inform user if not

صفحه 43:
SMTP Protocol - Reliability 0 Used to transfer messages from sender to receiver over TCP connection 0 Attempts to provide reliable service 0 No guarantee to recover lost messages 0 No end to end acknowledgement to originator 0 Error indication delivery not guaranteed 0 Generally considered reliable

صفحه 44:
SMTP Receiver I Accepts arriving message 0 Places in user mailbox or copies to outgoing queue for forwarding 0 Receiver must: ! Verify local mail destinations | Deal with errors | Transmission U Lack of disk space 0 Sender responsible for message until receiver confirm complete transfer I Indicates mail has arrived at host, not user

صفحه 45:
SMTP Forwarding 0 Mostly direct transfer from sender host to receiver host 0 May go through intermediate machine via forwarding capability I Sender can specify route ! Target user may have moved

صفحه 46:
Conversation 0 SMTP limited to conversation between sender and receiver 0 Main function is to transfer messages 0 Rest of mail handling beyond scope of SMTP I May differ between systems

صفحه 47:
SMTP Mail Flow SMTP receiver i User = SMTP Agent ‏هد‎ P| Sender body (a) Outgoing Mai User Mailboxes SMIP Receiver ‘TCP from foreign SMTP s {0 beat por (b) Incoming Mail

صفحه 48:
SMTP System Overview 1 Commands and responses between sender and receiver U Initiative with sender ! Establishes TCP connection Sender sends commands to receiver e.g. HELO<SP><domain><CRLF> Each command generates exactly one reply e.g. 250 requested mail action ok; completed ابا زج ين ارس

صفحه 49:
SMTP Replies 0 Leading digit indicates category I Positive completion reply (2xx) I Positive intermediate reply (3xx) ۱ Transient negative completion reply (4xx) I Permanent negative completion reply (5xx)

صفحه 50:
Operation Phases 0 Connection setup 0 Exchange of command-response pairs 0 Connection termination

صفحه 51:
Connection Setup 0 Sender opens TCP connection with receiver 0 Once connected, receiver identifies itself 1 220 <domain> service ready ! Sender identifies itself | HELO 0 Receiver accepts sender's identification ۱ 250 If mail service not available, step 2 above becomes: I 421 service not available

صفحه 52:
Mail Transfer I Sender may send one or more messages to receiver 4 MAIL command identifies originator | Gives reverse path to used for error reporting I Receiver returns 250 OK or appropriate fail/error message 4 One or more RCPT commands identifies recipients for the message | Separate reply for each recipient 0 DATA command transfers message text 1 End of message indicated by line containing just period (.)

صفحه 53:
Closing Connection 0 Two steps 0 Sender sends QUIT and waits for reply 0 Then initiate TCP close operation 0 Receiver initiates TCP close after sending reply to QUIT

صفحه 54:
Format for Text Messages RFC 882 0 Message viewed as having envelope and contents 0 Envelope contains information required to transmit and deliver message 0 Message is sequence of lines of text I Uses general memo framework 1 Header usually keyword followed by colon followed by arguments

صفحه 55:
Example Message Date:Tue, 16 Jan 1996 10:37:17 (EST) From: “William Stallings” <ws@host.com> Subject:The syntax of RFC 822 To: Smith@otherhost.com Cc: Jones@Yet-another_host.com This is the main text, delimited from the header by a blank line.

صفحه 56:
Multipurpose Internet Mail Extension (MIME) I Extension to RFC822 ۲" SMTP can not transmit executables | Uuencode and other schemes are available | Not standardized { Can not transmit text including international characters (e.g. a, a, a, @, 6, 6, 8( | Need 8 bit ASCII Servers may reject mail over certain size 0 Translation between ASCII and EBCDIC not standard | SMTP gateways to X.400 can not handle none text data in X.400 messages 0 Some SMTP implementations do not adhere to standard ! CRLF, truncate or wrap long lines, removal of white space, etc.

صفحه 57:
Overview of MIME 0 Five new message header fields 1 MIME version ! Content type ! Content transfer encoding ! Content Id ! Content Description 0 Number of content formats defines 0 Transfer encoding defined

صفحه 58:
Content Types Tiext body ‏أت‎ 0 Multipart | Mixed, Parallel, Alternative, Digest 0 Message | RFC 822, Partial, External-body 0 Image I jpeg, gif 0 Video 1 mpeg ۲ Audio I Basic 0 Application 1 Postscript ' octet stream

صفحه 59:
MIME Transfer Encodings I Reliable delivery across wide largest range of environments 1 Content transfer encoding field | six values I Three (7bit, 8bit, binary) no encoding done | Provide info about nature of data { Quoted-printable ! Data largely printable ASCII characters ' Non-printing characters represented by hex code 0 Base64 | Maps arbitrary binary input onto printable output 0 X-token 1 Named nonstandard encoding

صفحه 60:
Base 64 Encoding 24 bits

صفحه 61:
Hypertext Transfer Protocol HTTP Underlying protocol of the World Wide Web Not a protocol for transferring hypertext ! For transmitting information with efficiency necessary for hypertext jumps Can transfer plain text, hypertext, audio, images, and Internet accessible information ص ص ص

صفحه 62:
HTTP Overview 0 Transaction oriented client/server protocol 0 Usually between Web browser (clinet) and Web server 0 Uses TCP connections 0 Stateless I Each transaction treated independently | Each new TCP connection for each transaction ! Terminate connection when transaction complete

صفحه 63:
Key Terms Cache Client Connection Entity Gateway Message Origin server Proxy Resource Server Tunnel User agent

صفحه 64:
130 ‏جل سي يي سس‎ a User Agent ‏موسلا سس‎ it nn tn Server Examples of HTTP Operation

صفحه 65:
Intermediate HTTP eyelets

صفحه 66:
HTTP Messages I Requests ! Client to server 0 Responses I Server to client Request line Response line General header Request header Response header Entity header Entity body oo oo ooo

صفحه 67:
HTTP Message Structure Request Line General Header Request Header or Response Header Entity Header Entity Body

صفحه 68:
General Header Fields Cache control Connection Data Forwarded Keep alive MIME version Pragma Upgrade See: a eyo So

صفحه 69:
Request Methods "TRequest-tine = Method <or> Request-URL <or> MilP-version <CRLT> 0 Methods: Options Get Head Post Put Patch Copy Move Delete Link unlink Trace Wrapped Extension-method

صفحه 70:
Request Header Field ‏نا تا‎ Accept charset Accept encoding Accept language Authorization From Host If modified since Proxy authentication Range Referrer Unless User agent

صفحه 71:
Response Messages 0 Status line followed by one or more general, response and entity headers, followed by optional entity body 0 Status-Line = HTTP-Version <SP> Status- Code <SP> Reason-Phrase <CRLF>

صفحه 72:
Status Codes 0 Informational 0 Successful 0 Redirection 0 Client error 0 Server error

صفحه 73:
Response Header Fields Location Proxy authentication Public Retry after Server WWW-Authenticate ‎eas‏ ابحم زاو ‎Sy‏ اس

صفحه 74:
Entity Header Fields 0 Allow 0 Expires 0 Content encoding ! Last modified 0 Content language =‘! Link 0 Content length 0 Title 2 Content MD5 0 Transfer encoding 0 Content range 0 URL header 0 Content type 0 Extension header J Content version 0 Derived from

صفحه 75:
Entity Body I Arbitrary sequence of octets 0 HTTP transfers any type of data including: ۱ ‏ماع‎ binary data audio images video 0 Interpretation of data determined by header fields ! Content encoding, content type, transfer encoding

صفحه 76:
Required Reading 0 Stallings chapter 19 0 WWW Consortium 0 ASN.1 Web site

جهت مطالعه ادامه متن، فایل را دریافت نمایید.
29,000 تومان