Finally, my search for a commandline tool to configure the static IP settings came to an end with this article http://support.microsoft.com/kb/257748
First of all, I'd like to clarify that using commandline to configure IP setting should not be taken in "geeky" light. For those who never take their laptops out of their hostel room, it's okay to use the GUI to set IP settings once in a semester. But for guys like me who need to juggle between the IP settings of NAC and Kameng >= twice a day, it was a big pain to go thru the tedious process of configuring it thru GUI in Windows. No prizes for guessing that in linux, u could do it easily with the ifconfig command.
So, how to juggle the settings smartly(and geekily!)?
1) At Desktop, create a file SetKamengLANSettings.bat(it's is similar to the shell script of linux) with the following line:
netsh interface ip set address "Local Area Connection" static 10.9.2.156 255.255.0.0 10.9.0.254 1
2)create a file SetNACLANSettings.bat with the following line:
netsh interface ip set address "Local Area Connection" static 172.16.25.200 255.255.0.0 172.16.24.254 1
(replace IP , subnet mask and gateway addresses to match the settings of your hostel/lab in the above 2 commands.)
The above steps are required only once. Now all u have to do is following:
when u reach hostel, double click at the file "SetKamengLANSettings.bat"
when u reach NAC, double click at the file "SetNACLANSettings.bat"
Note: There is a minor twist in Windows Vista due to UAC: instead of double clicking, u need to rightclick the file and click at "Run as administrator" in the popup menunetsh
Showing posts with label netsh. Show all posts
Showing posts with label netsh. Show all posts
Friday, April 3, 2009
Subscribe to:
Posts (Atom)
