LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   two default route - help me (https://www.linuxquestions.org/questions/linux-networking-3/two-default-route-help-me-340397/)

fabiolpi 07-05-2005 08:17 PM

two default route - help me
 
Hi

How do I add two default route with two different gateways on different interfaces with different priorities:

CentOS release 4.1 (Final)

eth0 192.168.0.1 Intranet
eth1 192.168.1.1 internet router for internal QMail
eth2 192.168.2.1 internet adsl for Proxy

for the eth1 the gateway must be 192.168.1.254
for the eth2 the gateway must be 192.168.2.254

proxy and navigation must use adsl (192.168.2.254)

and

my email server only the router (192.168.1.254)

my firewall itīs ok...

I need help....

thanks

Fabio Leonardo Jung
from Brasil :)

Half_Elf 07-05-2005 10:43 PM

You can't use 2 default route. It's a non-sense, "default route" mean "send it there when you don't know where else to send". You can (and should) only have ONE default route.

However, if you want to do some "special" routing, like to send all trafic related to a certain service to a certain gateway, you could use iptables to force routing. This is probably what you need.

You could also use some routing daemon (routed, gated, etc...) and routing protocol (RIP, OSPF, PIM, ...). I never worked with all this, but if I remember my network courses rigt, you could use this to setup some "different cost" path on your system. I have no clue how useful this would be for you. And keep in mind all what I said about it is quite outdated.

fabiolpi 07-06-2005 06:35 AM

very very thanks, it was everything that I needed to know...

now... go to iproute2...


All times are GMT -5. The time now is 04:46 PM.