introduction
when computers communicate over a network, they follow structured rules. these rules are organized into models so engineers can design, build, and troubleshoot networks more easily.
two of the most important networking models are:
both describe how data moves from one device to another, but they organize the process differently.
why networking models exist
imagine sending a package:
network communication works in a similar layered way. each layer has a specific responsibility.
models help by:
The osi model
osi stands for open systems interconnection.
it was developed by the international organization for standardization (iso).
the osi model has 7 layers.
here are the 7 layers from top to bottom:
7 application 6 presentation 5 session 4 transport 3 network 2 data link 1 physical
now let us explain each layer in simple terms.
layer 7 – application
this is where users interact with the network.
examples: web browsers, email programs, ftp clients.
layer 6 – presentation
responsible for formatting, encryption, and compression.
example: converting text into a format both computers understand.
layer 5 – session
manages sessions (connections) between devices.
example: keeping a login session active.
layer 4 – transport
responsible for reliable delivery and error checking.
example protocols: tcp and udp.
layer 3 – network
handles logical addressing and routing.
example: ip addresses.
layer 2 – data link
handles physical addressing using mac addresses.
example: ethernet frames.
layer 1 – physical
deals with cables, electrical signals, bits (0s and 1s).
The tcp/ip model
tcp/ip stands for transmission control protocol / internet protocol.
it is the practical model used on the internet today.
it has 4 layers.
4 application 3 transport 2 internet 1 network access
explanation of each layer:
application layer
combines osi layers 7, 6, and 5.
examples: http, ftp, smtp, dns.
transport layer
same as osi transport layer.
protocols: tcp, udp.
internet layer
same as osi network layer.
handles ip addressing and routing.
network access layer
combines osi data link and physical layers.
handles mac addresses and physical transmission.
Side-by-side comparison
osi model (7 layers) tcp/ip model (4 layers) 7 application --------\ 6 presentation -------- > application 5 session --------/ 4 transport -------- > transport 3 network -------- > internet 2 data link --------\ 1 physical -------- > network access
main differences
Which model is used today
tcp/ip is used in real networks and on the internet.
osi is mainly used for:
Simple analogy
osi model = detailed blueprint of a car engine (very structured, very specific)
tcp/ip model = the working engine used in real cars
When troubleshooting networks
engineers often say things like:
this terminology comes from the osi model.
# osi model layers
7 application
6 presentation
5 session
4 transport
3 network
2 data link
1 physical
# tcp/ip model layers
4 application
3 transport
2 internet
1 network access
# osi vs tcp/ip mapping
osi model (7 layers) tcp/ip model (4 layers)
7 application --------\
6 presentation -------- > application
5 session --------/
4 transport -------- > transport
3 network -------- > internet
2 data link --------\
1 physical -------- > network access