6 ms·
The OSI Deprogrammer
- culopatin 3y agoThis is hilarious. I happen to be preparing for a test centered around the OSI model and I don’t get why it’s set this way. Every few paragraphs the text says something like “remember that nowadays things a bit fuzzier and don’t fit within one layer” well then why are we even using this model?
- db48x 3y agoAs models go it’s pretty good, and no one has made a better one. Seriously. The layers are all useful concepts to know about and discuss, even if in some cases it is most practical to blur the lines or outright combine two of them into one protocol. You will at least know that you are doing so, and you will know to point out _why_ you are. But nobody has ever determined that it is _always_ best to combine two of the layers (which would really amount to proving that the two are in fact the same thing). But since nobody can prove that it is _never_ a good idea either, it remains a model and not a theorem with a proof. Edit: but I will also say that any test or certification which focuses too much on the OSI model is also suspect. I don’t know what test you’re about to take, but plenty of people will sell you certifications that in the end are meaningless.
- zamadatix 3y agoIf one is going to argue for a layers based model the OSI model is still a particularly poor choice vs something with at least relevant layers such as the 4 layer model commonly referred from TCP/IP. It's been the superior model to reference for decades.
- brookst 3y agoBecause all models are wrong, but some models are useful. OSI is a useful model, especially at lower layers, because it covers the abstractions from physical to network to internet to protocols, and that is a useful way to think about things.
- robertgraham 3y agoI discuss this point several times. I claim the model is not useful, specifically because the layering abstraction for hte lower layers is a misconception rather than the truth. For example, I describe how the OSI Model claims that layer #2 and #3 describe different functionality in the same network stack. I claim the opposite, how they describe roughly the same functionality in differnet networks. Namely, both Ethernet and the Internet forward packets based upon addresses. The difference is that Ethernet does this locally while the Internet does this locally. Otherwise, the theoretical concept of packets, forwarding, and addresses are the same.
- brookst 3y agoThe key concept in routing is hierarchy, which Ethernet does not have. It’s an extra dimension that changes the way the protocol and applications work at that layer. You can say a cube and a square are the same thing, but I don’t think that’s particularly useful pragmatically. Ditto for L2 and L3; if you abstract out the difference, they are indeed the same. But that’s not useful. Now, you could say that time has brought evolutions / optimizations that blur layer boundaries, like VLANs at layer 2. But that doesn’t make the model less useful.
- fanf2 3y agoIn my experience working alongside network engineers, they use “layer 2” as a synonym for Ethernet, “layer 3” as a synonym for IP (v4 and v6), “layer 4” as a synonym for TCP and UDP, and “layer 7” as a synonym for application protocols. They don’t talk about the other layers. It’s just jargon, without any deeper meaning.
- brookst 3y agoWell yes, those are the network layers, so network engineers think about them the most. Admittedly layers 5 and 6 are kind of blurry, but so what? Doesn’t mean the model isn’t useful, just that it isn’t a perfect map=territory.
- hughesjj 3y agoYou might want to read this for a bit of a primer https://apenwarr.ca/log/20170810 https://apenwarr.ca/log/20170810 > The point of all this is that ethernet and IP were getting further and further intertwined. They're nowadays almost inseparable. It's hard to imagine a network interface (except ppp0) without a 48-bit MAC address, and it's hard to imagine that network interface working without an IP address. You write your IP routing table using IP addresses, but of course you know you're lying when you name the router by IP address; you're just indirectly saying that you want to route via a MAC address. And you have ARP, which gets bridged but not really, and DHCP, which is an IP packet but is really an ethernet protocol, and so on.
- technion 3y agoYep, for every person who says they haven't touched osi in a decade, there's someone studying the topic either at a school or for a vendor certification. And for every "the bottom layers are worthwhile", there's a network engineer applying for a job with some leetcode like tool asking them about layer 5.
- BillyTheMage 3y agoReminds me of how modern Linux systems still behave as though they're printing to a teletype.
- NBJack 3y agoThis is wonderful material. But admittedly, I am a bit lazy on reading to the part I want: what is a good model, or set of models, I should re-educate myself with to correct what I was taught?
- tptacek 3y agoEthernet, IPv4, TCP, and HTTP; what functions do each provide, how is each coupled to its neighbor, and what are the viable alternatives in the design spaces of each? Part of the OSI layering model was I think meant to get people's brains wrapped around the dynamics of packet switching networks, which were once a novelty and are now just part of the air we breathe. Then, read: https://web.mit.edu/Saltzer/www/publications/endtoend/endtoend.pdf https://web.mit.edu/Saltzer/www/publications/endtoend/endtoe...
- thayne 3y agoI would probably add TLS in thereas an optional layer between TCP and HTTP. But http/3 and quic complicates things because it kind of blends the tcp, tls, and http layers together.
- KirillPanov 3y agoLayer 4 is the lowest layer of the OSI model that isn't packet-based (i.e. can handle messages of arbitrary size). IMHO that's the highest layer of the OSI model that is useful. After that it's various ways of tunnelling streams inside of streams.
- fanf2 3y agoThat’s not true, though: the OSI model has connection-oriented services at the lower layers too.
- deleted 3y ago[deleted]
- robertgraham 3y ago
- tptacek 3y agoI mean, this isn't bad or anything, and if Rob Graham is going to write about anything with authority, this is certainly it, but it's kind of beating up a straw man, isn't it? I feel like "layering violations" went out the window with HTTP, and certainly by the time we got WebSockets.
- carlosm3011 3y agoI don't think that Bob's essay goes against layering per-se. It's about the OSI layering specifcially not being suited to describe the current Internet anymore. Layering is very much alive, but I tend to agree that we need a richer and better suited layering model.
- throwawaaarrgh 3y agoIt's not great. It reads like some angsty nerd who really doesn't like the idea of something and has spent an inordinate amount of time trying to explain why it's wrong and why his solution is better. Sometimes that works, if your name is Locke or Marx or something, but this writing really doesn't say "genius" to me. Moreover, I have not heard anyone but myself utter the word "OSI" out loud in 8 or 10 years. Maybe it's still a thing in academia, but it's not in corporate or open source worlds. I don't know if I've met more than 2 people in 5 years that know how TCP works. It's just a magic tunnel that HTTP somehow uses under the covers. So I really don't get the need or purpose for this document. It's like describing in excruciating detail that what you know about the ancient Egyptians is a lie, because that's somehow going to be necessary for somebody?
- tptacek 3y agoI sort of agree that "OSI" is really weakening his argument, and that he could take clearer aim at the classical Internet layering model (network, transport, application) --- even that simple layering is obsolete now. But it'd still be a straw man! We even run DNS over HTTP at this point.
- derefr 3y agoI think that the "OSI" he's speaking about isn't an engineering tool, a thing people would use to construct systems; rather, this "OSI" is a way of modelling systems that exist — systems that, of course, were not implemented by people thinking about OSI. It's an analytical modelling tool, a thing applied to a system retrospectively in an attempt to understand it, break it down along abstract rather than concrete lines. Like the various flavors of literary criticism. Except in the case of OSI, it's not a reputable analytical tool from the perspective of actual academics; it's rather a discredited one. Instead, it's only lay-people with an outdated view of the state-of-scientific-practice who attempt to apply the discredited tool. And this article is an attempt to get those lay-people to stop doing that. Compare/contrast how the layman may often think that Freudian psychoanalysis is still in use in psychiatry — and may even try to apply it themselves to understand someone's motivations. Much to the chagrin of psychiatrists.
- de6u99er 3y agoThis is funny Under: 7.1.2. Poorly understood terminology >This is what happened with “session”. When OSI named this layer, it had nothing to do with sessions in general, but with very specific issues connecting a terminal to a mainframe. [...] What we think of as sessions (as in HTTP) are actually called associations in OSI, and is assigned to the Application Layer #7.
- robertgraham 3y agoElsewhere in the text I describe how OSI chose a word at random, that they never meant by it what we now call "sessions". It could've been 'dialog layer' or 'interaction layer". I recommend they should've chosen "Intercourse Layer".
- housel 3y agoOverall this is helpful, but it seems a bit ranty, and doesn't do as much as (for example) John Day's Patterns in Network Architecture to provide a positive alternative model.
- mannyv 3y agoI always thought this model was pretty worthless. I remember when they tried to apply it to the internet. It didn't quite fit, but they needed a model because intellectuals.
- onetimeuse92304 3y agoIt depends on when it was. Back in 1999 it fit pretty well. Even if not perfect it still was a good teaching tool to explain "how it all works" on some level. Then you got to know the hairy details. Nowadays "Internet" is mostly HTTP 2 for most people and then this model doesn't even remotely explain the structure of it.
- Rapzid 3y agoIt's not really meant to explain http2? But it still very much applies to how an http2 user gets data from a server..
- robertgraham 3y agoThe book has an extensive section on history. I claim that by 1981, the OSI Model was already obsolete and that it didn't fit well, that was not a good teaching tool, that it has done more to beffudle than enlighten students. The problem being is that if you learned according to the modle, you are not aware of what you misundertood.
- IshKebab 3y agoIt didn't fit any better in 1999 than it does now and it wasn't a good teaching tool because it didn't match reality at all but was presented as if it did. Definitely caused more confusion than learning.
- jdougan 3y agoWhen I was first exposed to the OSI model in the late 80s, it wasn't very good then either.
- hiAndrewQuinn 3y agoA very fun read, especially if (like me) you realized a year ago you had basically no idea how networking actually worked, because your whole mental model was based off of the Wikipedia article on the OSI model, and decided to cram all 180 pages of Michael W. Lucas's Networking for System Administrators into your head with Anki cards to finally make the "real" stuff stick. (Terrific book, terrific writer, I will never get tired of recommending this one in particular.)
- hughesjj 3y agoYou might like this as well, imo it's more entertaining and flows better https://apenwarr.ca/log/20170810 https://apenwarr.ca/log/20170810
- hiAndrewQuinn 3y agoOh my God I read this ages ago and completely forgot which blog it was on. Thank you for bringing this back to my attention! This is up there with Hotel Concierge on Tumblr for "favorite giant sprawling essays on the Internet" for me.
- irascibeth 3y agoI'm really enjoying reading this. I understand why it needs to be so long, but I think it could have more reach if there were also a short primer that succinctly explains why OSI is wrong, and proposes a single alternative model.
- yjftsjthsd-h 3y ago> People today can’t comprehend the original model because they have no experience with terminals and mainframes. This makes them treat OSI as a deep mystery. In fairness, I have come to think that we should teach computer science by plopping students in front of a PDP-11 and teletype (probably actually a PiDP-11 under the hood, but the students don't need to know how we realized the machine), running v6 unix, take them through the Lions book[0], then take them through... probably early BSD? on similarly period-appropriate hardware (again, implemented however needed) to learn networking, and then catch them up on the following few decades, because it turns out a lot of modern concepts make more sense when you see them in the original context[1]. A person could also argue that we should get over the past and build systems that learn from past ideas and mistakes without having to actually include the entire history, but I've come to view this as impossible to actually implement so we might as well embrace the tree rings that are our computers. [0] https://en.wikipedia.org/wiki/A_Commentary_on_the_UNIX_Operating_System https://en.wikipedia.org/wiki/A_Commentary_on_the_UNIX_Opera... [1] For instance, vi's key choices make perfect sense when you see the keyboard it was born on - https://en.wikipedia.org/wiki/Vi#Creation https://en.wikipedia.org/wiki/Vi#Creation
- Almondsetat 3y agoComputer science is about computers just as much as physics is about telescopes. Computer scientists should think of computers in terms of logic, computability and complexity theory. We don’t expect physicists to learn how the first telescopes worked in detail because it’s useless. A physicist should learn optics and then understand why telescopes were build that way. The history of something can help put it in context and make taking the pill less bitter, but the fact remains that the majority of computer engineering is a bunch of incoherent mess that stems from decades of desperate backwards compatibility and baby duck syndrome. If you taught CS students stuff from the PDP era you would simply give them a limited view of what computers can be.
- yjftsjthsd-h 3y ago> Computer science is about computers just as much as physics is about telescopes. Assume I actually mean computer engineering or so, but it's still taught in a section of school called the computer science department and the diplomas still say computer science so I'm going to call it that. > but the fact remains that the majority of computer engineering is a bunch of incoherent mess that stems from decades of desperate backwards compatibility and baby duck syndrome. Yeah, that's my point; in reality our computers are layers upon layers of old stuff patched over with newer stuff for decades, so we might as well teach it that way. And obviously we should teach all the way to present; I'm not intending to suggest that we stop in the 80s.
- kiitos 3y ago> [OSI's] negatives far outweigh its positives. OSI is not theory, it’s not a framework, it’s not helpful, it’s not a standard, it’s not anything those who use it claim it to be. Anything you teach with the OSI Model can better be taught without it. This is a naive understanding of the OSI model, whose primary virtue is not any specific detail it expresses, but instead its ubiquity. The only way to successfully replace a (clearly entrenched) status quo is to make the positive case for the new thing, which has to be just obviously and significantly better. Pointing out the flaws in the current thing is never convincing, and never a winning strategy.
- lmm 3y agoIt's far from ubiquitous though. It breaks down as soon as you enter the real world. It's simultaneously too vague to be useful for talking about specifics and too inaccurate to be useful for talking about generalities.
- kiitos 3y agoIt's absolutely ubiquitous as a model. It's taught in every CS curriculum in every university in the world. It also doesn't break down in the real world, unless you're being extremely pedantic. Many bits of software don't map cleanly to the defined layers, but we can still talk about the distinction between the network layer vs. the session layer, for example, and get value out of that discussion.
- lmm 3y ago> It also doesn't break down in the real world, unless you're being extremely pedantic. It breaks down if you're trying to do anything at all with it. There are basically two layer boundaries that are useful to talk about in the real world - between Ethernet and TCP/IP, and between TCP/IP and application protocols. The OSI model has 6 layer boundaries but a) neither of them maps cleanly to either of those two real-world buondaries b) no-one knows what the other 4 are (you can kinda-sorta say that the boundary between TCP and IP is one of them, but that isn't the distinction that the OSI says it is either). Depending who you ask you can sort of retrofit it and say that the boundary between Ethernet and TCP/IP is between OSI layer 2 and 3 or 3 and 4, and the boundary between TCP/IP and application protocols is somewhere between layers 4 and 7, which is sort of ok because no-one knows WTF layers 5 and 6 are meant to be. But you're really not getting any value from using the OSI model at that point; it's not telling you anything useful and it's actively getting in the way of understanding what's going on. > we can still talk about the distinction between the network layer vs. the session layer, for example, and get value out of that discussion. Like what?
- corethree 3y agoThis is the story of the programming world. Tons of concepts that masquerade as "theory." Big words and "epiphanies" that make programmers loyal to the concept in the same way people are loyal to OSI. Design patterns, SOLID, etc. All bullshit akin to color theory and OSI. Big words and bullshit. At best you can use these things as rules of thumb. They work somewhat. But overall they don't.
- corethree 3y agoThis quote sums up the point: "The goal of these Wikipedia-style ontological frameworks is to describe theory, like science. But for the most part, networking is practice. It reflects engineering choices rather than scientific principles. It’s less like a biological taxonomy and more like a military hierarchy: we humans chose to put things there. It’s a struggle choosing pure theory vs. practice. Are we describing the TCP/IP Internet that we are all using today? Or are we trying to describe theory, how networks have existed in the past and how they might exist in the future? The OSI Model pretends its theory because it’s the standard. The idea is that there would be 7 fixed layers and that over time, new standards would be invented that would upgrade a layer. All networks of the future would follow this blueprint, so it described all future networks. "
- ranger207 3y agoSee also https://computer.rip/2021-03-27-the-actual-osi-model.html https://computer.rip/2021-03-27-the-actual-osi-model.html for a description of how it was supposed to work
- robertgraham 3y agoContrast with my descriptions of the layers, especially in chapters 3, 7 and 8.
- aidenn0 3y agoI'm really surprised that RFC-1122 isn't mentioned in the entire article; The IETF defines 3 layers for a TCP/IP network (link, IP, and Transport) and those layers are (IMO) much more useful for understanding the internet than the OSI model. In addition they don't pretend to be describing a platonic ideal of a network, but rather just specific parts of the network we are using today.
- robertgraham 3y agoI use RFC 791, the original Internet model. RFC 1122 is a retconned version of the Internet model that tried to change terminology to fit OSI.
- KirillPanov 3y agoYeah; as somebody who was taught the OSI model at university, they basically straight up told us to ignore the OSI model above layer 4, and to treat the remaining stuff as a starting point rather than the whole story. So criticizing layers 5/6/7 is not really helpful. Those are not actually taught anymore.
- KirillPanov 3y ago"All models are wrong, some are useful". People refer to the OSI model because it's useful, and can be explained in about 1/30th of the text needed to produce this rant. Why not propose an equally-concise yet more useful model instead?
- ogurechny 3y agoIt is good to remind yourself once in a while that “networks” don't exist, they are an illusion based on processing of independent packets based on magical numbers in them. In theory, there is nothing strange in a system that decides to hold all IP addresses higher than a certain number, or offer some service on all even ports at once. It only needs a different mathematical operation on those numbers to be performed. Also, in theory, we can have internet-wide broadcasts (in a multicast-like or some other graph traversal manner). Then, say, ALL p2p file sharing can be reduced to a single standard request "WHO-HAS The.Matrix.DivX.l33tR1pZ.avi". Then one starts to think why it is not possible in practice.
- idlewords 3y agoThis document is great but could use some tough-love editing. The author drives home the same points repeatedly, and in many cases redundantly, in a way that does no favors to the substantive content of the argument. Sometimes less ranting makes for a more devastating critique.
- jdougan 3y agoI think the history parts need a serious rewrite. Still lots of people alive who lived through this.
- RealityVoid 3y agoI think this might be the favourite thing I read on hacker news. Thank you so much Robert Graham for writing this, I always considered the OSI model fishy, and although I mostly worked with stuff like CAN (that was also mentioned) I was irked when people tried to shoehorn OSI model _even there_ ! If I ever meet you, robertgraham, I am definitely going to try buying you a beer. One thing I am a bit confused though is that the Ethernet uses TCP/IP but you keep trying to hammer the point that is a internet thing. So... I'm a bit confused about this. Are the packages used by the router to talk with a local network device different than the packages used by the router to talk with a device on the internet? And is the format of these packages the same and just fwded if they address a local device but unpacked and re-packed with the proper header if they address a internet device?
- robertgraham 3y agoEthernet doesn't use TCP/IP. Ethernet is it's own network. It has nothing to do with TCP/IP. Other things use Ethernet. Routers, when connected to each other, often use a local Ethernet network to communicate. Think of the TCP/IP Internet as it's own network, ignoring how routers physically talk to each other. Sometimes it's a directly link, a wire. Sometimes it's carrier pigeons. Sometimes it's WiFi. Sometimes it's Ethernet. Whatever it is, it's local to between the routers and does not extend outside that.
- RealityVoid 3y agoI think my confusion arises that, when I access some other PC on the local network, I connect to an IP and port. That's not on the wide internet, but it uses IP to communicate. Therefore... where's the ethernet's role in that?