Dual network profile

  • Thread starter Thread starter Sunil Pinto
  • Start date Start date
S

Sunil Pinto

Hi ,
I have two networks , one OFFICE and two HOME.
I use static IP address in my office , and i need to use DHCP at my home, is
there any way i can set this up on my laptop so that i dont have to keep
changing my TCP/IP properties.

Thanks in advance.
Sunil
 
make a batch file using NETSH Command.
Just one click will change IPs. If you need help making a
batch file using NETSH command, let me know.
Cheers.
-Nimit
 
Dear Mr. Mehta,
Would appreciate your help in creating one.

Regards
Sunil
 
When your laptop has IP configured to work in office, do
the following.
1. START
2. RUN
3. CMD
4. type "netsh -c interface dump >d:\office.txt" without
inverted commas. Check your D:\ for a text file called
office.txt. This file should look something like this.
#========================
# Interface configuration
#========================
pushd interface

reset all


popd
# End of interface configuration



# ----------------------------------
# Interface IP Configuration
# ----------------------------------
pushd interface ip


# Interface IP Configuration for "LAN"

set address name = "LAN" source = static addr =
192.168.0.111 mask = 255.255.255.0
set dns name = "LAN" source = static addr = none
set wins name = "LAN" source = static addr = none

# Interface IP Configuration for "MAIN"

set address name = "MAIN" source = static addr =
172.16.0.145 mask = 255.255.255.0
set address name = "MAIN" gateway = 172.16.0.1 gwmetric = 1
set dns name = "MAIN" source = static addr = 172.16.0.1
add dns name = "MAIN" addr = 206.163.146.4
set wins name = "MAIN" source = static addr = none


popd
# End of interface IP configuration

5. Open notepad and type netsh -f d:\office.txt
6. Save the file as office.bat
7. Double click and run this .bat file to change IP
settings to office network onwards.
What it does: Using "netsh -c interface dump" will dump
the current IP settings to a notepad file. The same file
is then used to restore the IP settings using "netsh -f
path" command where path is the path of your created
notepad file.
Do the same with home network.
Reply back if you need more help on this.
Cheers.
-Nimit
 
Thank you very much Mr Mehta,
Its working great now.

Regards
Sunil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top