LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   "route add default gw" - trouble (https://www.linuxquestions.org/questions/linux-networking-3/route-add-default-gw-trouble-304972/)

Vijayasarathy 03-23-2005 03:39 AM

"route add default gw" - trouble
 
Hello all,

I am currently setting up an Internet gateway with the help of a linux machine. I am using the route command to set up the default gateway, giving the addres of the router which connects me to the external world.

The problem now is that, everytime I reboot the linux machine, I have to add the default route, even though the corresponding ethernet interfaces are getting activated automatically.

I use the command "route add default gw 'ipaddress of the router' " command, but I have to do this everytime I reboot.

What could be the possible problem ?are there any files that I need to change ?when I went to the man page of route, it indicated me that changes would be made to the file /proc/net/route, but then automatic gateway setting is not being done here.

Help me out please. Thanks in Advance.

Regards

huibert.alblas 03-23-2005 06:09 AM

You did not mention the distribution you are running.
On gentoo, for instance, you add extra information like this in /etc/conf.d/net
There should be a similar file in your distro

Another posibiliity would be to add the line to script in /etc/init.d which brings up the network at boot.
Normaly this would be /etc/init.d/network or /etc/init.d/net.eth0 or something like that.

Vijayasarathy 03-23-2005 07:54 AM

Hey,

Really sorry for that .....I miss this every time I post a query ...I am using RHL9

Thanks.


All times are GMT -5. The time now is 12:18 PM.