I have two private networks say: and

I have two machines with two NICs per each machine.

machine1 NIC1:
machine1 NIC2:

machine2 NIC1:
machine2 NIC2:

How to configure the routing so that from machine1 to machine2, it would use actually machine1 NIC2?

The thing is that network is Gigabit and 192 one is Fast Ethernet (100Mbit).

My goal is to communicate between those two through the fastest connection (i.e: NIC2) even if they are trying to access by NIC1's IP.

  • You mean you want to use NIC2 between machine1 and machine2, right? (I think there's a typo in your actual question sentence.)
    – Mat
    Commented Feb 12, 2012 at 21:26
  • @mat yes two NIC's in different private networks
    – bakytn
    Commented Feb 12, 2012 at 21:30

1 Answer 1


I am assuming you have the networks one switch and on another, the simplest solution to the problem would be put the following into /etc/hosts file or whatever else you are using for name resolution.   machine1-100   machine2-100      machine1      machine2

As long as you have presence on the same network as another machine the system will automatically route the traffic on that interface unless you add specific routes overriding this behavior.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .