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.

    Switching between IP and DNS settings on a LAN connection

    Discussion in 'Windows OS and Software' started by ravenmorpheus, Nov 25, 2009.

  1. ravenmorpheus

    ravenmorpheus Notebook Deity

    Reputations:
    26
    Messages:
    846
    Likes Received:
    0
    Trophy Points:
    30
    Hey there

    I'm currently using Win 7 on may laptop and I'm starting to use it at work.

    Problem is I keep having to change my LAN settings when I get home because I don't require a fixed IP/DNS setting at work but I do at home as I use my laptop to stream media to my Xbox 360 as well as use XBLive via my laptops internet connection.

    Would anyone know of a way to change the IP and DNS settings in the IPv4 properties in a simple quick way, such as using a batch file or something similar?

    Thanks in advance. :)
     
  2. newsposter

    newsposter Notebook Virtuoso

    Reputations:
    801
    Messages:
    3,881
    Likes Received:
    0
    Trophy Points:
    105
    google (and searching here) is your friend

    look for netsetman
     
  3. ravenmorpheus

    ravenmorpheus Notebook Deity

    Reputations:
    26
    Messages:
    846
    Likes Received:
    0
    Trophy Points:
    30
    Ah thank you. I find unless I know what I'm looking for google and searching are usually fruitless.

    Although I have been but I've come across various answers, none of them the same. netsh seems to be one solution.

    I shall google for netsetman and see what I find though.

    Thanks you. :)
     
  4. ScuderiaConchiglia

    ScuderiaConchiglia NBR Vaio Team Curmudgeon

    Reputations:
    2,674
    Messages:
    6,039
    Likes Received:
    0
    Trophy Points:
    205
    1. Control Panel
    2. Network Sharing Center
    3. In the left pane "Change Adapter Settings"
    4. Right click on "Local Area Connection" and select properties
    5. Select Internet Protocol Version 4 (TCP/IPv4) and click properties
    6. You will see a tab labeled "Aternate Configuration".

    Once there hit the F1 key for more info. It describes the EXACT scenario you have, an office with DHCP and a home with a fixed IP address.

    Gary
     
  5. SDreamer

    SDreamer Notebook Consultant

    Reputations:
    23
    Messages:
    220
    Likes Received:
    0
    Trophy Points:
    30
    I just took a look at that, don't quite understand how it works. I understand how it works when it comes to home and work. But I have 3 locations I go to sometimes more public locations. Here is my scenario. I have fixed IP/DNS at home, and at my apartment at school, but school doesn't have fixed IP, same with public areas such as Starbucks or Borders. Is there a solution in Windows like this? I noticed I can enter all the gateways, fixed IPs, and DNS in Advance part of the general tab, but how would I handle the DHCP allocated IPs?
     
  6. ravenmorpheus

    ravenmorpheus Notebook Deity

    Reputations:
    26
    Messages:
    846
    Likes Received:
    0
    Trophy Points:
    30
    Thank you for the advice guys but netsetman doesn't appear to work (it comes up with an error on the IP, could that be because I'm doing this without a LAN connection actually plugged into my laptop?) and using the alternate configuration tab method doesn't work either as the Xbox 360 doesn't recognise it is plugged into my laptop.

    Here are the settings I have to use for my Xbox 360 to access the internet in order to use Live -

    IP
    IP address 192.168.0.1
    Subnet mask - 255.255.255.0

    DNS

    Preferred DNS server - 149.254.192.126
    Alternate DNS server - 149.254.201.126

    I have to put those in the general tab for the Xbox 360 to connect to Live and I don't use a default gateway hence the lack of that in the above details and when I do the alternate configuration tab disappears.

    The office LAN requires me to leave the IPv4 on Obtain an (IP address /DNS server address) automatically, as I understand it, with my postage stamp full of networking knowledge, that is because the office LAN is a DHCP connection, whatever one of those is.

    At the moment I have the settings above that I use at home with my Xbox 360 saved as a text file on my desktop and it is becoming a pain in the a to keep manually switching them. :(
     
  7. makaveli72

    makaveli72 Eat.My.Shorts

    Reputations:
    1,235
    Messages:
    2,108
    Likes Received:
    0
    Trophy Points:
    55
    Guys this is really easy and the answer to your issue is right in post #4. If I understand correctly what your needs are.

    Once you complete step #5 by clicking the Properties on Internet Protocol you should leave that set to "Obtain IPs Automatically...." for both the top and bottom section. That will handle all issues with HotSpots and such that hands out IPs Automatically and not Statically. So in your case raven when you go to work you will automatically be connected to your works' network due to that setting.

    Now the Alternate Tab is where you would set Static IP Addresses for your home network raven. When at home your Router and Computer will start to talk to each other and your computer should basically ask the Router to use those alternate IP settings and should connect automatically.

    PS: raven why not just get a Wireless Router and the WiFi adapter for the Box?

    Also, +rep to Scuderia.
     
  8. ravenmorpheus

    ravenmorpheus Notebook Deity

    Reputations:
    26
    Messages:
    846
    Likes Received:
    0
    Trophy Points:
    30
    Because I don't have anywhere to put one (my room is already cluttered with wires and junk as it is) and I don't currently have the funds to buy one.

    I am using a patch cable straight from the Xbox 360 to my laptop, and I use a mobile internet dongle as I use it at work and at home and don't have the funds for a fixed home line as well. So a wireless router is redundant as I don't have a fixed home broadband connection.

    My bad as I did not mention that. :)

    However I have just tried the Alternate configuration tab method, as previously stated and the Xbox 360 wouldn't connect to Xbox Live. :(
     
  9. SDreamer

    SDreamer Notebook Consultant

    Reputations:
    23
    Messages:
    220
    Likes Received:
    0
    Trophy Points:
    30
    So, if I understand this correctly, the Alternate Tab is for static IP, but you can only input one correct? So in my case, I wouldn't be able to use it really if I wanted to use two static ip?
     
  10. surfasb

    surfasb Titles Shmm-itles

    Reputations:
    2,637
    Messages:
    6,370
    Likes Received:
    0
    Trophy Points:
    205
  11. JohnnyFlash

    JohnnyFlash Notebook Virtuoso

    Reputations:
    372
    Messages:
    2,489
    Likes Received:
    11
    Trophy Points:
    56
  12. surfasb

    surfasb Titles Shmm-itles

    Reputations:
    2,637
    Messages:
    6,370
    Likes Received:
    0
    Trophy Points:
    205
    Or you could write an AutoKey script if you want something more elegant.
     
  13. SDreamer

    SDreamer Notebook Consultant

    Reputations:
    23
    Messages:
    220
    Likes Received:
    0
    Trophy Points:
    30
    Thanks, that's what I was looking for. I'll see if I can put it into my Autohotkey script. Thanks!

    EDIT: Noticed in Task Scheduler, under the conditions tab you can start tasks based on connection, and its by network name (usually the SSID). So if you pair this with the batch files, I think one would be able to make an automated process of changing IPs depending on the network connection. From my experience, one can connect to networks, but isn't issued an IP in the range of the network, does not get internet access (example: join a network, and you don't get an IP in the range of the network, you're still connected but you don't have internet access really or access to the network), thus Task Scheduler kicking in because of this condition, running the batch files to change the IP. I guess it's worth a shot.