Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-05-2005, 09:17 PM   #1
LQ Newbie
Registered: Jul 2005
Location: Brasil
Distribution: CentOS
Posts: 2

Rep: Reputation: 0
two default route - help me


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

CentOS release 4.1 (Final)

eth0 Intranet
eth1 internet router for internal QMail
eth2 internet adsl for Proxy

for the eth1 the gateway must be
for the eth2 the gateway must be

proxy and navigation must use adsl (


my email server only the router (

my firewall itīs ok...

I need help....


Fabio Leonardo Jung
from Brasil
Old 07-05-2005, 11:43 PM   #2
LQ Guru
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
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.
Old 07-06-2005, 07:35 AM   #3
LQ Newbie
Registered: Jul 2005
Location: Brasil
Distribution: CentOS
Posts: 2

Original Poster
Rep: Reputation: 0
Thumbs up

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

now... go to iproute2...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Not getting a default route wswartz Linux - Networking 4 10-27-2005 12:25 PM
c++ default route bassdemon Programming 1 02-06-2005 11:29 AM
Route to subnet exists but I get "Network unreachable" when adding default route fciuffani Linux - Networking 4 08-18-2004 03:11 PM
How to change default Route? suncloud Linux - Networking 2 11-21-2003 06:17 AM
Route dialup modem packets back through dialup instead of default route cable modem jogress Linux - Networking 1 10-21-2003 04:48 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration