OSI Model and TCP/IP Model

The OSI model defines how devices running on networks communicate with each other. The Open Systems Interconnection (OSI) model is a set of protocols developed by ISO. This model was accepted in a short time in the early days of the Internet, when inter-network communication began, became widespread and became a guide for network operations. In the early days of the Internet, each brand was building its own communication model on its own devices. However, with the growth and spread of networks, this became a problem, and OSI was introduced as a firm-independent communication model. In this way, all manufacturers started to implement communication methods in accordance with this model. The TCP/IP model, on the other hand, came up as an alternative to the ISO model, which is much simpler and facilitates communication.

In the cyber security world, we have to be familiar with the OSI and TCP/IP models. Knowing the layers and functioning of these models and gaining experience in network management are the most important steps to be taken in the introduction to cyber security.

Before the OSI model, the majority of commercial networks used in small or large companies were built with technologies that could not be set to certain standards by a particular business. With the spread of communication, OSI emerged as an industry imperative in the late 1970s to create a network to which products from various manufacturers can be connected.

The OSI model, defined in Turkish as Open Systems Interconnection, describes how networks communicate. In this way, he explained the various protocols and activities and stated how the protocols and activities are related to each other. The OSI model is classified into seven layers. It was first introduced by the International Organization for Standardization (ISO) in the 1980s and started to become widespread.

The basis of cyber security is network” , “There is no cyber security without knowing network!” We hear the phrases often. In fact, we can say that the network is the foundation of a building. In addition, without that foundation, the information you add on it is somehow destroyed. To know the network, it is necessary to know the TCP/IP and OSI model. What is TCP/IP and OSI model? What are the differences?

OSI and TCP/IP Models

It is known that the structure that forms the basis of the Internet and Network infrastructure is generally OSI. But the structure we use in today's internet world is actually the TCP/IP model. The TCP/IP structure has been preferred due to its ease of use. OSI, on the other hand, is a difficult model to use compared to TCP/IP.


OSI and TCP/IP Models and Differences

OSI and TCP/IP Models and Differences

 

Layers

Description

Protokoller

Application (7)

This layer interfaces directly with applications and performs common application services for application processes.

POP, SMTP, DNS, FTP, Telnet, HTTP

Presentation (6)

Applications for syntactic differences in data representation in end-user systems.

Ağ Veri Gösterimi (NDR), Hafif Sunum Protokolü (LPP)

Session (5)

It provides a mechanism to manage the dialogue between end-user application processes.

NetBIOS

Transport (4)

Provides end-to-end communication control.

TCP, UDP

Network (3)

It directs information on the network.

IP, ARP, ICMP

Data Connection (2)

It explains the logical organization of data bits transmitted in a given medium.

SLIP, PPP

Physically (1)

It explains the electrical properties and interpretation of the exchanged signals as well as the physical properties of various communication media.

IEEE 1394, DSL, ISDN

OSI Model Layers

The OSI Model does not vary with any type of hardware or computer network. The standard is unique and applied unchanged. As the ISO standard is divided into seven layers, these seven layers are specified as follows. For data transmission both inside and outside the network, the data must pass through each layer within the specified rules. In each layer it passes through, certain tasks are loaded on the data.

When sending data, each layer receives a separate header. When the data reaches the remote computer, it goes from the hardware layer (physical layer) to the application layer according to these headers. When it reaches the last application layer, the data will have reached the opposite computer.

1. Physical Layer

It is the layer where the data link is transmitted as electrical signals. The answer to the question of how we are connected to the network is determined at this layer. The physical layer is the actual NIC and Ethernet cable. A device and the transmission medium (such as fiber, copper, radio signal) connected to this device defines the relationship. It also explains these transmission modes such as simplex, half duplex, full. Bit resolution takes place on this layer. The decoded bits are also sent as digital or analog signals. Generally, raw data is processed in this layer. No information is looked at, such as the type or destination of the data.

2. Data Link Layer

It is defined as the data link layer where data transfer between endpoints is provided. It is known as the layer where we get the MAC address of our wired or wireless ethernet card and the ARP protocol runs. It detects errors that may occur in the physical layer and is the layer where these errors are corrected as much as possible. On this layer, the protocol that enables to establish and terminate the connection between two physically connected devices is defined.

3. Network Layer

The network layer provides the transfer of data packet from one network node to another network node. In this layer, data begins to be transported as a packet. Thanks to this layer, it is ensured that the data is routed through the router. Switching and routing devices work at this layer. The network layer covers situations where information is added to the data packet that routers will use when it needs to be sent to a different network. The network layer is the layer where the IP address is defined to the devices. At the same time, it is the layer where the IP address of the opposite system is determined.

In this layer, the best way for a data to reach its target is selected. Generally, the shortest route is preferred. This process is called Routing, and the device that performs this process is called Router. The router aims to reach the opposite system as soon as possible by choosing the best route with the simplest recipe. The protocols used in this layer can be listed as IP, ARP, RARP, BOOTP, ICMP. In this layer, it translates the logical network address to the physical machine address. If the size of the data transmitted from a node operating at the network layer to another node operating at the data link layer is too large, the network divides the data into several pieces, sends the pieces separately, and reassembles them at the node it sends. There is no guarantee that data transmission at the network layer will be performed securely.

4. Transport Layer

It is defined as the transport or transmission layer. The transport layer packs the data it receives from the application layer. Packaging is the whole process of dividing big data into small data. The transport layer is responsible for the fragmentation and assembly of packets and the security of error checking. If the package encounters an error, it is sent again. It is the layer where it is checked whether the packet goes to the other side and it is known as the layer where port separation is made and which port is listening to which application.

The transport layer divides the data coming from the upper layers into pieces of network packet size. TCP, UDP, SPX protocols work at this layer. These protocols also perform some tasks such as error checking. In this layer, data is moved in segments.

TCP and UDP are examples of protocols in the transport layer. Because the protocol is connection-based, the transport layer uses buffering, congestion avoidance, and windowing methods to prevent the loss of packets sent by splitting.

5. Session Layer

The session layer controls connections between devices. It can establish, manage or terminate local and remote connections. Session layer is mostly used in application environments that use remote procedure call. SQL, Netbios, NFS can be given as examples of services used in this layer.

At the session layer, the connection between two computers is made, used and terminated. When a computer is communicating with multiple computers at the same time, it is ensured that it can properly communicate with the right computer. In this layer, the data to be sent to the presentation layer are separated by different sessions. Protocols such as NetBIOS, RPC, Named Pipes and Sockets work in this layer.

6. Presentation Layer

The presentation layer provides the communication medium between the entities in the application layer. The most important task of the presentation layer is to translate the sent data so that it can be understood by the opposite computer. In this way, it is possible for different programs to use each other's data.

The presentation layer sends the data to the application layer, and then in this layer, the structure and format of the data are edited. The format of the data is determined. In addition, data encryption, decompression and compression are performed on this layer. GIF, JPEG, TIFF, EBCDIC, ASCII work in this layer. The presentation layer transforms data into a form that applications will accept. This layer formats and encrypts the data and sends it over the network. That's why it's also known as the syntax layer.

7. Application Layer

The application layer provides an interface between the computer application and the network. It is the layer closest to the end user and deals with the data that comes in front of the user. The software interacts with the application. It is the only layer among the OSI layers that does not provide service to other layers. This layer actually meets the needs of computer users. SSH, telnet, FTP, TFTP, SMTP, SNMP, HTTP, DNS protocols and browsers work on this layer.

When deciding on resource availability, the application layer decides whether the network is sufficient or whether the desired connection is available. This layer supports application and end-user operations. User authorization and privacy are taken into account.


TCP/IP Model Layers

1. Physical Layer

In the TCP/IP model, this layer is formed by combining the 1st and 2nd layers of the OSI Model, namely the physical and data layers. All the operations of these layers are gathered in the physical layer as the first layer in the TCP/IP model.

2. Network Layer

In this layer, the operations are done in the same way as in the 3rd Network layer in the OSI model. In the TCP model, this part is referred to as the second layer. As in the network layer in the OSI model, data begins to be transported as packets.

3. Transport Layer

Transactions in the transport layer work in the same way as the 4th Transport layer in the OSI model. The transport layer is referred to as the third layer in the TCP/IP model. The transport layer is also a stand-alone layer in the TCP/IP model. It bundles the data it receives from the application layer.

4. Application Layer

It covers layers 5, 6 and 7 of the OSI model. In this layer, known as Application, Session, Presentation and Application layers, which we have counted in the OSI model, are combined and gathered in this layer.

What are the Differences Between TCP/IP and OSI?

·         While the OSI model has seven layers, the TCP/IP model uses four layers.

·         Divides the TCP/IP communication task into simpler subtasks. Each subtask is made available to specific services for other subtasks. The OSI model uses the same concept, but the features of the protocols at each layer and their interrelationships are clearly defined in the OSI model. This feature makes working with the OSI model more efficient. TCP/IP, on the other hand, does not impose such a restriction, so a new protocol can be easily placed between existing layers when necessary.

·         It does not allow a flexible structure such as not using an unnecessary layer in the OSI model. TCP/IP, on the other hand, is not defined by strict rules, allowing layers that are not needed to be used.

·         TCP / IP is still used in computer networks, while the OSI Layer model is no longer used.

·         To define the functionality of the upper layers, OSI uses three separate layers (application, presentation and session), while TCP / IP uses a single layer (application).

·         OSI also uses two separate layers (Physical and Data link) to define the functionality of the lower layers, while TCP/IP uses a single layer (Link) for this.

·         To define routing protocols and standards, OSI uses the Network layer while TCP/IP uses the Internet layer.

·         Compared to the TCP/IP model, the OSI model is well documented and explains standards and protocols in more detail.

·         According to the OSI model, some of the layers are combined in the TCP/IP model for convenience.

·         TCP/IP makes communication simpler. In contrast to the session, presentation and application layer in the OSI model, TCP/IP uses only the application layer.

·         When the TCP/IP model uses UDP connections, it does not perform reliability checks at the transport layer. In the OSI model, this security process is always done.

Comments