vlan tagging on linux

We have a Linux server that we migrated from vlan 1 to a new vlan (vlan 10).   the cisco switch was configured as an access port and the physical server works fine when plugged into the access port.   However, the Linux server also has a VM  and this server is acting a host---so it has vnet0 that takes over instead of eth0.    I've reconfigured the switch port on the cisco switch as a Trunk port since vnet0 wants a trunk, but not sure what I need to change on the vnet0 properties.  I know I need to configure tagging on the virtual switch (vnet0) to properly communicate over a TRUNK port to support multiple VLAN----but what's the process for it?   cmd's etc to run on the Linux machine---(not as familiar with Linux as I am with windows).

Who is Participating?
petersystems engineerCommented:
As a side note, I would recommend, to vlan out the host traffic from the vm traffic, to reduce broadcast traffic on the host servers, I'm sure you know about that.
Best practices are, vlan hosts, vlan storage, vlan virtual machines, and vlan "vmotion" or migration of vm's between hosts.
Mohammed KhawajaManager - Infrastructure:  Information TechnologyCommented:
Is this a physical or a virtual machine?  If it is physical then the change must be made in Linux.  If it is virtual then you could either create a new vswitch associated to vlan10 to which the VM will connect or you could leave it as a trunk port and make the change in the OS.  Traditionally, it is harder to tag the NIC in the OS to a vlan than it is to change the vswitch or the port on the switch.  Which edition of Linux you have as instructions are different for each.
petersystems engineerCommented:
> the Linux server also has a VM...
Sound like you are running a hypervisor on the physical linux host server

What hypervisor are you running on the physical linux server ?
Have you googled for the documentation to set up vst using that hypervisor?
On-Demand: Securing Your Wi-Fi for Summer Travel

Traveling this summer?Check out our on-demand webinar to learn about the importance of Wi-Fi security and 3 easy measures you can start taking immediately to protect your private data while using public Wi-Fi. Follow us today to learn more!

seven45Author Commented:
appreciate the feedback:

MK: the change needs to be made to the physical Linux server.   unfortunately, I don't know the version yet.  (Sorry---I have very limited details so far).

PK: I believe you're right---  (I haven't actually seen the Linux server yet so cant say what type of hypervisor its running).   Since I'm not as familiar with Linux, I was hoping to get some general things to look for when I do go onsite to troubleshoot this.  

are there some general steps to perform on a typical Linux Host server when its connected to a switch that is not on vlan 1. (default vlan)
petersystems engineerCommented:
I am going to guess they are either running RHEV or oVert, the open source version of RHEV.
So I would google rhev and overt logical networking.

I checked both my kindle overt and rhev books briefly....

For oVert:
to create a logical network as they call it, go to Data Centers, select Logical Networks, New, General, fill in Name etc, enable Vlan tagging, rest you can figure out Im sure.

For RHEV, since it's in Data Centers too.
petersystems engineerCommented:
You said you reconfigureed the switch and trunked the port?
Sounds like that is correct. can you tag it for vlans 1 and 10 as a test to see if the vm works?

>not sure what I need to change on the vnet0 properties
On the HOST, you shouldnt have to change anything, and if the trunk is passing tagged frames for vlans 1 and 10 that the vm will work. Just for  test. Then just figure out based on the hypervisor its using where to change the vlan ID for the VM from 1 to 10 and drop the vlan1 frame tag from the switch port trunk, or just leave it.
seven45Author Commented:
UPdate:  sorry about the delay for this issue; I didn't get a chance to go back till today.

FYI:  switch was kept as the access port (no need for trunking as all the vm's and the physical host are all on the same vlan)  

The problem turned out to be routing.  added a static route to route via gateway.  and problem was solved..
petersystems engineerCommented:
thanks for the update, glad you got it working!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.