This section uses Windows Server 2012 R2 Standard as an example to describe how to configure a user-defined VLAN for BMSs.
The configuration methods of other Windows Server OSs are similar to that of Windows Server 2012 R2 Standard.
Get-NetAdapter
Information similar to the following is displayed.
Among the devices, eth0 and eth1 bear the VPC, and eth2 and eth3 bear the user-defined VLAN. The following steps use eth2 and eth3 to configure a user-defined VLAN.
New-NetLbfoTeam -Name qinq -TeamMembers "eth2","eth3" -TeamingMode SwitchIndependent -LoadBalancingAlgorithm Dynamic -Confirm:$false
In the command, qinq is the name of the port group planned for the user-defined VLAN, and eth2 and eth3 are the network devices that bear the user-defined VLAN obtained in step 2.
Get-NetLbfoTeamMember
Get-NetAdapter
New-NetLbfoTeam -Name Team2 -TeamMembers "eth2","eth3" -TeamingMode SwitchIndependent -LoadBalancingAlgorithm IPAddresses -Confirm:$false
In the command, Team2 is the name of the port group planned for the user-defined VLAN, and eth2 and eth3 are the network devices that bear the user-defined VLAN obtained in step 2.
Set-NetLbfoTeamMember -Name "eth2" -AdministrativeMode Standby -Confirm:$false
The port group configured for the user-defined VLAN supports only the active/standby mode. eth2 is one of the ports of the port group. You can determine which port is configured as the standby port based on your planning.
get-NetLbfoTeamMember
Get-NetAdapter
ncpa.cpl
Then enter the following page.
If the IP address planned for the user-defined VLAN does not conflict with the VPC network segment, you can plan the IP address as needed, only to ensure that BMSs communicating through the user-defined VLAN are in the same network segment as the user-defined VLAN.
Run the following command to create a VLAN sub-interface based on the existing Team2:
Add-NetLbfoTeamNIC -Team "Team2" -VlanID XXX -Confirm:$false
In the preceding command, Team2 indicates the bond name, and XXX indicates the VLAN ID.
After the VLAN sub-interface is created, configure the IP address and subnet mask of network port Team2-VLAN 500 by referring to 4 and 5.