How to add addional IP addresses to an interface through batch file

3

I have assigned a IP address to my LAN interface through

netsh int ip set address "LAN" static 192.168.0.99 255.255.255.0 192.168.0.1

Now I want to add 192.168.4.20 with gateway 192.168.4.1 to the same interface without overwriting the existing IP address.

How can I do this through a batch file?

Anbu

Posted 2014-10-21T07:32:42.847

Reputation: 875

Answers

1

According to this URL it is possible to do this via:

netsh in ip add address "Local Area Connection" 172.16.1.2 255.255.0.0

(netsh int ip add rather than netsh int ip set).

Hennes

Posted 2014-10-21T07:32:42.847

Reputation: 60 739