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.

changing subnetmask on all servers

Discussion in 'General Discussion' started by CoolMike, Jul 12, 2005.

  1. CoolMike

    CoolMike Well-Known Member

    Joined:
    Sep 6, 2001
    Messages:
    307
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    I have to change the subnet mask on all my cpanel servers in a few days. I'm wondering, is it enough if I change the file "/etc/sysconfig/network-scripts/ifcfg-eth0"? Or is there anything else needed? After I made the change there, do I need to restart a service?

    I use Centos 3.5.

    Thanks
    Michael
     
  2. CoolMike

    CoolMike Well-Known Member

    Joined:
    Sep 6, 2001
    Messages:
    307
    Likes Received:
    0
    Trophy Points:
    16
    I just realized in this file I have only the main IP adress, what about the second IP which I have configured on this servers? I did expect that there will be also a file ifcfg-eth0:1, but I did not find it.

    Michael
     
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Run ifconfig to check how your IP addresses are bound. After making changes you need to down and up the interface. Remotely, this is best done with:

    /etc/init.d/network restart

    But do be aware that this can render the server inaccessible and may require a manual restart of the network from the console. If you have access to the console remotely, do that restart from there. If not, it might be better to simply reboot.
     
  4. CoolMike

    CoolMike Well-Known Member

    Joined:
    Sep 6, 2001
    Messages:
    307
    Likes Received:
    0
    Trophy Points:
    16
    Hi Chirpy

    ipconfig shows this:

    But I have only a /etc/sysconfig/network-scripts/ifcfg-eth0 file and not a second one for eth0:1.

    Where can I change the subnetmask for the second ip address?

    Thanks
    Michael
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    They're setup by /etc/init.d/ipaliases and take the information from the file /etc/ips which contains, among other things, the network mask information.
     
  6. CoolMike

    CoolMike Well-Known Member

    Joined:
    Sep 6, 2001
    Messages:
    307
    Likes Received:
    0
    Trophy Points:
    16
    Thanks a lot, this was exactly what I was looking for.

    Michael
     
Loading...

Share This Page