Related Items  

Linux and Windows IT Support  

dedicated-technology-experts

Windows, Apple and Linux IT support and services.

For Software and Web Development.

Default gateway keeps disappearing

PrintE-mail

Q. I've just install CentOS version 5.x and my system keeps losing the default gateway on reboots and network restarts.

A. It seems like a bug and has been reported on trixbox as well. A quick way to fix it is to run system-config-network and configure all the parameters. Even if you have the proper settings, make sure you hit the Save button. The gateway should stay there after reboot/network restart.

If that doesn't work, add something like this in you /etc/rc.local script:

route add default gw 192.168.1.1

Replace 192.168.1.1 with whatever your gateway is.

Careful when you do this - make sure you remember this change next time you need to change the gateway, otherwise you'll be pulling your hair.

Comments (1)
found the problem.
1 Wednesday, 17 August 2011 14:07
Chen
make sure that the GATEWAY= is in the END of the file:
/etc/sysconfig/network-scripts/ifcfg-eth0

i found that in some cases it's in the middle of the above file and then you experience the above herbivore.

Cheers

Add your comment

Your name:
Subject:
Comment:
  The word for verification. Lowercase letters only with no spaces.
Word verification:
yvComment v.1.24.0
   
Copyright © 1999 - 2024 Virtual Helpme | Trusted IT Services | Original Template: Allrounder