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.

Add an internal IP on eth0

Discussion in 'General Discussion' started by jameshsi, Dec 14, 2009.

  1. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Hi!
    I am trying to use an internal IP (192.168.100.XX) to backup some data to the other server in the same rack using same switch, so I go to /etc/sysconfig/network-scripts/ and add a ifcfg-eth0:1, then, I restart network by "service network restart" , am i doing wrong ?
    It seems I doing big wrong, and all the IP are gone, so i add them back in WHM, but I still need to add the internal IP, how can I do that ?
    Where did cpanel put the IP setting to ? I mean there must be some files like ifcfg-eth0:1 , pls let me know the correct way to do this.:confused:
     
  2. BianchiDude

    BianchiDude Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2005
    Messages:
    619
    Likes Received:
    0
    Trophy Points:
    16
    Not 100% sure but I think you would need 2 nic cards and you would make eth1 the private IP, and connect that to the switch/vlan of your private network.
     
  3. NeilAgg

    NeilAgg Member

    Joined:
    Dec 14, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Houston, TX
    Here is an example of ifcfg-eth0:0 from one of my servers:


    DEVICE=eth0:0
    BOOTPROTO=static
    BROADCAST=[bcast]
    HWADDR=[max]
    IPADDR=[ip]
    NETMASK=[netmask]
    NETWORK=[network]
    ONBOOT=yes

    Note: It should not have a gateway specification.
    Once you create the file, you should be able to do ifup eth0:0
     
  4. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    It turn out to be very easy to add an internal IP to server, you just login to WHM, and add the IP ( 192.168.100.10) like what u do for public IP, and WHM will bind that IP without problem, but you just won't see any ifcfg-eth0:1 file in /etc/sysconfig/network-scripts/ .

    On the other hand, if u manuly add that ip, like what u do in linux, u add a file called ifcfg-eth0:1, that might caused problem.
     
Loading...

Share This Page