LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   automatically add route on boot? (https://www.linuxquestions.org/questions/linux-networking-3/automatically-add-route-on-boot-258203/)

Loz 11-22-2004 11:44 PM

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

ilikejam 11-22-2004 11:56 PM

Hi.

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

Dave


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