Set up multiple network interfaces in Windows XP

Huge area to cover, we have assembled and written tutorials that have proven helpful over time.

Set up multiple network interfaces in Windows XP

Postby weazy » Wed Jul 23, 2003 9:14 pm

The age of a single network interface with a single IP address assigned to it is quickly coming to a close. 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. I’ll show you how to set up and manage multiple network interfaces in Windows XP.
TCP/IP is the protocol of choice
Because almost every significant operating system is set up to make use of TCP/IP by default, I’ll focus on that protocol in this article. I won’t be discussing IPX/SPX or NetBEUI.

The scenarios
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

Image

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

Image
A single PC connected to two networks with one adapter

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

In the third, you have a single network adapter but connect to multiple networks (Figure C). For example, you could have a remote small office network with a DHCP-assigned RFC 1918 address, but also you would 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.

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 Mindspring 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
Image

A listing of all of 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 lessen this problem (see sidebar for more information) http://www.techrepublic.com/utils/sideb ... tm&index=1, install the Microsoft RIP Listener Service http://www.microsoft.com/windows2000/en ... fault.asp? , which will allow your XP workstations to receive dynamic routing table updates from your routers and build a routing table automatically.

To see IP addressing information, I issue the command ipconfig /all at the command line. Listing A http://www.techrepublic.com/utils/sideb ... tm&index=2 shows the results for the two physical network adapters in my machine.

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, XP will use the appropriate interface. When attempting 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
For the remainder of this article, 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
Image

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

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

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
Image

This is the 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

Image

These are 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.
--The Devil is in the Details--
User avatar
weazy
Ex-Admin
 
Posts: 1688
Joined: Sun Jul 07, 2002 10:02 am
Website: http://www.hackerthreads.org
Location: any given

Return to “%s” Windows Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests

cron