Announcement

Collapse
No announcement yet.

NetworkManager killing my static eth0 link all the time

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    NetworkManager killing my static eth0 link all the time

    I have a little issue with the default NetworkManager reverting to a non-configured LAN eth0 interface when there is no DHCP present.

    I read elsewhere that people have these issues with NetworkManager more and that there is also a substitute manager available that I now forgot about.

    The thing is that if I manually configure a static IP address, it will constantly delete this address from the interface, no matter (usually) if it is at that point trying for DHCP, or apparently leaving it alone.

    I now have a root shell open with watch ifconfig eth0 192.168.1.x where x is the local IP number for this subnet (obviously) that my laptop uses to connect to the static server I also have on static IP.

    In other words, every 2 seconds it configures the eth0 again, this way I always have a link.

    I may even have an open SSH connection to that other computer (it is not on the internet in any way now, although I am, though not on the static ethernet cable link....) and the IP address is removed by NetworkManager and then the link will stop responding (no more control in my SSH) until I reassign the IP address to the interface.

    Killing NetworkManager is an option at that point but then I have to chmod a-x to make sure it doesn't run, because something "reboots" it constantly if I happen to kill it also.

    I really don't know what to do about it. I have to run it for wifi links. But it also refuses /etc/network/interfaces completely. It doesn't even use that data on eth0 even when it is available (and functional for doing ifconfig).

    #2
    I think it really incredible to have a network manager or network configuration system that does not even allow you to specify a fixed or dhcp address.

    It is not configurable at all.

    Comment


      #3
      There is not even any network section in the System Settings that does anything.

      Comment


        #4
        It is really weird. And what is more, it even obstructs anything you do by hand. It also interferes with any manual wpa_supplicant configuration. It must be the greatest system ever devised.

        :P.

        Comment


          #5
          I do not know about the wpa_supplicant but I have a manual ip local dns wired ethernet connection configured here in addition to a normal wired connection with dhcp and switch between them with a click of the mouse.
          I just use network manager from the taskbar.
          Maybe you are needing something more?

          Comment


            #6
            xennex81: I don't use NM on my desktop, but I have it on a laptop - it never does what you're describing, but I rarely plug in the cable.

            To your issue: You're not getting any helpful responses because you're mostly just describing what's wrong but not really supplying any hard info. Start with a detailed description of the hardware involved. Review all your log files and post any pertinent messages - starting with dmesg. Attach config files that apply like NetworkManager.conf, interfaces, etc.. Post the output of key commands that apply, like route, ifconfig, nmcli dev, etc. Post screen shots of the NM configuration screen for the ethernet interface in question. Describe in detail what changes you made to your system that might effect networking - iptables, firewalls, VPNs, etc.

            Unless you do the background work there's not much any of us can suggest because - apparently, since you've received no help - no one else is having this experience. You have to help us help you.

            Please Read Me

            Comment


              #7
              I guess, I will see if I can do something. The only downside (upside?? :P) being that at that point I will probably be able to fix it myself, and providing all of that information is currently a too big a toll on my.... mental condition, so to speak.

              Let me give a few background informations:

              - i have noticed google entries suggesting the same problem from a few years back, and I think it was also Kubuntu, but I will have to search again to provide detail. Later.
              - I did not change anything firewall wise, this was a real fresh install, and it happened on 15.04 the same as on 14.10.
              - my /etc/network/services was and is simply:

              Okay never mind then. I hadn't found that the icon of the tool in the top right corner of the popup of NetworkManager in the system tray, was actually a clickable button. There was no indication that it would allow to be clicked just from the visuals, and in my hastiness I guess I had just sought a different solution that would be more readily apparent to me.

              I just hadn't found that screen yet. But it still ignores /etc/network/interfaces!!

              Let's say that I was accustomed as of late of:
              - meaningful popup menus for icons
              - visible buttons.

              My apologies, I guess I have wasted people's time here.

              Regards,....

              Comment


                #8
                Originally posted by xennex81 View Post
                Okay never mind then. I hadn't found that the icon of the tool in the top right corner of the popup of NetworkManager in the system tray, was actually a clickable button.
                Ah yes, I remember when I discovered that sort of thing in KDE (I guess). The audio mixer (kmix) does the same thing, you can actually interact with the tiny icons above the streams. Actually, it is the whole "column" with the slider control and the icon. Who knew?

                As far as not providing info or having time or whatever, hmmmmm. I think we all have those same problems so its always courteous to provide as much info as needed to solve the problem.
                Last edited by anika200; Feb 05, 2015, 12:41 PM. Reason: added part about the column, changed possible to needed

                Comment


                  #9
                  I just hadn't found that screen yet. But it still ignores /etc/network/interfaces!!
                  Yes, that's the point of NetworkManager - so you don't have to configure network interfaces. Trying changing the networkmanager.conf from managed=false to managed=true and see if that changes anything.

                  Please Read Me

                  Comment


                    #10
                    You can also remove it completely and configure manually., or configure your ethernet interface manually and let NM manage the wireless.

                    If your remove NM, be sure to configure /etc/resolvconf/resolv.conf.d/tail with your name server and dns info.

                    Please Read Me

                    Comment


                      #11
                      Right, I could have put it to disabled. Now that I found out ;-). How. To. Do. It.

                      I went as far as to run manual wpa_supplicant scripts for a while after having chmod a-x /usr/sbin/NetworkManager.

                      I was imagining setting up a script also to negotiate the "accept these license terms" for this public network after an ipup for the wireless. That would make it easier indeed. However, it seems like the "automatically connect to this network" (which was already checked) never does anything. It does not automatically connect ever that I have seen. I think it did do that for a while while there was a config file for it. But I do not remember for sure.

                      I mean a wpa_supplicant.conf for it.

                      In /etc/wpa_supplicant/wpa_supplicant.conf.

                      Yes @anika I know that but if your mental mind condition is so bad that you can hardly find the time to breathe while trying to work out imminent problems then at that point trying to solve things yourself becomes your first priority. You don't really have time, or think you do not have time, which is actually quite true as well....

                      You might get more time if those problems go away, but for that reason you are trying to solve them as fast as possible. So anything you then do on a forum is more of a feedback thing in order to just talk about the issue to get it out there and hope that will clear your mind enough and perhaps also attract a few kind responses.....

                      ....than you are busy with formulating decent and neat questions ;-).

                      If I had been calm and easy and relaxed I would probably not have needed to ask anything ;-). But so it goes. You do what you can given the circumstances.

                      So thank you in any case, just talking to people in this way means a lot to me regardless.

                      I could attempt an ifup.d script just to see if I can help you with that ;-).

                      Trying..
                      Last edited by xennex81; Feb 05, 2015, 01:54 PM. Reason: small typo

                      Comment


                        #12
                        Scoooore it took a bit longer than I wanted (and that I have) .. but:

                        I was getting cold and not thinking straight anymore ;-).

                        For some reason scripts in /etc/network/if-up.d were not run ?? but the script in /etc/NetworkManager/dispatcher.d does try to execute them.

                        I have put the following script in my /etc/NetworkManager/dispatcher.d:

                        name: login.sh

                        contents (more or less, or about):

                        Code:
                        #!/bin/sh
                        
                        case "$2" in
                          up)
                            echo $IP4_ADDRESS_0 > /tmp/wlan0ip.address
                            echo $IP4_ROUTE_0 >> /tmp/wlan0ip.address
                            ifconfig wlan0 | grep "inet addr" > /dev/null && wget --wait=5 --tries=2 --max-redirect=3 --post-file=/etc/network/login.postdata -o /tmp/login.log --output-document=/tmp/xxx_login.html http://the.address.html
                            ;;
                        esac
                        Well, it doesn't check yet whether it is really wlan0 in the script (it might overwrite those files with the eth0 address now but it only executes wget when wlan 0 is configured).

                        The file has to be owned by root, not writable by group or other, and executable by its owner.
                        Last edited by xennex81; Feb 05, 2015, 01:57 PM.

                        Comment


                          #13
                          Originally posted by xennex81 View Post
                          Yes @anika talk about the issue to get it out there and hope that will clear your mind enough and perhaps also attract a few kind responses.....
                          I see, yes. Very nice, thanks.

                          Comment


                            #14
                            Originally posted by oshunluvr View Post
                            Yes, that's the point of NetworkManager - so you don't have to configure network interfaces. Trying changing the networkmanager.conf from managed=false to managed=true and see if that changes anything.
                            From man NetworkManager.conf...

                            [ifupdown]
                            This section contains ifupdown-specific options and thus only has effect when using ifupdown plugin.

                            managed=false | true
                            Controls whether interfaces listed in the 'interfaces' file are managed by NetworkManager. If set to true, then interfaces listed in /etc/network/interfaces are managed by NetworkManager. If set to false, then any interface listed in /etc/network/interfaces will be ignored by NetworkManager. Remember that NetworkManager controls the default route, so because the interface is ignored, NetworkManager may assign the default route to some other interface. When the option is missing, false value is taken as default.
                            It shouldn't be necessary to disable NM or resort to wonky hacks like changing mode bits. Proper configuration of /etc/NetworkManager/NetworkManager.conf and /etc/network/interfaces is sufficient.
                            Last edited by SteveRiley; Feb 06, 2015, 12:14 AM.

                            Comment


                              #15
                              I was wanting to say here:

                              It seems like letting NetworkManager manage unlisted devices is not such a bad idea. Unfortunately I was in too much of a rush still all the time to take time to read that config well. I mean the manual to the config. I was actually fearing that putting it to "false" would also kill the ability to select Wifi signals/networks/ssids.

                              I do think it is a shame that the configuration in /etc/network/interfaces is not actually used, or congruent, with what this NM is doing. It seems like the whole point of providing an abstraction or user interface layer, at least in these linux systems, is to provide wrapping or support for something that already exists in the bare system.

                              It is basically extremely confusing for someone experienced with linux to suddenly be confronted -- I guess it is a case of being used to something -- with a system that completely IGNORES the whole /etc/network/interfaces file, by default, except that the if-up.d directory seems to be honoured (but my testing revealed that it wasn't so, for some peculiar reason).

                              Currently I just put my script in the dispatcher.d directory or something of the kind -- also works.
                              Last edited by xennex81; Feb 08, 2015, 12:14 PM.

                              Comment

                              Working...
                              X