no audio available

click for audio related to this page


Lesson 1: Open Systems Interconnection (OSI) Reference Model

This lesson describes the Open Systems Interconnection (OSI) reference model. The OSI reference model represents the seven layers of the process by which data is packaged and transmitted from a sending application through the physical wires to the receiving application.

Network Communications

Network activity involves sending data from one computer to another. This complex process can be broken into discrete, sequential tasks. The sending computer must:
  1. Recognize the data.
  2. Divide the data into manageable chunks.
  3. Add information to each chunk of data to determine the location of the data and to identify the receiver.
  4. Add timing and error-checking information.
  5. Put the data on the network and send it on its way.
Network client software operates at many different levels within the sending and receiving computers. Each of these levels, or tasks, is governed by one or more protocols. (Protocols are introduced in Chapter 3, Lesson 2: How Networks Send Data.) These protocols, or rules of behavior, are standard specifications for formatting and moving the data. When the sending and receiving computers follow the same protocols, communication is assured. Because of this layered structure, this is often referred to as the protocol stack.

With the rapid growth of networking hardware and software, a need arose for standard protocols that could allow hardware and software from different vendors to communicate. In response, two primary sets of standards were developed: the OSI reference model and a modification of that standard called Project 802 (covered in the next lesson).

Acquiring a clear understanding of these models is an important first step in understanding the technical aspects of how a network functions. Throughout this lesson we refer to various protocols. The protocols and how they apply to these models are covered in detail in Chapter 6, "Defining Network Protocols."

The OSI Reference Model

In 1978, the International Organization for Standardization (ISO) released a set of specifications that described network architecture for connecting dissimilar devices. The original document applied to systems that were open to each other because they could all use the same protocols and standards to exchange information.
To set up a network competently, you need to be aware of the major standards organizations and how their work affects network communications. An overview of the most important standards bodies is presented in Appendix B, "Common Network Standards and Specifications."

In 1984, the ISO released a revision of this model and called it the Open Systems Interconnection (OSI) reference model. The 1984 revision has become an international standard and serves as a guide for networking.

The OSI reference model is the best-known and most widely used guide for visualizing networking environments. Manufacturers adhere to the OSI reference model when they design network products. It provides a description of how network hardware and software work together in a layered fashion to make communications possible. The model also helps to troubleshoot problems by providing a frame of reference that describes how components are supposed to function.

Run the c05dem02 video located in the Demos folder on the CD accompanying this book to see an overview presentation of the OSI reference model.

A Layered Architecture

The OSI reference model architecture divides network communication into seven layers. Each layer covers different network activities, equipment, or protocols. Figure 5.1 represents the layered architecture of the OSI reference model. (Layering specifies different functions and services as data moves from one computer through the network cabling to another computer.) The OSI reference model defines how each layer communicates and works with the layers immediately above and below it. For example, the session layer communicates and works with the presentation and transport layers.

Figure 5.1 The seven-layer OSI reference model

Each layer provides some service or action that prepares the data for delivery over the network to another computer. The lowest layers—1 and 2—define the network's physical media and related tasks, such as putting data bits onto the network interface cards (NICs) and cable. The highest layers define how applications access communication services. The higher the layer, the more complex its task.

The layers are separated from each other by boundaries called interfaces. All requests are passed from one layer, through the interface, to the next layer. Each layer builds upon the standards and activities of the layer below it.

Relationships Among OSI Reference Model Layers

Each layer provides services to the next-higher layer and shields the upper layer from the details of how the services below it are actually implemented. At the same time, each layer appears to be in direct communication with its associated layer on the other computer. This provides a logical, or virtual, communication between peer layers, as shown in Figure 5.2. In reality, actual communication between adjacent layers takes place on one computer only. At each layer, software implements network functions according to a set of protocols.

Click to view at full size.

Figure 5.2 Relationships among OSI layers

Run the c05dem03 video located in the Demos folder on the CD accompanying this book to view a presentation of layer transmission on the OSI reference model.

Before data is passed from one layer to another, it is broken down into packets, or units of information, which are transmitted as a whole from one device to another on a network. (Packets were introduced in Chapter 3, Lesson 2: How Networks Send Data.) The network passes a packet from one software layer to another in the same order as that of the layers. At each layer, the software adds additional formatting or addressing to the packet, which is needed for the packet to be successfully transmitted across the network.

At the receiving end, the packet passes through the layers in reverse order. A software utility at each layer reads the information on the packet, strips it away, and passes the packet up to the next layer. When the packet is finally passed up to the application layer, the addressing information has been stripped away and the packet is in its original form, which is readable by the receiver.

Run the c05dem04 and c05dem05 videos located in the Demos folder on the CD accompanying this book to view a presentation of layer transmission between computers using the OSI reference model.

With the exception of the lowest layer in the OSI networking model, no layer can pass information directly to its counterpart on another computer. Instead, information on the sending computer must be passed down through each successive layer until it reaches the physical layer. The information then moves across the networking cable to the receiving computer and up that computer's networking layers until it arrives at the corresponding layer. For example, when the network layer sends information from computer A, the information moves down through the data-link and physical layers on the sending side, over the cable, and up the physical and data-link layers on the receiving side to its final destination at the network layer on computer B.

In a client/server environment, an example of the kind of information sent from the network layer on computer A to the network layer on computer B would be a network address, with perhaps some error-checking information added to the packet.

Interaction between adjacent layers occurs through an interface. The interface defines the services offered by the lower networking layer to the upper one and further defines how those services will be accessed. In addition, each layer on one computer appears to be communicating directly with the same layer on another computer.

The following sections describe the purpose of each of the seven layers of the OSI reference model, and identify the services that each provides to adjacent layers. Beginning at the top of the stack (layer 7, the application layer), we work down to the bottom (layer 1, the physical layer).

Application Layer

Layer 7, the topmost layer of the OSI reference model, is the application layer. This layer relates to the services that directly support user applications, such as software for file transfers, database access, and e-mail. In other words, it serves as a window through which application processes can access network services. A message to be sent across the network enters the OSI reference model at this point and exits the OSI reference model's application layer on the receiving computer. Application-layer protocols can be programs in themselves, such as File Transfer Protocol (FTP), or they can be used by other programs, such as Simple Mail Transfer Protocol (SMTP), used by most e-mail programs, to redirect data to the network. The lower layers support the tasks that are performed at the application layer. These tasks include general network access, flow control, and error recovery.

Presentation Layer

Layer 6, the presentation layer, defines the format used to exchange data among networked computers. Think of it as the network's translator. When computers from dissimilar systems—such as IBM, Apple, and Sun—need to communicate, a certain amount of translation and byte reordering must be done. Within the sending computer, the presentation layer translates data from the format sent down from the application layer into a commonly recognized, intermediary format. At the receiving computer, this layer translates the intermediary format into a format that can be useful to that computer's application layer. The presentation layer is responsible for converting protocols, translating the data, encrypting the data, changing or converting the character set, and expanding graphics commands. The presentation layer also manages data compression to reduce the number of bits that need to be transmitted.

The redirector, which redirects input/output (I/O) operations to resources on a server, operates at this layer. Redirectors are discussed in Chapter 8, "Designing and Installing a Network."

Session Layer

Layer 5, the session layer, allows two applications on different computers to open, use, and close a connection called a session. (A session is a highly structured dialog between two workstations.) The session layer is responsible for managing this dialog. It performs name-recognition and other functions, such as security, that are needed to allow two applications to communicate over the network.

The session layer synchronizes user tasks by placing checkpoints in the data stream. The checkpoints break the data into smaller groups for error detection. This way, if the network fails, only the data after the last checkpoint has to be retransmitted. This layer also implements dialog control between communicating processes, such as regulating which side transmits, when, and for how long.

Transport Layer

Layer 4, the transport layer, provides an additional connection level beneath the session layer. The transport layer ensures that packets are delivered error free, in sequence, and without losses or duplications. At the sending computer, this layer repackages messages, dividing long messages into several packets and collecting small packets together in one package. This process ensures that packets are transmitted efficiently over the network. At the receiving computer, the transport layer opens the packets, reassembles the original messages, and, typically, sends an acknowledgment that the message was received. If a duplicate packet arrives, this layer will recognize the duplicate and discard it.

The transport layer provides flow control and error handling, and participates in solving problems concerned with the transmission and reception of packets. Transmission Control Protocol (TCP) and Sequenced Packet Exchange (SPX) are examples of transport-layer protocols.

Network Layer

Layer 3, the network layer, is responsible for addressing messages and translating logical addresses and names into physical addresses. This layer also determines the route from the source to the destination computer. It determines which path the data should take based on network conditions, priority of service, and other factors. It also manages traffic problems on the network, such as switching and routing of packets and controlling the congestion of data.

If the network adapter on the router cannot transmit a data chunk as large as the source computer sends, the network layer on the router compensates by breaking the data into smaller units. At the destination end, the network layer reassembles the data. Internet Protocol (IP) and Internetwork Packet Exchange (IPX) are examples of network-layer protocols.

Data-Link Layer

Layer 2, the data-link layer, sends data frames from the network layer to the physical layer. It controls the electrical impulses that enter and leave the network cable. On the receiving end, the data-link layer packages raw bits from the physical layer into data frames. (A data frame is an organized, logical structure in which data can be placed. Data frames are discussed in more detail in Chapter 3, Lesson 4: Token Ring.) The electrical representation of the data (bit patterns, encoding methods, and tokens) is known to this layer only.

Figure 5.3 shows a simple data frame. In this example, the sender ID represents the address of the computer that is sending the information; the destination ID represents the address of the computer to which the information is being sent. The control information is used for frame type, routing, and segmentation information. The data is the information itself. The cyclical redundancy check (CRC) provides error correction and verification information to ensure that the data frame is received correctly.

Figure 5.3 A simple data frame

The data-link layer is responsible for providing error-free transfer of these frames from one computer to another through the physical layer. This allows the network layer to anticipate virtually error-free transmission over the network connection.

Usually, when the data-link layer sends a frame, it waits for an acknowledgment from the recipient. The recipient data-link layer detects any problems with the frame that might have occurred during transmission. Frames that were damaged during transmission or were not acknowledged are then re-sent.

Physical Layer

Layer 1, the bottom layer of the OSI reference model, is the physical layer. This layer transmits the unstructured, raw bit stream over a physical medium (such as the network cable). The physical layer is totally hardware-oriented and deals with all aspects of establishing and maintaining a physical link between communicating computers. The physical layer also carries the signals that transmit data generated by each of the higher layers.

This layer defines how the cable is attached to the NIC. For example, it defines how many pins the connector has and the function of each. It also defines which transmission technique will be used to send data over the network cable.

This layer provides data encoding and bit synchronization. The physical layer is responsible for transmitting bits (zeros and ones) from one computer to another, ensuring that when a transmitting host sends a 1 bit, it is received as a 1 bit, not a 0 bit. Because different types of media physically transmit bits (light or electrical signals) differently, the physical layer also defines the duration of each impulse and how each bit is translated into the appropriate electrical or optical impulse for the network cable.

This layer is often referred to as the "hardware layer." Although the rest of the layers can be implemented as firmware (chip-level functions on the NIC), rather than actual software, the other layers are software in relation to this first layer.

Memorizing the OSI Reference Model

Memorizing the layers of the OSI reference model and their order is very important, especially when preparing to take a computer networking exam. Table 5.1 provides two ways to help you recall the seven layers of the OSI reference model.

Table 5.1 OSI Reference Model Layers
OSI Layer Down the Stack  Up the Stack 
Application All Away
Presentation People Pizza
Session Seem Sausage
Transport To Throw
Network Need Not
Data Link Data Do
Physical Processing Please

Data Packets and the OSI Reference Model

In Chapter 3, Lesson 2: How Networks Send Data, we discussed the data packet in general terms. These data packets are assembled and disassembled according to the OSI reference model. The packet-creation process begins at the application layer of the OSI reference model, where the data is generated. Information to be sent across the network starts at the application layer and descends through all seven layers.

At each layer, information relevant to that layer is added to the data. This information is for the use of the corresponding layer in the receiving computer. The data-link layer in the receiving computer, for instance, will read information added at the data-link layer in the sending computer. Figure 5.4 shows the assembly of a packet in the sending workstation and the disassembly of the packet in the receiving workstation.

Figure 5.4 Packet assembly and disassembly process

At the transport layer, the original block of data is broken into the actual packets. The protocol defines the structure of the packets used by the two computers.

When the packet reaches the transport layer, sequence information is added that guides the receiving computer in reassembling the data from packets.

When the packets finally pass through the physical layer on their way to the cable, they contain information from each of the other six layers.

Addressing Packets

Most packets on the network are addressed to a specific computer and, as a result, get the attention of only one computer. Each NIC sees all packets sent on its cable segment, but it interrupts the computer only if the packet's address matches the card's individual address. Alternatively, a broadcast-type address can also be used. Packets sent with a broadcast-type address can receive the simultaneous attention of many computers on the network.

In situations involving large networks that cover large regions (or even countries) and offer several possible communication routes, the network's connectivity and switching components use the packet's addressing information to determine the best route for addressing packets.

Directing Packets

Network components use the addressing information in packets to direct the packets to their destinations or to keep them away from network locations where they do not belong. The following two functions play a key role in properly directing packets:

Windows NT and the OSI Reference Model

Network manufacturers use the OSI reference model when designing their products. When each follows the model, there is a greater likelihood that different systems can communicate. One shortcoming of the model stems from the fact that many manufacturers created their products before the model was accepted; these early products might not follow the model exactly. To demonstrate how the OSI reference model is adapted to a specific network operating system, we next examine Windows NT and how it fits the model.

OSI Layers and Windows NT

To simplify the model, Windows NT compresses the seven layers into only three layers: file system drivers, transport protocols, and NIC drivers. Figure 5.5 shows how the groups relate to OSI.

Figure 5.5 Windows NT and OSI

Windows NT uses drivers to provide for communication between the operating system and the network. A driver is a device-specific control program that enables a computer to work with a particular device, such as a printer or a disk drive. Every time you install a new piece of hardware, such as a printer, sound card, or network card, you need to install the software drivers that operate the card.

File System Drivers

File system drivers work in the application, presentation, and session layers of the OSI reference model. When these drivers detect that an application is requesting resources on a remote system, they redirect the request to the appropriate system. Examples of these drivers include the Windows NT file system (NTFS) and file allocation table (FAT) drivers, and the services applications installed on Windows NT Server and Windows NT Workstation.

Transport Protocols

Transport protocols operate in the transport and network layers of the OSI model. They are responsible for adding software address information to the data and for ensuring the reliability of the transmission. The transport protocols are bound to or combined with the NIC to provide communication. During installation and configuration of Windows NT, you must always bind these protocols to a specific network card.

Network Interface Card (NIC) Drivers

NIC drivers operate in the data-link and physical layers of the OSI reference model. They are responsible for adding the hardware address information to the data packet and for formatting the data for transmission through the NIC and cable. NIC drivers are protocol-independent, allowing systems based on Windows NT to transport data to a variety of network systems.

Figure 5.6 shows how software and protocols relate to the OSI reference model and the Windows NT model.

Click to view at full size.

Figure 5.6 Software and protocols

Windows NT Interfaces

Windows NT supports many different network redirectors, transport protocols, and NICs. With so many possible combinations, it was necessary to develop a method of handling the interactions between them. To resolve this problem, Microsoft developed common interfaces—boundary layers—to act as translators between each layer. Thus, as long as any network component was written to communicate with the boundary interfaces, it could be used with the model. Figure 5.7 shows the three boundary interfaces.

Figure 5.7 Windows NT architecture with boundary interfaces

Application Programming Interfaces (APIs)

The application programming interfaces (APIs) are system routines that give programmers access to the services provided by the operating system. Windows NT networking APIs lie between user applications and the file system drivers and redirectors. These APIs allow an application to control or be controlled by other applications. They are responsible for setting up a session between the sender and the receiver on the network. Windows NT supports a variety of APIs for networking.

Transport Driver Interfaces (TDIs)

The transport driver interfaces (TDIs) work between the file system drives and the transport protocols. These will allow any protocol written to TDI to communicate with the file system drivers.

Network Driver Interface Specifications (NDISs)

The Network Driver Interface Specifications (NDISs) work between the transport protocols and the NIC drivers. As long as a NIC driver is written to NDIS standards, it will communicate with the transport protocols.

Exercise 5.1: Reviewing the OSI Reference Model Layers

This two-part exercise will give you the opportunity to memorize and review the layers of the OSI reference model.

The left column is a listing of a memorization tool: "All People Seem To Need Data Processing." Next to each word in that column, enter the appropriate name of the applicable OSI layer in the center column and a brief description of that layer's function in the right column.
Memorization Tool OSI Layer Function

In the second part of Exercise 1 that follows, a device or standard is listed in the left column. In the space provided in the right column, write in the applicable OSI layer(s) for each device or standard.
Device OSI layer
IEEE 802.x


Lesson Summary

The following points summarize the main elements of this lesson: