1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Switching between Static and Dynamic IP easily

Discussion in 'Networking Issues' started by ediggity, Mar 2, 2005.

  1. ediggity

    ediggity Network Guru Member

    Here is something that I can't figure out. I have my notebook set up to use a static ip address at home, but I need DHCP config for when I bring it to starbucks or somewhere else. How do I configure my connection to easily switch between static and DHCP without having to re-enter all the static ip information everytime I switch back from DHCP to static IP? I prefer static at home because my computer boots up so much quicker that way and the connection seems a little more stable with static ip when transferring large files. :?: :?: :?: :?:
     
  2. bluedog

    bluedog Network Guru Member

    I have a WRT54G and I use Satori firmware to assign a static DHCP address for my laptop at home. That way when I travel, I don't have to mess with configurations as much...

    Don't know if that helps or is what you are looking for...

    The other thought is Mac(intosh)s allow you to have different network configs.. At least they did back in OS 9. =)
     
  3. ediggity

    ediggity Network Guru Member

    After digging around Google, I have found the simplest answer to change my laptop tcp/ip settings with a batch file using the netsh command.

    To change from a Static IP to DHCP addressing, make a bat file with the following:

    netsh interface ip set address "Wireless Network Connection" dhcp
    netsh interface ip delete dns "Wireless Network Connection" all


    To change from a DHCP to Static IP addressing, make a bat file with the following:

    netsh interface ip set address "Wireless Network Connection" static <static ip address> <subnet mask> <gateway ip> <metric>
    netsh interface ip add dns "Wireless Network Connection" <DNS address 1>
    netsh interface ip add dns "Wireless Network Connection" <DNS address 2>
    netsh interface ip add dns "Wireless Network Connection" <DNS address 3> index=1

    Note: change "Wireless Network Connection" to whatever your adapter name is that you want to change. Keep the quotes. Also, change all the items between the <> with your info but leave out the <>
     

Share This Page