LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Setting the default gateway permanently (https://www.linuxquestions.org/questions/linux-newbie-8/setting-the-default-gateway-permanently-363316/)

hcclnoodles 09-14-2005 11:04 AM

Setting the default gateway permanently
 
Hi there

When installing my system I accidentally set my default gateway to the wrong address, so the first thing i did when i booted up was to delete the old gateway

"route del -net 0.0.0.0"

and then set a new one .......

"route add default gw 87.x.x.129 netmask 0.0.0.0 eth0"


however, when I reboot, the original (wrong) gateway address comes back again ??

does anybody know which file I edit to set this permanetly ????

any help woul;d be greatly appreciated

Gary

hcclnoodles 09-14-2005 11:04 AM

forgot to mention ...Im using Fedora Core 3 as my OS

jeffk42 09-14-2005 11:18 AM

I had this problem at one point and I was able to fix it. Not sure exactly why, but if you go to System Settings --> Server Settings --> Services and look for an item near the top called 'Network Manager', you can make sure it's checked. Mine was not checked, and as soon as I checked it, the problem went away. If it's not checked, check it and make sure to click the Save icon before closing the window.

hcclnoodles 09-14-2005 11:28 AM

sorry, forgot to mention.....I have no X windows ...this is a command line only machine

Sledge 09-14-2005 12:03 PM

You can check services from the command line with /sbin/chkconfig.

For what it's worth, I'm using FC4 and I am not running Network Manager and I don't seem to have any problem with it forgetting about my default gateway.

andreseso 09-26-2005 04:15 AM

How to set default gateway
 
Hello,

In al versions of RedHat I have had access to, and I believe Fedora Core 3 to be Redhat, the gateway is set in /etc/sysconfig/network which is a plain text file and has a field like
Code:

GATEWAY=192.168.0.1


All times are GMT -5. The time now is 06:35 PM.