Would be easier to address if you gave us some information on your operating system. If you are in linux you could set up two network configuration files on slackware the file is /etc/rc.d/ rc.inet1.conf
CODE
Config information for eth0:
IPADDR[0]="192.168.1.125"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]="no"
DHCP_HOSTNAME[0]=""
...
.....
...
# Default gateway IP address:
GATEWAY="192.168.1.1"
As yu can see there are settings for the address, using DHCP and the default gateway. there are many more entries in the file for how ever many interfces you may have. open the file in your favorite editor and set it up for a fixed IP by entering your config in the appropriate lines. save this file as rc.inet1.fixed
now remove the mask, address and gateway values and replace the value for "USE_DHCP[0]" to "yes."
Save this file as rc.inet1.dhcp. you can now write a simple shell script to copy the proper file to rc.inet1.conf.
CODE
#!/bin/sh
cp /etc/rc.d/rc.inet1.$1 /etc/rc.d/rc.inet1.conf
save it as chnetconf, or whatever, chmod it to 755 and call it with "chnetconf (fixed or dhcp)"
This is all real basic and there are other aspects to consider such as user rights and chmodding the files to writable, etc. but if you'e linux geek it oughta be cake
IF, you have windoze:
You'll have to be comforatable working in regedit
you can export the TCPIP configuration for your fixed ip config from within regedit to a fixed.reg file then go in through control panel and change the config to DHCP and export the settings again to a dhcp.reg file.
These files can be double clicked to update the registry for the desired effect or, yu can write a .cmd file to call regedit with the proper file name depending on the desired effect. My Windoze is rusty so do a little msn search on "parameters in .cmd files" for your answer to that one.
I'd just put shortcuts to the .reg files on the desktop or in the menu with labels like 'Change to DHCP" & "Change to Fixed IP"
Comment/Reply (w/o sign-up)