* of the day, you are at work (you have to set up your network to work at work)
* At night, you are at home or in the School (you have to set up your network to work there)
* etc ...
On Linux, it's easy! You create a script using the ifconfig and you are ready. But in Windows, I never knew how to do it! Until I discovered Netsh !!!
Create these 2 batch:
creates.bat
netsh -c interface dump > c:\config_casa.txt
carries_casa.bat
netsh -f c:\config_casa.txt
Hence, just run the BAT above to load the generated settings.
When you go to your job, set up your network and then change the creation.bat by changing only the file name to C: \ config_tork .txt. Run creates again. It will create the C: \ config_work.txt with the settings of your work.
carries_work.bat
netsh -f c:\config_trabalho.txt
there is an example of config_casa that he created for me:
#========================
# Configura‡Æo da Interface
#========================
pushd interface
reset all
popd
# Final da configura‡Æo de interface
# ----------------------------------
# Configura‡Æo de Interface IP
# ----------------------------------
pushd interface ip
# Configura‡Æo de interface IP para "ConexÆo de rede local"
set address name = "ConexÆo de rede local" source = static addr = 172.16.3.113 mask = 255.255.255.0
set address name = "ConexÆo de rede local" gateway = 172.16.3.251 gwmetric = 1
set dns name = "ConexÆo de rede local" source = static addr = 172.16.2.18
add dns name = "ConexÆo de rede local" addr = 172.16.2.16
set wins name = "ConexÆo de rede local" source = static addr = 172.16.2.4
popd
# Final da configura‡Æo de interface IP