-   Linux - Software (
-   -   how to add static route for loopback interface. (

UltraSoul 04-09-2009 10:51 AM

how to add static route for loopback interface.
HI, All

I have configured LVS under RHEL5.

I need to configure static route to my VIP.
Now, I used the following command to add route but reboot OS will flush the route.

# route add -host dev lo:0

google always told me how to add static route for certain network via
/etc/sysconfig/network-scripts/route-<device-name>. But I did not found
that for host.

Kindly pls advise.

Thank you

acid_kewpie 04-10-2009 03:55 AM

well you do need to use that file, yes. if you want to add a machine for a single host just use a 32 bit netmask.

UltraSoul 04-11-2009 09:30 PM

Hi, I created the following route-lo:0 file but the static route for lo:0 is not added to route table.


kirukan 04-12-2009 12:38 AM

# route add -host dev lo:0 add this command on rc.local,
actually this is a way to execute commands on system boot

UltraSoul 04-12-2009 01:02 AM

thank u, the problem is fixed by adding command at /etc/rc.local

All times are GMT -5. The time now is 07:59 PM.