none
How to create Virtual Switch with NIC teaming with multiple VLAN

    Question

  • Hi,

     Please help me to resolve my problem.

    I have 

    1 Server 2016 (Physical Machine)

    NIC teaming with LACP Dynamic (NIC3 + NIC 4) -- Both NIC are connected on different Switch(Arista switches) port (SW1-E24 and Sw2 -E24)

    Switch 1, 2 Configuration

    Interface Port-Channel15

    Switchport trunk allowed vlan 40,70

    Switchport mode trunk

    Mlag 15

    |

    |

    Interface Ethernet 24

    Switchport trunk allowed vlan 40,70

    Switchport mode trunk

    Channel-group 15 mode active

    |

    |

    Question 1:  when i create NIC team with LACP, i need to define the VLAN ID 40 on  NIC team otherwise the server is inaccessible from NIC team. how to resolve this ?

    I also add the interface on NIC team with VLAN 70.

    Question 2: When create virtual switch(Switch-VLAN40) from Hyper-V virtual switch manager, with Connection type External Network, Allow Management Operating system to share this network adapter and specific the NIC team VLAN 40 network.

    The server become inaccessible. same happen with VLAN 70. how can i resolve it.

    I need to create virtual switch with VLAN 40 and another Virtual Switch with VLAN 70. 

    Thanks.


    Wednesday, May 22, 2019 11:39 PM

Answers


  • If I understand correctly you would like to create two virtual adapters (VLAN 40 and 70) on your Hyper-V Host?

    One option is of course to configure VLAN 40 as native on ports connected to your host. The other way is to configure VLAN ID with PowerShell for your Hyper-V Host. 

    Set-VMNetworkAdapterVlan -ManagementOS -Access -VlanID 40

    To create additional virtual adapter (for VLAN 70) use Add-VMNetworkAdapter cmdlet. For example

    Add-VMNetworkAdapter -ManagementOS -Name "NIC-VLAN70" -SwitchName "Your vSwitch Name"

    Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "NIC-VLAN70" -Access -VlanId 70

    Hope this helps.


    Microsoft Certified Professional

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered"Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]


    Thursday, May 23, 2019 5:35 AM
  • Hi,

    Thanks for your question.

    I agree with Matej's suggestion, we can do this implementation as your need. Additionally, here're the articles talked about setting up VLANs in Hyper-V in detail, hope this helps.

    How to Set up VLANs in Hyper-V

    https://www.altaro.com/hyper-v/setting-up-vlans-in-hyper-v/ 

    Multiple VLAN in Hyper-V Using Virtual Switch Manager

    https://www.vembu.com/blog/multiple-vlan-hyper-v-using-virtual-switch-manager/

    If you have any question or concern, please feel free to let us know.

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by Imran_Ali Wednesday, May 29, 2019 3:53 PM
    Thursday, May 23, 2019 7:05 AM
    Moderator

All replies


  • If I understand correctly you would like to create two virtual adapters (VLAN 40 and 70) on your Hyper-V Host?

    One option is of course to configure VLAN 40 as native on ports connected to your host. The other way is to configure VLAN ID with PowerShell for your Hyper-V Host. 

    Set-VMNetworkAdapterVlan -ManagementOS -Access -VlanID 40

    To create additional virtual adapter (for VLAN 70) use Add-VMNetworkAdapter cmdlet. For example

    Add-VMNetworkAdapter -ManagementOS -Name "NIC-VLAN70" -SwitchName "Your vSwitch Name"

    Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "NIC-VLAN70" -Access -VlanId 70

    Hope this helps.


    Microsoft Certified Professional

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered"Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]


    Thursday, May 23, 2019 5:35 AM
  • Hi,

    Thanks for your question.

    I agree with Matej's suggestion, we can do this implementation as your need. Additionally, here're the articles talked about setting up VLANs in Hyper-V in detail, hope this helps.

    How to Set up VLANs in Hyper-V

    https://www.altaro.com/hyper-v/setting-up-vlans-in-hyper-v/ 

    Multiple VLAN in Hyper-V Using Virtual Switch Manager

    https://www.vembu.com/blog/multiple-vlan-hyper-v-using-virtual-switch-manager/

    If you have any question or concern, please feel free to let us know.

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by Imran_Ali Wednesday, May 29, 2019 3:53 PM
    Thursday, May 23, 2019 7:05 AM
    Moderator
  • Hi,

    Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

    Best Regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, May 24, 2019 7:31 AM
    Moderator
  • Thank Michael and Matej. I will implement it and let you know that's works or not.
    Friday, May 24, 2019 4:58 PM
  • Hi,

    Just want to confirm the current situation. 

    I'll stand by with you. If you have any question or concern, please feel free to let us know.

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, May 27, 2019 2:49 AM
    Moderator
  • Thanks Michael,

    I have add the interface on Team NIC with VLAN 70 with no primary. can i still make virtual switch over VLAN70 Interface and it will work or not?

    Can you please answer this question.

    Question 1:  when i create NIC team with LACP, i need to define the VLAN ID 40 on  NIC team otherwise the server is inaccessible from NIC team. how to resolve this ?


    • Edited by Imran_Ali Tuesday, May 28, 2019 5:14 PM
    Tuesday, May 28, 2019 5:10 PM
  • Did you use the PowerShell cmdlets that I posted? 

    Microsoft Certified Professional

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Wednesday, May 29, 2019 8:09 AM