Multiple LAN Connections?

G

Guest

OK, with one NIC installed can WinXP Pro SP2 be set up to have multiple LAN
Connections?

We have a need to do this because we use different IP settings on special
machines and having to manually change them each time is time consuming. It
would be nice to just have multiple connections and enable/disable as needed.
 
G

Guest

It would seem to me that running a script to change the IP would be just as
easy as enabling/disabling the lans.

---assignIP.vbs--
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")

strIPAddress = Array("192.168.0.1")
strSubnetMask = Array("255.255.255.0")
strGateway = Array("192.168.1.100")
strGatewayMetric = Array(1)

For Each objNetAdapter in colNetAdapters
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways = objNetAdapter.SetGateways(strGateway, strGatewaymetric)
If errEnable = 0 Then
WScript.Echo "The IP address has been changed."
Else
WScript.Echo "The IP address could not be changed."
End If
Next
---end file--
 
G

Gordon

Tecknomage said:
OK, with one NIC installed can WinXP Pro SP2 be set up to have multiple
LAN
Connections?

We have a need to do this because we use different IP settings on special
machines and having to manually change them each time is time consuming.
It
would be nice to just have multiple connections and enable/disable as
needed.


If you go to Properties of the Network Connection, highlight TCP/IP
connection and click Properties it gives you the option of an alternative
configuration. That's only two though, if you need more.....
 
G

Guest

Gordon said:
If you go to Properties of the Network Connection, highlight TCP/IP
connection and click Properties it gives you the option of an alternative
configuration. That's only two though, if you need more.....

We know that. That is exactly what we do now. What we are looking for is a
one-click way to change a Connection. The answer should be that WinXP allow
multiple LAN connections as long as the settings were different.

From what I see in Help, you can set only one LAN Connection for a given NIC.
 
G

Guest

Tecknomage said:
We know that. That is exactly what we do now. What we are looking for is a
one-click way to change a Connection. The answer should be that WinXP allow
multiple LAN connections as long as the settings were different.

From what I see in Help, you can set only one LAN Connection for a given NIC.

A shot in the dark, what about try to bridge these LANs connection, or if
you have a router try the IP routing.
On the Bridging Multi-LAN read this:
http://www.microsoft.com/technet/prodtechnol/winxppro/plan/xpbrdgnt.mspx

That If I understood you rightly.
HTH.
Regards,
nass
 
G

Guest

-setDNSonCompanycom .vbs--
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colNetCards = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each objNetCard in colNetCards
Wscript.Echo objNetCard.SetDNSDomain("company.com")
Next
---end file--
 
G

Guest

Thanks

Mark L. Ferguson said:
-setDNSonCompanycom .vbs--
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colNetCards = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each objNetCard in colNetCards
Wscript.Echo objNetCard.SetDNSDomain("company.com")
Next
---end file--
 
G

Guest

Thanks, and I am putting the link you provided in Favorites, but that's not
what we need.

The systems in question have only one NIC = one LAN connection. When we
test various software we need to change the IP/DNS structure from our
corporate network to the test requirements. I was just looking for an easier
way to do this, other than manually changing the properties of the LAN
connection every time.

I may try VPN for the test setups and use the LAN for corporate connection.
We would just disable the LAN connection during software tests.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top