Page 1 of 1

FACING PROBLEM TO SET NAT SETTNIG IN HYPER-V

Posted: Sat Sep 04, 2021 7:07 am
by shubhamsarve0777
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 987 times
get-netadapter.PNG
get-netadapter.PNG (11.24 KiB) Viewed 984 times