[5.001] Can't add default gateway to 2nd Interface

I've got 2 internet connections, I can configure a default gateway for the first connection, but when I try and configure a default gateway for the second I get an error about only one default gateway being allowed (the machine is at work so I don't have the exact error message). It is possible to do this under ASL v3 - can it be enabled under v5 ?

I'd like to use v5 and use both connections sumultaneously (VPN and SMTP use one, HTTP and FTP use the other) rather than use the v5 ISP fail-over which seems to only allow one interface to be used at a time.

Thanks,

John
  • I have not yet had the chance to install v5, so I can't give you any version 5 specific information, but I'm curious if you are using your desired setup (FTP, HTTP down one path, VPN out the other) in version 3.

    I only ask because I don't understand how that could work.  By definition, you can only have one default route/gateway.  Usually if an OS allows you to configure 2 default gateways, it uses some mechanism to choose which default to use, in which case you are still only using one at a time.

    I'm pretty sure you would have to use some form of policy routing to accomplish what you want to do.  I know in V4, you cannot configure policy routing through WebAdmin but you could make some OS hacks to allow this.  Unfortunately I don't have a link to that document, but I might be able to dig it up when I get home.  As I mentioned above, I'm not familiar with v5 to know if it can do what you want, although I expect v5 will be the same story.
  • There can be only one default gateway. (otherwise it wouldn't be default    ). But you CAN make a static route that uses your other connection. This would ofcourse be based on destination addresses and not services.

    Best regards
    Tomas
  • There is only one routing table in an IP protocol enabled machine, so there can only be one default gateway defined. That's why it is called default, it is the path used for any packet that cannot be routed via any of the other routing entries in the table.

    Configuring default gateway addresses on more than one network card is therefore quite pointless, since you will end up with just a single default gateway entry in your routing table anyway.
  • Thanks for the replies - got myself a bit confused on the routing front.

    Regards,


    John
  • You can only have one default gw per routing table, as many have mentioned already.   However, in linux you can have more than one routing table and specify which packets are routed by which table using a variety of methods.   There is no supprt for this in the Astaro web UI but it is very possible to do at the command line.  You can send packets to the different routing tables based on basically the same criteria used in packet filter rules, i.e. source, destination , src or dst ports, etc.  
    Using this type of setup I have had great results with both a DSL and a cable modem connection at my home.  Since my cable has more incoming bandwidth but much less outgoing than the DSL, I use the DSL for protocols involving alot of outgoing traffic (bittorent, smtp, uploads etc) and the cable for protocols mostly coming in (web surfing, pop3).    
    http://www.lartc.org/  will show you how to do this.