Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-09-2009, 10:51 AM
|
#1
|
Member
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404
Rep:
|
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 192.168.11.55 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
|
|
|
04-10-2009, 03:55 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
04-11-2009, 09:30 PM
|
#3
|
Member
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404
Original Poster
Rep:
|
Hi, I created the following route-lo:0 file but the static route for lo:0 is not added to route table.
ADDRESS0=192.168.11.55
NETMASK0=255.255.255.255
GATEWAY0=127.0.0.1
|
|
|
04-12-2009, 12:38 AM
|
#4
|
Senior Member
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278
Rep: 
|
# route add -host 192.168.11.55/mask dev lo:0 add this command on rc.local,
actually this is a way to execute commands on system boot
|
|
|
04-12-2009, 01:02 AM
|
#5
|
Member
Registered: Dec 2004
Location: Japan
Distribution: REDHAT9.0, Mandrake10.1
Posts: 404
Original Poster
Rep:
|
thank u, the problem is fixed by adding command at /etc/rc.local
|
|
|
All times are GMT -5. The time now is 10:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|