You often hear the terms Subnet and VLAN used interchangeably. With the ubiquitous nature of IP these days, when are the two not considered roughly the same from a high-level, understanding that VLANs are L2 and Subnets are L3. In other words, are there any cases for having a VLAN without a Subnet, and still have IP (L3) communication? [Also ignoring that all networks are not subnets when considering classful networks which all are really just CIDR prefixes these days.]
If they are used interchangeably then they are used incorrectly. Subnet refers to particular IP network, such as 192.0.2.0/28 VLAN refers to 802.1Q standard, in which you can essentially give each port unique MAC address table, effectively separating them from each other. VLAN may transport one or more subnet (but does not have to, it may be transporting something else than IP entirely). Subnet may be configured for VLAN, but does not have to be, it could be without 802.1Q or over some completely different L2 technology than ethernet. |
|||||
|
Subnets (L3) and VLANs (L2) are on different layers. The terms should not be used interchangeably. A VLAN can contain one or more L3 prefixes ("Subnets"). For a layman this could cause confusion. Often people don't understand that these two are connected but not the same. People might say The host located in our server subnet or The server located in the DMZ VLAN and mean the same thing. |
|||
|
They are only used interchangeably from a perspective of each unique vlan at layer 2 should have its own subnet for addressing at layer 3 giving you separation and ability to manage broadcast traffic etc. In terms of scenarios where you would have a vlan without a subnet then only perhaps if using an 'ip unumbered' setup but there are not too many reasons to want to have to do this. If you review some best practice models like Cisco's composite network model then in terms of keeping individual subnets and your vlans 'local' to switch blocks then you would generally have a separate subnet assigned per vlan. |
|||||||
|
They are very much different. However a lot of terms (megabit, megabyte, memory, hard drive, etc) get miscommunicated. Often we have customers asking us to move a vlan from one site to another, when really what they want is to move a subnet over. You get used to it, even though I try and correct them (politely) |
|||
|
A lot of the responders said the terms should NOT be used interchangeably. Actually I think it is perfectly acceptable and common practice amongst people who DO know the difference to use the terms interchangeably when talking about IP on ethernet networks. In fact they pretty much should be synonymous in most circumstances (there's always exceptions) since both define a broadcast domain and your L2 and L3 broadcast domains should normally be identical. |
|||
|
some routing protocols can be in the same L2 domain and support the likes of apple talk or other non IP L3/4 protocols. These would need to be in the same L2 domain but not be in the same IP subnet, since IP is not required. In such a case it may be practical to use VLANS without considering IP/Subnetting of any kind. |
|||
|
In my experience, these days, they are considered the same until you use a protocol other than IP directly on top of Ethernet. |
|||
|
The difference between the two is one of significance. VLANs are generally only locally unique while subnets are usually unique across an organization. Folks 'in the know' understand that vlan 100 in campus 1 is different than the one at campus 2 if the subnet of one is 192.168.1.0 and the other is 192.168.2.0. But you could have vlan 100 repeated in every building across a campus if you separate them by layer-3 boundaries and use different subnets. And then there there are the exceptions to the rules or the bad designs that get worked around with duct tape and nat pools... |
|||
|
In many implementations an IPv4 subnet and a VLAN are closely correlated on a 1:1 basis. A subnet, strictly speaking is a portion of IPv4 address space from which one may assign addresses to hosts. This is differentiated from a "prefix" a term used in the common parlance or a supernet, which may be a some larger portion of IP address space that is comprised of many subnets. The reason for the correlation is that a single VLAN and a single subnet both represent a single broadcast domain. As such, these two tend to be overlaid in most implementations. As described in earlier answers, a VLAN is a layer 2 entity. All hosts on a given VLAN can communicate with each other, but no hosts on one VLAN can communicate to hosts on another without some form of routing or in rare cases, bridging. |
|||
|
Put another way, subnets are, technically, a division of the address space at the L2 level -- it's more of a routing decision than anything else. VLANs are tunneled LAN frames within the payload of other LAN frames. Ignoring the various standards for a moment, if you put a packet analyzer on the cable, you'd see: For a subnetted LAN, you'd see the same traffic. THere's no easy way to look at a subnetted LAN and tell it is, in fact, subnetted. For VLANs, you'd actually see ethernet frames carrying a VLAN tag, which then carry another ethernet frame inside of them. Subnet frames are easily handled by equipment -- you can choose to ignore the subnet at a given moment if you want to, for example, have a transparent proxy watch some trafic. VLANs are tunnels. |
|||
|