Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Networking for Beginners - The OSI Model Explained

In this thread I will be explaining the OSI (Open System Interconnection) Model. When two computers communicate, they need to speak the same language. The structure of this language is described in layers by the OSI Model. The OSI model provides standards that allow hardware, such as routers, firewalls, switches, to focus on one particular aspect of communication that applies to them and ignore others. The OSI model is broken down into seven layers. This way, routing and firewall hardware can focus on passing data to the lower layers, ignoring the higher layers of data encapsulation.

The seven OSI layers are as follows:
  • 1) Physical Layer
    2) Data-link layer
    3) Network layer
    4) Transport layer
    5) Session layer
    6) Presentation layer
    7) Application layer

~1) Physical Layer

The physical layer deals with the physical connection between two points. It's the lowest layer, whose primary role is basically communicating raw bit steams. It's as well responsible for activating, maintaining, and deactivating these communications.

~2) Data-link Layer

The Data-link layer deals with actually transferring data between two points. In contrast with the physical layer, which takes care of sending the raw-bit streams, this layer provides high-level functions. These could be error correction and flow control. This layer provides procedures for activating, maintaining and deactivating data-link connections.

~3) Network Layer

The Network layer works as middle ground; it's primary role is passing information between the lower and higher layers. It also provides addressing and routing.

~4) Transport Layer

The Transport layer provides transparent transfer of data between systems. By providing reliable data communication, this layer allows the higher layers to never worry about the data transmission.

~5) Session Layer

This layer is responsible for establishing and maintaining connections between network applications.

~6) Presentation Layer

The Presentation layer is responsible for presenting the data to applications in a syntax or language they understand. Because of that, things like encryption and data compression are possible.

~7) Application Layer

The only thing this layer is concerned with, is keeping track of the requirements of the application.



When data is sent through these protocol layers, it's sent in packets. Each packet contains implementations of these protocol layers. Starting from the application layer, the packet goes past the session layer, which wraps the transport layer, and so forth. This process is called encapsulation. Each layer that got wrapped contains a header and a body. The header would contain protocol information needed for that layer, while the body contains the data for that layer. The body of one layer contains the entire package of previously encapsulated layers, like the skin of an onion.

Let's describe an example, you browse the Web, the Ethernet cable and card make up the physical layer, taking care of the transmission of bits from one end of the cable to the other. The next layer the data passes is the data-link layer. In a web browser for example, Ethernet makes up this layer, which provides the low-level communications between Ethernet ports on the LAN (Local Area Network). This protocol allows communication between Ethernet ports, but these ports don't have IP addresses yet. The concept IP address doesn't exist untill the next layer, aka the Network layer. The Network layer thus, would be responsible for moving data from one address to the other. These three lower layers together are able to send packets from on IP address to the other.

The following layer is the Transport layer, which for web traffic is TCP (Transmission Control Protocol); it provides a two-way socket connection. The term TCP/UDP describes the use of TCP on the transport layer and IP on the network layer. Both IPv4 and IPv6 exist in this layer.

The web traffic itself however, uses HTTP (HyperText Transfer Protocol) to communicate, which is in the top layer of the OSI model. When you browse the internet, the webbrowser you're using at that moment is communicating with different private networks. Whenever this happens, the packets are encapsulated down to the physical layer where they are passed to a router, and because the router isn't concerned with whatever the packets may contain, it only implements protocols up to the network layer. The router sends the packets out to the Internet, where they reach another network's router. This same router would encapsulate the packets with the lower-layer protocol headers needed for the packets to reach their final destination.

This process is shown in the image below:

[Image: a029518f82abc7e457626c8c5a517b38.png]

All these packet encapsulations make up a complex language that hosts on the Internet (and other network types as well) use to communicate with eachother. All the protocols are programmed into your hardware like firewalls, routers, and computer's operating system so that they can communicate. It just takes up a big part of all that's needed to be online.



That was everything, if you guys request it I might write a continuation on this thread on how to understand security using the OSI model. Hope you guys learnt something and if anything can be corrected, let me know! Source of information would be the book "Hacking: The Art of Exploitation". It's been a great help explaining this.

Spoiler (Click to View)
Nice thread, thank you for sharing this.
We Protect, What Cannot Be Protected. ~WHHs

_D3BUG.MKV_[/color]
Thanks for actually putting the source of information this time.
Nice thread I read that the tutorial was prescribed for beginners however you still could have gone into the more advanced technicalities.
(Mar 20, 2015 02:39 PM)Windows95 Wrote:  Nice thread I read that the tutorial was prescribed for beginners however you still could have gone into the more advanced technicalities.

I might write a thread on how to understand security using the OSI model whenever people request it.
(Mar 20, 2015 02:40 PM)The Sly Wrote:  I might write a thread on how to understand security using the OSI model whenever people request it.

No need, let me just go get my Hacking: The Art of Exploitation 2nd Edition book from upstairs.
(Mar 20, 2015 02:41 PM)hahdbwoannniabs Wrote:  No need, let me just go get my Hacking: The Art of Exploitation 2nd Edition book from upstairs.

Book does not describe this. It did help me formulate the explanation in the proper way.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by StanleyFeb 8, 2026 07:55 AM 2 122 Feb 8, 2026 07:55 AM
Last Post: SIM-5735617
by RednewCipherJan 17, 2026 06:36 AM 5 141 Jan 17, 2026 06:36 AM
Last Post: DramaKing
by DumbChickenApr 12, 2021 06:57 PM 5 244 Apr 12, 2021 06:57 PM
Last Post: psickophant