Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-14-2005, 11:04 AM   #1
Registered: Apr 2003
Posts: 50

Rep: Reputation: 15
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"

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

"route add default gw 87.x.x.129 netmask 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

Old 09-14-2005, 11:04 AM   #2
Registered: Apr 2003
Posts: 50

Original Poster
Rep: Reputation: 15
forgot to mention ...Im using Fedora Core 3 as my OS

Last edited by hcclnoodles; 09-14-2005 at 11:17 AM.
Old 09-14-2005, 11:18 AM   #3
Registered: Mar 2005
Location: Orlando, FL USA
Distribution: Fedora Core 13 x86_64 / RHEL 5.3
Posts: 76

Rep: Reputation: 15
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.
Old 09-14-2005, 11:28 AM   #4
Registered: Apr 2003
Posts: 50

Original Poster
Rep: Reputation: 15
sorry, forgot to mention.....I have no X windows ...this is a command line only machine
Old 09-14-2005, 12:03 PM   #5
Registered: Nov 2003
Distribution: Fedora Core 6
Posts: 76

Rep: Reputation: 15
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.
Old 09-26-2005, 04:15 AM   #6
LQ Newbie
Registered: Oct 2003
Posts: 12

Rep: Reputation: 0
How to set default gateway


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


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
setting the default GW permanently hcclnoodles Linux - Networking 6 09-15-2005 09:38 AM
dhclient not setting default gateway - no WAN route kadissie Linux - Networking 2 03-10-2005 04:55 AM
setting my router as the default gateway TheOneAndOnlySM Linux - Networking 10 03-27-2004 06:12 PM
Setting gateway permanently through console on MD9.2 RyanAT Linux - Newbie 1 11-26-2003 02:10 PM
Setting default gateway from CLI? Pcghost Linux - Networking 1 03-20-2003 10:38 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:44 AM.

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