CSE 480 Lecture Notes January 23, 1996 Communication in Distributed Systems need for interprocess communication no shared memory messages protocols -- rules that communicating processes must adhere to A protocol is an agreement between the communicating parties on how communication is to proceed. multiple layers of protocols two well-known sets of layers -- OSI, ATM client-server model -- issues in message passing remote procedure call group communication, ISIS 2.1. Layered Protocols ISO (International Standards Organization) Open Systems Interconnection Reference Model, known as the OSI model An open system -- can communicated with any other open system by using standard protocols (which govern the format, contents, and meaning of messages sent and received). Two types of protocols: 1) connection-oriented (or circuit switching) -- a dedicatd path is established between two parties wishing to communicate, and the same path is used during the entire sesssion. E.g., telephone systems 2) connectionless (or packet switching) -- no setup in advance is needed. Each packet contains the address of the destination. E.g., letters OSI seven layers (Fig. 2-1, Fig. 2-2) - to send, add header (and trailer) as go down in the layers - to receive, remove header (and trailer) as go up in the layers A protocol stack (or protocol suite) refers to a collection protocols used in a particular system. 1. The Physical Layer - for transmitting the 0s and 1s (i.e., raw bit streams of data). - how many volts for 0 and 1? how many bits per second? simplex versus duplex - E.g., RS-232-C for serial communication lines 2. The Data Link Layer - for recovering transmission errors and flow control - group the bits into units, called frames - frames include checksum for error detection - frames are assigned sequence numbers for flow control - flow control talkes care of disparity between the sender's and receiver's speeds 3. The Network Layer - for routing and congestion control - routing handles how to get from the sender to the receiver for LAN, simple for WAN, a packet has to make a number of hops - the shortest route is no always the best due to congestion - congestion control determines which rout to take depending on the amount of traffic, message queued, path length, etc. - X.25 is a wide--used connection-oriented network-layer protocol by public networks such as telephone compaines - The X.25 user first send a CallRequest to the destination, which either accepts or rejects the proposed connection. If accepted, its connection id is used in subsequent requests. - IP (Internet Protocol), a part of DoD protocol suite. An IP packet can be sent without any setup. Each IP packet is routed independent of others. 4. The Transport Layer - hides all the details of the communication network from the layers above and provides a network independent end-to-end communication - break a message from session layer into packets, assign sequence numbers, etc. - Reliable transport connections can be built on top of either X.25 or IP If X.25 is used, all packets arrive in sequence. If IP is used, they may arrive out of order. - TCP (Transmission Control Protocol) - TCP/IP is widely used on UNIX systems - UDP (Universal Datagram Protocol) is just IP with some minor additions. used by user programs that do not need a connection-oriented protocol. 5. The Session Layer - responsible for establishing and maintaining a connection, known as a session, between two processes. 6. The Presentation Layer - the interface between a user program and the rest of the network. 7. The Application Layer - to provide a facility for the user processes to use the ISO OSI protocols. - E.g., layers for airline and banking applications.