Solved

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

Posted on 1998-01-20
8
190 Views
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?
0
Comment
Question by:lorenkia
8 Comments
 
LVL 1

Expert Comment

by:XMS
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:-)

0
 

Author Comment

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

Expert Comment

by:alexbik
ID: 1587411
Hi,

On slackware, the initial network setup is done form the file
/etc/rc.d/rc.inet1.

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
clear.

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.

0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:lorenkia
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*
0
 
LVL 2

Expert Comment

by:jeffa072897
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.


0
 
LVL 4

Expert Comment

by:unicorntech
ID: 1587414
Lorenkia,

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/kia-sequoia.com for the file you need to edit. Then kill -HUP named to fix this.

PS - It's Jason here!!!!
0
 

Author Comment

by:lorenkia
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
0
 
LVL 4

Accepted Solution

by:
jetx earned 150 total points
ID: 1587416
lorenkia,

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

regards,

jetx
0

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

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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

830 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