How to start my network in CentOS 7?











up vote
1
down vote

favorite
1












I have edited the /etc/sysconfig/network-scripts/ifcfg-enpos2:



BOOTPROTO="static"
IPADDR=192.168.1.105
NETMASK=255.255.255.0
NM_CONTROLLED=no


I can't surf the web when I reboot. How do I start my network again?



systemctl restart network.service


The network isn't connected. Let's see the status.



network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: active (exited) since Wed 2015-08-26 17:21:53 CST; 21s ago
Process: 3494 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS)
Process: 3674 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)


Aug 26 17:21:50 localhost.localdomain network[3674]: Bringing up loopback interface: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: [ OK ]
Aug 26 17:21:53 localhost.localdomain network[3674]: Bringing up interface enp2s0: [ OK ]
Aug 26 17:21:53 localhost.localdomain systemd[1]: Started LSB: Bring up/down networking.


Here is my ifcfg-lo file:



cat /etc/sysconfig/network-scripts/ifcfg-lo
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback


Why can't I load it? How do I set my IP address static and make it connect to the Internet properly?










share|improve this question
























  • there must be a NetworkManager service. Try service NetworkManager restart (or) service network-manager restart
    – Madhavan Kumar
    Aug 26 '15 at 3:52










  • please read bugs.centos.org/view.php?id=7351, add "TYPE=Loopback" to avoid "Could not load file....)
    – munish
    Mar 7 '16 at 23:09

















up vote
1
down vote

favorite
1












I have edited the /etc/sysconfig/network-scripts/ifcfg-enpos2:



BOOTPROTO="static"
IPADDR=192.168.1.105
NETMASK=255.255.255.0
NM_CONTROLLED=no


I can't surf the web when I reboot. How do I start my network again?



systemctl restart network.service


The network isn't connected. Let's see the status.



network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: active (exited) since Wed 2015-08-26 17:21:53 CST; 21s ago
Process: 3494 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS)
Process: 3674 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)


Aug 26 17:21:50 localhost.localdomain network[3674]: Bringing up loopback interface: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: [ OK ]
Aug 26 17:21:53 localhost.localdomain network[3674]: Bringing up interface enp2s0: [ OK ]
Aug 26 17:21:53 localhost.localdomain systemd[1]: Started LSB: Bring up/down networking.


Here is my ifcfg-lo file:



cat /etc/sysconfig/network-scripts/ifcfg-lo
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback


Why can't I load it? How do I set my IP address static and make it connect to the Internet properly?










share|improve this question
























  • there must be a NetworkManager service. Try service NetworkManager restart (or) service network-manager restart
    – Madhavan Kumar
    Aug 26 '15 at 3:52










  • please read bugs.centos.org/view.php?id=7351, add "TYPE=Loopback" to avoid "Could not load file....)
    – munish
    Mar 7 '16 at 23:09















up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I have edited the /etc/sysconfig/network-scripts/ifcfg-enpos2:



BOOTPROTO="static"
IPADDR=192.168.1.105
NETMASK=255.255.255.0
NM_CONTROLLED=no


I can't surf the web when I reboot. How do I start my network again?



systemctl restart network.service


The network isn't connected. Let's see the status.



network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: active (exited) since Wed 2015-08-26 17:21:53 CST; 21s ago
Process: 3494 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS)
Process: 3674 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)


Aug 26 17:21:50 localhost.localdomain network[3674]: Bringing up loopback interface: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: [ OK ]
Aug 26 17:21:53 localhost.localdomain network[3674]: Bringing up interface enp2s0: [ OK ]
Aug 26 17:21:53 localhost.localdomain systemd[1]: Started LSB: Bring up/down networking.


Here is my ifcfg-lo file:



cat /etc/sysconfig/network-scripts/ifcfg-lo
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback


Why can't I load it? How do I set my IP address static and make it connect to the Internet properly?










share|improve this question















I have edited the /etc/sysconfig/network-scripts/ifcfg-enpos2:



BOOTPROTO="static"
IPADDR=192.168.1.105
NETMASK=255.255.255.0
NM_CONTROLLED=no


I can't surf the web when I reboot. How do I start my network again?



systemctl restart network.service


The network isn't connected. Let's see the status.



network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: active (exited) since Wed 2015-08-26 17:21:53 CST; 21s ago
Process: 3494 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS)
Process: 3674 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)


Aug 26 17:21:50 localhost.localdomain network[3674]: Bringing up loopback interface: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: Could not load file '/etc/sysconfig/network-scripts/ifcfg-lo'
Aug 26 17:21:50 localhost.localdomain network[3674]: [ OK ]
Aug 26 17:21:53 localhost.localdomain network[3674]: Bringing up interface enp2s0: [ OK ]
Aug 26 17:21:53 localhost.localdomain systemd[1]: Started LSB: Bring up/down networking.


Here is my ifcfg-lo file:



cat /etc/sysconfig/network-scripts/ifcfg-lo
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback


Why can't I load it? How do I set my IP address static and make it connect to the Internet properly?







centos networkmanager






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 3 at 9:09









Anthony Geoghegan

7,44133854




7,44133854










asked Aug 26 '15 at 2:18









it_is_a_literature

19742556




19742556












  • there must be a NetworkManager service. Try service NetworkManager restart (or) service network-manager restart
    – Madhavan Kumar
    Aug 26 '15 at 3:52










  • please read bugs.centos.org/view.php?id=7351, add "TYPE=Loopback" to avoid "Could not load file....)
    – munish
    Mar 7 '16 at 23:09




















  • there must be a NetworkManager service. Try service NetworkManager restart (or) service network-manager restart
    – Madhavan Kumar
    Aug 26 '15 at 3:52










  • please read bugs.centos.org/view.php?id=7351, add "TYPE=Loopback" to avoid "Could not load file....)
    – munish
    Mar 7 '16 at 23:09


















there must be a NetworkManager service. Try service NetworkManager restart (or) service network-manager restart
– Madhavan Kumar
Aug 26 '15 at 3:52




there must be a NetworkManager service. Try service NetworkManager restart (or) service network-manager restart
– Madhavan Kumar
Aug 26 '15 at 3:52












please read bugs.centos.org/view.php?id=7351, add "TYPE=Loopback" to avoid "Could not load file....)
– munish
Mar 7 '16 at 23:09






please read bugs.centos.org/view.php?id=7351, add "TYPE=Loopback" to avoid "Could not load file....)
– munish
Mar 7 '16 at 23:09












3 Answers
3






active

oldest

votes

















up vote
0
down vote













CentOS 7 switched to systemd - use systemctl restart network.service to restart your network.



For static network settings like yours you may want to install NetworkManager-config-server RPM package using yum






share|improve this answer





















  • It is more complicated than you think,please see my re-edited post.
    – it_is_a_literature
    Aug 26 '15 at 10:07










  • Maybe the selinux labels are broken. Try restorecon -FRv /etc/sysconfig/ and reload network.
    – MLu
    Aug 26 '15 at 11:44


















up vote
0
down vote













it cost me also lot of time but at least trying this:



# service NetworkManager stop
Redirecting to /bin/systemctl stop NetworkManager.service
# chkconfig NetworkManager off


removed the lo error since the Manger was blocking it.



Just I still dont get internet on my fresh centos 7 installation






share|improve this answer




























    up vote
    0
    down vote













    Looks like you disabled NetworkManager and now your ifcfg-enp0s2 file doesn't have enough information in it.
    In addition to:



    BOOTPROTO="static"
    IPADDR=192.168.1.105
    NETMASK=255.255.255.0
    NM_CONTROLLED=no


    You also need:



    # Specify the default gateway
    GATEWAY=<ip of your router>
    # Bring the interface up on boot
    ONBOOT=yes
    # Specify your dns server
    DNS1=<ip of your router>





    share|improve this answer





















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "106"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














       

      draft saved


      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f225525%2fhow-to-start-my-network-in-centos-7%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      0
      down vote













      CentOS 7 switched to systemd - use systemctl restart network.service to restart your network.



      For static network settings like yours you may want to install NetworkManager-config-server RPM package using yum






      share|improve this answer





















      • It is more complicated than you think,please see my re-edited post.
        – it_is_a_literature
        Aug 26 '15 at 10:07










      • Maybe the selinux labels are broken. Try restorecon -FRv /etc/sysconfig/ and reload network.
        – MLu
        Aug 26 '15 at 11:44















      up vote
      0
      down vote













      CentOS 7 switched to systemd - use systemctl restart network.service to restart your network.



      For static network settings like yours you may want to install NetworkManager-config-server RPM package using yum






      share|improve this answer





















      • It is more complicated than you think,please see my re-edited post.
        – it_is_a_literature
        Aug 26 '15 at 10:07










      • Maybe the selinux labels are broken. Try restorecon -FRv /etc/sysconfig/ and reload network.
        – MLu
        Aug 26 '15 at 11:44













      up vote
      0
      down vote










      up vote
      0
      down vote









      CentOS 7 switched to systemd - use systemctl restart network.service to restart your network.



      For static network settings like yours you may want to install NetworkManager-config-server RPM package using yum






      share|improve this answer












      CentOS 7 switched to systemd - use systemctl restart network.service to restart your network.



      For static network settings like yours you may want to install NetworkManager-config-server RPM package using yum







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Aug 26 '15 at 5:37









      MLu

      1,323822




      1,323822












      • It is more complicated than you think,please see my re-edited post.
        – it_is_a_literature
        Aug 26 '15 at 10:07










      • Maybe the selinux labels are broken. Try restorecon -FRv /etc/sysconfig/ and reload network.
        – MLu
        Aug 26 '15 at 11:44


















      • It is more complicated than you think,please see my re-edited post.
        – it_is_a_literature
        Aug 26 '15 at 10:07










      • Maybe the selinux labels are broken. Try restorecon -FRv /etc/sysconfig/ and reload network.
        – MLu
        Aug 26 '15 at 11:44
















      It is more complicated than you think,please see my re-edited post.
      – it_is_a_literature
      Aug 26 '15 at 10:07




      It is more complicated than you think,please see my re-edited post.
      – it_is_a_literature
      Aug 26 '15 at 10:07












      Maybe the selinux labels are broken. Try restorecon -FRv /etc/sysconfig/ and reload network.
      – MLu
      Aug 26 '15 at 11:44




      Maybe the selinux labels are broken. Try restorecon -FRv /etc/sysconfig/ and reload network.
      – MLu
      Aug 26 '15 at 11:44












      up vote
      0
      down vote













      it cost me also lot of time but at least trying this:



      # service NetworkManager stop
      Redirecting to /bin/systemctl stop NetworkManager.service
      # chkconfig NetworkManager off


      removed the lo error since the Manger was blocking it.



      Just I still dont get internet on my fresh centos 7 installation






      share|improve this answer

























        up vote
        0
        down vote













        it cost me also lot of time but at least trying this:



        # service NetworkManager stop
        Redirecting to /bin/systemctl stop NetworkManager.service
        # chkconfig NetworkManager off


        removed the lo error since the Manger was blocking it.



        Just I still dont get internet on my fresh centos 7 installation






        share|improve this answer























          up vote
          0
          down vote










          up vote
          0
          down vote









          it cost me also lot of time but at least trying this:



          # service NetworkManager stop
          Redirecting to /bin/systemctl stop NetworkManager.service
          # chkconfig NetworkManager off


          removed the lo error since the Manger was blocking it.



          Just I still dont get internet on my fresh centos 7 installation






          share|improve this answer












          it cost me also lot of time but at least trying this:



          # service NetworkManager stop
          Redirecting to /bin/systemctl stop NetworkManager.service
          # chkconfig NetworkManager off


          removed the lo error since the Manger was blocking it.



          Just I still dont get internet on my fresh centos 7 installation







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jun 2 '16 at 0:34









          Samsky

          101




          101






















              up vote
              0
              down vote













              Looks like you disabled NetworkManager and now your ifcfg-enp0s2 file doesn't have enough information in it.
              In addition to:



              BOOTPROTO="static"
              IPADDR=192.168.1.105
              NETMASK=255.255.255.0
              NM_CONTROLLED=no


              You also need:



              # Specify the default gateway
              GATEWAY=<ip of your router>
              # Bring the interface up on boot
              ONBOOT=yes
              # Specify your dns server
              DNS1=<ip of your router>





              share|improve this answer

























                up vote
                0
                down vote













                Looks like you disabled NetworkManager and now your ifcfg-enp0s2 file doesn't have enough information in it.
                In addition to:



                BOOTPROTO="static"
                IPADDR=192.168.1.105
                NETMASK=255.255.255.0
                NM_CONTROLLED=no


                You also need:



                # Specify the default gateway
                GATEWAY=<ip of your router>
                # Bring the interface up on boot
                ONBOOT=yes
                # Specify your dns server
                DNS1=<ip of your router>





                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Looks like you disabled NetworkManager and now your ifcfg-enp0s2 file doesn't have enough information in it.
                  In addition to:



                  BOOTPROTO="static"
                  IPADDR=192.168.1.105
                  NETMASK=255.255.255.0
                  NM_CONTROLLED=no


                  You also need:



                  # Specify the default gateway
                  GATEWAY=<ip of your router>
                  # Bring the interface up on boot
                  ONBOOT=yes
                  # Specify your dns server
                  DNS1=<ip of your router>





                  share|improve this answer












                  Looks like you disabled NetworkManager and now your ifcfg-enp0s2 file doesn't have enough information in it.
                  In addition to:



                  BOOTPROTO="static"
                  IPADDR=192.168.1.105
                  NETMASK=255.255.255.0
                  NM_CONTROLLED=no


                  You also need:



                  # Specify the default gateway
                  GATEWAY=<ip of your router>
                  # Bring the interface up on boot
                  ONBOOT=yes
                  # Specify your dns server
                  DNS1=<ip of your router>






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 16 '16 at 19:21









                  Jason Powell

                  1814




                  1814






























                       

                      draft saved


                      draft discarded



















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f225525%2fhow-to-start-my-network-in-centos-7%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Morgemoulin

                      Scott Moir

                      Souastre