THE OSI SEVEN-LAYER NETWORK MODEL LINUX
The Open System Interconnect (OSI) seven-layer model [OSI7498] was first specified in the early 1980s. Although neither traditional nor modern networking protocols fit neatly into this model, it has been the common framework to discuss and explain networking protocols for over 20 years. The layered model is often called a stack because each layer in the sending computer in effect has a logical relationship with the corresponding layer in the receiving machine. See Table for an illustration of the seven-layer model
The OSI Seven-Layer Model
The OSI Lower Layers
The lowest layer, Layer 1, is the physical layer. It is concerned with the lowest level of detail about data transmission. This layer worries about issues such as how to indicate the presence of a one bit versus a zero bit on the physical media. It also deals with electrical signal levels and other details related to physical transmission. The next layer up, Layer 2, is the data link layer. The data link layer is primarily responsible for establishing and maintaining connections or providing connectionless service. It is concerned with how the two endpoints will establish a communication. It also deals with framing or how to differentiate user or payload data from control data. It contains a way for machines to identify each other, generally called station IDs or Media Access Control (MAC) addresses. The next layer up, Layer 3, is the network layer. It is responsible for how nodes on the network are named or addressed. It is concerned with network topology and how to route packets from one node to another. As with the data link layer, the network layer has address information, too. However, network addresses are more abstract; they have to do with network topology and at least theoretically are not tied to a particular physical interface. The next layer up, Layer 4,or the transport layer, provides a way for data to be collected or aggregated for passage across the network. In addition, the transport layer provides a simple programming interface to users at higher layers so they don’t have to deal with the network details of Layer 3 or lower. In the world of TCP/IP, we think of the transport layer interface as providing two types of interfaces. The first is a streaming interface where the user can send and receive data as a continuous stream of bytes. The other interface provides a chunked or datagram interface to the user where the user must break up the data into discrete packets before sending.
The OSI Upper Layers
The higher layers are often thought to be part of the application. Layer 5, the session layer, is primarily about managing access and session control of a user on one machine who wants to access another machine. Layer 6, the presentation layer, is for abstract data representation. Data in network representation is mapped to the user’s view so the application need not worry how the data looks when it is stored on a different machine. Architectural details of data representation in a particular machine are removed at this layer. The uppermost layer, Layer 7, is the application layer. Only pure OSI-compliant networking protocols think of this as a separate layer. It is important to point out that the upper layers—Layers 5, 6, and 7—are not part of the TCP/IP stack.