Set two default gateway?

I have 3 Linux boxes.Let me first define the specs:
1.pc A with kernel > 2.4, ext eth-->adsl connection,int eth -->
2.pc B with kernel > 2.4, ext eth-->adsl connection,int eth -->
3.pc C with kernel 2.0.x, eth-->, gw-->

I'm hosting a download service on pc C. Currently, any incoming packets from pc A are forwarded to pc C so that users can download via connection on pc A. I have another ppp connection on pc B.  I want to configure the connection on pc B as a backup line to pc A. How do I make it in such a way that users can download from both connections on pc A and pc B? I've found out that users can only download from connection on pc B if I swith the default gateway of pc C to refer to pc B. Is it possible to have two default gateways on pc C, so that download from both connections could happen at the same time? Or are there any other ways to solve this? Please advice.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


i.g. you cannot do it, simply ...
Have seen a question here where it has been discussed, not shure if the solution works (no link either).

What you want to do is usually done by a load balancer infront of the servers.
There're several load balabcing software available:
Load ballancing usually menad 2 connections to the same ISP and requires support at both ends.

Having a backup default gateway is easy, just set it upas a static route with a higher metric that the primary.

details vary from distro to distro, but in RH7.1 all you do is mangle


to add

eth0 net gw metric192.168.8.1  0
eth0 net gw metric192.168.8.2  5

(going from memory, YMMV). The box __should___ use .2 if .1 becomes unresponsive. Alternativley add B as a backup gateway to A, the changeover will then be transparent yo C.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
viansooAuthor Commented:
what do u mean by 'mangle' the /etc/sysconfig/static-routes. is it equivalent to 'vi' the static-routes. after adding the 2 lines into the file, do i need to restart the pc?
vi, emacs, I'm not getting into that holy war ;-)

Restart the PC? What do you think this is, Windos?

ifdown eth0
ifup eth0

should be enough. actually,
/etc/sysconfig/network-scripts/ifup-routes eth0
should do the trick.

/etc/init.d/network restart
works too.

(sorry, being LINUX I feel obliged to point out several ways to skin the same cat)
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.