[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


ifconfig settings are lost after reboot

Posted on 2010-09-13
Medium Priority
Last Modified: 2012-06-21
how do i make them stay after rebooting?

samething with gw and dns.

assuming theres somekind of process on startup that enables dhcp.....

centos 5.5
Question by:Kylo Ren
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 10

Accepted Solution

ddiazp earned 900 total points
ID: 33664505
open the file:

/etc/sysconfig/network-scripts/ifcfg-ethX (depending on your ethernet device)

And post the contents. You want to make sure that it's enabled on startup and PROTO is DHCP.

DHCP should automatically populate the /etc/resolv.conf file with the nameserver and domain search. If not, edit your /etc/resolv.conf file like this:

search domain.com
nameserver <ip of DNS Server1> <ip of DNS Server2>

to verify the default gateway, type the command  "route"  and show the output; if there's none, you might need to put it in yourself:

route add -net default gw X.X.X.X (put ip of default gateway)

All these should be automatically updated with DHCP, but if it's not doing it, once you set it up manually as above, they should stay permanently.

You can test with ` service network restart`

Author Comment

by:Kylo Ren
ID: 33665415


I need to set it to static so i set it up as follows and saved.


it didnt work....

dhcp works but i need a static ip

thanks for the help!!

LVL 19

Assisted Solution

jools earned 100 total points
ID: 33665554
if you have bootproto set to static then it should be static.

have you got any typos? Post the whole file back here.

if you want to create the config using the gui you can use system-config-network.

LVL 10

Expert Comment

ID: 33665699
have you restarted the network service since that change?

can you type ifconfig -a and post the output?

When you say 'it didn't work', you mean the interface didn't get that IP address after network was restarted?

Author Closing Comment

by:Kylo Ren
ID: 33665967
i accidently typed in a ip that was already in use which prevented the interface from coming up.  kept everything the same except for the ip and voila.  thanks guys

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month13 days, 22 hours left to enroll

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question