|||

0057-setting_up_vswitch_nating_hyper-v

Powershell FTW

Being used to VMware Workstation, where NATing is a few GUI clicks away, I couldn’t find a GUI way of configuring it in Hyper-V. inside local outside hokey pokey; Turn yourself around I don’t mind the command line and actually prefer it sometimes. The PowerShell equivent didn’t end up being too bad. Not like the first time doing Cisco NAT from the CLI.

Setting up NAT

The first code block is the generic commands from the Microsoft reference document the second one is what I used in my lab. Create Internal vSwitch for NATNew-VMSwitch -SwitchName SwitchName” -SwitchType Internal Configure the NAT gatewayNew-NetIPAddress -IPAddress -PrefixLength -InterfaceIndex Configure the NAT networkNew-NetNat -Name -InternalIPInterfaceAddressPrefix What I Used in My Lab New-VMSwitch –SwitchName NATvSwitch” –SwitchType InternalNew-NetIPAddress –IPAddress 172.143.1.1 -PrefixLength 24 -InterfaceAlias vEthernet (NATSwitch)”New-NetNat –Name myNATnetwork –InternalIPInterfaceAddres

There Can Be Only One

Windows (WinNAT) only supports one internal NAT subnet prefix, trying to create multiple NATs will place the system into an unknown state. (1)

References:

https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/setup-nat-network/ https://www.thomasmaurer.ch/2016/05/set-up-a-hyper-v-virtual-switch-using-a-nat-network/

Up next 0056-win_err_2_citrix_command_center 0058-ccsp_crash_course_review
Latest posts 0104-change-synology-password-cli 0105-free-git-ebook 0103-using-brew-bundle-to-backup-and-restore-mac-app-store-and-brew-apps Update macOS with an all in one alias Mac App Store Command Line Interface 0100-macos-softwareupdate-cli Markdown Crash Course Video What’s New with Fusion and Workstation [HCP1833] File IO in Python Overview of vSphere 7 Video 0095-what_is_iso Migrating Website HTML details Tag Microsoft RD Client iOS App 0091-create_vmware_esxi_usb_install_media Intel NUC Lab Hosts Hardware Setup 0089-installng_microsoft_sql_2016 Installing the First Two Domain Controllers in the VMware ESXi 6.7 Lab Environment 0088-deploy_vcsa_in_lab Macchanger Utility, and Usage Install a Kali Linux VM in a VMware ESXi 6.7 Environment Install Ubuntu 18.04 Virtual Machine in a VMware ESXi 6.7 Environment Install xRDP on Ubuntu 18.04 Install Chromium on Ubuntu 18.04 Install OpenSSH on Ubuntu 18.04 Install VMware Workstation 14 on Ubuntu 18.04 Nested ESXi server Laboratorium Rattus The Animal Within Who is Veeam? RSAC OnDemand Videos 0075-create_win10_sandbox_vm