DonationCoder.com Software > Finished Programs
DONE: Static IP address changer
thomthowolf:
I frequently need to interface with different networks, some with DHCP and some that require static IP addressing. I would love a simple set of buttons that I could set up with the most common Static IP addresses I use, and then easily change back to DHCP.
mouser:
there are some good utilities to switch between network configurations now - most helpful if you have a laptop that switches networks. Netswitcher is one but there are others.
cettolox:
To set dhcp I have a dhcp.bat file that contains:
netsh -f dhcp.txt
and a dhcp.txt file like this:
# ----------------------------------
# Interface IP Configuration
# ----------------------------------
pushd interface ip
# Interface IP Configuration for "Local Area Connection"
set address name="Local Area Connection" source=dhcp
set wins name="Local Area Connection" source=dhcp
popd
# End of interface IP configuration
Then for any fixed IP config eg 192.168.0.10) you can use a fixIP.txt like the following:
# ----------------------------------
# Interface IP Configuration
# ----------------------------------
pushd interface ip
# Interface IP Configuration for "Local Area Connection"
set address name="Local Area Connection" source=static addr=192.168.10 mask=255.255.255.0
set address name="Local Area Connection" gateway=192.168.1 gwmetric=0
set dns name="Local Area Connection" source=static addr=212.245.255.2
add dns name="Local Area Connection" addr=??.??.??.?? index=2
add dns name="Local Area Connection" addr=??.??.??.?? index=3
set wins name="Local Area Connection" source=static addr=none
popd
# End of interface IP configuration
/Stefano
bad_man:
how can i download it :(
app103:
how can i download it :(
-bad_man (November 07, 2006, 05:56 AM)
--- End quote ---
Just copy this to a text file and name it dhcp.bat:
--- ---netsh -f dhcp.txt
then copy this to a text file and name it dhcp.txt:
--- ---# ----------------------------------
# Interface IP Configuration
# ----------------------------------
pushd interface ip
# Interface IP Configuration for "Local Area Connection"
set address name="Local Area Connection" source=dhcp
set wins name="Local Area Connection" source=dhcp
popd
# End of interface IP configuration
Then for any fixed IP config eg 192.168.0.10) you can use a fixIP.txt like the following:
--- ---# ----------------------------------
# Interface IP Configuration
# ----------------------------------
pushd interface ip
# Interface IP Configuration for "Local Area Connection"
set address name="Local Area Connection" source=static addr=192.168.10 mask=255.255.255.0
set address name="Local Area Connection" gateway=192.168.1 gwmetric=0
set dns name="Local Area Connection" source=static addr=212.245.255.2
add dns name="Local Area Connection" addr=??.??.??.?? index=2
add dns name="Local Area Connection" addr=??.??.??.?? index=3
set wins name="Local Area Connection" source=static addr=none
popd
# End of interface IP configuration
then put them all in the same folder...or on your desktop.
replace the ??.??.??.?? with the appropriate IP's
Navigation
[0] Message Index
[#] Next page
Go to full version