LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to set the rules in Centos, so that local table won't override (https://www.linuxquestions.org/questions/linux-networking-3/how-to-set-the-rules-in-centos-so-that-local-table-wont-override-4175509679/)

centosguy 06-30-2014 03:27 PM

How to set the rules in Centos, so that local table won't override
 
Hello community,

I am new-bee to Linux and seeking for your help. I will try to explain my problem here and hopefully I will do well enough to explain.

In Centos 6.4, when I type : ip rule list, I am seeing following:

0: from all lookup local
xyz: from all lookup 220
...: from all lookup main
...: from all lookup default

If I understood it correctly, it is prioritizing local table above all. What is happening is a route that is added in the Main does not getting executed for eth1 as there is already similar route exist for traffic through eth0. This makes the traffic flow from eth0 :(.

Now adding this route in local table above already existing route works and route flows from eth1. But the problem is whenever I perform network restarts, it remove the route that is added in local table!!

Is there any way to put a new route in local table permanently, so that it will be there even after network restart? Is there any way I can change the rules so that creating a new rule that can override the route in table local?

Thanks in advance. Your help will be highly appreciated.

centosguy 07-01-2014 09:20 AM

Please help, and let me know if any particular information is missing.


All times are GMT -5. The time now is 10:39 PM.