Find the answer to your Linux question:
Results 1 to 5 of 5
I have two network cards, eth0, and eth1. Each interface has an IP address with the option of having a default gateway, but at present only eth0's gateway is set ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2010
    Posts
    2

    Two default gateways.


    I have two network cards, eth0, and eth1. Each interface has an IP address with the option of having a default gateway, but at present only eth0's gateway is set up as the default route.

    I have applications that can launch using -iface ethX. They work fine when using eth0, but not eth1, unless I remove my default route for eth0 and add eth1 as the default route or add a static route to that interface.

    My question is this: How can I make it so that I can have two default routes, with eth1's default route only being used when packets flow in or out of eth1?

    Is this possible?

    Thanks in advance!

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,401
    There is -by definition- only one default gateway.

    I have no idea about your setup and network layout, but in the simplest case you could try to enable IP forwarding.
    You must always face the curtain with a bow.

  3. #3
    Linux Enthusiast Bemk's Avatar
    Join Date
    Sep 2008
    Location
    Oosterhout-NB, Netherlands
    Posts
    525
    I have once seen a network with 2 gateways that shared the loads, but I don't know if that's what you're talking about.

    Either way, I don't know yet how to set these things up. I don't think it was an easy project, as the developers told me, but they weren't linux users anyway.

    I would be more than happy to try and find the developers, and ask them, if necessary.

  4. #4
    Just Joined! kerim's Avatar
    Join Date
    May 2010
    Location
    Istanbul
    Posts
    15
    You can do with linux advanced routing
    google lartc . You will see the howto. This is your solution.I made myself so many kind of multi gateway router with linux advanced routing.You can do.

    lartc.org/

  5. #5
    Just Joined!
    Join Date
    May 2010
    Posts
    2

    gateway

    you can do by Iproute on etho of gateway & ip

Posting Permissions

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