Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to forward packets to some target hosts by target ip, if the target host is down, the packet is passed to one default host.

The target ip has no rule, so i think i need to create many routes. and these routes(about 10 000 items) will be modified frequently.

Is there any better method to deal with this case ?

share|improve this question

migrated from Sep 28 '10 at 16:00

This question came from our site for professional and enthusiast programmers.

Would this be better on ServerFault? I'm not sure. It's certainly big enough to need programming. – Chuck Vose Sep 28 '10 at 15:48
Yes, this is the functionality of a fail-over director and there are many to choose from and to configure as a server service. No programming is needed in this case. – Peter Tillemans Sep 28 '10 at 15:52
I am thinking about this by BGP protocol, that's to say, the target hosts can exchange the route table with the forward server(gateway). but i am not sure with this.:( – sharp Sep 28 '10 at 16:00
up vote 2 down vote accepted

The most common approach for something like this is to either using a routing protocol or a virtual IP. Routing protocols such as BGP or OSPF can take down routes that are no longer working as they use keep alive messages. A Virtual IP is when one server has a secondary IP address, if this server fails the other server will pick up the virtual IP address. You could use ucarp or heartbeat for this.

The VIP approach is generally simpler depending on what you are trying to do.

share|improve this answer
I want to know. how to setup BSG ? I need to setup BSG at both target host and gateway host ? Do you have some experiences at BSG ? – larry Sep 29 '10 at 1:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.