Additional IP's Lost upon Reboot

l33tnet

Verified User
Joined
Jun 6, 2007
Messages
9
When adding an additional IP through DirectAdmin, the IP address is lost upon reboot of the machine - the IP becomes unpingable and non-routeable.

CentOS 4 DA Latest
 
Make sure startips is being run after the network starts and that nothing makes the network restart after that. Probably something is causing the network to restart after startips is run.
 
My understanding is that DA executes the ifconfig command when adding an IP, but it wont write out the ifcfg:ethX:Y file...

Webmin will help you out in this case =)
 
/usr/local/directadmin/scripts/startips needs to be run after the network is started. Also make sure that the latest IP#s are being added here: /usr/local/directadmin/data/admin/ips/.

Jeff
 
http://www.help.directadmin.com/item.php?id=136

When adding an additional IP through DirectAdmin, the IP address is lost upon reboot of the machine - the IP becomes unpingable and non-routeable.

CentOS 4 DA Latest

http://www.help.directadmin.com/item.php?id=136

After a "service network restart" command is run, the "service startips start" script needs to be run. The startips script is run at bootup time, but on some systems, it seems that the network restart is called again, after the initial startup.

One solution is to run:

/sbin/service startips start
after each startup, but usually, admins can't watch their boxes all day long.

The easier solution is to setup the alised IPs into the network settings so they're loaded with the network, no matter how many times it's restarted.

If you type "/sbin/ifconfig", it will tell you what your ethenernet device name is for your main server IP.. usually eth0 or eth1.
Let's use eth0 for the example.
You'll create a file called:
/etc/sysconfig/network-scripts/ifcfg-eth0-range0

in it, you'll add the code:

IPADDR_START=192.168.0.2
IPADDR_END=192.168.0.100
CLONENUM_START=0
where 192.168.0.2 is the next IP *after* your server IP which is not part of this list. Only include aliased IPs in this list (IPs that are added after your server IP). And obviously, the 192.168.0.100 would be the ending IP address.

Once done, you can type:

/sbin/service network restart
to test it out. (make sure you're logged into your server IP when yo do this, or you might get disconnected if it fails).
 
Modify the network startup script to run the startips script every time it is run.

Or create the network-scripts files.
 
after you add them to DA IP Managment,
define them by /etc/rc.local
reboot and it should work
 
define them by /etc/rc.local

That will work on the initial boot but not if the network script is run after the boot process is finished and after rc.local is run. What is a program restarts the network 2 minutes later, rc.local will not help then.
 
Modify the network startup script to run the startips script every time it is run.

Or create the network-scripts files.
Or create a script in /etc/rc.d/init.d/ and a pointer in /etc.rc.d/rc3.d/ to run startips whenever the network is started/restarted/reloaded.

(Note example given is for RedHat based servers.)

However this should work without any problems on every platform DirectAdmin supports, so I think we'd be better off finding out why it's not working.

Jeff
 
Back
Top