The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

IP addresses

Discussion in 'General Discussion' started by dzevad, Nov 12, 2001.

  1. dzevad

    dzevad Well-Known Member

    Joined:
    Oct 7, 2001
    Messages:
    95
    Likes Received:
    0
    Trophy Points:
    6
    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
     
  2. MichaelShanks

    MichaelShanks Well-Known Member
    PartnerNOC

    Joined:
    Aug 20, 2001
    Messages:
    104
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  3. dzevad

    dzevad Well-Known Member

    Joined:
    Oct 7, 2001
    Messages:
    95
    Likes Received:
    0
    Trophy Points:
    6
    It worked thanks :)


    Dzevad Durakovic
     
  4. totalufo

    totalufo Well-Known Member

    Joined:
    Jan 17, 2002
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    where do you add that line to exactly?
     
  5. moronhead

    moronhead Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    706
    Likes Received:
    0
    Trophy Points:
    16
    [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. ;)
     
Loading...

Share This Page