Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Splitting the traffic on multiple interfaces

    I have the following setup:
    Client A, having 2 network interfaces, eth0 and eth1, both with the IP address
    Client B, also having 2 network interfaces, eth0 and eth1, with the IP addresses
    The routing table on client A has one entry: dev eth0
    The routing table on client B has one entry: dev eth1.
    Basically the idea is to send the upload traffic one one interface and the download traffic on the other interface. (Client B could serve as a gateway).
    However, with this setup, well... nothing works. The packets received by Client B are ignored. Does the linux kernel have anything against routing packets coming from an interface, although he thinks the source is on another interface?

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    You need to bond the 2 interfaces per server and assign the IP to the *one* bonded interface.
    Same on the other server.

    There are certain policies you can run on the bonded interface that give more performance and/or high availability.
    However, I doubt there is one for your described setup.
    You must always face the curtain with a bow.

  3. #3
    I have looked into the bonding option, given it a few tries, but it's not quite what I need.
    Simply put, is there ANY way to separate upload from download between two computers connected to each other on two networks? An if yes, can you do it dynamically, so you can switch the upload and download separatelly from one network to the other and back when needed?

  4. $spacer_open
  5. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    On two *networks*: maybe. If you design the upload / download application in that way.

    But two interfaces with the same IP is just wrong, itīs a IP address conflict
    You must always face the curtain with a bow.

  6. #5
    I think I didn't explain what I want to do very well....:P
    I attached a small drawing of the setup, to make it more clear.
    In terms of IP addresses, the client has the same IP on both interfaces ( for application purposes.
    The gateway has on eth0 and on eth1.
    The client has two routes to the gateway, one over Net1 and one over Net2 (from ip route: " dev eth0" and " dev eth1"). The default route for the client is through Net1 ("default via"). This way, all the upload goes through Net1. However, I want the download to go through Net2, so the Gateway has the route to the client over Net2 (" dev eth1")>
    The problem is, that in this scenario, the gateway doesn't forward packets from the client to the internet. If I set both the upload and the download routes over the same network, everything works. When I try to separate the traffic, the gateway stops forwarding the packets. This is actually what I don't understand. Why does the gateway stop forwarding packets, if the route TO the client is different than the path where the packet came from?
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts