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
181 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:lorenkia
Comment Utility
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 2

Expert Comment

by:jeffa072897
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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 this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now