The definitive guide to the OSI and TCP/IP Model (Layer 1 – Physical Layer)

Introduction

After speaking to many DBAs it seems that the OSI model is the one topic that causes the most grief when it comes to understanding how networks work. In this post I will attempt to provide some background knowledge primarily focusing on Layer 1 – the Physical Layer. I hope you can use this post to further improve your understanding.

Layered Models:

The IT industry uses layered models to describe the complex process of network communication. Protocols for specific functions in the process are grouped by purpose into well-defined layers. By breaking the network communication process into manageable layers, the industry can benefit in the following ways:

■ Defines common terms that describe the network functions to those working in the industry and allows greater understanding and cooperation.
■ Segments the process to allow technologies performing one function to evolve independently of technologies performing other functions. For example, advancing technologies of wireless media is not dependent on advances in routers.
■ Fosters competition because products from different vendors can work together.
■ Provides a common language to describe networking functions and capabilities.
■ Assists in protocol design, because protocols that operate at a specific layer have defined information that they act upon and a defined interface to the layers above and below.

What is the OSI Model?

The Open Systems Interconnection (OSI) model, known as the OSI model, provides an abstract description of the network communication process. Developed by the International Organization for Standardization (ISO) to provide a road map for nonproprietary protocol development, the OSI model did not evolve as readily as the TCP/IP model.

In a nutshell, the communication process beings at the application layer of the source, and the data is passed down to each layer to be encapsulated with supporting data until it reaches the physical layer and is put out on the media. When the data arrives at the destination, it is passed back up through the layers and decapsulated (decapsulation is the process of stripping off one layer’s headers and passing the rest of the packet up to the next higher layer on the protocol stack) by each layer.

In other words, for application data to travel uncorrupted from one host to another, header (or control data), which contains control and addressing information, is added to the data as it moves down the layers. The process of adding control information as it passes through the layered model is called encapsulation. To reiterate, decapsulation is the process of removing the extra information and sending only the original application data up to the destination application layer.

Each layer adds control information at each step. Each layer provides data services to the layer directly above by preparing information coming down the model or going up. The generic term for data at each level is protocol data unit (PDU).

The OSI model is used to reference the process of communication, not to regulate it. Many protocols in use today apply to more than one layer of the OSI model. This is why some of the layers of the OSI model are combined in the TCP/IP model. Which leads us to…

The TCP/IP Model:

The TCP/IP model evolved faster than the OSI model and is now more practical in describing network communication functions. The OSI model describes in detail functions that occur at the upper layers on the hosts, while networking is largely a function of the lower layers.

When juxtaposed, you can see that the functions of the application, presentation, and session layers of the OSI model are combined into one application layer in the TCP/IP model. The bulk of networking functions reside at the transport and the network layers, so they remain individual layers. TCP operates at the transport layer, and IP operates at the Internet layer. The data link and physical layers of the OSI model combine to make the network access layer of the TCP/IP model.

So what’s the purpose of the physical layer in the OSI model?

The role of the OSI physical layer is to encode the binary digits that represent data link layer frames into signals and to transmit and receive these signals across the physical media—copper wires, optical fiber, and wireless—that connect network devices. The datalink frame that comes down to the physical layer contains a string of bits representing application, presentation, session, and transport and network information. These bits are arranged in the logical order required by the specific protocols and applications that use them. These bits must travel over a physical medium such as copper cable or a glass fiberoptic cable, or wirelessly through the air.

The physical medium is capable of conducting a signal in the form of voltage, light, or radio waves from one device to another. It is possible that the media will be shared by traffic from many protocols and subjected to physical distortions along the way. Part of the physical layer design is to minimize these effects of overhead and interference.

The delivery of frames across the local media requires the following physical layer elements:
■ The physical media and associated connectors
■ A representation of bits on the media
■ Encoding of data and control information
■ Transmitter and receiver circuitry on the network devices

After the signals traverse the medium, they are decoded to their original bit representations of data and given to the data link layer as a complete frame.

When the physical layer puts a frame out onto media, it generates a set patterns of bits, or signal pattern, that can be understood by the receiving device. They are organized so that the device will be able to understand when a frame begins and when it ends. Without the signal pattern, the receiving device will not know when the frame ends, and the transmission will fail.

The physical layer performs functions very different from the other OSI layers. The upper layers perform logical functions carried out by instructions in software. The upper OSI layers were designed by software engineers and computer scientists who designed the services and protocols in the TCP/IP suite as part of the Internet Engineering Task Force (IETF). By contrast, the physical layer, along with some similar technologies in the data link layer, defines hardware specifications, including electronic circuitry, media, and connectors. Instead of software engineers, the physical layer specifications were defined by electrical and communications engineering organizations.

tl;dr:

OSI Layer 1 takes data link layer frames and encodes the data bits into signals that travel copper, fiber-optic, or wireless media to the next device, where they are decoded and sent back up to the data link layer.

Copper cable, fiber-optic cable, and wireless media have varying performance benefits and costs that determine their use in a network’s infrastructure. Physical layer equipment standards describe the physical, electrical, and mechanical characteristics of the physical media and the connectors used to connect media to devices. These standards are under constant review and are updated as new technologies become available.

Aside

When to tune?

If the application performance limits the business processes it is supposed to be supporting, the application must be tuned.

Aside

Data Availability

Today’s businesses depend heavily on their databases. Should applications and data become unavailable, the entire business may halt. Revenue and customers may be lost and penalties may be incurred. Bad press can have a lasting effect on both customers and stock prices. Certainly, providing continuous data availability is essential for today’s businesses.

Quote

Engineering

The great liability of the engineer compared to men of other professions is that his works are out in the open where all can see them. His acts, step by step, are in hard substance. He cannot bury his mistakes in the grave like the doctors. He cannot argue them into thin air or blame the judge like the lawyers. He cannot, like the architects, cover his failures with trees and vines. He cannot, like the politicians, screen his shortcomings by blaming his opponents and hope that the people will forget. The engineer simply cannot deny that he did it. If his works do not work, he is damned. That is the phantasmagoria that haunts his nights and dogs his days. He comes from the job at the end of the day resolved to calculate it again. He wakes in the night in a cold sweat and puts something on paper that looks silly in the morning. All day he shivers at the thought of the bugs which will inevitably appear to jolt its smooth consummation.

On the other hand, unlike the doctor his is not a life among the weak. Unlike the soldier, destruction is not his purpose. Unlike the lawyer, quarrels are not his daily bread. To the engineer falls the job of clothing the bare bones of science with life, comfort, and hope. No doubt as years go by people forget which engineer did it, even if they ever knew. Or some politician puts his name on it. Or they credit it to some promoter who used other people’s money with which to finance it. But the engineer himself looks back at the unending stream of goodness which flows from his successes with satisfactions that few professions may know. And the verdict of his fellow professionals is all the accolades he wants.

-Herbert Hoover

Quote

Science

Jessica Flack: I believe that science sits at the intersection of these three things — the data, the discussions and the math. It is that triangulation — that’s what science is. And true understanding, if there is such a thing, comes only when we can do the translation between these three ways of representing the world.