Second IP not coming up after reboot on Centos 5.2

Discussion in 'HOWTO-Related Questions' started by marm26, Jan 15, 2009.

  1. marm26

    marm26 New Member

    Hello Everybody.

    I am having problems to get a second IP on my server to start up after rebooting the system. I followed the perfect server how to for centos 5.2.
    I added an additional IP by copying the following file:

    cp /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-eth1:1

    Afterwards I opened ifcfg-eth1:1 and changed the respective date to the new IP I added.

    ifcfg-eth1 contains the following:
    # Attansic Technology Corp. Unknown device 1026

    ifcfg-eth1:1 contains the following:
    # Attansic Technology Corp. Unknown device 1026

    So far so good. if i enter ifup eth1:1 it brings up the second IP and everything is working just fine. However the second IP is not coming up automatically when I reboot the server. Does anybody know how to solve this problem? I already tried the steps shown here: for making the second IP come up on boot but the only effect that deleting the Gateway from eth1 had was that I couldn’t access my server remotely anymore and I had to undo the changes.(the default server IP wasn’t coming up anymore)

    One strange thing I recognized is that etc/sysconfig/network-scripts/ does not contain an ifcfg-eth0 file. Only a ifcfg-eth0.bak file. Might that be causing the problem?

    Thank you for your help guys...
  2. falko

    falko Super Moderator ISPConfig Developer

    Do you have an eth0, or just eth1?

    The easiest solution might be to add
    ifup eth1:1
    to /etc/rc.local.
  3. marm26

    marm26 New Member

    Problem solved!

    Adding ifup eth1:1 to /etc/rc.local did the deal. Thanks a lot Falko.

    To answer your question, no i don't have an eth0 file. There is only a ifcfg-eth1:0.bak file.
  4. marm26

    marm26 New Member

    Ohhh it looks like my server still isn't doing what i want it to do. Now after I made the changes that falko suggested the second IP comes up when the server is rebooted but for some strange reason its not staying up.

    After a few days the second IP is not up anymore. Any ideas to what could be causing this? Any ideas for a quick fix?
  5. falko

    falko Super Moderator ISPConfig Developer

    Any errors in your logs?
  6. marm26

    marm26 New Member

    Could you specify the error log I have to open to find possible errors connected to my second IP?

    There are a lot of error logs in /var/log/

    To be very honest. I don't understand any one of them. The only error log files I could possibly relate to are php error logs. But I don't understand a thing about server related error logs.
  7. falko

    falko Super Moderator ISPConfig Developer

    Something like /var/log/messages or /var/log/syslog.
  8. marm26

    marm26 New Member

    Hi Falko.

    Nothing in /var/log/messages
    Just a lot of FTP session opened; FTP session closed

    I don't have a /var/log/syslog on my system.
    I am on Centos 5.2 if that helps.

    Thanks again for your help...
  9. falko

    falko Super Moderator ISPConfig Developer

    Hm... Do you lose the second IP randomly, or after a certain event?
  10. marm26

    marm26 New Member

    Randomly, The website that is hosted on that server hasn't been opened for several days when the second IP went down. I have no idea what could have caused this. But I would say its close to being impossible that it has been triggered by some event/ action.
  11. falko

    falko Super Moderator ISPConfig Developer

    Is there maybe a cron job that restarts the network or does anything similar that could cause this?
  12. marm26

    marm26 New Member

    No, no cron jobs our anything that could possibly cause the second ip to go down.
  13. falko

    falko Super Moderator ISPConfig Developer

    Hm, then I'm at my wit's end... :(
  14. marm26

    marm26 New Member

    Ok thank you anyways. Well lets just hope it was indeed something random and it doesnt happen again.

    thanks again ya.

Share This Page