I am trying to do source-based routing, following the question https://unix.stackexchange.com/questions/131527/routing-based-on-source-ip.

The source IP floating one and assigned to a cluster (consists from 2 servers). Let's say that the physical IP on server1 is, on server2, and the virtual IP is (and this should be the source IP for outgoing traffic).

How can I configure static source IP routing for this in RHEL?

  • The article linked from that question (openvz.org/Source_based_routing) seems to have a reasonable introduction to source-based routing. Can you explain what you've tried and what's not working as you expected?
    – larsks
    Jun 8, 2014 at 12:20
  • I've set source based routing per server for testing and this is working. I need to set this routing as permanent one. If the IP was constant assigned to a server, it would use the description specified in the post. But the IP is floating one - once it can be on server1 and on other time on server2. Jun 8, 2014 at 13:06
  • So have whatever mechanism is responsible for managing the floating ip also be responsible for setting up the source routing rules.
    – larsks
    Jun 8, 2014 at 13:30
  • I've edited your question to clarify (and also to use the RFC5737-sanctioned example address space; remember and use it always). If my clarification is wrong, please feel free to correct. Jun 9, 2014 at 2:49


You must log in to answer this question.

Browse other questions tagged .