Networking optimize

How do I... set up multiple network interfaces in Windows XP?

Working with multiple adapters in Windows XP can be a little intimidating at first, but it gets easier once you get into it. Scott Lowe shows you how to set up and manage multiple network interfaces in Windows XP.

As more networks are rolled out and more computers are shipped with multiple connection methods, the need for a workstation to participate in more than one network is becoming more common. Working with multiple adapters in Microsoft Windows XP can be a little intimidating at first, but it gets easier once you get into it.

This blog post is also available in PDF format in a TechRepublic download.

There are three scenarios that would require you to use more than one network interface on a machine. In the first, you're physically connected to two separate networks; this would obviously require multiple network adapters (Figure A).

Figure A

A single PC connected to two networks with separate adapters
In the second, you have two separate IP networks at the office and need to be able to access both of them (Figure B).

Figure B

A single PC connected to two networks with one adapter
In the third, you have a single network adapter but are connected to multiple networks (Figure C). For example, you could have a remote small office network with a DHCP-assigned RFC 1918 address, but you would also need to connect to your network at the main office via a VPN connection. In any case, you'd need to set up XP to recognize any and all of the networks that you participate in.

Figure C

A single PC connected to two networks with one adapter but two connections

The language

You can reduce possible confusion by keeping a couple of terms in mind while reading this article. An adapter is a piece of hardware that you install in your system or a piece of software that you install under XP that emulates a network adapter, such as the loopback network adapter. Connection describes an individual connection to a network. Depending on how your network is configured, this can include multiple addresses. I'll explain more about this later.

My configuration

I'm using a laptop with differing types of network adapters and connections so that I can show you a wide range of options. I have two physical network adapters installed -- an 11-Mbps wireless adapter and a fixed 10/100 jack on the side of the laptop. I also have a modem with a dial-up connection that I use when I'm on the road. Other than that, I have a whole host of virtual adapters and connections that I will also explain.

Showing them all

In Windows XP, all network connections -- dial-up, LAN, VPN, or FireWire (IEEE 1394) are shown in the Networking control panel. (Figure D)

Figure D

A listing of all the Windows XP network connections

You can see in Figure D that there are four categories of network interfaces under Windows XP. Dial-up connections are just that -- connections to a dial-up ISP. I have only one, and I use it when I can't connect to anything faster. Next on the list are my LAN or high-speed Internet connections. I have two adapters: an Intel 10/100-Mbps adapter and an 11-Mbps 802.11b D-Link wireless Ethernet adapter.

Next are Network Bridge adapters, which include my FireWire and VMware bridge network connections. Network Bridge connections work a little differently from other connections because they're assigned addresses from a pool reserved by the actual bridge adapter, which is a piece of software. Often, bridge connections are used to communicate between the host (the Windows XP machine) and the remote end -- a device such as a digital video camera or a certain kind of VMware session.

Finally, my VPN connections are listed. I almost always have one connection open to my work network when I'm working at home, and I keep Outlook running over it. (I've blacked out the name and IP address of the connection for security reasons.) The last connection is TechRepublic Tunneling Test, which I was using for testing.

Two physical connections

I'll first go over installing two separate network adapters in a Windows XP machine because they're the easiest to understand and troubleshoot. This connection method corresponds to Figure A.

In this scenario, there is a physical adapter for each individual connection on the machine. On the laptop that I'm using to write this article, these adapters could be considered the two physical jacks -- the wireless adapter and the one on the side of the machine.

I've configured the Intel adapter, which is wired directly to my home network, to use DHCP for its address and have provided a static address for the wireless adapter to use. However, I haven't provided the wireless adapter with a default gateway. Providing multiple default gateways to a Windows 2000 or XP machine can seriously confuse network issues, because the machine won't know which one is the real default gateway.

To see IP addressing information, I issue the command ipconfig /all at the command line. Listing A shows the results for the two physical network adapters in my machine.

Listing A -- Windows IP Configuration

Host Name . . . . . . . . . . . . : slowe-nb

Primary Dns Suffix . . . . . . . :

Node Type . . . . . . . . . . . . : Unknown

IP Routing Enabled. . . . . . . . : No

WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Intel 8255x-based PCI Ethernet Adapter (10/100)

Physical Address. . . . . . . . . : 00-20-E0-69-7F-AD

Dhcp Enabled. . . . . . . . . . . : Yes

Autoconfiguration Enabled . . . . : Yes

IP Address. . . . . . . . . . . . : 192.168.1.102

Subnet Mask . . . . . . . . . . . : 255.255.255.0

Default Gateway . . . . . . . . . : 192.168.1.1

DHCP Server . . . . . . . . . . . : 192.168.1.1

DNS Servers . . . . . . . . . . . : 209.183.205.35

209.183.192.65

Lease Obtained. . . . . . . . . . : Sunday, July 28, 2002 4:45:53 PM

Lease Expires . . . . . . . . . . : Wednesday, July 31, 2002 4:45:53 PM

Ethernet adapter Local Area Connection 5:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : D-Link DWL-650 11Mbps WLAN Adapter

Physical Address. . . . . . . . . : 00-05-5D-D9-69-30

Dhcp Enabled. . . . . . . . . . . : No

IP Address. . . . . . . . . . . . : 10.10.10.2

Subnet Mask . . . . . . . . . . . : 255.255.255.0

Default Gateway . . . . . . . . . :

NetBIOS over Tcpip. . . . . . . . : Disabled

This listing shows me the IP address, network mask, gateway, and almost all other information related to networking that I would need. Notice that the names of the connections correspond to the names in Figure D. I'm also told whether this is a DHCP-assigned address.

When I attempt to ping an address on either network, Windows XP will use the appropriate interface. When you try to traverse beyond the routers that connect the workstation to these networks, things become a little trickier. After the router, your Windows workstation has no way to determine what lies beyond. It only knows about what is directly connected to it, unless you provide it with static routes or install the RIP Listener Service. For this reason, one of your connections must include a default gateway. This is the device that your Windows XP workstation will consider its "next hop" on the network when you attempt to access services that are beyond your directly connected networks.

To modify an address on an adapter, bring up a list of network connections by selecting Start | Control Panel | Network Connections. If you're using Windows XP's default Category View, browse to Start | Control Panel | Network And Internet Connections | Network Connections.

Note: I will not be using Category View. I find it less efficient than the classic view of the Control Panel. Next, double-click the connection you wish to work with and click the Properties button to bring up the information related to that adapter. This screen will look similar to the one shown in Figure E.

Figure E

Adapter information
To bring up the TCP/IP properties, click TCP/IP and then click the Properties button. You will see a screen similar to the one shown in Figure F.

Figure F

TCP/IP properties

To change the TCP/IP address, enter the information you need and click OK.

Single NIC, multiple networks

Next on the list of complexity is connecting a workstation to two logically separate but physically connected networks, as shown in Figure B. This setup might occur, for example, if (1) you have separate departments using separate address spaces, (2) certain users need to be able to connect to services offered by both departments, and (3) everything is connected via switches with routers only at the edge of the network. This setup may also be done for security reasons, particularly when sensitive information is put on the network address space that isn't connected to the router that goes out to the Internet.

In any case, you'd need to be able to get workstations attached to both networks, which is actually a very easy task. First, decide which connection will have the default gateway. For the same reasons I mentioned earlier, using more than one gateway can be problematic. I always use the router with the connection out to the Internet as the default gateway because it lets me avoid adding routes to every host on the Internet -- that wouldn't be much fun.

Second, the address for the network connected to the Internet router must be assigned. When you assign multiple addresses to a NIC, they all must use static addressing. For my example, I'm going to use my wireless adapter and work with the IP addressing. I'll then statically assign the second address.

To accomplish this, I'll use a single network adapter with multiple network addresses. (You may have heard the terms "multihoming" or "binding multiple addresses" associated with this action.) To perform the action, bring up the TCP/IP properties for the network adapter that you wish to work with. On my system, the screen shown in Figure G shows my current configuration, with a single address assigned to the network adapter.

Figure G

Current configuration of my wireless adapter
To add an address, click the Advanced button, which will bring up a second properties screen, as shown in Figure H.

Figure H

Advanced TCP/IP properties

You need to work with three areas. The first is the IP Addresses section, which is where you'll add the second IP address. You can see in Figure H that there is already one address assigned. The second section lists the default gateways currently defined on the machine. You can see that a single gateway is already defined. Finally, the network metrics section defines the order in which network information will be used. This information can be used to alleviate problems with multiple default gateways, but it isn't always 100 percent reliable.

Adding a second address

To add the second address, click the Add button in the IP Addresses section of the window. You'll be presented with a window that asks for the IP address and subnet mask for the new address, as shown in Figure I.

Figure I

Adding a second IP address
That's all you need to begin accessing resources on the second network. Listing B shows the network parameters from an ipconfig /all command for this adapter. Notice that there are two entries for IP address now listed. This shows that Windows XP can communicate with both the 10.10.10 and the 10.10.11 networks over this single physical network connection.

Listing B

Ethernet adapter Local Area Connection 5:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : D-Link DWL-650 11Mbps WLAN Adapter

Physical Address. . . . . . . . . : 00-05-5D-D9-69-30

Dhcp Enabled. . . . . . . . . . . : No

IP Address. . . . . . . . . . . . : 10.10.11.2

Subnet Mask . . . . . . . . . . . : 255.255.255.0

IP Address. . . . . . . . . . . . : 10.10.10.2

Subnet Mask . . . . . . . . . . . : 255.255.255.0

Default Gateway . . . . . . . . . : 10.10.10.1

NetBIOS over Tcpip. . . . . . . . : Disabled

Other types of connections

Windows XP can also work with other types of connections, such as VPN adapters, as evidenced by Figure D. In essence, these types of connections make use of one of the actual physical connections but show up as a separate, virtual connection, as shown in Figure C.

In the example shown in Figure D, a VPN connection was established over the WAN Miniport (PPTP) to a specific IP address. The WAN Miniport is a virtual port established in XP for just this purpose. The ipconfig /all listing for this connection is visible in Listing C. The IP addressing information in Listing C is DHCP assigned from the VPN server in my office, as are the remaining parameters, such as DNS servers and WINS information. Other than the fact that it is a software adapter and uses a real adapter to do its work, the VPN adapter works like the other adapters I have shown you.

System tray tip

Finally, I find it useful to enable icons in the system tray to get at-a-glance information about my network connections without having to open the Networking control panel (Figure J).

Figure J

Network information in the system tray

This information is more useful if you rename the network connections with something more descriptive than Local Network Connection. You can enable a system tray icon for any adapter -- hardware- or software-based -- by selecting the Show Icon In Notification Area When Connected check box on the properties page for the adapter.

About

Since 1994, Scott Lowe has been providing technology solutions to a variety of organizations. After spending 10 years in multiple CIO roles, Scott is now an independent consultant, blogger, author, owner of The 1610 Group, and a Senior IT Executive w...

14 comments
dryd
dryd

Great article. Only a few days ago did I put and extra NIC in my system! So yes, very timely indeed. I have been labouring under the misunderstanding that each network needs it's own subnet mask. But from your article, I am given to understand that this is not so. Could you elaborate a little on the topic of subnet masks for me, and what aspect of the IP address that actually does separates the networks please? Kind regards. -Adrian

pgit
pgit

You need to replace your BIOS battery... =) But seriously, thanks for the info. Couldn't be more timely, I have to put two adapters in an XP machine tomorrow, I planned on just winging it. Now, both networks are using DHCP. Is this going to create two default gateways? You mentioned that can be a bear, but didn't elaborate...

derek
derek

Out in the field I regularly have to shift between networks and configurations. For me, having to go through the steps above (WHICH IS EXACTLY how I do it), also needs another suggestion. Personally, I would only like to do this ONCE so I use, NetSetMan, which allows me to set up (for free) 6 profiles, that are easily switched by selecting a TAB and hitting ACTIVATE... I mean if your going to do all that typing, why not only do it once... http://www.netsetman.com/

Tom Wind
Tom Wind

I have two networks, both have access to internet. One of them works via vpn. how to force windows to use vpn connection for work stuff (email, sites which are available only via vpn), and other connection for other things (for example viewing www.techrepublic.com which is blocked at work)

richard.bertolett
richard.bertolett

Adrian, I think maybe you misunderstood one of the points in the article. You always have to provide a subnet mask, but you don't always have to provide a Default Gateway. In IPv4 Addressing and subnet masking can be confusing at first. Tech Republic has some great resources to help you over the hump. I would start with the basics in this article: http://articles.techrepublic.com.com/5100-10878_11-5778292.html Cheers, Rick

pseudopygrapha
pseudopygrapha

The article covers attaching two networks through the same adapter. With two adapters, each will have its own configuration interface and each may be connected to a different gateway.

The 'G-Man.'
The 'G-Man.'

sounds like you are looking to get around the blocking software on the network. Not something I will help with, sorry.

jwebfoot2togo
jwebfoot2togo

I have two boxes running Vista. I have 108mbs wireless cards in them yet everytime I connect it uses the Athos driver native to Vista and not the 108. End result I'm connecting at 54 mbs. Have tried disabling and removing the Athos through control panel but at re-boot it reverts to using it. Any ideas how I can completly disable the driver?

balboa41
balboa41

There is an easy way to accomplish that task, but, most security experts recommends not doing this, because this could be a potential risk for any company. For using your default gateway for accessing the Internet while still accessing the services at your company through VPN, do this: Go to the networks connections properties for the connection you are using for VPN, open "Internet Protocol TCP/IP". Click on "Advanced" and then on "IP Settings" unclick the option "Use default gateway on remote network". Then click ok on all the windows. That is all, but as I told you, try not to do this at all costs. Jose Angel.

dziedzicmj
dziedzicmj

You have to be very careful, when you try to VPN connect to your work network and, at the same time, connecting to the Internet. This is a well documented security issue. Normally, when a VPN client is deployed, this "split" access is disabled. The main reason for avoiding this split connection is that if you have access to your Intranet and the Internet at the same time, it is quite possible to use your workstation to route traffic between the two networks. Keep in mind that if that happens, your internal network is not protected at all (you circumvented your corporate firewall and intrusion detection systems). But if you, _really_, want to proceed, you can assign a static route to your corporate network and define the default gateway on your "direct to Internet" adapter.

dryd
dryd

Hi Rick. Thanks for your reply and link. I read that page and will read the other pages it links to directly. I think I get what your saying though. I had thought default gateways were for connecting a router to the internet. But now I understand that they are for connecting *any* two networks together. Hence, not providing one will separate two networks, even if they have the same subnet mask. Is that correct? Cheers Rick. -Adrian.

dfd9880
dfd9880

Can I assume then that if i use my wireless with a default gateway and my wired connection without that, if I run a VMware virtual machine, the host XP OS would use the wireless connection and I could force the virtual machine to use the wired connection. If this is true and since I am new to VMware, how would I tell the XP OS in the virtual machine to use the wired connection and do I have to assign a default gateway to the wired connection from within the virtual machine??