I would suggest expanding your terminology section. I know almost nothing about routers and I'm lost in the first sentence of the High Level Overview section.
"A switch (or an L2 switch :-) ) is an L2-only thing."
I don't know what L2 means. I suspect a definition of the various levels would expand the audience for this post.
> The IETF protocol development effort is not concerned with strict layering. Some of its protocols may not fit cleanly into the OSI model, although RFCs sometimes refer to it and often use the old OSI layer numbers. The IETF has repeatedly stated that Internet protocol and architecture development is not intended to be OSI-compliant. RFC 3439, referring to the Internet architecture, contains a section entitled: "Layering Considered Harmful".
Anyway: People sometimes like to pretend that OSI is a model and TCP/IP implements the model, forgetting that OSI is/was a protocol stack and TCP/IP has no interest in being "compliant" with any other protocol stack to the extent it mimics its layering architecture.
This is one of those cases where both sides have some insight depending on viewpoint. The OSI model is like every other model. It isn't reality (at least in TCP/IP) but instead is a helpful abstraction esp. around troubleshooting and understanding networking concepts. There comes a point where the model breaks down but that doesn't mean it's an unhelpful model just that it isn't a complete picture. I try and work networking problems through the OSI layer model but am aware when things don't really fit well into it (MPLS, MSS, ARP, Layer 5-7).
I agree with you, except that the use of the OSI model seems to be distorting history: TCP/IP went up against OSI and won, even though OSI was favored, because TCP/IP could get working systems faster. That's a lesson which should be learned, but it gets obscured if you think that TCP/IP implemented OSI and there never was a competition.
Plus, the OSI model is rather complicated; there's a "TCP/IP Model" with four layers which is a lot simpler:
For me the OSI tends to come up at work to talk about scope or areas of control. People will say "that happens in layer 3" (for instance) as shorthand, not as a referent that corresponds to any actual thing.
I don't think the post is meant to be a beginners level introduction to networking, the author writes:
This is the inside view of how exactly a router operates. You only need to know this if you are poking inside a router implementation. If that is the case, my condolences.
If you're poking inside a router implementation, it seems fair to expect that you have a basic understanding of OSI networking layers.
Reading the replies, I somewhat doubt whether you still know what L2 means. The danger of being a nerd is sometimes you say a lot of words but they don’t mean anything.
Ethernet. L2 means Ethernet (or WiFi). Ethernet is the envelope we put Internet traffic in (L3) and the layers above that are about nailing down how exactly a conversation is managed. Sometimes people get upset about what constitutes Layers 5-7, especially since that Tim Berners-Lee joker ruined all the pretty pictures with HTTP. So mostly we only talk about 2,3,4 and 7, in the same way you don’t bring up religion or politics at a family reunion.
Except now we have session and application protocols built on top of HTTP using additional software, which according to OSI would be additional layers. You can in a lot of cases use the standard to achieve this, but frequently enough we don’t.
This is a good point. You have to have some assumptions of what your audience brings.
I'm aware there are levels of information in an IP packet, but I don't know them offhand. If I have to google something on the first sentence in a high level overview, then I'm likely not going to read the piece and the author has lost me as a reader. Maybe I'm not the target audience, though I was interested. I'm providing that as feedback for the origial author since the piece mentions that's it's still a work in progress.
To be fair, L2 could be Layer 2 or Level 2 (cache) and it might be a crapshoot what you get. You might get confused trying to answer your own questions.
Discoverability lives in the space between overexplaining and underexplaining.
One can just add switch, router, network, etc to the query until it works. Supposedly they'll all work. Weak google fu means no info today, and if OP and the author are not the same person, then the latter may not even have a clue that it was posted on hn, where such high standards apply. If someone brought an electronics forum wiki post, should one expect every TLA¹ to be explained there too?
The IP stack has the concept of layers, which function as abstractions that hide the implementation of lower layers from the upper layers. Layer 2 (L2) is the physical link layer - it only cares about getting a packet between two devices. Layer 3 (L3) is where IP addresses live. As the article describes a router has functionality to send a packet towards its final destination as well as get it between ports.
GP may be referring to the "TCP/IP model" which does indeed define the layers used in common parlance. This model has 4 layers in contrast to the OSI model's 7 layers. The TCP/IP model is closer to how most real life network stack implementations are defined.
Arguably even this layering system is too rigid for reality but it's a decent model. See RFC 3439 section 3.
So, many switches are layer 2, but layer 3 switches are often referred to as switching routers. This can cause two different switches to act differently from each other in certain network environments. It isn't that one switch "doesn't work" but that it isn't a router.
A router is nominally a L3 device, though most actually are L1-7. To work, you need L1 & L2, but in today's world, there are applications and interfaces that move the router across L1-7, though not to the same depth as purpose built application devices for example. Topping this off, some routers will switch and some will not. It's the same wide-world of words that we see across the whole computer industry.
The OSI model differs from the TCP model of networking, even though both use numbered layers.
You may want to read OSI 7 layers model. Those L1,L2,L3,L4 and L7 concept derived from that model.
L1 is the physical access. It is the cable, the fiber or the WiFi itself.
L2 is datalink. We use Ethernet for IP network. The device that mainly handle communication at this later called a switch.
L3 is network. In IP Network it handles the routings between IP Network. The device usually called as a router.
Some devices can do L2 and L3 at the same time. That’s why another term came up: L2 only switch.