Link to home
Start Free TrialLog in
Avatar of itnifl
itniflFlag for Norway

asked on

Creating virtual NICs on a Hyper-V host OS that accesses or uses vlans in a trunked virtual switch

Is this possible?
To me it seems like not.

From what I can see, it is possible to let the host OS share the NIC that a virtual switch is created on, but it is not possible to create a virtual NIC on a Hyper-V host OS that accesses or uses vlans in that virtual switch. Or is there a way?
Avatar of Bembi
Bembi
Flag of Germany image

If you share the virtual switch on the host, you can set a VLAN ID for the host in the HyperV Virtual switch manager.
For the guest machine, you set the VLAN setting in the NIC properties of the virtual machine.
Avatar of itnifl

ASKER

Yes same as I wrote, but that only leaves me with one network setup for the host that is shared with the virtual switch. I want several. Perhaps creating subinterfaces on the windows host, on the samee physical nic, will do the trick? If possible?
The VLAN setting for the host has nothing to do with the guest OS.
If you allow the host to share the virtual network, you get an additional virtual NIC beside the virtual switch, And for this Virtual NIC you can set the VLAN.
Whatever you set here, you can assign any other VLAN on the NIC properties of the guest.

If you want to have several NIC inside a guest, you can add several NICs connected the  same or another virtual switch (if your host has more than 1 NIC) and assign each guest NIC a different VLAN.

The only thing what you can not do is to have two virtual networks which can be used by the host  which are bound on one virtual switch. The rule for the host is: 1 virtual switch = 1 virtual NIC. or number of virtual NICs <= number of virtual switches (on the host)
Avatar of itnifl

ASKER

I am sorry to have to correct you, but there is no talk of guest operating systems here. The text I wrote offers no interpretation into a subject of guest OS networking. I want to find a way to share the host network with the virtual switch in more then one instance. Normally when you share the virtual switch with the host, you have only one NIC you can configure for the host (one instance). This gives you one vlan for the host, in one subnet, with one ip-address. I want several, so that I may use the host OS as if it was a guest OS. This limitation is what I have seen, that I suspect is not possible to get around, and that you restate here is the case.

So in short you are stating that you think it is not possible. Please inform if otherwise.
The rule for the host is: 1 virtual switch = 1 virtual NIC. or number of virtual NICs <= number of virtual switches (on the host) .

In other words, if you want to have 2 VLAN connections for your host, you need two physical NICs.

It is like in hardware switches, there you usually can assign one single port also only to one single VLAN. The connection between VLANs are routers.
So even you would have the chance to do it on the host, you physical switch would not be able to handle it.
Avatar of itnifl

ASKER

Sure, you can trunk the vlans.
But back to the question; I guess the host was never intended to act as a guest on to the virtual switch per design, which is understandable.

I have a manager (not in my department, but connected to it), he is very enthusiastic and keeps stating that this must be possible (using the host as a guest to the virtual switch). He seems so convinced that I almost dare not contradict him. So I told him I didn't think so, but I would look into it. I have done so twice now. Both by labbing this myself, and asking here. Bet he won't give up still.
ASKER CERTIFIED SOLUTION
Avatar of Bembi
Bembi
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of itnifl

ASKER

Looks like something similar to the intel vlan solution that has been tried already, but without the intel drivers. I will test it, thank you.