This is a discussion on 2 routes to a single end point ? within the Linux Networking forums, part of the Linux Forums category; I would like to know whether it is possible to define two direct routes from a machine with two interfaces ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I would like to know whether it is possible to define two direct routes
from a machine with two interfaces to a single other machine : Machine src Machine dst eth0 _____ \____ ____| dst0 eth1 _____/ I tried bonding, coupling eth0 and eth1 in a master bond0. It worked fine but it is not what I want to do since the traffic is shared between the two slaves. I tried a slightly different configuration : the destination having also to interfaces dst0 and dst1. With iproute2 I successfully set up two parallel routes eth0-dst0 and eth0-dst1. But again, it is not what I want. Finally, using 'ip route add,change, ...' I've tried to configure my system in order to have the traffic going directly from eth0 to dst0 *or* (exclusive) from eth1 to dst0. But 'ip route' has not accepted my requests. Is it a forbidden configuration ? |
|
|||
|
"Jean-Paul Le Fevre" <lefevre@hep.saclay.cea.fr> wrote in message
news:403DC941.9080502@hep.saclay.cea.fr... > I would like to know whether it is possible to define two direct routes > from a machine with two interfaces to a single other machine : > > Machine src Machine dst > eth0 _____ > \____ > ____| dst0 > eth1 _____/ > > > I tried bonding, coupling eth0 and eth1 in a master bond0. It worked fine > but it is not what I want to do since the traffic is shared between the > two slaves. .... > Is it a forbidden configuration ? I'm certainly no expert, but isn't this a job for IP Masquerading? http://www.tldp.org/HOWTO/Masqueradi...WTO/index.html Good Luck! Rich |
|
|||
|
Jean-Paul Le Fevre <lefevre@hep.saclay.cea.fr> wrote:
> I would like to know whether it is possible to define two direct routes > from a machine with two interfaces to a single other machine : > > Machine src Machine dst > eth0 _____ > \____ > ____| dst0 > eth1 _____/ In order to help you, I would need to ask you why you wanted to do this. That would help clarrify the situation. -- Cameron Kerr cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/ Empowered by Perl! |
|
|||
|
Cameron Kerr wrote:
> Jean-Paul Le Fevre <lefevre@hep.saclay.cea.fr> wrote: > >>I would like to know whether it is possible to define two direct routes >>from a machine with two interfaces to a single other machine : >> >> Machine src Machine dst >> eth0 _____ >> \____ >> ____| dst0 >> eth1 _____/ > > > In order to help you, I would need to ask you why you wanted to do this. > That would help clarrify the situation. > Some colleagues of mine want to test a set of switch devices. Actually the architecture is the following : The source consists of something like 6 interfaces (100 Mb/s) embedded in 1 or 2 PC. The destination is a machine with 1 Gigabit/s interface. A java application is running between the source and the destination sending data back and forth. The device to verify is inserted bewteen the source and the destination. It has 6 input ports and 1 output port. The goal is to see whether the switch hardware is functionning as specified and more specifically if the ports are correctly wired. So it is quite important to know which route (i.e. which port) is chosen. -- __________________________________________________ _________________ Jean-Paul Le Fèvre * Mail : LeFevre@fonteny.org |
|
|||
|
Jean-Paul Le Fevre <jeanpaul.lefevre@free.fr> wrote:
> Cameron Kerr wrote: >> Jean-Paul Le Fevre <lefevre@hep.saclay.cea.fr> wrote: >> >>>I would like to know whether it is possible to define two direct routes >>>from a machine with two interfaces to a single other machine : >>> >>> Machine src Machine dst >>> eth0 _____ >>> \____ >>> ____| dst0 >>> eth1 _____/ Well then, you would need to put static routes on the destination, so that every IP has its own route, directing it to the correct address. -- Cameron Kerr cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/ Empowered by Perl! |
|
|||
|
Cameron Kerr wrote:
> Jean-Paul Le Fevre <jeanpaul.lefevre@free.fr> wrote: > >>Cameron Kerr wrote: >> >>>Jean-Paul Le Fevre <lefevre@hep.saclay.cea.fr> wrote: >>> >>> >>>>I would like to know whether it is possible to define two direct routes >>> >>>>from a machine with two interfaces to a single other machine : >>> >>>> Machine src Machine dst >>>> eth0 _____ >>>> \____ >>>> ____| dst0 >>>> eth1 _____/ > > > Well then, you would need to put static routes on the destination, so > that every IP has its own route, directing it to the correct address. > How ? With route(8) it seems that, if you define 2 static routes to the same target, the system uses only the first one. On the other hand, with iproute2, I could not find the corrrect arguments to 'ip route add ' to set up the 2 routes. The command failed with a error message. -- __________________________________________________ _________________ Jean-Paul Le Fèvre * Mail : LeFevre@fonteny.org |
|
|||
|
Jean-Paul Le Fevre <jeanpaul.lefevre@free.fr> wrote:
> Cameron Kerr wrote: >> Well then, you would need to put static routes on the destination, so >> that every IP has its own route, directing it to the correct address. >> > How ? > > With route(8) it seems that, if you define 2 static routes to the > same target, the system uses only the first one. Ah, a good point. You can use IP aliases on dst so it has multiple IPv4 addresses. root@dst:~# ifconfig eth0:1 <IP1> netmask 255.255.255.255 up root@dst:~# ifconfig eth0:2 <IP2> netmask 255.255.255.255 up Each <IPx> would need to be different though, and the Java program would need to know to send to the correct IP address. -- Cameron Kerr cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/ Empowered by Perl! |