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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple networks using one nic 1

Status
Not open for further replies.

spudnuts

Technical User
Sep 30, 2002
123
US
I've got a problem, I have a user that needs to be able to connect to two separate networks using just one nic. Here's the deal.

At work, the user docks his notebook and has a static IP through our firewall.
At home, the user is undocked and uses DHCP through his broadband connection to connect to a VPN.

I've tried two hardware profiles (Docked and Undocked) but the nic TCP/IP config stays at whatever was setup last. How can I set XP up so when he's docked, the nic uses the static IP's and when he's undocked it moves to the dynamic IP config?

Thanks

Information Assurance,CCNP,CST
 
Use the alternative configuration available (Connection properties/TCPIP/Properties/Alternative Configuration)

Set that to the static configuration, leave the other on automatic.
 
What "Alternate Configuration"? When I go to TCP/IP properties, I don't see an alternate configuration.

Information Assurance,CCNP,CST
 
Have a batch file I created for some people I work with that do the same thing. There are a couple areas you'll have to fill in your own information. Where it says IP address, put in the static IP. Same for the Subnet mask and Gateway. Also, make sure that "Local Area Connection" is what it says in "My network places" properties. The below will ask if they are at work or home and then change the IP Accordingly. Just save the below at a .bat file. Hope this helps:

@ECHO OFF
set /p where=Are you at Home or Work? (h/w)
IF %WHERE%==h GOTO :HOME
IF %WHERE%==w GOTO :WORK

EXIT

:WORK

netsh interface ip set address name="Local Area Connection" source=static addr=IP ADDRESS GOES HERE mask=SUBNET MASK GOES HERE gateway=GATEWAY GOES HERE gwmetric=1

PAUSE

EXIT

:HOME

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

PAUSE

EXIT

 
Now this is where the ability to post a screen shot would be nice.

In Control Panel - Network Connections, right click on the nic in question.
Scroll down to Internet protocol (TCP/IP)
Click on it to select it, then click on properties
Then you should have two tabs - general & alternate.

If you don't - I'm lost!
 
I don't have an alternate, I think i'll use the batch file. I'm wandering if there is a way to add dynamic/static DNS in there also?

Can I set that in the boot.ini file or just have the user run it when they log in their machine?

Thanks much.

Information Assurance,CCNP,CST
 
I have never witnessed a situation where the alternate tab is missing. Not in XP or 2000 anyway. I wonder if anyone can throw any light on why that is the case. Because once set up the connection is automatic, both at home and in the office.
 
I think the "Alternative Configuration" tab is not available if you don't check "Obtain an IP address automatically" and have the Static IP address option checked instead.


How to use the Alternate Configuration feature for multiple network connectivity in Windows XP

Networking question (one adapter, multiple connections?)
thread779-1149240
 
So far nothing has worked but the batch file so i'm going with that. If anyone see's anything wrong with this, please let me know.

@ECHO OFF
set /p where=Are you at Home or Work? (h/w)
IF %WHERE%==h GOTO :HOME
IF %WHERE%==w GOTO :WORK

EXIT

:WORK

netsh interface ip set address name="Local Area Connection" source=static addr=IP Address mask=SUBNET MASK gateway=GATEWAY gwmetric=1
set dns name="Local Area Connection" source=static=PRIMARY DNS register=primary
set wins name="Local Area Connection" source=static=PRIMARY WINS register=primary
set wins name="Local Area Connection" source=static=SECONDARY WINS register=secondary

PAUSE

EXIT

:HOME

netsh interface ip set address name="Local Area Connection" source=DHCP
set dns name="Local Area Connection" source=DHCP register=primary
set wins name="Local Area Connection" source=DHCP
ipconfig /release
ipconfig /renew
ipconfig /all

EXIT

Thanks

Information Assurance,CCNP,CST
 
You don't have to do the DNS, Wins or ipconfig /release and renew. It does it automatically when you change to DHCP.
 
if you're not the admin, the tcp/ip protocol would be greyed out. in large networks, admins restrict your access to tcp/ip.
 
I tried leaving the DNS out but it would keep the old DNS addresses listed when I switched to DHCP. I'm just waiting for the user to come back from lunch to test it. I'm going to try it like it is and if it works I might widdle it down. Can I add that batch file to the boot.ini so that the question comes up at boot?

alidabiri, I have admin rights.

Thanks

Information Assurance,CCNP,CST
 
I doubt you can add something like that to the Boot.ini.

What about logon scripts or Scheduled Tasks? They might be a better alternative?
 
How about splitting that batch file into two - one for home, one for work and putting shortcuts to them on the desktop? One called something like - 'Home network' and the other 'Work network'.

However. It seems you don't get the alternate tab if you don't have the general tab configured as automatic.

1 Go to Start | Control Panel | Network Connections.
2 Right click the icon for your connection and select Properties.
3 On the General tab, scroll down and double click Internet Protocol (TCP/IP).
4 On the General tab, select Obtain an IP address automatically (this configures the computer for the network that uses DHCP).
5 Click the Alternate Configuration tab (this tab does not appear if you don't have the General tab configured as described in step 4).
6 Select the User configured option, then type in the TCP/IP information for the network that uses a static address (IP address, subnet mask, default gateway and preferred DNS and WINS servers).
7 Click OK twice to close the dialog boxes.

I suspect that you are trying to configure this PC at work and so as DHCP is not available and a connection is not made, XP does not create the alternate tab! Perhaps if you set it up as automatic and the user connects OK at home, when they return to work the alternate tab will be there to use?

Just a thought.




 
Yeah alternate tab is there, everything seems to be working just fine now. Thanks for your help everyone.

Information Assurance,CCNP,CST
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top