Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


It's important to keep layering in mind when talking to people outside the IETF, but the IETF itself is not impressed:

https://en.wikipedia.org/wiki/Internet_protocol_suite#Compar...

> 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:

https://www.geeksforgeeks.org/tcp-ip-model/

> Process/Application Layer

> Host-to-Host/Transport Layer

> Internet Layer

> Network Access/Link Layer

(This seems to be the RFC 1122 model, BTW.)

RFC 1122 and RFC 871 each have models, too.

RFC 871 has:

> Application/Process

> Host-to-host

> Network interface

https://en.wikipedia.org/wiki/Internet_protocol_suite


It's just part of the lingo, a tool to communicate. The TCP/IP model ignores the physical layer making it a less useful tool.


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.


"Tim Berners-Lee joker ruined all the pretty pictures with HTTP"

This is the first time I am reading this, I interpret this to mean HTTP is badly designed and Tim Berners-Lee caused it. Need more...


I didn’t take it that way, I took the “pretty pictures” to be mocking the OSI model’s more ambiguous layers.


Reads to me like the design of HTTP combined 5, 6, and 7 into one.


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.


I think you need to know your audience and cater to them, trying to explain everything just ends in a book. L2 is especially googleable.


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.


If only we were using a technology where you could turn the word "L2"[0] into a link to a page explaining what it means.

Then the author wouldn't have to, and we wouldn't need to use a search engine!

[0]: https://en.wikipedia.org/wiki/OSI_model#Layer_2:_Data_Link_L...


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.


In a networking discussion, L2 always means Layer 2. If the subject of caching came up the author would say "I'm talking about L2 cache here."

It's like TTL. It means one thing in a networking context but something totally different in a digital logic context.

But granted, somebody with no networking background wouldn't necessarily know that.


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?

¹ Three Letter Acronym/Abbreviation


For me, that book was W. Richard Stevens's TCP/IP Illustrated, volumes 1 & 2 particularly.


Surely they would be aware the audience would know what ethernet is. To me, L2 refers to the level 2 cpu cache.



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.


> The IP stack has the concept of layers, which function as abstractions that hide the implementation of lower layers from the upper layers

Correction: the network stack has layers, where IP is one of them, near the top.

Which is why most software targets IP. It’s a good abstraction and it’s portable.


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.


L1 is (naturally) physical. L2 is data link.


L1 is the physical layer. L2 is the MAC layer.


This refers to Layer 2 in the OSI model of the network stack. See https://en.wikipedia.org/wiki/OSI_model

1. physical layer, 2. data link, 3.vnetwork, 4. transport, 5. session, 6. presentation, 7. application layer.

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.

And so on, you can read it more on [1].

1] https://en.m.wikipedia.org/wiki/OSI_model



L3 => IPs L2 => MAC addresses




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: