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.
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.
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.[/edit]
If you need to make the distinction you should use the layer names or numbers.
In the bad old days there was a fairly sharp line between "Lan" technologies and "Wan" technologies. The former were used to build networks within a building or maybe a campus and were generally relatively fast flat multipoint networks. The latter were used to build networks between multiple sites and were generally slower point to point (at least from the IP stack's perspective) links.
But technology shifts and with it the ways things are done shifts. On the one side the introduction of fiber physical layers and the move away from CSMA/CD have largely removed the distance limitations from Ethernet. On the other hand the growth in the number of devices of each site and the growth of security concerns have meant that many sites no longer have a single flat network. The network is split up either physically or by using VLANs or a similar technology.
So you now have a split between lan as a physical concept (a high-bandwidth network within a building or site) and lan as a logical concept (a multipoint L2 network which allows broadcast traffic and normally maps to an IP subnet).
LAN used to broadly align with L2 and that is why VLANs are single subnet layer 2. As networks have got more complex you now have multi VLAN networks and LAN has become synonymous with a site or unit of network within a WAN.
So from a purist point of view a LAN is a subnet but in a more complex multi vlan architecture a LAN is effectively a site.
Lan is combination of layer 2 and layer 3 datalink and network layer together can called as lan network we can not establish connectivity between two pc without layer 3 connectivity .. so both layers are depend on each other...datalink layer ensure connectivity from pc to layer2 switch Mac address table play vital role and network layer endure connectivity from layer 2 switch from router where arp table play vital role....
Layer-3. Not Layer-2.
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.
This is very good deduction, and sound reasoning. If you have to choose between the two, Layer-3 is the correct choice.
I did think Layer-2 initially myself, but after some thinking, I am convinced it's Layer-3 (even before reading your full OP with your good reasoning):
In IPv6, there is a standardised
local-linkIP address, meant for the LAN, while another public internet IP address is supplied.
192.168.0.1, and other such LAN addresses are considered as LAN addresses, while a given MAC address is not.
Routers confine an IPv4 LAN at the Layer-3 level. The public internet is the gateway, and NATing occurs on that Layer-3 boundary.
An international fibre cable across the Pacific Ocean sea floor WOULD have some sort of Layer-2 MAC for a WDM division that is leased. It doesn't have a LAN IP address, and it isn't considered a LAN.
Layer-2 is called the
data-linklayer. Layer-3 is called the
Network layer. LAN stands for Local Area Network
An ethernet cable is a Layer-1 tangible wire. People call it a "network cable" at times, not because of the Layer-2 switching to the next switch/router, but because of the Layer-3 capability to communicate on the global inter-network.
The "Inter-Network" speaks of the Layer-3 IP suite (also including TCP/UDP in Layer-4)
Some I have read from others here, and some I have anticipated. These are all good points, but when it comes to splitting hairs and choosing one over the other, Layer-3 is a clearer choice.
- VLAN is a layer-2 concept: That's a misnomer, it would be better described as "VWires" or "Ethernet Slicing".
This misnomer is the problem that initiated confusion for the question poster:
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
Network Engineers take consideration for "broadcast domains", usually using VLANs to isolate: the broadcast issue happens in Layer-2 domains. Such broadcasts do not propagate further in the Layer-3 "Network" layer. Calling this a LAN issue would be a misnomer, especially if you have multiple VLANs or isolated wiring.
A LAN is defined by physical boundaries - very true. Socially and Professionally, a LAN transcends the Layer-2/Layer-3 definitions. But according to the OP, if there has to be a choice, Layer-3 is more clearly the "LAN".