Find the answer to your Linux question:
Results 1 to 5 of 5
I have the following setup: Client A, having 2 network interfaces, eth0 and eth1, both with the IP address 192.168.1.1/32. Client B, also having 2 network interfaces, eth0 and eth1, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2010
    Posts
    3

    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 192.168.1.1/32.
    Client B, also having 2 network interfaces, eth0 and eth1, with the IP addresses 192.168.1.2.
    The routing table on client A has one entry: 192.168.1.2 dev eth0
    The routing table on client B has one entry: 192.168.1.2 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
    Location
    Munich
    Posts
    3,439
    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
    Just Joined!
    Join Date
    Jul 2010
    Posts
    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
    $spacer_close
  5. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,439
    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
    Just Joined!
    Join Date
    Jul 2010
    Posts
    3
    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 (192.168.3.3) for application purposes.
    The gateway has 192.168.3.1 on eth0 and 192.168.3.2 on eth1.
    The client has two routes to the gateway, one over Net1 and one over Net2 (from ip route: "192.168.3.1 dev eth0" and "192.168.3.2 dev eth1"). The default route for the client is through Net1 ("default via 192.168.3.1"). 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 ("192.168.3.3 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
  •