FACING PROBLEM TO SET NAT SETTNIG IN HYPER-V

General Information about how to make best use of this forum
India shubhamsarve0777
Posts: 11
Joined: Tue Aug 17, 2021 8:01 am

FACING PROBLEM TO SET NAT SETTNIG IN HYPER-V

Post by shubhamsarve0777 » Sat Sep 04, 2021 7:07 am

FOR creating an vm sab server by" WINDOWS POWER SHELL FOLLOW THE STEPS BELLOW"
STEP1:-
Command for Creating a New Adapter in windows machine VIA power shell

Code: Select all


New-VMSwitch -SwitchName NATv1-shub -SwitchType Internal
Get-NetAdapter
New-NetIPAddress -IPAddress 10.10.4.1 -PrefixLength 16 -InterfaceIndex 53
New-NetNat -Name NAT -InternalIPInterfaceAddressPrefix "10.10.4.0/16"


Discription:-
First command is used for creating an new switch with name
Second command is used for "GET NET ADAPTER INTERFACE INDEX VALUE"
Third command is for to set getway IP Address ,Its length ,and interface index value
Fourth command is used to set IP of Base machine

Note:- Check the Interface index
(To check interface ID use command:- Get-NetAdapter)


step:- 2 SET IP IN SAFESQUID SWG
FOR VM MACHINE
Ip: 10.10.4.6
mask: 255.255.0.0
gateway: 10.10.4.1 (THIS IP SET IN BASE MACHINE OR IN ADAPTER)
solution.PNG
after set the NAT setting
solution.PNG (31.22 KiB) Viewed 988 times
get-netadapter.PNG
get-netadapter.PNG (11.24 KiB) Viewed 985 times
Attachments
nat error.PNG
Unable to ping any web site from host to guest machine
nat error.PNG (21.05 KiB) Viewed 988 times