2 NICs, 2 subnets, 2 paths: can I do this?

Posted on 2004-08-09
Last Modified: 2010-04-11
I have two machines, each with 2 NICs, connected to the same two subnets (192.168.1. & 192.168.2.). I was thinking of setting up my host tables like this:

On machineA: machineA machineB   # machineA looks for machineB on subnet 1

On machineB: machineA machineB   # machineB looks for machineA on subnet 2

to spread the traffic between these machines over the two subnets.  Am I setting myself up for trouble doing this?  Will it work?

I doubt it matters, but I'm running Linux (FC1).
Question by:jwolter
LVL 27

Expert Comment

ID: 11756619
I don't think this will work - you want traffic to travel in a circle?!?!?  

You might be able to get funky with host files, but if A initiates a conversation to B over subnet1, B will learn A's physical address and rember it (ARP cache) and use it to repy to A over subnet1, not subnet 2.

Are these machines only going to talk to each other?  So you won't have any default gateway?  Or would you put it on one subnet on one and vice versa?

I assume you're doing this as a learning experiment - if you're trying to load balance your connections and improve throughput, it won't work.

Expert Comment

ID: 11756811
You maybe able to configure some sort of FastEtherChannel link, whereby they will share a virtual MAC and then load balance traffic, never seen it done back to back and it is not possible with two different subnets!

Assisted Solution

Kooroo earned 25 total points
ID: 11756815
Do you mean:

On machineA: machineA <----I changed this line machineB   # machineA looks for machineB on subnet 1

On machineB: machineA machineB   # machineB looks for machineA on subnet 2

I'm not sure what you're trying to accomplish here, but it looks to me like you want to reduce the load on the switches?

It looks to me like you're trying for:
Machine A makes requests to Machine B via 192.168.1 subnet
Machine B makes requests to Machine A via the 192.168.2 subnet

Of course, this is done after a name resolution, so lower level apps which don't use hostnames would use the routing table instead.

You might have to tweak your routing tables, but it should work. The problem is, there's really no point to it beyond you having an overloaded switch. And, let's face it, if 2 workstations are generating too much traffic for your swtich, it's time to buy a new switch.
LVL 11

Accepted Solution

PennGwyn earned 25 total points
ID: 11768982
> It looks to me like you're trying for:
> Machine A makes requests to Machine B via 192.168.1 subnet
> Machine B makes requests to Machine A via the 192.168.2 subnet

That's it exactly.  And responses will go back over the same leg as the original request.  In effect, he's got a full channel for connections initiated by A, and one for connections initiated by B.

It's crude, but it will work just fine.  Each NIC will have its own MAC address, so neither machine will "know" that both the partners it's talking to are the same machine.

Author Comment

ID: 11813172
Since people were wondering what I'm trying to do here, I've actually got a whole cluster of machines, and I happen to have two switches and two NIC's on each machine.  So I thought it might be a cheap way to spread some of the load out.  Thanks for the comments everyone.


Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now