What is the difference between TCP/IP and OSI Model
Note that the TCP/IP suite is a networking model, too, but it’s usually referred to as the TCP/IP suite, or just TCP/IP. A full detail about TCP/IP and OSI Model is given below:
The Open Systems Interconnection (OSI) Model is a normalized model for telecom in PC frameworks. It doesn't respect the fundamental innovation, however, rather the layers engaged with correspondence. Allow us to investigate the various layers inside the OSI Model:
A networking protocol is a set of rules defining how network devices and software should work, including how they should work together. By the way, protocols refer to logical rules about how devices should communicate logical not physical standards. So, you could visualize it like this.
Protocol |
This is a networking model, and it categorizes and provides a structure for various networking protocols like these. The different colors represent different categories of protocols and standards. These protocols and standards could define something like the structure and usage of IP addresses, or maybe physical details like electrical voltage used on copper cables when transmitting data. Let’s talk about the OSI model first. So, what if there were no protocols and standard networking models? Here are a few Dell PCs and a few iMacs.
Dell PC vs iMacs |
If Dell and Apple each made their own networking model, each with their own set of networking protocols, these Dells would be able to communicate with each other, and these iMacs would be able to communicate with each other, but because the Dells and iMacs would speak a different language than each other, with a different set of rules about how to communicate, the Dells wouldn’t be able to communicate with the iMacs.
If Dell and Apple each made their networking model, each with their own set of networking protocols, these Dells would be able to communicate with each other, and these iMacs would be able to communicate with each other, but because the Dells and iMacs would speak a different language than each other, with a different set of rules about how to communicate, the Dells wouldn’t be able to communicate with the iMacs, and iMacs wouldn’t be able to communicate with Dells.
Dell PC vs iMacs |
This is a problem in modern networks,
such as the Internet, where we expect devices from various makers in various
countries to be able to communicate with each other.
The OSI model is
one attempt at standardizing network communications. Although it isn’t actually
in use today, it has had a big impact on how network engineers think about
networking. OSI stands for ‘open systems interconnection model. Open, means
that it is an open standard, not a proprietary model developed and used by an
individual company. It is a conceptual model that categorizes and standardizes
the different functions in a network. It was created by the international
organization for standardization, the ISO, in the late
1970s and early 1890s. Network functions are divided into 7 layers.
OSI Layers |
For example, look at the bottom layer
1. It is the physical layer. The
standards for cables and interfaces fit into the physical layer of the OSI
model, but there are 6 more layers on top of that to make the network operate
properly. Let’s examine each layer one by one, starting at Layer 7, the application layer.
The application layer is the layer that
is closest to the end-user. The application layer interacts with software
applications that have some communication component, such as your web browser,
whether that’s Brave, Firefox, Chrome,
or whatever. For example, HTTP and HTTPS are Layer 7 protocols.
Example of Application Layer |
Notice
HTTPS before cisco.com,
indicating that HTTPS is being used to get this website and view it in the
browser. Keep in mind that Layer 7 doesn’t include the application itself,
like Chrome or Firefox,
but rather the protocols that interact with the application, like HTTP or
HTTPS. A couple of functions of Layer 7 are: identifying communication partners
and synchronizing communication.
Encapsulation |
Let me explain how it does this. Here I have two OSI model stacks, representing two computers that will communicate with each other. The software application, maybe a web browser, interacts with Layer, the application layer, and wants to send some data to the system on the right. This data is processed through the OSI stack, each layer adding something to the original data. This is called ‘ENCAPSULATION’ because the original data is encapsulated inside this additional information which is added on.
By the time it reaches the physical layer, it is electrical signals on a wire and is sent to the neighboring system. Then, the neighboring system performs the opposite process; the additions of each layer are stripped off until the data reaches the application layer of the neighboring system. This process is called ‘de-encapsulation’, as the additional information is removed as the data is processed up the stack. Both the encapsulation and de-encapsulation processes are examples of ‘Adjacent-layer interaction’, interaction between the different layers of the OSI model.
De-Encapsulation |
Encapsulation vs De-Encapsulation |
Data in the application is in an ‘application format’, a format that applications understand. It can be translated to a different format to be sent over the network. The job of this layer is to translate between application and network formats. An example of a function of the presentation layer is encryption of data as it is sent so that only the intended recipient can read it, and of course decryption as it is received.
The presentation layer also translates between different
application-layer formats, to ensure that the data is in a format the receiving
host can understand. To summarize, the presentation layer translates data to
the appropriate format. That’s all you need to know about the presentation
layer.
Encryption vs De-cryption |
The session layer controls dialogues, also known as
sessions, between communicating hosts. It establishes, manages, and terminates
connections between the local application (for example your web
browser) and the remote application, for example, YouTube. YouTube’s servers
are being used by countless people at every moment, and there has to be a way
to manage all of these sessions.
That’s the purpose of the session layer of the OSI model.
So, we’ve looked at the top layers of the OSI model, from top to bottom,
Application, Presentation, and Session.
It’s important to know what the functions of these layers
are, but a network
Engineers don’t work with these layers of the OSI model.
That is the job of application developers. Application developers work
with the top layers of the OSI model to connect their applications over
networks.
Let’s return to this diagram. Remember what I said about encapsulation? Well, data prepared at the top layers are then sent over to the bottom layers, which do the work of sending it over the network. After the top layers and data over to the bottom layers, the next step before sending data is that Layer 4, the transport layer, adds a header in front of the data, like this.
Upper
Layers
Upper Layer |
Transport Layer segments and reassembles data for communications between end hosts. To reword
that, it breaks large pieces of data into smaller segments that can be easily
sent over the network and are less likely to cause transmission problems if
errors occur. For example, if data wasn’t segmented and you were trying to
watch a video, if an error occurred that prevented the video from reaching your
computer, you wouldn’t be able to watch the video at all. However, if the data
is segmented into many small units and only one fails to reach the destination,
that’s not a big problem. Also, the Transport layer provides host-to-host communication, also known as
end-to-end communication. This also provides process-to-process communications
for applications.
Process to Process Communication |
Now let’s review. Data is prepared by the top 3 layers. A Layer 4 header is added on. Note that at this point in the process, this unit of data plus the Layer 4 header is called a segment. Remember, if the data being sent is large enough, it will be segmented into smaller parts, and a Layer 4 header will be added to each segment. Next, that segment is passed on to Layer 3. And another header is added on to the end, like this.
Process to Process Communication |
The Transport layer of the OSI model
is answerable for recognizing network streams.
At some random time on a client's
PC, there may be an Internet program open, music is being streamed, while a
messenger or chat app is running. Every one of these applications is sending
and getting information from the Internet, and all that information is showing
up as 1's and 0's on that PC's NIC.
Something needs to exist to
recognize which 1's and 0's have a place with the courier or the program or the
streaming music. That "something" is Layer 4:
Transport Layer |
The network layer provides
connectivity between end hosts on different networks, for example outside of
the local area network, or LAN. Network Layer provides logical addressing, in
the form of IP addresses; it also provides path selection between source and
destination. Often there are many possible paths that data can take to reach
its destination, especially over a huge network like the Internet Layer
provides the means of selecting the best path. Routers operate at this Layer 3.
Routers are used when end hosts need to reach a destination outside of their
LAN.
Internet Layer |
Let’s review the encapsulation
process again. Data is prepared by the upper layers, the transport layer adds a
layer header, and this combination of data plus layer header 4 is called a
segment, next to the network layer, adds a layer 3 header, including
information like the source and destination IP address, to the segment. This
combination of data, layer 3 header, and layer 3 header, is called a packet.
Next, the packet is further encapsulated at Layer 2 this time with both a Layer
2 header and a Layer 2 trailer.
Encapsulation at Internet Layer |
The data link layer provides node-to-node connectivity
and data transfer. For example, direct connections between a PC to switch, or a
switch to router, or a router to router, because this Layer is adjacent to
the physical layer, it also defines how data is formatted
for transmission over a physical medium, like copper UTP cables. It also
detects, and possibly corrects, errors that occur on the physical layer. Like
layer 3, layer 2 also uses an addressing system; however, it is separate and
different from layer 3 addressing. Finally, switches operate at Layer 2.
Switches look at the destination Layer address to determine where to send the data, Let’s look at the encapsulation process once more. Data is prepared by the application layer. A layer 4 header is added to the data to make a segment. A Layer 3 header is added to the segment to make a packet.
Remember, the IP address is included in this Layer 3 header. Then, a
layer 2 header and layer 2 trailer are added to the packet. At this point, the
combination of data, layer 2 header, and layer 2 trailer is called a frame.
Now, the data is not further encapsulated at Layer 1.
This frame is then sent over the connection, whether it’s electrical signals
over a wire or wireless signals in the case of Wifi
to the neighboring system.
Encapsulation at Data Link Layer |
The interaction and distinction between Layer 2 and Layer 3 are crucial to understanding how data flows between two computers. For example, if we have a unique L2 addressing scheme on every NIC (like MAC addresses), then why do we need so far addressing scheme at L3 (like IP addresses)? Or conversely?
The answer is that both addressing schemes attain different functions:
v Layer 2 works on MAC
addresses and is responsible for packet delivery from hop to hop.
v Layer 3 works on IP addresses and is responsible for packet delivery from end to end.
When
a computer has data and wants to send it, it encapsulates it in an IP header
which will include information like the Source and Destination IP addresses of
the two “ends” of the communication.
The
IP Header and Data are then further encapsulated in a MAC address header
(information like the Source and Destination MAC address of the current hop) in
the path towards the final destination.
Here is a representation to effectively express this idea:
![]() |
End to End Delivery |
Notice between each Router, the MAC address header is deprived and regenerated to get it to the next hop. The IP header generated by the first computer is only deprived by the final computer, hence the IP header handled the “end to end” delivery, and each of the four unique MAC headers associated with this animation handled the “hop to hop” delivery.
The physical layer defines the physical characteristics
of the medium used to transfer data between devices. For example, voltage
levels, maximum transmission distances, the maximum cable lengths, physical
connectors, cable specifications, etc. Digital bits are converted into
electrical signals, for wired connections, or radio signals, for wireless
connections, like Wi-Fi, such as cables and pin layouts, are related to the
physical layer of the OSI model.
Wired and Wireless Connection |
Now we’ve got a complete frame, and that frame will be
sent from the local device over the cable, let’s say it’s an Ethernet cable.
Once it reaches the remote device, the reverse process of encapsulation and
de-encapsulation, takes place, the data link layer translates
the raw physical data into a complete frame once again. Then the layer 2 header
and trailer are removed, leaving the Layer 3 packet, and the
layer 3 header is removed, leaving the Layer 4 segment. Finally, the layer
4 header is removed and we are left with the
original data prepared by the upper layers of the original device. That’s the
process of de-encapsulation.
De-encapsulation at Physical Layer |
I
want to review some terms. So, when an application wants to send data to
another system, it interacts with the application layer of the OSI stack and
the data is prepared to be sent. When the layer header is added to the Transport layer, what is this combination
of data plus the Layer 4 header called a Segment; then,
the Layer 3 header is added on at the Network
layer; remember that includes the IP address. It’s called a
packet. Finally, a Layer 2 header and trailer are added to the Data Link layer. It’s called a
frame.
Protocol Data Units |
Now, there is one new term that is
used to refer to all of these. These are all called Protocol Data Units, or PDUs.
For example, the segment is the term for a Layer 4 PDU; the Packet is the term for a Layer 3 PDU, etc. At Layer 1, the physical layer, the name for the PDU is a bit, referring to the bits being transferred on the wire. So, that’s a lot of information.
We need to discuss the complete process of
Encapsulation and De en-capsulation, in which how data is moved through the
layers from top to bottom when sending and from bottom to top when receiving.
Data is passed from layer to layer, and each
layer adds the information it requires to attain its goal before the complete
datagram is converted to 1s and 0s and sent across the wire. For example:
• Layer 4 will add a TCP header which would
incorporate a Source and Destination port
• Layer 3 will add an IP header which would
incorporate a Source and Destination IP address
• Layer 2 would add an Ethernet header which
would incorporate a Source and Destination MAC address
On the receiving end, each layer takes the
header from the data and passes it back up the stack towards the Application
layers. Here is the entire interaction process:
![]() |
Interaction Process |
Like the OSI model, it is a
conceptual model and set of communications protocols, and in TCP/IPs case it is
used on the Internet and other networks. It is known as TCP/IP because those
are two of the foundational protocols in the suite. It was developed by the
United States Department of Defense through DARPA, which is the Defense
Advanced Research Projects Agency. It has a similar structure to the OSI model,
but with fewer layers. And, it is the model actually in use in modern networks,
NOT OSI. However, the OSI model still influences how network engineers think
and talk about Networks today, which is why it's important to learn. Now let’s
compare the two.
TCP/IP and OSI Model |
On the left is the OSI model you’re familiar with by now, and on the right is the TCP/IP Suite’s networking model. The Application, Presentation, and Session layers of the OSI model are identical to the Application Layer of the TCP/IP model. Combining them into one represents how network engineers tend to think about networks since we don’t work much with anything above the Transport Layer, however, when talking about networks, we use the OSI numbering. For example, if you say ‘there is a Layer problem in the network’, network engineers will think of OSI’s Layer, the transport layer, not TCP/IP’s Layer, the Application Layer.
The OSI model and the TCP/IP model both share the transport layer. The network layer of the OSI model maps to the Internet layer of the TCP/IP model. Finally, the data link and physical layers of the OSI model are equivalent to the Link layer of the TPC/IP model. Once again, though, if people say, for example, there is a Layer problem in the network, they are referring to the OSI Model’s Layer, the Data Link Layer, not TCP/IP’s layer, the Internet layer. Even though, TCP/IP is the model used in modern-day networks. Now, you might hear different names used for these layers.
TCP/IP Layer Names |
This is a chart showing different naming systems used. For example, the Link layer might be called the network interface, or network access layer. I like this 5 layer model because it combines the top 3 layers that we, network engineers, don’t think about into one, but it keeps the data link and physical layers separate, and I think it's good to think of them as two separate layers.
Flow of data |
It demonstrates the process of a host, Host A, sending
data to Host B, with two routers in between. Here you see the four
devices, Host A, connected to a router, connected to another router,
connected to Host B. Here is the
TCP/IP stack on each device. Note that, for forwarding data from a host to host, these routers don’t need
to be aware of the higher layers, so only the Internet and Link layers are
present here.
So, let’s walk through the process. An application
on Host A wants to communicate with an application
on Host B. Let’s say it’s a Skype
conversation, so Host A is
sending a little bit of video and audio data to Host B. Skype interacts with the Application Layer,
and the data is encapsulated via the Transport, Internet, and Link
Layers. Then, it is forwarded over to the Router, probably via
Ethernet UTP copper cabling.
Remember, Routers are Layer 3 devices, so they want to know the Layer 3 IP address to know where to forward the data next. So, de-encapsulation occurs at the Link layer, and then at the Internet layers, the router looks at the destination IP address to know where to send the packet. Then, the packet is once again encapsulated to make a Frame.
From here it is sent to another router, perhaps over long-distance fiber cabling. At the Link Layer of this second router, de-encapsulation occurs again, and this router also checks the destination IP address. Once it knows where to send the packet, it is once again encapsulated, and sent over some medium, Ethernet cabling in this case, to Host B. Now de-encapsulation takes place once more. Here at the link layer, it is a frame. The header and trailer are removed, and it becomes a packet. The header is removed, and it becomes a segment.
Finally, the transport layer 4 header is removed, and the application layer on Host B receives the data and interacts
with the application on Host B. So,
this has achieved process-to-process communication,
between Skype on Host A and Skype on Host
B. Of course, this process will happen many times in both directions during
the duration of a Skype call, this is known as same-layer
interaction. Also, I mentioned the transport layer provides host-to-host communications
before.
This diagram indicates that as well. This Transport layer segment was never changed during this whole process, it is as if it's direct communication between the two hosts. Finally, remember that, because the TCP/IP protocols are all industry-standard protocols used by all makers, it doesn’t matter what kind of PC or router you’re using. An Apple iMac can communicate with a Cisco router, which can communicate with a Juniper router, which can communicate with a Dell PC. That’s the importance of having industry standards.
Search
Tags
- TCP/IP vs OSI Model
- Difference between TCP/IP and OSI Model
- OSI vs TCP/IP
- Difference between tcp and ip
0 Comments