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.

How do you set a dedicated IP to a second nic card?

Discussion in 'General Discussion' started by DWHS.net, Apr 5, 2010.

  1. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    I have a server running one nic for several IP's but I have a account that needs lots of priority so I would like to have the second nic just for this one IP.

    I added the IP in WHM and the second nic is set to: DHCP

    I tried to use the setup command via centos / fedora but that seems to confuse cpanel and kill the new IP.

    When you set up cpanel it asks for additional IP's and gives the option of which nic to add it too. Can you still do that after cpanel is installed?
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    Remove the IP from cpanel & the set up the nic manually with a static IP & the correct IP information

    nano /etc/sysconfig/network-scripts/ifcfg-ethx

    & reload alias's

    /usr/local/cpanel/whostmgr/bin/ipaliases restart


    if the second nic is set to DHCP it will never work right
     
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    If the primary NIC is not desirable to use then the additional IPs must be manually configured on the preferred NIC. For assistance I recommend consulting with the data center staff or network engineering personnel as they will know the proper network setup information to use, including the correct network mask, network gateway, broadcast address, and applicable routing information.

    It is correct that DHCP may need to be disabled and not used on the network interfaces as it may cause configuration difficulty.
     
  4. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    The network interface option for the main Ethernet device is configurable via the following menu path (after installation):
    WHM: Main >> Server Configuration >> Basic cPanel/WHM Setup >> Settings
    • Main Ethernet Device "If you are using a device other than the first ethernet device (eth0) as your public interface, enter it here."

    The setting is defined by the entry for "ETHDEV" within the file "/etc/wwwacct.conf" as found via the following example command (using "grep"):
    Code:
    # grep -hi "ETHDEV" /etc/wwwacct.conf
     
Loading...

Share This Page