The ISO-OSI Layered Model

Parity is a simple but primitive form of catching errors, and has limited recogni- tion. Therefore real systems use more sophisticated schemes such as CRC. However, the principle is the same. And naturally, we want a separate program to handle the calculation of the error-correcting code ECC and the necessary re-sends. mail encode packets route route packets encode mail route error error error ECC message rep pkt addr All this results in the creation of complex protocol stacks As we saw, it is convenient to divide the work of performing communication into mul- tiple layers. Each layer builds upon the layers below it to provide an additional service to the layers above it, and ultimately to the users. The data that is transmitted goes down through the layers, acquiring additional headers on the way, on the sending side. Then it is transmitted across the network. Finally it goes back up again on the receiving side, and the headers are peeled off. The set of programs that the message goes through is called a protocol stack. Log- ically, each layer talks directly with its counterpart on the other machine, using some particular protocol. Each protocol specifies the format and meaning of the messages that can be passed. Usually this is a protocol-specific header and then a data field, that is not interpreted. For example, the packetization layer adds a header that con- tains the packet number in the sequence. Exercise 162 What is the protocol of the email application? look at your email and make an educated guess. The protocol also makes assumptions about the properties of the communication subsystem that it uses. For example, the email application assumes that the whole message is transferred with no errors, and is in the local representation. In reality, this abstraction of the communication subsystem is created by lower layers in the stack.

13.1.2 The ISO-OSI Layered Model

Standardization is important A computer receiving a message acts upon it in blind faith. It assumes that the last byte is a checksum that testifies to the correctness of the data, and performs the 216 required check. It assumes that the first byte is an address, and checks whether the data is addressed to itself or maybe has to be forwarded. It assumes that the next byte is a packet number, and so on. But what if the sending computer ordered the headers and the corresponding layers in the protocol stack differently? In order to be able to communicate, computers must agree on the structure and functionality of their protocol stacks, and on the format of the headers used by each one. This leads to the creation of open systems, that can accept external data and assimilate it correctly. The OSI model defines seven layers The International Standards Organization ISO has defined a protocol stack with seven layers called the Open Systems Interconnect OSI. The layers are 1. Physical: the network interface hardware, including connectors, signaling con- ventions, etc. 2. Data link: flow control over a single link, buffering, and error correction. Higher levels can assume a reliable communication medium. 3. Network: routing. This is the top layer used in intermediate routing nodes. Higher levels need not know anything about the network topology. 4. Transport: packetization and end-to-end verification. If a node fails along the way, the end-to-end checks will rectify the situation and re-send the required packet. Higher levels can assume a reliable connection. 5. Session: control over the dialog between end stations often unused. 6. Presentation: handling the representation of data, e.g. compression and encryp- tion. 7. Application: an interface for applications providing generally useful services, e.g. distributed database support, file transfer, and remote login. In the context of operating systems, the most important are the routing and trans- port functions. To read more: The OSI model is described briefly in Silberschatz and Galvin [5] section 15.6. Much more detailed book-length descriptions were written by Tanenbaum [9] and Stallings [6].

13.1.3 The TCPIP Protocol Suite