Mastering Windows Server 2016 Hyper-V

(Romina) #1

Figure 3.19 Adding a single site to a logical network


Here is the PowerShell code used to create my corporate logical network:


$logicalNetwork = New-SCLogicalNetwork -Name "Corp" -LogicalNetworkDefinitionIsolation $false
-EnableNetworkVirtualization $false -UseGRE $false `
-IsPVLAN $false -Description "Corporate, connected network"


$allHostGroups = @()
$allHostGroups += Get-SCVMHostGroup `
-ID "0e3ba228-a059–46be-aa41–2f5cf0f4b96e"
$allSubnetVlan = @()
$allSubnetVlan += New-SCSubnetVLan -VLanID 10


New-SCLogicalNetworkDefinition -Name "Corp Trunk" -LogicalNetwork $logicalNetwork -VMHostGroup $allHostGroups
-SubnetVLan $allSubnetVlan -RunAsynchronously


The next network for you to create is my set of lab networks. In this case, I will select
the VLAN-based independent networks type, and I will create a separate site for each
of the VLAN/IP subnet pairs, which represent separate lab environments, as shown in
Figure 3.20. I’m creating only two of the VLANs in this example because performing
this using the graphical tools is slow. My lab environments are all based in Dallas, so
only the Dallas host group is selected. Because the sites in this logical network have IP
subnets defined, I would also create an IP pool for each site as in the next set of steps.
You will notice that most of these settings are similar to those configured for a DHCP
scope, because SCVMM is performing a similar role; it just uses a different
mechanism to assign the IP address. All of the details are those that will be configured

Free download pdf