How can i add a second ip on my Centos server?

Discussion in 'Site & Server Administration' started by asteraki1976, Jan 28, 2014.

  1. #1
    Hello

    I am very confused about second ip routed on a dedicated server a on the last 2-3 datacenters that i got a dedicated server i just ask for a second ip routed on my server and they just add it without accessing my server and i was able to ping it and use it as ns2.

    I got one server a few days ago from online.net and i got 1 ip and i ask for a second ip routed on my server and they told me to get one failover ip and add it on my server from the client panel.

    I did it but i was not able to ping or use that ip so i contact them and they told me to create a file:

    /etc/sysconfig/network-scripts/ifcfg-eth0:0
    Code (markup):
    as i did and i add all the info there...

    Then when i try to run ifup eth0:0 or service network restart i got this:

    eth0:0 is not present, initialization will be delayed
    Code (markup):
    Then i just check on the path /etc/sysconfig/network-scripts/ and no eth0 file is there... and my main server ip was on a file named em1...

    Any ideas how can i fix this so i can ping that ip?

    if i run ifconfig i can see the em1 only interface that is working using main sever ip and lo ...

    Thank you
     
    Solved! View solution.
    asteraki1976, Jan 28, 2014 IP
  2. #2
    /etc/sysconfig/network-scripts/ifcfg-em1
    DEVICE=em1
    BOOTPROTO=none
    ONBOOT=yes
    IPADDR=XXX.XXX.XXX.XXX
    NETMASK=XXX.XXX.XXX.XXX
    BROADCAST=XXX.XXX.XXX.XXX
    GATEWAY=XXX.XXX.XXX.XXX

    /etc/sysconfig/network-scripts/ifcfg-em1:0
    DEVICE=em1:0
    BOOTPROTO=none
    ONPARENT=yes
    IPADDR=XXX.XXX.XXX.XXX
    NETMASK=XXX.XXX.XXX.XXX
    BROADCAST=XXX.XXX.XXX.XXX


    Adjust those to your network specs, then do:

    /etc/init.d/network restart
     
    zacharooni, Jan 28, 2014 IP
  3. asteraki1976

    asteraki1976 Active Member

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #3
    Great thanks :)
     
    asteraki1976, Jan 29, 2014 IP