Question

Locked

how to switch the one network to another network through batch files

By rajkumar24_Siddham ·
iam having local area netwok 192.168.1.1 (Lan) subnetmask is 255.255.255.0

and internet is 10.7.192.81 and subnetmask is 255.255.255.240


and i like to add the dns and gateway also

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Use netsh

by Bizzo In reply to how to switch the one net ...

Use the "netsh interface" command

At a prompt, type "netsh interface help" (without the quotes) to get more information.

Here's an example:

netsh interface ip set address name="Local Area Connection" source=static addr=111.222.333.444 mask=255.255.255.255
netsh interface ip set address name="Local Area Connection" gateway=555.666.777.888 gwmetric=0
netsh interface ip set dns name="Local Area Connection" source=static addr=999.111.222.333
netsh interface ip add dns name = "Local Area Connection" addr = 444.555.666.777

Related Discussions

Related Forums