dzevad

Well-Known Member
Oct 7, 2001
94
0
306
Hello,

I have following problem: I have 5 IP addresses. First one is main one and used to host shared IP accounts. Two are free, and two are used for single IP account. When I reboot my server all addresses except main one are gone. Right now it\'s not problem since I don\'t have many accounts. But when I have 50 or more it woule be problem to add addresses manually every time. Until I add addresses again my single IP accounts do not work. When I add them after reboot this is what I get:

SIOCSIFFLAGS: Cannot assign requested address
eth0:4 is now up, 66.96.228.84 has been added
Please wait while I rebuild your ipaddrpool
[66.96.228.80] [66.96.228.80] [66.96.228.80] [66.96.228.82] [66.96.228.80] [66.96.228.80] [66.96.228.80] [66.96.228.80] [66.96.228.80] [66.96.228.80] [66.96.228.83] [66.96.228.80]
Found 2 free ips. /etc/ipaddrpool has been updated

Does anyone know how to keep IP addresses after reboot?


Thanks,

Dzevad Durakovic
 

MichaelShanks

Well-Known Member
PartnerNOC
Aug 20, 2001
103
0
316
you can add the following line to

/etc/rc.d/rc.local

/etc/rc.d/init.d/ipaliases start

there are other ways but this is the simplest to explain :O)

Mike
 

moronhead

Well-Known Member
Aug 12, 2001
706
0
316
[quote:e7c3cde611][i:e7c3cde611]Originally posted by totalufo[/i:e7c3cde611]

where do you add that line to exactly?[/quote:e7c3cde611]

Try this:

echo &/etc/rc.d/init.d/ipaliases start& && /etc/rc.d/rc.local

This will append the line to the bottom of /etc/rc.d/rc.local and you're done.

Or, edit /etc/rc.d/rc.local and add this on a new line after the line that says fi:

/etc/rc.d/init.d/ipaliases start

You may want to backup /etc/rc.d/rc.local first to be on the safe side. ;)