Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have multiple network interfaces on a Windows client machine. I would like for some IP traffic to go through one card and other traffic to go through the other card based upon the IP (actually, I would prefer domain names) of the destination server.

I see no way to configure this using the Windows GUI.

Can I do this in WinXP+?

If it's complicated, then some pointers to good articles would be sufficient as my Googling skillz seems to fail here.

share|improve this question

2 Answers 2

You would use the 'route' command. Essentially you can tell you machine to send traffic to different gateways based on the destination IP range. Type "route" from cmd.exe to see usage behaviours.

Here's the output from "route print" on my local machine. You can see that since I have a VPN connection with split tunneling turned on, some networks (as defined by the VPN server) are destined to the VPN ( and some are destined to my local network interface (

C:\Documents and Settings\jj33>route print
Interface List
0x1 ........................... MS TCP Loopback interface
0x3 ...00 1f e1 3d 61 06 ...... Dell Wireless 1395 WLAN Mini-Card - Packet Scheduler Miniport
0x10005 ...00 1e 37 fc ca c8 ...... Bluetooth Personal Area Network - Packet Scheduler Miniport
0x100006 ...00 05 9a 3c 78 00 ...... Cisco Systems VPN Adapter - Packet Scheduler Miniport
0x120002 ...00 1d 09 d7 78 65 ...... Broadcom NetXtreme 57xx Gigabit Controller- Packet Scheduler Miniport
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
       25       1       1       1       1       1       1       1       20       1       25       25       25       25       1       25       25       1       1       1       25       25       1       1          120002       1           10005       1
Default Gateway:
Persistent Routes:

Now, all of those are dynamic routes. You could use the route command to replicate something similar though. Try Googling "adding static routes to windows" for more details

share|improve this answer

This question is similar, no matter what platform you're on. First, I'm going to make the assumption that you have two network adapters, and they are both connected to the same subnet. If they are connected to different subnets, the answer is similar.

An approach to the problem illustrated with an example:

Routing traffic based on IP


  • A1:
  • A2:
  • Default gateway on both:

Target addresses/networks and how you want to reach them:

  • via A1
  • via A2
  • via A1
  • via A2

This means that you want to set up the following direct and gateway routes. I'm using notation similar to what you would see using ip routes on Linux, for simplicity: dev A1 dev A2 via dev A1 via dev A2

The way to make these routes exist, how to reference the appropriate adapter, and how to make them persistent is dependent upon the OS you're using. I'll describe how to do this in XP.

First, you have to identify the interface number for each interface. As described by the previous answer, use route print. Suppose the first few lines show:

C:\>route print
Interface List
0x1 ........................... MS TCP Loopback interface
0x120002 ...00 1d 09 d7 78 65 ...... Broadcom NetXtreme 57xx Gigabit Controller
0x120003 ...00 1d 09 d7 78 66 ...... Broadcom NetXtreme 57xx Gigabit Controller

Assuming that you determined that 0x120002 was the adapter A1, and 0x120003 was adapter A2, you could then type the commands:

C:\> route -p add mask IF 0x120002
C:\> route -p add mask IF 0x120003
C:\> route -p add mask IF 0x120002
C:\> route -p add mask IF 0x120003

Using the -p option makes the routes persistent, which means that they will still be available after reboot.

Routing traffic based on domain name

For this, I would use the same approach, but segment the domain names into different subnets to make the route entries easier. For instance, using the data above:

  • mynetwork1.company.localnet =
  • mynetwork2.company.localnet =
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.