Mastering Windows Server 2016 Hyper-V

(Romina) #1

Figure 3.12 Using SCVMM to create multiple isolated PVLANs that use the same
secondary VLAN ID


Here are the same PowerShell commands for SCVMM to create the isolated PVLAN
configuration that matches the configuration previously performed using the SCVMM
graphical interface:


$logicalNetwork = New-SCLogicalNetwork -Name "test" -LogicalNetworkDefinitionIsolation $true
-EnableNetworkVirtualization $false -UseGRE $false -IsPVLAN $true


$allHostGroups = @()
$allHostGroups += Get-SCVMHostGroup -ID "b08d9191–5890–4edf-a067–8ab63baf5946" $allSubnetVlan = @() $allSubnetVlan += New-SCSubnetVLan -Subnet "10.1.1.0/24" -VLanID 110
-SecondaryVLanID 200
$allSubnetVlan += New-SCSubnetVLan -Subnet "10.1.2.0/24" -VLanID 120 `
-SecondaryVLanID 200


New-SCLogicalNetworkDefinition -Name "Lab Main—Prod—PVLAN Isolated" -LogicalNetwork $logicalNetwork -VMHostGroup $allHostGroups
-SubnetVLan $allSubnetVlan -RunAsynchronously


It’s important that all of the physical switch ports are configured correctly for the
VLANs used as part of a PVLAN configuration, or traffic will not flow between hosts
correctly. Although VLANs are used heavily in many environments, most
organizations won’t use PVLANs that are aimed at specific scenarios requiring large
numbers of hosts/virtual machines that cannot talk to each other. The good news is
that they are all supported with Hyper-V.

Free download pdf