- Mar 13, 2017
- 23
- 0
- 66
So I have a dual port gigabit Ethernet card and I want to setup their IPs via a batch script.
I have used this and it works at the time I first wrote it.
But the problem is when I reinstalled Windows. Windows has swapped them so the IPs got swapped as well.
I am hoping to can help me with another script/command where I can use MAC address instead of "interface name" since this name can be swapped.
Thanks
I have used this and it works at the time I first wrote it.
Code:
netsh interface ipv4 set address name="Ethernet" static 192.168.2.2 255.255.255.0
netsh interface ipv4 set address name="Ethernet 2" static 192.168.3.2 255.255.255.0
But the problem is when I reinstalled Windows. Windows has swapped them so the IPs got swapped as well.
I am hoping to can help me with another script/command where I can use MAC address instead of "interface name" since this name can be swapped.
Thanks