Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm new to vlans, but I'm thinking to set one up. I'm wondering if I can assign the vlan any network address I want (ex. can I make it say 3.1.0.0/16 if I wanted to?). The reason I'd like to do this is because many computers that would go on this network have static ips, and I'm wondering if I can set the vlan so these computers will get the network they're already looking for.

If there is a way to do this, what is it?

share|improve this question
4  
Do you currently control the network 3.1.0.0/16? That is to say, are you head network admin of General Electric? –  MadHatter Jul 4 at 12:09
    
@MadHatter It was a hypothetical example. –  Dave Jul 4 at 12:11
    
That was far from clear, but OK. As long as you control the IP addresses in question, it's pretty much up to you how you IP your switch's logical VLAN interface(s). Avoid conflicts. –  MadHatter Jul 4 at 12:19
4  
VLANs are a layer 2 thing, IP is a layer 3 thing - the two have little/nothing to do with each other, though in practice they often align by design. It sounds like you need some training in this area before you make changes. –  Chopper3 Jul 4 at 12:22

2 Answers 2

up vote 4 down vote accepted

A vlan is pretty much the same as having a separate network with separate cables and switches. So you can use any valid IP addresses you would use on a regular LAN. You can't use addresses you don't control, but can use any of the ones set aside for private usage like 10.0.0.0/8.

It is best to avoid reusing the same subnets for different VLANs. Its not strictly required that you do so, but it saves you a lot of problems should you ever need to make connections between your VLANs.

share|improve this answer

1. "I'm new to vlans, but I'm thinking to set one up" - If this is a production environment and you're setting up a VLAN just for the heck of it then stop. Never do anything without having clearly defined needs and outcomes.

2. "I'm wondering if I can assign the vlan any network address I want" - Why would you want to do that? Wouldn't it make more sense to assign an ip address from the network range you're using internally? What would be the point of assigning it a random ip address?

3. "I'm wondering if I can set the vlan so these computers will get the network they're already looking for" - Why would you think these two things are related?

My suggestion to you is to go read up on VLAN's; what they are, how they're used, what layer of the OSI model they fit into, what purpose they serve, etc. If you're doing this as an educational activity then that's great but first get a foundational understanding of VLAN's before you go implementing them.

share|improve this answer
    
1. Not a production environment 2/3. The ips are defined statically in the OSs, I was wondering if I could set the vlan to be on the network the OSs were statically defined to be on, which would have simplified installation –  Dave Jul 9 at 18:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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