Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way how to create vlan interface without using vconfig ? I have only KVM console and trunk port connected to the machine, so I cannot use apt as I do not have internet access. I defined vlans in /etc/network/interfaces but it does not work as vlan interfaces are not created. Thanks.

share|improve this question

closed as not constructive by ewwhite, Ward, Scott Pack, Lucas Kauffman, HopelessN00b Oct 1 '12 at 23:28

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

Ok, i'll fix that. – John Sep 28 '12 at 7:55
How is it 'not constructive' ? – FractalSpace Apr 27 at 15:21
up vote 4 down vote accepted
ip link add link eth0 name eth0.5 type vlan id 5 

do not forget to make link UP:

ip link set eth0 up
ip link set eth0.5 up
share|improve this answer
Awesome! Just what I was looking for (embedded device; minimal tools). And just for completion: ip link del eth0.5 to delete the vlan – FractalSpace Apr 27 at 15:20

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