LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-22-2004, 11:44 PM   #1
Loz
LQ Newbie
 
Registered: Nov 2003
Location: Hobart, Tasmania - Australia
Distribution: Redhat 9
Posts: 2

Rep: Reputation: 0
automatically add route on boot?


Hi, I'm using RH9 on my server.

when I boot my server, I need to open a terminal, su to root, and manually type:

route add -net 192.168.2.0 netmask 255.255.255.0 dev eth0

so that I can connect to my server via eth0 using a PC.

Where could I put this command on my server so that it would run automatically ie: create this route on boot, not just as root (hey, that rhymes).

So, basically I want to be able to restart my server then be able to connect to it again without having to type in the above command.

hope that makes sense,

Loz
 
Old 11-22-2004, 11:56 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

Put that line into /etc/rc.d/rc.local - it'll be run every time you boot.

Dave
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I add a route??? moonmoth Linux - Networking 3 09-04-2005 06:25 AM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
route add powah Linux - Newbie 4 09-01-2005 02:24 PM
route add robf2301 Linux - Networking 6 03-11-2005 04:06 AM
ip route add ducati620 Linux - Networking 0 06-06-2004 06:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration