We can easily configure IPv4 Networking with Windows GUI , but today we will look at how to change IPv4 with Netsh command.
1.Open Powershell as administrator and run the next command to show list of the interface cards:
Netsh interface ipv4 show interface
2. We will configure Ethernet interface (index 12). So to look exiting ip address run the next command:
Netsh interface ipv4 show config Ethernet
3. As we see To set ip address we will use next command:
Netsh interface ipv4 set address name=Ethernet static 172.16.171.52 mask=255.255.255.0 gateway=172.16.171.1 and press enter
4. and then type: netsh interface ipv4 show config Ethernet to see new configuration:
That is all.
You can set also DNS with next command:
Netsh interface ipv4 set dns name=Ethernet static 172.16.171.51 primary