Get answers from your peers along with millions of IT pros who visit Spiceworks.
Join Now

Hi

I started since a few weeks with Hyper-v and i’m quite struggling with my network config and the hyper-v setup. I have server with 4 NIC’s and my network contains severall vlan’s. This is my VLAN overview:

VLAN 20 - Clients (172.16.20.0/24)

VLAN 30 - Servers (172.16.30.0/24)

VLAN 100 - Hyper-V server management (172.16.100.0/24)

How should i configure this in hyper-v? I know how to this in vmware but i have no clou to do this in hyper-v.

Any help is appreciated


kevinmhsieh
Habanero
OP
kevinmhsieh

Here are my notes for how to configure a switch independent NIC team called TEAM-TRUNK. It then will create a new external virtual switch called ExternalSwitch. It will assign the host virtual interface to vlan 100. It creates two more virtual NICs to vlan 100 for iSCSI. Skip if you don't use iSCSI, and change to your own VLAN ID. Finally, it sets jumbo frames. Skip if you don't have those set for your network.

The reason for get-netadapter is to identify the correct adapters. In my case, I don't use all NICs for the team (I leave the others unplugged during this part. I need the list of active adapters that I will be using.

Text
#Hyper-V host networking
get-netadapter

new-netlbfoteam -name TEAM-TRUNK -teammembers "ethernet 2","ethernet 4","ethernet 5",ethernet 6"

new-vmswitch -name ExternalSwitch -allowmanagementos 1 -netadaptername TEAM-TRUNK

Add-VMNetworkAdapter -managementos -name ISCSI1 -switchname externalswitch
Add-VMNetworkAdapter -managementos -name ISCSI2 -switchname externalswitch

 set-VMNetworkAdapterVlan -access -ManagementOS -VlanId 100 -VMNetworkAdapterName ExternalSwitch

 set-VMNetworkAdapterVlan -access -ManagementOS -VlanId 100 -VMNetworkAdapterName ISCSI1
 set-VMNetworkAdapterVlan -access -ManagementOS -VlanId 100 -VMNetworkAdapterName ISCSI2


Get-NetAdapterAdvancedProperty -DisplayName "Jumbo Packet" | Set-NetAdapterAdvancedProperty –RegistryValue "9014"

#Or run

Set-NetAdapterAdvancedProperty -Name * -RegistryKeyword "*JumboPacket" -Registryvalue 9014

2 Replies

· · ·
B-C
Habanero
OP
B-C

apzzwilliam wrote:

Hi

I started since a few weeks with Hyper-v and i’m quite struggling with my network config and the hyper-v setup. I have server with 4 NIC’s and my network contains severall vlan’s. This is my VLAN overview:

VLAN 20 - Clients (172.16.20.0/24)

VLAN 30 - Servers (172.16.30.0/24)

VLAN 100 - Hyper-V server management (172.16.100.0/24)

How should i configure this in hyper-v? I know how to this in vmware but i have no clou to do this in hyper-v.

Any help is appreciated

Quickly -

4 Nics are not necessary...

a single or dual nic would be fine...

--- 

basically the host is set to trunk - and can operate the host via native vlan or a vlantag of 100
untagged 100 / tagged all but native 0 / 1 doesn't matter.

VM's within would be tagged with needed vLAN30 over the trunk on the switch.

if your switches support VLAN which it sounds like they do if you have VLANS anyway...

0
· · ·
kevinmhsieh
Habanero
OP
Best Answer
kevinmhsieh

Here are my notes for how to configure a switch independent NIC team called TEAM-TRUNK. It then will create a new external virtual switch called ExternalSwitch. It will assign the host virtual interface to vlan 100. It creates two more virtual NICs to vlan 100 for iSCSI. Skip if you don't use iSCSI, and change to your own VLAN ID. Finally, it sets jumbo frames. Skip if you don't have those set for your network.

The reason for get-netadapter is to identify the correct adapters. In my case, I don't use all NICs for the team (I leave the others unplugged during this part. I need the list of active adapters that I will be using.

Text
#Hyper-V host networking
get-netadapter

new-netlbfoteam -name TEAM-TRUNK -teammembers "ethernet 2","ethernet 4","ethernet 5",ethernet 6"

new-vmswitch -name ExternalSwitch -allowmanagementos 1 -netadaptername TEAM-TRUNK

Add-VMNetworkAdapter -managementos -name ISCSI1 -switchname externalswitch
Add-VMNetworkAdapter -managementos -name ISCSI2 -switchname externalswitch

 set-VMNetworkAdapterVlan -access -ManagementOS -VlanId 100 -VMNetworkAdapterName ExternalSwitch

 set-VMNetworkAdapterVlan -access -ManagementOS -VlanId 100 -VMNetworkAdapterName ISCSI1
 set-VMNetworkAdapterVlan -access -ManagementOS -VlanId 100 -VMNetworkAdapterName ISCSI2


Get-NetAdapterAdvancedProperty -DisplayName "Jumbo Packet" | Set-NetAdapterAdvancedProperty –RegistryValue "9014"

#Or run

Set-NetAdapterAdvancedProperty -Name * -RegistryKeyword "*JumboPacket" -Registryvalue 9014
3
Oops, something's wrong below.