Last active
April 6, 2021 08:06
-
-
Save msjyoo/78b741fb48a9f0936e20 to your computer and use it in GitHub Desktop.
How to set up NAT for Internet access with Hyper-V
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the Virtual SAN Editor: | |
Select Internal mode. | |
Then, open cmd, type in `ipconfig`. | |
You should see something like this: | |
``` | |
Ethernet adapter vEthernet (Internal Virtual Switch 1): | |
Connection-specific DNS Suffix . : | |
Link-local IPv6 Address . . . . . : xxmacaddressxx:1:2:3:randomidentifier | |
Autoconfiguration IPv4 Address. . : 169.254.101.196 | |
Subnet Mask . . . . . . . . . . . : 255.255.0.0 | |
Default Gateway . . . . . . . . . : | |
``` | |
Now, in your guest operating system, the network settings should be: | |
``` | |
IP: 169.254.101.197 (Or any other in the /16) | |
Subnet Mask: 255.255.0.0 | |
Gateway: 169.254.101.196 (This IP is your computer. So instead of traffic going VM -> Router -> Internet, this way the traffic goes VM -> Host OS -> Router -> Internet. This is called NAT) | |
DNS Servers: Any you like (Use 8.8.8.8 8.8.4.4 for Google's Public DNS) | |
``` | |
Enjoy! | |
Edit: Make sure you also enable ICS (Internet Connection Sharing or IP Forwarding in Linux?) as per this answer: http://superuser.com/questions/531590/windows-8-hyper-v-network-not-working-on-host |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment