ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    CentOS 7 networking issues

    IT Discussion
    centos centos 7 networking
    4
    16
    3.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JaredBuschJ
      JaredBusch @Obsolesce
      last edited by

      @Tim_G said in CentOS 7 networking issues:

      First thing I do on CentOS is disable Network Manager. I hate it.

      Wrong answer, sorry. Network manager is the new default. You should get used to it and use it appropriately.

      1 Reply Last reply Reply Quote 2
      • JaredBuschJ
        JaredBusch
        last edited by

        So I changed it to static like this.

        0_1488409027886_upload-6278cf40-5144-4ad9-a5ed-a3593f25ef3e

        1 Reply Last reply Reply Quote 0
        • ObsolesceO
          Obsolesce
          last edited by

          Part of my CentOS routine:

          1. Change run level: nano /etc/inittab (use id:3:initdefault:)

          2. cd /etc/rc.d/rc3.d

          3. ls -lh

          4. mv S23NetworkManager K23NetworkManager

          5. Reboot

          6. ls -l /etc/sysconfig/network-scripts (to see what's there)

          7. nano /etc/sysconfig/network-scripts/ifcfg-eth0
            (if dhcp)
            DEVICE=eth0
            BOOTPROTO=dhcp
            ONBOOT=yes
            (save it)

          ifup eth0
          chkconfig network on

          stacksofplatesS 1 Reply Last reply Reply Quote 0
          • travisdh1T
            travisdh1
            last edited by

            Network Manager, still throwing admins for a loop even after all these years 😞

            1 Reply Last reply Reply Quote 0
            • stacksofplatesS
              stacksofplates
              last edited by stacksofplates

              NetworkManager still creates the ifcfg files under network-scripts. So those configs will still be there, but should have NM_CONTROLLED=yes

              Also, for some reason CentOS ships with both network and NetworkManager on at the same time. So that's most likely why you saw the DHCP for NetworkManager and the static file that you created. I always disable and mask network to keep people from turning it back on when they aren't paying attention.

              stacksofplatesS 1 Reply Last reply Reply Quote 0
              • stacksofplatesS
                stacksofplates @Obsolesce
                last edited by stacksofplates

                @Tim_G said in CentOS 7 networking issues:

                Part of my CentOS routine:

                1. Change run level: nano /etc/inittab (use id:3:initdefault:)

                2. cd /etc/rc.d/rc3.d

                3. ls -lh

                4. mv S23NetworkManager K23NetworkManager

                5. Reboot

                6. ls -l /etc/sysconfig/network-scripts (to see what's there)

                7. nano /etc/sysconfig/network-scripts/ifcfg-eth0
                  (if dhcp)
                  DEVICE=eth0
                  BOOTPROTO=dhcp
                  ONBOOT=yes
                  (save it)

                ifup eth0
                chkconfig network on

                Targets (run levels) are handled through systemd now so you should use systemctl set-default multi-user.target.

                And as @JaredBusch said, NetworkManager is the new default, and handles things like teaming much better.

                ObsolesceO 1 Reply Last reply Reply Quote 1
                • ObsolesceO
                  Obsolesce @stacksofplates
                  last edited by

                  @stacksofplates Didn't realize he was being forced to use defaults. Since that's the case, I guess he has no other option than to use Network Manager?

                  JaredBuschJ 1 Reply Last reply Reply Quote 0
                  • JaredBuschJ
                    JaredBusch @Obsolesce
                    last edited by

                    @Tim_G said in CentOS 7 networking issues:

                    @stacksofplates Didn't realize he was being forced to use defaults. Since that's the case, I guess he has no other option than to use Network Manager?

                    No one is forcing me to use anything. But use of defaults is a best practice. without a really good reason, you do not stray from them.

                    ObsolesceO 1 Reply Last reply Reply Quote 2
                    • ObsolesceO
                      Obsolesce @JaredBusch
                      last edited by

                      @JaredBusch said in CentOS 7 networking issues:

                      @Tim_G said in CentOS 7 networking issues:

                      @stacksofplates Didn't realize he was being forced to use defaults. Since that's the case, I guess he has no other option than to use Network Manager?

                      No one is forcing me to use anything. But use of defaults is a best practice. without a really good reason, you do not stray from them.

                      Losing VM functionality due to time issues because of a default isn't a good enough reason? Isn't it a production VM? Does it being down not lose the company money on top of paying you to mess with it? I'd rather use a non-default that works just as well for a particular function or task, rather than having to waste so much of a clients money to fix something that can arguably be replaced with something else non-default. Maybe Network Manager handles teaming better, but are you using teaming? Are you using teaming at the VM level or at the Hypervisor level? Just do what's best for the client. Don't use a default because it does something better with something you aren't even using. Know what I mean?

                      Maybe for your case it's worth it to get Network Manager working properly due to other things I don't know about. I'm not giving a blanket statement, just throwing out a point is all.

                      Sometimes best practice is a square, and what you are dealing with is a circle. It might not fit.

                      stacksofplatesS 1 Reply Last reply Reply Quote 0
                      • stacksofplatesS
                        stacksofplates @Obsolesce
                        last edited by

                        @Tim_G said in CentOS 7 networking issues:

                        Losing VM functionality due to time issues because of a default isn't a good enough reason

                        That's not the reason. The downtime was due to both services running. I have literally never had a network issue with just NetworkManager running. It also takes about 10 seconds to set up an interface through NetworkManager, it's much simpler.

                        Also network is being phased out, and not receiving feature updates. So while you can use it currently, it's most likely not going to be there in 8.

                        And yes, I am using teaming, but on the host.

                        1 Reply Last reply Reply Quote 0
                        • stacksofplatesS
                          stacksofplates @stacksofplates
                          last edited by

                          @stacksofplates said in CentOS 7 networking issues:

                          NetworkManager still creates the ifcfg files under network-scripts. So those configs will still be there, but should have NM_CONTROLLED=yes

                          Also, for some reason CentOS ships with both network and NetworkManager on at the same time. So that's most likely why you saw the DHCP for NetworkManager and the static file that you created. I always disable and mask network to keep people from turning it back on when they aren't paying attention.

                          So it looks like they took out the NM_CONTROLLED section. I must have been thinking of RHEL 6. But NM still creates the ifcfg files in the same directory.

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post