Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Networking question (one adapter, multiple connections?)

Status
Not open for further replies.

disord3r

Programmer
Apr 12, 2002
189
US
Lets' get the question out of the way first: Is it possible to have multiple network connections that both use the same physical ethernet adapter?

Background: I use my notebook to connect to many different networks. Two of them are DHCP networks, and the other two require static addresses. I find myself having to tweak the IP settings for my network connection just about every other day.

If it's possible to have multiple network connections, each with their own "profile" of settings so to speak, then I could simply enable the network connection that I need at that time.

Alternatively, someone suggested I might be able to do it through the registry, but I don't know how I could accomplish that. When I have an IP address statically assigned, I never find it in the registry. I suppose I could do something along the lines of a registry export between different Ip configurations and use something like regdiff to spot the difference, and create some .reg files to accomplish the "profiling" I'm looking for.

Is there an easier approach to doing this? Any software utilities that can do this so I don't have to reinvent the wheel?

Thank you in advance.


- Kevin
 
There are several ways to approach this. The simplest alebit sometimes the least functional is to use Windows XP inbuilt facility.

When You set the LAN connection to DHCP, you get an "Advanced" button at the bottom of the dialog box. Clikc that and it gives you an advanced IP configuration dialog. there you can add all the IP's and gateways you need for the static IP Lan's

In theory Windows should detect the lan and use the appropriate Address to set it up.


There are also applications out there that will let you switch between lan settings with the click of a button.

such as:

and




----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Thanks for the links. In searcing for some free alternatives, I came across a page about a utility called netsh.exe.


It's already on my computer, and I'm already putting it to use. I used the "netsh.exe -c" command to create two profiles in the root of my drive: dhcp.txt and work.txt (work is one of my static connections). I then created a batch file in my path called eth.bat with the following line:

"netsh -f c:\%1.txt"

If I issue the command "eth work", the batch file loads my work connection profile. If I usse the command "eth dhcp", it loads the dhcp profile. Very easy!
 
Glad to see you sorted it out, never even thougvh of the Netsh command. good thing to have.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top