What Files need to be edited and how to make an IP come up automatically on a reboot

Posted on 1998-01-20
Last Modified: 2010-03-18
I have a lot of IP's aliased on my server, the last two and most recent I have learned how to do myself, however the IP does not stay live if the server goes thru a reboot, I have to rerun ifconfig and route add, I already edited the file in /etc/rc.d to include the new routes and IPs but apparently there is another file somewhere that needs something added for the startup to bring these last two live... can anyone steer me in the right direction please?
Question by:lorenkia
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

Expert Comment

ID: 1587409
If you run RedHat 4.0 or higher, the answer is simple. Go to /etc/rc.d/sysconfig/network-scripts, use your ifcfg-eth0 as a skeleton to create ifcfg-eth0:0 , ifcfg-eth0:1 and as many ifcfg-ethx:n as you need for the "lot" of aliased addresses that you have. :) Edit then /etc/sysconfig/static-routes to add all the static routes that you need (use the ones already defined as an example). They will come up at boot.

If you run a Slackware system .. I don't know. I guess you gotta recursively grep the files in /etc for ifconfig commands and add _your_ commands next to them. You can also reject the answer, maybe someone more familiar with Slackware shows up. O:-)


Author Comment

ID: 1587410
this is a slackware linux system with kernel 2.0.30 and yes I need someone familar with slackware  :) thanks anyway XMS

Expert Comment

ID: 1587411

On slackware, the initial network setup is done form the file

I've made a seperate file with all the ifconfig and route add stuff, made it executable, and made rc.inet1 call this file.
Ofcours, this is not really necesary (sp?), but it keeps things

Check your /etc/rc.d/rc/inet1 for ifconfig commands (besides the one used to configure your primary IP), or for calls to some other file that may do the job.

Save the day with this special offer from ATEN!

Save 30% on the CV211 using promo code EXPERTS30 now through April 30th. The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.


Author Comment

ID: 1587412
yes I put the lines in the rc.inet1 like I see the other ones there, and I know I saved the file but it did not ifconfig the last two IPs in the list, like it did the others so I thought there might be another file on the system somewhere? I was also told to go to rc.local but I am not sure what to put in rc.local as I do not see any entries there for the ifconfig stuff, just my quota stuff...??? it has to be really simple and I am missing it *grin*

Expert Comment

ID: 1587413
Since you're aliasing the IP's you proabably need to use insmod to load the aliasing module before you setup any of your IP's.
With slackware I'd do it in the top or rc.inet1.

The aliasing module needs to be loaded first, befire you ifconfig
the alias IP's.

The doc for the alias module says you have to load it manually not rely on kerneld to load it automagically.

Either that or put the ifconfig commands in the rc.local script. That one gets run last, after the rest of the system is up. That's what I do for my masquerade server. I also manualy load the ailas module in rc.local too.


Expert Comment

ID: 1587414

The answer to this is that the rc files are right.

What you have forgotten to do is add the entries to dns for the subdomains.

Check out /var/named/pz/ for the file you need to edit. Then kill -HUP named to fix this.

PS - It's Jason here!!!!

Author Comment

ID: 1587415
HI Jason!! um, been there done that NEXT? *grin* hey when I got a question I really give you all a stumper don't I? LOL

Accepted Solution

jetx earned 150 total points
ID: 1587416

i guess the best solution to your problem is to edit or view all the files off your rc.d directory and see if you can find the one that starts your deamon on bootup. Move youre routes to that section and then reboot. This should fix up your problem



Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
linux 2 116
iptables limit connection per ip correct way ? 2 310
Configuring windows 7 host in Nagios 4 5 112
(Open)LDAP V2.44  search proxy to AD (W2012R2) 37 274
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit If you want to manage em…
In an interesting question ( here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

752 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