multiple ethernet interfaces, routing depending on destination - Networking

This is a discussion on multiple ethernet interfaces, routing depending on destination - Networking ; Hello, I have two ethernet cards on two interfaces, eth0 and eth1. I have a cable modem plugged into eth1 and a dsl modem plugged into eth0. I would like to use the eth1 interface for everything except for http ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: multiple ethernet interfaces, routing depending on destination

  1. multiple ethernet interfaces, routing depending on destination

    Hello,

    I have two ethernet cards on two interfaces, eth0 and eth1. I have a
    cable modem plugged into eth1 and a dsl modem plugged into eth0. I
    would like to use the eth1 interface for everything except for http
    requests to a particular website which I would like to go through the
    dsl modem on eth0. (If you're curious I need to upload a large ammount
    of data to amazon's S3 service and the DSL line has much better upload
    speeds). I've done quite a bit of searching and it seems like the
    linux routing is very flexible but I can't figure out how to have
    requests to a particular domain go through a different ethernet
    interface.

    If someone would be kind enough to step me through this, or point me
    to some documentation which deals with this I would be most grateful.

    Thanks,
    sam


  2. Re: multiple ethernet interfaces, routing depending on destination

    smagister@gmail.com wrote:

    > Hello,
    >
    > I have two ethernet cards on two interfaces, eth0 and eth1. I have a
    > cable modem plugged into eth1 and a dsl modem plugged into eth0. I
    > would like to use the eth1 interface for everything except for http
    > requests to a particular website which I would like to go through the
    > dsl modem on eth0. (If you're curious I need to upload a large ammount
    > of data to amazon's S3 service and the DSL line has much better upload
    > speeds). I've done quite a bit of searching and it seems like the
    > linux routing is very flexible but I can't figure out how to have
    > requests to a particular domain go through a different ethernet
    > interface.
    >
    > If someone would be kind enough to step me through this, or point me
    > to some documentation which deals with this I would be most grateful.


    I haven't tried it, but

    route add -host upload.amazon.com dev eth0 metric 1 your.dsl.gateway
    route add default dev eth1 metric 2 gw your.cable.gateway

    might work.

    --
    Lasse Jensen [fafler at g mail dot com]
    Linux, the choice of a GNU generation.

+ Reply to Thread