OSI Model & TCP/IP Model

OSI Model & TCP/IP Model
OSI Model & TCP/IP Model
  • OSI Model Layers

    The OSI Model does not vary according to 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 within and outside the network, data must pass through each layer within the rules set. In each layer it passes, certain tasks are loaded on the data.

    Each layer receives a separate header when data is sent. When the data reaches the other computer, it travels from the hardware layer (physical layer) to the application layer according to these headers. When it reaches the latest application tier, the data will have reached the counter computer.

    1. Physical Layer

    It is the layer where the data connection is transmitted as electrical signals. The answer to the question of how we are connected to the network is determined in this layer. The physical layer is the actual NIC and Ethernet cable. It defines the relationship between a device and the means of transmission (such as fiber, copper, radio signal) connected to this device. It also explains these transfer modes such as simplex, half duplex, full. The resolution of lice occurs on this layer. The dissolved bits are also sent as digital or analog signals. In general, raw data is processed in this layer. No information such as the type or destination of the data is looked at.

    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 receive the MAC address of our wired or wireless ethernet card and where the ARP protocol works. 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 allows to establish and terminate the connection between two physically connected devices is defined.

    3. Network Layer

    The network layer enables the transfer of a data packet from one network node to another network node. In this layer, data begins to be transported as packets. Thanks to this layer, data is routed through the router. Switching and routing devices work in 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 devices. It is also the layer where the IP address of the opposite system is determined.

    In this layer, the best way is chosen for a data that takes action to reach its goal. In general, the shortest way is preferred. This process is called Routing and the device that does this process is called a Router. The router aims to make the best choice of way with the simplest description and to reach the opposite system as soon as possible. At this layer, it translates the logical network address to a physical machine address. If the size of the data transmitted from one node running at the network layer to another node operating at the data link layer is too large, the network divides the data into several parts, sends the fragments separately, and reassembles those fragments at the node to which it is sending. There is no guarantee that data transmission will be performed securely at the network layer.

    4. Transport Layer

    It is defined as a transport or transmission layer. The transport layer packages 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 control. If the packet encounters an error, it is sent again. It is the layer where the packet is checked whether it goes to the opposite side or not, and it is known as the layer where the port separation is made and which port is listening to which application.

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

    Examples of protocols at the transport layer are TCP and UDP. Thanks to the fact that the protocol is link-based, the transport layer uses buffering, congestion avoidance and windowing methods to prevent the loss of packets sent by breaking them into pieces.

    5. Session Layer

    The session layer controls the connections between devices. Establish, manage, or terminate local and remote connections. The session layer is often used in application environments that use remote procedure calling. Examples of services used in this layer are SQL, Netbios, NFS.

    At the session layer, the connection on the two computers is made, used, and terminated. When a computer communicates with multiple computers at the same time, it ensures that it can communicate with the correct computer as needed. In this layer, the data to be sent to the presentation layer is separated from each other by different sessions. Protocols such as NetBIOS, RPC, Named Pipes, and Sockets operate at this layer.

    6. Presentation Layer

    The presentation layer provides the communication environment between entities in the application layer. The most important task of the presentation layer is to translate the data sent in a way that 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 arrangements are made to the structure and format of the data in this layer. The format of the data is determined. In addition, the encryption, opening and compression of the data are performed on this layer. GIF, JPEG, TIFF, EBCDIC, ASCII work on this layer. The presentation layer transforms data into a state that applications accept. This layer formats and encrypts the data so that it is sent across the network. 

    7. Application Tier

    The application layer provides an interface between the computer application and the network. It is the layer that is closest to the end user and deals with the data that comes in front of the user. Interacts with the software, with the application. It is the only layer among the OSI layers that does not provide service to other layers. This layer actually satisfies the requirement 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 exists. This tier supports application and end-user operations. User authorization and privacy are considered.

    TCP/IP Model Layers

    1. Physical Layer

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

    2. Network Layer

    In this layer, the OSI model 3. Operations are done in the same way as at the network layer. In the TCP model, this section is considered the second layer. As in the OSI model, data begins to be transported as packets as it resides at the network layer.

    3. Transport Layer

    Operations in the transport layer are in the OSI model 4. It works in the same way as the transport layer. The transport layer is considered the third layer in the TCP/IP model. The transport layer is also a stand-alone layer in the TCP/IP model. Packages the data it receives from the application layer.

    4. Application Tier

    It covers layers 5, 6 and 7 in the OSI model. In this layer known as Application, the Session, Presentation and Application layers that we have listed in the OSI model are combined and collected in this layer

  • Key Difference Between TCP/IP and OSI Model

    • OSI has 7 layers, whereas TCP/IP has 4 layers.
    • The OSI Model is a logical and conceptual model that defines network communication used by systems open to interconnection and communication with other systems. On the other hand, TCP/IP helps you to determine how a specific computer should be connected to the internet and how you can be transmitted between them.
    • OSI header is 5 bytes, whereas TCP/IP header size is 20 bytes.
    • OSI refers to Open Systems Interconnection, whereas TCP/IP refers to Transmission Control Protocol.
    • OSI follows a vertical approach, whereas TCP/IP follows a horizontal approach.
    • OSI model, the transport layer, is only connection-oriented, whereas the TCP/IP model is both connection-oriented and connectionless.
    • OSI model is developed by ISO (International Standard Organization), whereas TCP Model is developed by ARPANET (Advanced Research Project Agency Network).
    • OSI model helps you to standardize router, switch, motherboard, and other hardware, whereas TCP/IP helps you to establish a connection between different types of computers.