Switch – Is a “LAN” a layer 2 or a layer 3 concept, in TCP/IP

layer2layer3routerswitch

I think my question is purely theoretical and a matter of definitions; it derives from the fact that a L2-switch with VLAN capabilities is able to "create" different virtual LANs, and thus I am led to believe that "LAN" is a L2 concept. However, I've only recently thought about that, and I've always been used to the concept of LAN as a layer 3 thing, especially after university exercises. For example, if I have a network with a host, connected to a L2-switch, with the latter connecting another host and a router, then in an equivalent logical representation for identifying LANs, I would say that whatever is on one port of the router is a LAN, and whatever is on the other side is another LAN, thus replacing the switch with a "logical link". This makes me think, instead, that a router is what's needed to distinguish between a LAN and another – I can have multiple layer 2 switches and still be on the same LAN, provided that they don't use any VLAN capability. But then again, a router has both L3 and L2 capabilities, so this doesn't imply that a LAN isn't a L2 concept. I then thought, in order for 2 different LANs (or VLANs) to communicate, a router is needed, thus one may infer that when there's a router, it can be used to connect different LANs, hence we see it as a "LAN separator" in a logical scheme. But if that's true, then I can't understand what actually discriminates between a LAN and another, which factors do by definition. I may be confusing stuff, but I really can't find a precise definition for "LAN" as I only find very broad ones.

Best Answer

LAN is more commonly a reference to a layer-2 network but is sometimes used for a layer-3 network aka subnet as well. I don't think there's any "official" definition.

[edit]I did find an official definition in IEEE 802.3 Clause 1.1.5:

In the context of this standard, the term “LAN” is used to indicate all networks that utilize the IEEE 802.3 (Ethernet) protocol for communication.

Which makes it layer 2. However, in the context... acknowledges that there are other definitions. LAN could even be used for a building or possibly a campus network, regardless of layer connectivity.[/edit]

If you need to make the distinction you should use the layer names or numbers.