Skip to main content

Fun exercise, let's break down Mastodon into its constituent OSI model layers.

starting from the bottom:

Layer 1 (Physical) - since a lot of Mastodon instances are running on VPSes, this is usually a virtual link, otherwise probably a Cat5e/Cat6 ethernet cable. If you run a Mastodon server on wi-fi, hit me up.

Layer 2 (Data link) - this is either going to be IEEE 802.3 Ethernet or IEEE 802.11 WLAN (Wi-Fi)

Layer 3 (Network) - this is going to be IPv4 and IPv6.

(thread, cont.)


Layer 4 (Transport) - in the case of Mastodon, it is entirely TCP.

Layer 5 (Session) - from now on, things get a little fuzzy, I believe this layer is implemented in the Mastodon application itself. HTTPS probably belongs here?

Layer 6 (Presentation) - this is probably ActivityPub?

Layer 7 (Application) - this is the web interface you interact with

As I mentioned, the last 3 layers get a bit fuzzy and am not sure if they are entirely applicable, suggestions welcome.


@staticsafe Layers 5 and 6 were never really properly defined and nobody is really sure of what can get there. I suggest to delete them.

@staticsafe The Web interface is not at layer 7. The layered model is for the network stuff, so no user interface belongs here.

In the case of the #fediverse, layer 7 is the protocols of the ActivitySuite group (not just ActivityPub).