LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-12-2023, 03:52 AM   #1
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 369
Blog Entries: 1

Rep: Reputation: 49
The seven layers


Dear LQ,

I wasn't satisfied with the search results about real protocols for each layer.
For example,
some sources claim that JPEG and GIF are network protocols?

Anyway, here's what I gathered so far:

1. Physical (wifi, ethernet, bluetooth)
2. Link (PPP, ATM, wifi, ethernet)
3. Network (IP, ICMP, ARP)
4. Transport (TCP, UDP, STCP)
5. Session (RPC, NetBios)
6. Presentation (TLS)
7. Application (HTTP/DNS)

Could anyone confirm these protocols are on the right layers?
(some of them are duplicated,
for example ethernet and wifi span two layers)
 
Old 12-12-2023, 04:56 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,313
Blog Entries: 3

Rep: Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723
Funny that this has come up some many times in the last few days in various places.

I'd look at TechTarget's summary: https://www.techtarget.com/searchnet...definition/OSI

Thus is might look like Wi-Fi and Ethernet are in there twice, but those are separate: There is the cabling of Ethernet (the wires) and the electrical signal of Ethernet (IEEE 802.3) over the wires. Same for the Wi-Fi. There are the electromagnetic waves and then the signal (IEEE 802.11) over those waves, if I understand correctly.

However, there are often three additional unofficial but very important layers described as the financial, political, and religious layers.


TLS could be in the Session or Presentation layers. There is even some commentary on the shortcomings of the OSI model since a lot of other protocols don't quite fit in one layer or another either:

But to get to the primary source, the PDF is available at ISO:

https://standards.iso.org/ittf/Publi...-1_1994(E).zip

Bizarrely the PDF is wrapped in a Zip archive.
 
1 members found this post helpful.
Old 12-12-2023, 06:43 AM   #3
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,341

Rep: Reputation: Disabled
Quote:
Originally Posted by ychaouche View Post
1. Physical (wifi, ethernet, bluetooth)
"Physical" means precisely that: The method by which the actual signals representing bits are sent and received. Terms like "WiFi" or "Bluetooth" encompass a awful lot more than just that.

Some examples: The various 802-standards specifying data transmission over twisted-pair wire, coaxial cable, radio waves, and optical fibre.

These standards are implemented as physical components inside various types of tranceivers.
Quote:
Originally Posted by ychaouche View Post
2. Link (PPP, ATM, wifi, ethernet)
Layer 2 specifies how sequences of bits (=signals) are grouped to form frames, which typically include a header, a payload (the actual data), and possibly a trailer.

Layer 2 will typically also specify some form of node addressing, making it possible to send frames to and from specific nodes in a multi-node setup. For 802.3/802.11 that would be the MAC addresses.

Examples: 802.3 ("Ethernet"), 802.11, and yes, PPP.

Note that some of these standards encompass one or more Layer 1 specifications as well. Since Layer 1 can transmit bits, it's entirely possible to use the same Layer 2 frame format with different Layer 1 technologies; Ethernet over twisted-pair, coaxial, and fibreoptic cable all use the exact same Layer 2 frame format. Same with PPP, you can run that over a number of different media/transports.

Layer 2 may also encompass certain "control plane" protocols that network equipment use to communicate with one another and possibly auto-configure links, but that do not contain any upper-layer information.

Examples: The Spanning-Tree protocol (STP/RSTP), Link-Layer Discovery Protocol (LLDP), Link Aggregation Control Protocol (LACP).

Layer 2 standards are implemented inside various types of chips (typically ASICs) inside switches and network interface adapters. The connection to Layer 3 (if relevant) is provided by drivers.
Quote:
Originally Posted by ychaouche View Post
3. Network (IP, ICMP, ARP)
Layer 3 deals with network addressing and unlike Layer 2, the addresses may belong to different networks, making it possible to send data from A to B via C. It specifies a header structure for packets that fit inside one or more Layer 2 frames.

Examples: IPv4, IPv6 (and older standards like IPX, DECnet, etc.)

While Layer 3 should in theory be completely Layer 2-agnostic, a Layer 3 protocol must also specify how a network address is associated with a local Layer 2 address, and how such associations are discovered and published.

Examples: ARP (for IPv4), NDP (for IPv6)

Some non-data-carrying protocols designed for network operations and troubleshooting also fit into this category, simply by virtue of not (normally) carrying user data.

Examples: ICMP (ping), various routing protocols (RIP/OSPF/BGP/etc.)
Quote:
Originally Posted by ychaouche View Post
4. Transport (TCP, UDP, STCP)
Correct. These protocols exist within Layer 3 packets and carry the actual application protocol data as a payload. They may or may not include mechanisms for error checking, retransmissions, and throttling.
Quote:
Originally Posted by ychaouche View Post
5. Session (RPC, NetBios)
Things get a bit more vague here, as the concept of a "session" simply means a transaction that is started and finished in a particular way, and should be considered ongoing even if no data is currently being transmitted.

NFS and SMB are fairly good examples of protocols that include a session layer (and a lot more). Protocols like Telnet and SSH also work like this, but they rely on a single TCP connection for session management and thus have no real session layer of their own.
Quote:
Originally Posted by ychaouche View Post
6. Presentation (TLS)
This is where the theoretical OSI model somewhat breaks down when confronted with reality, as encryption (arguably the most common implementation of presentation-layer functionality) isn't necessarily implemented over a pure Layer 5 session layer.

TLS (and its predecessor SSL) sits directly on top of a transport protocol (TCP or UDP), while IPsec runs directly over Layer 3 (IP) and does session management over a separate UDP connection. In the latter case the encrypted connection is itself treated as a Layer 3 protocol, meaning the result looks something like this:
Code:
Layer 1 - Layer 2 - Layer 3 - IPsec - Encrypted Layer 3 - Layer 4 etc.
But sure, encryption belongs at Layer 6 in the OSI model.
Quote:
Originally Posted by ychaouche View Post
7. Application (HTTP/DNS)
Indeed. These are the protocols spoken by various servers and clients.

Last edited by Ser Olmy; 12-12-2023 at 06:46 AM.
 
2 members found this post helpful.
Old 12-12-2023, 06:51 AM   #4
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 369

Original Poster
Blog Entries: 1

Rep: Reputation: 49
That OSI model refuses to die article is a gem.
Thanks a lot for the pointer.
I feel releived!
 
Old 12-12-2023, 07:10 AM   #5
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 369

Original Poster
Blog Entries: 1

Rep: Reputation: 49
Thanks for the extremely detailed explanation Ser Olmy,
one the most intelligible things I have read on the matter today.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: OpenSSL releases seven patches for seven vulns LXer Syndicated Linux News 0 06-13-2015 07:01 AM
help to separate implemenation of IP and LINK layers in ip_output.c cranium2004 Programming 0 08-18-2004 05:02 AM
LAN security - how many layers of protection? svarreby Linux - Security 3 03-19-2004 06:41 AM
Gimp Gradiant Layers? BmxFace Linux - Software 3 08-20-2003 08:24 AM
Linux OSI Layers MelLinux Linux - General 8 10-29-2002 07:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration