1 / 109

Top Three Layers

Top Three Layers. Session Layer Presentation Layer Application Layer. Session Layer Design. Marks the division between “upper layers and lower layers” lower layers:= end to end communications upper layers:= user-oriented services Invented by ISO Can support transport layer QoS

trixie
Télécharger la présentation

Top Three Layers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Top Three Layers • Session Layer • Presentation Layer • Application Layer

  2. Session Layer Design • Marks the division between “upper layers and lower layers” • lower layers:= end to end communications • upper layers:= user-oriented services • Invented by ISO • Can support transport layer QoS • Not explicitly used by TCP/IP • “Generally connection-oriented”

  3. Session Layer & Transport Layer • Usually a transport connection is required to establish a session • Session Layer provides Control. It says what to do, not necessarily how to do it. • Can provide redundancy and multiplexing of transport layer resources • Administrative control point

  4. Dialog Management • In principle, all OSI connections are full duplex • Some upper layer software is structured to be half-duplex • This is to simplify the software and has nothing to do with hardware limitations • The session layer supports data token schemes to support half-duplex transmissions

  5. Synchronization • Transport layer provides error recovery only from communication errors • Synchronization in the transport layer provides for returning the session entries back to the last known correct state. • Example: Session established and large file transmitted; receiving end has no storage and directly prints the incoming data. The printer dies and data is lost. • Session users could split the text into pages and insert a synchronization point between each page.

  6. Activity Management • Users split the message stream into activities • delimiters are added in the session to separate activities First File Sent Second File Sent Session Stop Start Start Stop

  7. Remote Procedure Calls • Based on the connectionless model • Generally outside the OSI model • Can be implemented in the application layer • Multiple Flavors • {Sun} ONC RPC • {OSF} DCE RPC

  8. “RPC School of Thought” • Clients sending messages are viewed as procedure calls with the reply being the return from the procedure • Contrast this to the more “conventional” school which views I/O with primitives such as X-DATA.request and X-DATA.return as I/O and interrupts respectively.

  9. RPC Invocation Client Client Stub Network {Portmapper} Server Stub Server 1 2 3 4 5 6 7

  10. RPC Semantics and Orphans • Operations • exactly once • at most once • at least once • Handling crashes: • 1. Hang forever, waiting for reply that never comes • 2. Time out and raise an exception • 3. Time out and retransmit • Orphans • extermination • expiration • reincarnation (kill & restart) • gentle reincarnation (selectively kill and restart)

  11. Presentation Layer Information Transformation Network Format Local Format “few standards, but a lot of ideas”

  12. Presentation Functions These are examples! • Syntax (format) conversion • Compression • Encryption • Sub-issue: Does it belong here?

  13. Presentation Layer, cont. • Providing a way to specify complex data structures • Managing the set of data structures required • Converting data between internal and external form

  14. Data Representation • ASCII vs. EBCDIC • two’s complement vs. one’s complement • FFF0 hex is -15 1’s complement; -16 2’s complement • byte order right left vs. left right • Text File formats

  15. Abstract Syntax Notation 1 (ASN.1) • Data Structures • Abstract Syntax • Transfer Syntax • International Standard 8825 • Notation used to encode, transfer and decode data structures across a wide range of applications • Both connection-oriented and connectionless primitives

  16. Data Compression • Encoding a Finite Set of Equally Likely Symbols • Finiteness of the set of symbols. • Frequency Dependent Coding • The relative frequencies with which the symbols are used. • Context Dependent Encoding • The context in which a symbol appears.

  17. Compression • Elimination of Redundancy • (increased susceptibility to error) • Examples • Run Length Encoding • Predictive Codes • Huffman • LZW

  18. Frequency Dependent Coding • In English, “E” occurs ~100 times more than the letter “Q” • So give common symbols short codes and longer symbols longer codes. • Theoretical minimum encoding often requires fractional bits, but close approximations available.

  19. Huffman Coding • 1. Write down all symbols and associated probability of each. Eventually a binary tree is built on these nodes, with the symbols representing terminal nodes. • 2. Find the two smallest nodes and mark them. Add a new node with arcs to each of the nodes just marked. Set the probability of the new node to the sum of the probabilities of the two nodes connected to the new node. • 3. Repeat until all symbols are marked except one. The probability of the unmarked node will always be 1.0. • 4. The encoding for each symbol is found by tracing the path from the unmarked symbol to that symbol, recording the sequence of left and right branches taken. The code is the path, left = 0, right = 1.

  20. Context Dependent Encoding • Uses conditional probability instead of independent probability. • What is P(u|q)? • So determine the conditional probability for each possible predecessor and store in a table. • For k symbols this requires k2 entries.

  21. Compression (Summary) • Problem Domain determines the “best” compression scheme • Lossy vs Loss-less schemes • One-pass vs multi-pass schemes

  22. Network Security and Privacy • Protecting data from being read by unauthorized persons. • Preventing unauthorized persons from inserting and deleting messages. • Verifying the sender of each message. • Allowing electronic signatures on documents.

  23. Cryptography • Traditional Cryptography • Substitution Ciphers • Codes • Transposition Ciphers • Data Encryption Standard • Key Distribution • Public Key Crytography • MIT Algorithm • Authentication & Digital Signatures • Federal Standards

  24. Cryptography Users • Military • Diplomatic • Diarists • Lovers • Curmugdeons

  25. Cyptography Terms • Ciphertext or Cryptogram -- encrypted message • Cryptanalysis -- breaking ciphers • Cryptography -- devising ciphers • Cryptology := Cryptanalysis and Cryptography

  26. Encryption Model Passive Listener Plaintext Ciphertext Plaintext Key-1 Key-2 Active Intruder

  27. Keys • If Key-1 is the same as Key-2, then it has to be a secret key process. They can differ, making it a Public Key Process. • Big Problems: key distribution and key security

  28. Fundamental Truths of Cryptology • Potential intruders know the general encryption method. • Message contents may be guessed. • Cryptographic systems may be changed, but rarely are. • Non-technical compromises always outnumber successful cryptanalysis.

  29. Ciphers • Substitution (preserve order, disquise) • Caesar code = “shift 4” • Alphabet shifted by k letters --”enigma” • Exhaustive search infeasible • Words and phrases may be guessed • Codes • Purple code, Japanese translated into Latin • Navajo talkers • Transposition Ciphers (reorder, do not disguise) • Game is up when key length is guessed • Once close, easy to guess

  30. Data Encryption Standard • Developed by IBM in 1977 • Implemented in hardware • Widely used • 128 bit key proposed, 56 bit key specifiedAny guesses why? • Now, study AES.

  31. Public Key Encryption • Applying the decryption key to an encrypted message must return the plaintext message. • The decryption key can’t be guessed from an encyption key. • The encryption key cannot be broken by a plaintext attack. • Key Point: the decryption key must be privately held.

  32. Digital Signatures • A’s secret key must remain secret • B has A’s public key and A has B’s public key • B received a encypted message from A that he decypts with A’s public key • B can later show that lacking A’s private key that he could not have produced the encrypted message

  33. Politics of Cryptography • Software as Munition • “Clipper” Chip • Digital Telephony Bill • Digital Signature Standard • Other Countries • Current Legislation

  34. Application Layer • File Transfer, Access and Management • virtual file store • file servers and requesting clients • Electronic Mail • process to process traffic expected to dominate Internet • actually email dominates the Internet • Virtual Terminals • representing the abstract state of the real terminal • Remote Job Execution • JTM: Job Transfer and Manipulation

  35. ISO Applications • FTAM ~ FTP File Transfer, Access & Manipulation • VTS ~ TELNET Virtual Terminal Service • JTM ~ ??? Job Transfer & Manipulation {maybe rsh, RPC?} • MHS ~ SMTP Message Handling System (X.400)

  36. “applications” SASE SASE CASE ISO Terminology [Specific|Common] Application Service Elements “think of them as programming libraries or APIs”

  37. Electronic Mail • Motis and X.400CCITT has aligned them for compatibilityWon’t replace SMTP! • The user agentuser interface • Message transfer agentpost office

  38. Virtual Terminals • Scroll mode terminalsno local resources; dumb display and transmission • Page mode terminals25 x 80 character displayscreen editing via termcap • Form mode terminalslocal processing enabled • Bitmapped terminals like X stations • Browsers?

  39. File Transfer Protocol • FTP recognizes four file types: • 1. Image • bit by bit transfer • 2. ASCII • 3. EBCDIC • 4. Logical Byte files • binary files which use byte size other than 8 bits

  40. Electronic Mail • Pioneered by ARPANET • RFC 822 (widely used) • Simple Mail Transfer Protocol (SMTP) • Supports only ASCII text(see MIME) • name@domain addressing

  41. Virtual Terminals - TELNET • Designed for scroll mode terminals • Hit a key , 8-bit bytes are sent • 95 ASCII and 7 control characters legal

  42. The Web • “the” killer application for the Internet • Two components for popularity • http combines multiple access (gopher, ftp, etc) methods • hypertext interface supports point-and-click interface • Who will organize the information? • No one... • Database experts • Librarians (!)

  43. Web Future Directions • HTML Enhancements • Secure Transactions • Uniform Naming • Librarians & Brokers • Information “push” or “pull”

  44. Layer 7 Summary • Service Element Model • Not all Apps belong here... • Common Network Services

  45. What is a Distributed System? Just insert a network? Mass Storage Computing (CPU) User Interface

  46. Distributed System Services Servers (Storage, Compute) Network User Interfaces Users Users

  47. D.S. Design Issues • Transparency • Flexibility • Reliability • Performance • Scalability

  48. More Design Issues • Global Clocks? • Causality • Information Consistency

  49. Distributed Control • Master/Slave (Issue: Response Time) • Polled • Command -> <-Response • Schedule under control of server • Client/Server (Issue: Server Size) • Interrupt, or Event, Driven • Aperiodic Scheduling • Peer-to-Peer (Issue: Coordination) • No single critical node • Hard to describe or predict

  50. Distributed System:Why or Why not? • Performance • Economics • Reliability • Security

More Related