The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Dynamic IP AND Static IP?

    Discussion in 'Networking and Wireless' started by Sprintguy1376, Apr 30, 2008.

  1. Sprintguy1376

    Sprintguy1376 Notebook Consultant

    Reputations:
    18
    Messages:
    295
    Likes Received:
    0
    Trophy Points:
    30
    Hey what's up guys. I just have a question involving the wireless networking involving Windows Vista Business. I go between my dorm room and home pretty often and they're two different wireless connections (obviously). For my home I use a static IP address and when I'm at my dorm I have an IP given to me. I find it really annoying that I have to keep switching my settings every time I go back and forth from home to my dorm. Is there any way I can set up my wireless so that when it connects to my University network it obtains it's IP automatically and when I go home I keep my static IP?

    In case you're wondering, I need the static IP for port forwarding, or I'd just always leave the settings on obtain IP automatically. Thanks
     
  2. blue68f100

    blue68f100 Notebook Virtuoso

    Reputations:
    1,020
    Messages:
    3,439
    Likes Received:
    0
    Trophy Points:
    105
    Why don't you use reserved IP to assign your Static IP with the router setup in DHCP. Most routers have this feature, they do call it different names though, IP Mapping is another . It is usually found under the Lan side (adv) configuration. Sometime where you can assign group names to hardware. The way it works it looks at your mac address, and assigns it the IP based on the rule/table. I have most all of my DHCP (reserved) this way I don't have to use static IP's. And I know what IP address the hardware will be at.

    Some routers allow you to use the MAC address inplace of an IP in the port forwarding setup. Not common though.
     
  3. surfasb

    surfasb Titles Shmm-itles

    Reputations:
    2,637
    Messages:
    6,370
    Likes Received:
    0
    Trophy Points:
    205
    I was gonna attach a script to my post til I saw Blue's post. This is a far easier and simpler solution. There is a VBscript I remember downloading that swapped your network settings from DHCP to static and back. If you prefer this long script, I'll dig it up here....
     
  4. Sprintguy1376

    Sprintguy1376 Notebook Consultant

    Reputations:
    18
    Messages:
    295
    Likes Received:
    0
    Trophy Points:
    30

    So just to verify... Using this, the router at home will always give me the same IP address without me having to set it to static on my laptop?? I am not very familiar with networking so forgive my ignorance xP

    And thanks surfasb, I'm gonna try this method first since it seems easiest. But if I'm too stupid to figure this out I'd love that script... unless it requires more intelligence...
     
  5. Sparky 1720

    Sparky 1720 Notebook Consultant

    Reputations:
    39
    Messages:
    286
    Likes Received:
    0
    Trophy Points:
    30
    I have such a script too but can transfer it to a .net windows app to toggle back and forth between static/dhcp. Its not long or slow though, not sure if surfsab means length of time or code? Its only about 5 lines of code.
     
  6. sipp11

    sipp11 Notebook Consultant

    Reputations:
    25
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    30
    That's correct.
     
  7. surfasb

    surfasb Titles Shmm-itles

    Reputations:
    2,637
    Messages:
    6,370
    Likes Received:
    0
    Trophy Points:
    205
    It is more than the five lines, so it would take a while for me to type out again. I just have no idea where I stashed the script and will probably just google to find a similiar one.

    Edit: So i found out there is no need for a friggin VBscript. I'm just a retard. You can use netsh. Type this into notepad:

    netsh interface ip set address " Local Area Connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1

    All that is one line. Change the Local area connection to the name of your wireless adapter in qutoes. You can see the name of your NIC by typing ipconfig. The first few lines should show the name of your NIC, which mine is "Wireless Network Connection". The Red number is your IP address. The Green number is your Subnet address. And the Cyan numbers is your gateway address. The last number is a metric. Just leave it 1 or 0.

    save that as Location Home.bat in a folder you can find :)

    Open a new file and type this into notepad

    netsh interface ip set address " Local Area Connection" dhcp

    Again, change Local area connection to the name of your NIC. Save this as Location University.bat

    Drag shortcuts to your desktop and you are ready to go. But seriously, Blue's advice is easier. That way you don't have to do any interaction at all to setup your computer.
     
  8. Sprintguy1376

    Sprintguy1376 Notebook Consultant

    Reputations:
    18
    Messages:
    295
    Likes Received:
    0
    Trophy Points:
    30
    Alright Awesome! These are 2 really great options I have. I'm gonna try Blue's method first and see how it goes. If it doesn't work then I'm gonna try Surfasb's method. Thanks to all of you, I really appreciate all the help.