LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-08-2005, 10:56 AM   #1
ehedetniem
LQ Newbie
 
Registered: Apr 2005
Posts: 4

Rep: Reputation: 0
Gateway ip address removed from /etc/sysconfig/network files


This is my first time posting to this website. I'm hoping someone can help me. Each morning some of my servers are losing their gateway address/statment from /etc/sysconfig/network. I'm not sure what's happening. I have to manually add it again and reboot and everything is fine. I am using the eth1 card. I have 2 nic cards installed. I have the following configuration set for each card in /etc/sysconfig/network-scripts/:
eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=no

eth1
DEVICE=eth1
IPADDR=172.30.49.15
NETMASK=255.255.255.0
GATEWAY=172.30.49.1
ONBOOT=yes

The /etc/sysconfig/network file shows:

NETWORKING=yes
HOSTNAME=server1
GATEWAY=172.30.49.1

- When I do an ifconfig it shows the correct ip address but only the gateway statement is missing from /etc/sysconfig/network. Is this caused by leaving the BOOTPROTO=dhcp on eth0? Should I add BOOTPROTO=static for eth1?

Thanks so much!
 
Old 04-09-2005, 01:16 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
That's a very good possibility. DHCP doesn't just provide a client with an IP address, but also gateway and other network topology information. This would override anything in the static config files, I think. So if the machines are to be set up statically, you should have bootproto=static in your configs.

Is there a DHCP server running on your network? That would be something to investigate further.
 
Old 04-12-2005, 10:29 AM   #3
ehedetniem
LQ Newbie
 
Registered: Apr 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for the reply...
Found out what it was. Red Hat 9.0 looks in the /etc/sysconfig/networking/profiles/default directory and if the same ifcfg-ethX isn't there, then it could overwrite some of the network settings. I added the ifcfg-ethx to this directory and haven't had any problems.
 
  


Reply



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
How to add default gateway in /etc/sysconfig/network-scripts/* zamri Linux - Networking 2 09-06-2005 10:32 AM
How do I edit /etc/sysconfig/network IPDreams Linux - Newbie 14 07-28-2005 07:32 PM
What is Gateway address and what is Network address? abefroman Linux - Networking 1 03-17-2004 08:25 PM
Creation of files in /etc/sysconfig rajatgarg Linux - General 1 10-09-2003 11:10 AM
/etc/sysconfig/network ssrikant Linux - Software 1 05-18-2003 03:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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