The principles that were applied to arrive at the seven layers are as follows:
- A layer should be created where a different level of abstraction is needed.
- Each layer should perform a well defined function.
- The function of each layer should be chosen with an eye toward defining internationally standardized protocols.
- The layer boundaries should be chosen to minimize the information flow across the interfaces.
- The number of layers should be large enough that distinct functions need not be thrown together in the same layer out of necessity, and small enough that the architecture does not become unwieldy.
Note: the OSI model itself is not a network architecture because it does not specify the exact services and protocols to be used in each layer. It just tells what each layer should do.
The physical layer
The physical layer is concerned with transmitting raw bits over a communication channel.
The major goal: making sure that when one side sends a 1 bit, it is received by the other side as a 1 bit, not as a 0 bit.
Typical questions (main design issues):
- How many volts should be used to represent a 1 and how many for a 0.
- How many microseconds a bit lasts.
- Whether transmission may proceed simultaneously in both directions.
- How the initial connection is established and how it is torn down when both sides are finished.
- How many pins the network connector has and what each pin is used for.
The data link layer
It takes a raw transmission facility from the physical layer and transforms it into a line that appears free of undetected transmission errors to the network layer.
Main design issues:
- Break the input data up into data frames and transmit the frames sequentially.
- Process the acknowledgement frames sent back by the receiver.
- Retransmit lost or damaged frames, and solve the problem of possible duplicate frames.
- Offer several different service classes to the network layer, each of a different quality and price.
- Use some traffic regulation mechanism to let the transmitter know how much buffer space the receiver has at the moment. This flow regulation is frequently integrated with error handling.
- A Medium ACcess (MAC) sublayer is introduced to deal with the access control over the shared channel in broadcast networks.
The network layer
The main task of this layer is to control the operation of the subnet.
- Routing from source to destination: static, dynamic (per session or per packet). Congestion control.
- Allowing heterogeneous networks to be interconnected (internetworking): different addressing, length of packet, and protocols.
- Accounting: count the number of packets or character per customer.
In broadcast networks, the routing problem is simple, so the network layer is often thin or even nonexistent.
The transport layer
The basic function of this layer is to
- accept data from the session layer,
- split it up into smaller units if need be,
- pass these to the network layer, and
- ensure that the pieces all arrive correctly at the other side.
Connection management
- Each transport connection corresponds to one network connection (in normal conditions).
- Each transport connection corresponds to multiple network connections (for a high throughput).
- Multiple transport connections correspond to one network connection (for convenience and low cost).
- A distinction must be made among multiple connections entering and leaving each host (using transport header ).
- A naming mechanism is needed so that a process on one host has a way of describing with whom it wishes to converse (establishing a connection).
Type of services
- An error-free point-to-point channel that delivers messages in the order in which they were sent.
- Isolated messages with no guarantee about the order of delivery.
- Broadcasting of messages to multiple destinations.
The transport layer is a true source-to-destination or end-to-end layer. Flow control between hosts is also needed but different from between routers (similar principles will apply to both).
The session layer
This layer provides enhanced services useful in some applications, e.g., remote login, remote file transfer.
The presentation layer
Unlike all the lower layers, which are interested in transmitting messages over the network, this layer is concerned with the syntax and semantics of the information transmitted.
Typical services:
- Encode data in a standard agreed upon way to facilitate information exchange among heterogeneous systems using different codes for strings (e.g., ASCII and Unicode), integers (e.g., one's complement and two's complement), and so on.
- Data compression for reducing the number of bits to be transmitted.
- Cryptography for privacy and authentication.
The application layer
This layer contains a variety of commonly needed protocols.
Typical services:
- Transfer files among different file systems.
- Electronic mails among different systems.
- Remote job entry, directory lookup, and various other general-purpose and special-purpose facilities.
The TCP/IP reference model
The TCP/IP model was used in the grandparent of all computer networks, the ARPANET, and its successor, the worldwide Internet.
Major design goals:
- The ability to connect multiple networks together in a seamless way.
- The ability to survive loss of subnet hardware, with conversations not being broken off.
- A flexible architecture for supporting applications with divergent requirements, ranging from transferring files to real-time speech transmission.
All these goals led to the choices of a packet-switching network based on a connectionless internetwork layer, called the internet layer.
The internet layer
The official packet format and protocol at this layer is called IP (Internet Protocol).
Its job is to inject IP packets into any network and have them travel independently to the destination (potentially on a different network).
The TCP/IP internet layer is very similar in functionality to the OSI network layer, as shown in Figure
The transport layer
It is the same in functionality as the OSI transport layer.
Two official end-to-end protocols:
- TCP (Transmission Control Protocol): a reliable connection-oriented protocol.
- UDP (User Datagram Protocol): an unreliable connectionless protocol.
The relation of IP, TCP, and UDP is shown in above Figure
The TCP/IP model does not have session or presentation layers, which are of little use to most applications.
The top application layer contains all the higher-level protocols, as shown in Figure .Many other protocols, such as HTTP used on the World Wide Web, have been added over the years.
The host-to-network layer
The layer below the internet layer is a great void. The TCP/IP model just points out that the host has to connect to the network using some protocol so it can send IP packets over it. This protocol is not defined and varies from host and network to network.
A comparison of the OSI and TCP/IP reference models
Fundamental similarities:
- The same concept of a stack of independent protocols.
- Similar functionality of the layers.
The three central concepts to the OSI model:
- Services: which tell what the layer does, not how entities above it access it or how the layer works.
- Interfaces: which tell the processes above it how to access it (i.e., what the parameters and results are), not how the layer works inside.
- Protocols: which are used between peer entities to implement the offered services.
The biggest contribution of the OSI model is to make the distinction between these three concepts explicit. The TCP/IP model did not clearly distinguish them.
Other major differences:
- The OSI model was devised before the protocols were invented, but the reserve was true with the TCP/IP model.
- The OSI model has seven layers, but the TCP/IP model has only five layers.
- The OSI model supports both connection-oriented and connectionless communication in the network layer, but only connection-oriented communication in the transport layer.
The TCP/IP model has only connectionless mode in the internet layer, but has both modes in the transport layer.
A critique of the OSI model and protocols
Summary:
- Bad timing.
- Bad technology.
- Bad implementation.
- Bad politics.
A critique of the TCP/IP reference model
- No clear distinguishment of the concepts of service, interface, and protocol not much of a guide for designing new networks using new technologies.
- Not general and poorly suited to describing any protocol stack other than TCP/IP, e.g., SNA.
- The host-to-network layer is not really a layer at all, but an interface (between the network and data link layers).
- No distinguishment of the physical and data link layers.
- Prococols other than the IP and TCP were ad hoc.
Summary:
- The OSI model minus the session and presentation layers) is exceptionally useful for discussing computer networks, but the OSI protocols have not become popular.
- The TCP/IP model is practically nonexistent, but the protocols are widely used.