In the second host operating system network configuration option within a non-converged topology, the storage traffic uses virtual adapters in the host operating system connected to a SET.
The following figure depicts storage on SET with four NIC ports.
As shown in Figure 13 and Figure 14, different SET switches get implemented for storage and management/VM traffic.
Deployment instructions for storage using SET
This section provides the PowerShell commands to configure the non-converged network topology in which the SET switches are used for both storage traffic management/VM traffic.
$ErrorActionPreference = 'Stop'
#region Variables for the scenario
## Management Adapter
$ManagementSwitchName = 'Management'
$ManagementNetAdapterName = @('NIC1','NIC2')
$ManagementAdapterName = 'Management'
# VLAN ID for host management traffic; if no VLAN is preferred set this to 0
$ManagementVlanId = 102
# Management Gateway Addreess
$ManagementGateway = '172.16.102.1'
# DNS Server Address
$ManagementDns = '172.16.102.2'
# Set this to a string 'DHCP' for a dynamic IP address
$ManagementIPAddress = '172.16.102.51'
# Management address prefix (24 translates to subnet mask 255.255.255.0)
$ManagementAddressPrefix = 24
## Storage Adapters
$storageSwitchName = 'Storage'
### You must specify 2 or 4 network adapter port names
$StorageNetAdapterName = @('SLOT 2 PORT 1', 'SLOT 2 PORT 2')
### You must specify 1 or 2 or 4 VLANIDs
### Specify 0 if you want the network not tagged with any VLAN
$StorageVlanId = @(103, 104)
### You must specify 2 or 4 IP Addresses
### DHCP as a value is accepted if you want dynamically assigned IP addresses
$StorageIPAddress = @('172.16.103.51', '172.16.104.51')
### You can specify 1 or 2 or 4 prefix length values (24 translates to subnet mask 255.255.255.0)
$StorageAddressPrefix = @(24)
#endregion
# Add VM Network Adapters and configure VLANs and IP addresses as needed
## Management Adapter
### Management VM Switch
$null = New-VMSwitch -Name $ManagementSwitchName -AllowManagementOS 0 -NetAdapterName $ManagementNetAdapterName -MinimumBandwidthMode Weight -Verbose
$managementAdapter = Add-VMNetworkAdapter -SwitchName $ManagementSwitchName -ManagementOS -Passthru -Name $ManagementAdapterName -Verbose
if ($ManagementVlanId -and ($ManagementVlanId -ne 0))
{
# Set VM Network adapter VLAN only if the VLAN ID specified is other than 0
Set-VMNetworkAdapterVlan -VMNetworkAdapter $managementAdapter -Access -VlanId $ManagementVlanId -Verbose
Start-Sleep -Seconds 5
}
if ($ManagementIPAddress -ne 'DHCP')
{
$null = New-NetIPAddress -InterfaceAlias "vEthernet ($ManagementAdapterName)" -IPAddress $ManagementIPAddress -DefaultGateway $ManagementGateway -PrefixLength $ManagementAddressPrefix -Verbose
Set-DnsClientServerAddress -InterfaceAlias "vEthernet ($ManagementAdapterName)" -ServerAddresses $ManagementDns -Verbose
}
## Storage Adapters
### Storage VM Switch
$null = New-VMSwitch -Name $StorageSwitchName -AllowManagementOS 0 -NetAdapterName $StorageNetAdapterName -Verbose
## Add VM Network adapters and configure VLANs and IP addresses as needed
### Configure storage adapters
for ($i = 0; $i -lt $StorageNetAdapterName.Count; $i++)
{
$storageAdapterName = "${storageAdapterPrefix}$($i+1)"
# if there is a single VLAN for storage use the first and only element
if ($storageVlanId.Count -eq 1)
{
$storageVlan = $storageVlanId[0]
}
else
{
# else use the right index to get the VLAN ID
$storageVlan = $storageVlanId[$i]
}
# Check if only one prefix is provided
if ($StorageAddressPrefix.Count -eq 1)
{
$StoragePrefix = $StorageAddressPrefix[0]
}
else
{
# if more than one, use the right index to get the address prefix
$StoragePrefix = $StorageAddressPrefix[$i]
}
$storageAdapter = Add-VMNetworkAdapter -SwitchName $storageSwitchName -ManagementOS -Passthru -Name $storageAdapterName -Verbose
if ($storageVlan -and ($storageVlan -ne 0))
{
# Set VM Network adapter VLAN only if the VLAN ID specified is other than 0
Set-VMNetworkAdapterVlan -VMNetworkAdapter $storageAdapter -Access -VlanId $storageVlan -Verbose
Start-Sleep -Seconds 5
}
if ($StorageIPAddress[$i] -ne 'DHCP')
{
$null = New-NetIPAddress -InterfaceAlias "vEthernet ($storageAdapterName)" -IPAddress $StorageIPAddress[$i] -PrefixLength $StoragePrefix -Verbose
}
## Set VMnetwork adapter to Physical adapter mapping
Set-VMNetworkAdapterTeamMapping -VMNetworkAdapterName $storageAdapterName –ManagementOS –PhysicalNetAdapterName $netAdapterName[$i]
}