I recently got myself an MTNL Triband connection along with which I also had a local broadband connection.
Now I had just one LAN card and consequently just the one "Local Area Connection" in my network connections.
Each of the 2 had separate IPs, masks and gateways and I had to find a quicker way to switch between the 2 LAN-TCP/IP settings. Manually editing the settings each time is obviously too troublesome.
This little trick is pretty useful also if you're constantly swapping between several connections (maybe home and office) on your laptop.
Google to the rescue it was. Here's a neat trick that uses "netsh", a command-line command to change the tcp/ip settings.
Here's how you do it,
Create a text file and copy the following lines of code into the file.
netsh interface ip set address name="Local Area Connection" source=static addr=IP_ADDRESS mask=SUBNET_MASK
netsh interface ip set address name="Local Area Connection" gateway=DEFAULT_FATEWAY gwmetric=0
netsh interface ip set dns name="Local Area Connection" source=static addr=PREFERRED_DNS
netsh interface ip add dns name="Local Area Connection" addr=ALTERNATE_DNS index=2
pause
Replace the yellow text with the respective details of either one of your connections.
(Make sure that file extensions are not hidden and then) Change the extension from .txt to .bat so that it is saved as a batch file.
You can name the files whatever you want. For e.g., I named one as MTNL connection.bat and the other as localnet.bat