1

I have searched and am having a hard time understanding VLANs, as I am jsut getting into networking.

My Question: If you create a VLAN with a Class-C like 192.168.1 and another VLAN with 192.168.2 can each VLAN contain its own 256 addresses giving my 192 network 528 addresses total? Or, will the routing only hand out a maximum of 256 total and split them between the 2 VLANs?

I understand class-c=256 and class-b=@65000, but does a vlan not abide by those rules entirely?

1
  • "Can Class-C VLAN have more than 256 addresses?" There is no such thing. There used to be IPv4 network classes, but they were deprecated in 1993 by RFCs 1517, 1518, and 1519, which defined CIDR (Classless Inter-Domain Routing). Modern networking doesn't use network classes.
    – Ron Maupin
    Commented Jul 25, 2018 at 0:53

2 Answers 2

1

VLANs are layer 2 constructs. Subnets are layer 3 constructs. While normally there is a 1:1 correspondence between VLANs and subnets, it isn't always the case. You can have multiple subnets per VLAN or a subnet that spans multiple VLANs.

In your example, you have identified two VLANs and two subnets. Your DHCP server will hand out addresses for each subnet based on the subnet size. Your network (meaning all the subnets under your control) will have as many possible addresses as the sum of all the addresses on all your subnets. That is independent of the number of VLANs.

As an aside, classful addressing is obsolete, and has been since before you were born.

1

A VLAN is a layer 2 concept and provides isolation on that layer. IP addresses are a layer 3 concept, so there's no concept of "number of usable IP addresses you could have in a VLAN".

If you've meant subnets, you can have subnets much bigger than /24 (what you call Class-C, terminology which is deprecated) or smaller, as you please.

As closure, you can have more than one subnet in the same VLAN; but people tend to use VLANs to isolate subnets that share physical equipment or a layer 2 domain.

2
  • Okay that makes sense. So, what you are saying is that "Yes each VLAN can have 256 addresses even though we are using a 192 address"?\
    – samlf3rd
    Commented Apr 4, 2017 at 17:04
  • You can have and use as many or as few addresses as you want. VLANs do not know anything about IP addresses :) Commented Apr 5, 2017 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.