Peeking behind the scenes at the OSI

The communications stack unravelled, layer by layer.

With the launch of ArrowPoint Communications' 'content smart switch' (Network News 31 March), and Foundry Networks' announcement of support for Layer 7 switching, we thought we'd take a look behind the scenes at the OSI stack to see what all the excitement is about.

The OSI (Open Systems Interconnection) is a standard reference model for how data should be transmitted between any two points over a network.

Developed by major computer and telecoms companies during the early 1980s, the OSI was intended to be a detailed specification of interfaces. Instead, the committee decided to establish a common reference model from which others could develop detailed interfaces that, in turn, could become standards.

The main idea in the OSI stack is that the process of communication between two devices in a network can be split into layers, with each layer adding its own set of special, related functions. In a given message between devices there will be a flow of data down through the layers in one device and, when the data arrives at the other end, another flow of data up through the layers in the receiving device.

There are seven layers, which are divided into two groups. The upper four layers are used when data passes from or to a user, while the lower three are used when data passes over the network.

The layers are as follows.

Layer 7: The application layer

This is where communication partners are identified, quality of service is identified, user authentication and privacy are considered, and any constraints on data syntax are identified. (This layer is not the application itself, although some applications may perform application layer functions.)

Examples include e-mail, web applications, file transfers, host sessions, file services, network management and directory services.

Layer 6: The presentation layer

This layer, usually part of an operating system, converts incoming and outgoing data from one presentation format to another (for example, from a text stream into a popup window with the newly arrived text). It is sometimes called the syntax layer.

Examples include POP/SMTP, HTTP, FTP, Telnet, NFS, SNMP and DNS.

Layer 5: The session layer

This sets up, co-ordinates, and terminates conversations, exchanges, and dialogues between the applications at each end. It deals with session and connection co-ordination.

Examples include port 80 for HTTP sessions, 20 or 21 for file transfers, and 53 for DNS.

Layer 4: The transport layer

This layer manages the end-to-end control (for example, determining whether all packets have arrived) and error-checking. It ensures complete data transfer.

Layer 3: The network layer

This handles the routing of the data (sending it in the right direction to the right destination on outgoing transmissions and receiving incoming transmissions at the packet level). The network layer does routing and forwarding.

Layer 2: The data link layer

This is where error control and synchronisation is provided for the physical level. The layer also does bit-stuffing for strings of 1s in excess of five. It furnishes transmission protocol knowledge and management.

Layer 1: The physical layer

This layer conveys the bit stream through the network at the electrical and mechanical level. It provides the hardware means of sending and receiving data on a carrier.

We all know that hubs work at Layer 2, broadcasting data over the network, while routers and switches work at Layer 3, sending data to specific nodes, but why would you want to work at Layer 4 or above?

At Layer 4 you can define full access-control lists, so that you can filter or forward traffic based on TCP or UDP port numbers. Layer 4 switching is also now being referred to as Application Switching.

Dealing with sessions and connection co-ordination, Layer 5 handles data flows between specific applications.

This layer is being used by some new next-generation switches, such as the CSS-100 from ArrowPoint Communications, specifically for handling web and internet traffic.

Working at Layer 7 will allow the host to communicate directly with the switch to determine appropriate resources for forwarding the data.

It was inevitable that we'd start to see Layer 4 and Layer 5 switches, after all the hype and techno-babble surrounding Layer 3 devices. Eventually, however, we'll find our networks peppered with Layer n switches. These devices will automatically detect the type of incoming traffic and switch it at the most effective layer to the destination.