Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

automatic DHCP and constant IP on the same laptop


  • Please log in to reply

#1
witek

witek

    New Member

  • Member
  • Pip
  • 1 posts
Hello
I aim to use the same laptop with windows XP both
* at work with defined: computer name,IP,mask,gate,DNS server
* at home with Internet Provider that requares default DHCP.
Each connection alone works ok. Unfortunately both use the same "Local area connection".
So, at work I have to define manually constant numbers for IP,mask,gate,DNS.
At home I have to remove it and set default=automatic.
I know IP(static) /Mask/Gate, but it works only with default DHCP.
I don't want to repeat network configuration 2 times a day.
I'd like something like two local area connections and just click the right one.

I use router D-Link DI-604, but that is independent from my question and router works fine.

Thanks for your help

Witek
[email protected]
  • 0

Advertisements


#2
Neil Jones

Neil Jones

    Member 5k

  • Member
  • PipPipPipPipPipPipPipPip
  • 8,476 posts
If you right-click on Local Area Connection, got to Properties -> Click on "Internet Protocol TCP/IP" and click Properties, there's a tab for Alternative Configuration, though its not clear from the context help whether this is what you're looking for. Give it a go, see what happens.
  • 0

#3
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
about the only way to simplify this process would be to use a wireless connection at home..windows doesn't do well with allowing you to create multiple lan connections....you could in theory...create a batch file that would set this for you ( i have no idea how to do that but i will research it)
  • 0

#4
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
found it.

find the SOLUTION FOR SETTING THE TCP-IP now to find how to Switch (turn on-of) XP firewall by batch commands? :tazz:




TCP_IP_setting.bat


rem Network Settings for Lab in Building Ch

netsh interface ip set address name = "Local Area Connection" source = static addr = 100.60.64.42 mask = 255.255.255.192

netsh interface ip set address name = "Local Area Connection" gateway = 100.60.64.2 gwmetric = 1

netsh interface ip set dns name = "Local Area Connection" source = static addr = 100.60.115.1

netsh interface ip add dns name = "Local Area Connection" addr = 100.60.116.1

netsh interface ip show config

pause


Let’s see what this short batch file does.

1st line: is just a remark, to remind me what this batch file is doing.

2nd line: defines the IP address of my laptop, and sets the corresponding network mask.

3rd line: sets the address of the gateway server.

4th line: first DNS server

5th line: second DNS server (optional)

6th line: shows the new configuration

7th line: waits for a keypress

__________________________________________

TCP_IP_setting_to_Automotic.bat


rem Home Net with DHCP

netsh interface ip set address name = "Local Area Connection" source = dhcp

netsh interface ip set dns name = "Local Area Connection" source = dhcp

netsh interface ip set wins name = "Local Area Connection" source = dhcp

netsh interface ip show config

pause


I hope this helps who are searching for my question...


basically make a text file named static and post this inside of it

rem Network Settings for work

netsh interface ip set address name = "Local Area Connection" source = static addr = <your work ip> mask = <your work netmask>

netsh interface ip set address name = "Local Area Connection" gateway = <your work gateway> gwmetric = 1

netsh interface ip set dns name = "Local Area Connection" source = static addr = <your work dns>

netsh interface ip add dns name = "Local Area Connection" addr = <your work dns 2>

netsh interface ip show config

pause


then save the file..and change the extension to .bat

then make one called DHCP and paste this in it

rem Home Net with DHCP

netsh interface ip set address name = "Local Area Connection" source = dhcp

netsh interface ip set dns name = "Local Area Connection" source = dhcp

netsh interface ip set wins name = "Local Area Connection" source = dhcp

netsh interface ip show config

pause

do the same as far as saving it and changing the extension
  • 0

#5
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
and they actually work..just tested them

on the end of the dhcp one...i added ipconfig /renew

and on the static one i threw in an ipconfig /all...so that it would prove i had the right address
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP