How to Configure Network Static IP Address and Manage Services on RHEL/CentOS 7.0

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Matei Cezar

I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

11 Responses

  1. walid says:

    After 2 hours tests, Good all be fine, it works fine, just Added : In smb.conf file configuration in [Anonymous]

    1- be sure that your server has a static connection
    2- added user with password : smbpasswd -a username

    Thank For Author I have make a samba configuration in 2 hours

    I feel learning with quick manner in this site Thank you very much

  2. rickyketch says:

    I also routinely disable NetworkManager on my servers, but do note that “nmtui” (and also nmcli) are NetworkManager clients, so you cannot use them if you have disabled NetworkManager.

  3. xplorerdev says:

    Excellent!. This is the ONLY post on setting static IP on Centos which is correct. Simple flow.

    All: Just follow the steps as is.

    Great explanation. Great job guys.

  4. David Penney says:

    Great article. The static IP configuration works great on my RHEL 7 server vm.

    Just have a question. The Red Hat documentation says that BOOTPROTO should be set to “none”. My copy of your configuration only works with BOOTPROTO=static as you used in your example. If I set it to none the ip address does not get updated. I am having some discussions with our Linux sys admins since they are insisting that I should follow only the Red Had docs and this is a problem as I can’t make it work with BOOTPROTO=none. Is there a reason why it only works with BOOTPROTO=static?

    • Matei Cezar says:

      If it works with bootptoto=static then stick with this option as long as it does the job right! As far as i know it should work also with none (none actually specifies that no boot-time protocol should be used but the IP value from IPADDR= variable should be updated for NIC at boot time).

  5. Matei Cezar says:

    @Ehwan Kho: Just use ip link show or ifconfig -a command and you should see all your NICs names. You can also use nmtui to edit your new card settings.

  6. Ehwan Kho says:

    How do I add a new network card – NIC? I tried using lspci | grep Ethernet, it display that it 2 cards. My question now how could I know its name? as they are not using the eth1, eth2 et al.. And I can’t see /etc/udev/rules.d/70-persistent-net.rules. Your thoughts are highly appreciated.

  7. Matei Cezar says:

    In my opinion you can use both approaches, manual editing NICs interfaces or configure static IP using NM or nmtui if you dont have a GUI. But for a better control and flexibility over your NICs you should go with manual configurations, without NM. If you go with manual without NM don’t forget to use NM_CONTROLLED=no and ONBOOT=yes parameters.

    • ubani friday says:

      please matie cezar can you teach me how to network a small firm.
      i will be happy if you can teach me form scratch to the level of networking a firm.
      i want to learn the installation and configuration

  8. Howard says:

    I ALWAYS disable network manager on Servers, it’s too dynamic and wastes resources. Why Red Hat is pushing that crap I don’t know, but I haven’t met anyone who wants it on a server. It’s great for desktops, and laptops, but NOT servers.
    Also, the DNS settings need to stick to being setup in the resolv.conf file, not spread out in the ifcfg scripts. Keeps the config manageable and easy to troubleshoot.

  9. B. says:

    From going over the documentation on RHEL/CentOS 7, it appears that they’re really pushing for NetworkManager to be the default way to manage networking. For servers (not desktop) do you believe it’s best to disable NetworkManager and just assign static IPs normally as you have instructed or do you believing managing all the network through net manager is worth it?

    The reason I ask is because I only deal with servers (not desktops) and I’ve seen many times NetworkManger causing major network issues. So I’m still on the fence whether or not to do things through netManager. Specially considering that rhel 7 is using it by default.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.