User Manual

Table Of Contents
Rev 4.60
Mellanox Technologies
132
Appendix B: NVGRE Configuration Scrips Examples
The setup is as follow for both examples below:
B.1 Adding NVGRE Configuration to Host 14 Example
The following is an example of adding NVGRE to Host 14.
Hypervisor mtlae14 = "Port1", 192.168.20.114/24
VM on mtlae14 = mtlae14-005, 172.16.14.5/16, Mac 00155D720100
VM on mtlae14 = mtlae14-006, 172.16.14.6/16, Mac 00155D720101
Hypervisor mtlae15 = "Port1", 192.168.20.115/24
VM on mtlae15 = mtlae15-005, 172.16.15.5/16, Mac 00155D730100
VM on mtlae15 = mtlae15-006, 172.16.15.6/16, Mac 00155D730101
# On both sides
# vSwitch create command
# Note, that vSwitch configuration is persistent, no need to configure it after each
reboot
New-VMSwitch "VSwMLNX" -NetAdapterName "Port1" -AllowManagementOS $true
# Shut down VMs
Stop-VM -Name "mtlae14-005" -Force -Confirm
Stop-VM -Name "mtlae14-006" -Force -Confirm
# Connect VM to vSwitch (maybe you have to switch off VM before), doing manual does also
work
# Connect-VMNetworkAdapter -VMName " mtlae14-005" -SwitchName "VSwMLNX"
Add-VMNetworkAdapter -VMName "mtlae14-005" -SwitchName "VSwMLNX" -StaticMacAddress
"00155D720100"
Add-VMNetworkAdapter -VMName "mtlae14-006" -SwitchName "VSwMLNX" -StaticMacAddress
"00155D720101"
# ------- The commands from Step 2 - 4 are not persistent, Its suggested to create
script is running after each OS reboot
# Step 2. Configure a Subnet Locator and Route records on each Hyper-V Host (Host 1 and
Host 2) mtlae14 & mtlae15
New-NetVirtualizationLookupRecord -CustomerAddress 172.16.14.5 -ProviderAddress
192.168.20.114 -VirtualSubnetID 5001 -MACAddress "00155D720100" -Rule "TranslationMetho-
dEncap"
New-NetVirtualizationLookupRecord -CustomerAddress 172.16.14.6 -ProviderAddress
192.168.20.114 -VirtualSubnetID 5001 -MACAddress "00155D720101" -Rule "TranslationMetho-
dEncap"
New-NetVirtualizationLookupRecord -CustomerAddress 172.16.15.5 -ProviderAddress
192.168.20.115 -VirtualSubnetID 5001 -MACAddress "00155D730100" -Rule "TranslationMetho-
dEncap"
New-NetVirtualizationLookupRecord -CustomerAddress 172.16.15.6 -ProviderAddress
192.168.20.115 -VirtualSubnetID 5001 -MACAddress "00155D730101" -Rule "TranslationMetho-
dEncap"
# Add customer route
New-NetVirtualizationCustomerRoute -RoutingDomainID "{11111111-2222-3333-4444-
000000005001}" -VirtualSubnetID "5001" -DestinationPrefix "172.16.0.0/16" -NextHop
"0.0.0.0" -Metric 255