Switching IPs using scripts
Posted on December 20th, 2007 in Networking | No Comments »
Mobile users will usually move across many networks, and it is really frustrating to change the IP configuration each time they connect to certain network. So why not automating this by writing a small script?
We will assume two scenarios. In the first, which is the easiest, we assume that there exists a DHCP server on the network leasing IPs and making our life easier. While in the second scenario we assume that we have to specify our IP address manually along with the default gateway and DNS server. Here’s how it can be done.

