Announcement

Collapse
No announcement yet.

Network Manager keeps connecting and disconnecting from eth0

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

    Network Manager keeps connecting and disconnecting from eth0

    Hi, I've been using KDE 14.04, but I wanted Plasma 5 badly, so I upgraded to 14.10 and then to 15.04 on Thursday.

    I use both a WiFi dongle and wired Ethernet -- my wired ethernet is for work-intranet sites, everything else goes through WiFi via my custom routing config. Also, I had two lines custom-added to my /etc/dhcp/dhclient.conf file (a "send user-class" line and a "append domain-name" line, which were relevant for my Wired Ethernet).

    Since upgrading to 15.04, the Wired Ethernet (eth0) connection in KDE's network plasma -- visible in "Connection Editor" -- just cycles constantly, giving "Connection 'eth0' activated." followed immediately by "Connection 'eth0' deactivated." in the notification area. Finally a "Wired Interface (eth0)" "The device could not be configured" message" pops up.

    I feel as though my dhcp configuration may be to blame after upgrading -- I think I was asked and chose to leave it with my existing config during install.)

    I tried modifying my /etc/network/interfaces file, and adding the lines:
    Code:
    [FONT=monospace]auto eth0
    [/FONT][FONT=monospace]iface eth0 inet dhcp[/FONT]
    to the end of it.

    If I do this, Network Manager and my Plasma panels become unresponsive and, if I restart my computer it will reopen without the eth0 connection in Network Manager BUT running `ifconfig eth0` will have a DHCP-assigned IP address, and everything will be connecting properly, I believe!

    The only thing is that I need to get my custom routes back in place and I am not confident about getting these into the routing table manually. I'd like to do it using Network Manager.

    Any thoughts?

    #2
    Originally posted by offlein View Post
    I tried modifying my /etc/network/interfaces file, and adding the lines:
    Code:
    [FONT=monospace]auto eth0
    [/FONT][FONT=monospace]iface eth0 inet dhcp[/FONT]
    to the end of it.

    If I do this, Network Manager and my Plasma panels become unresponsive and, if I restart my computer it will reopen without the eth0 connection in Network Manager BUT running `ifconfig eth0` will have a DHCP-assigned IP address, and everything will be connecting properly, I believe!

    The only thing is that I need to get my custom routes back in place ... I'd like to do it using Network Manager.

    Any thoughts?
    I haven't set up a box like you described in the first part of your post, so I can't answer your question exactly, but maybe this will help!

    You can't edit /etc/network/interfaces and have NetworkManager manage the connection at the same time, which is why the Network Management widget becomes unresponsive if you edit that file. Note: the widget is called Network Management, and it changes settings for the program NetworkManager... this was a bad choice of name IMO because it makes it difficult to search for info on one without getting the other mixed in!

    Personally, I have configured my server using /etc/network/interfaces because I don't want Network Management doing anything "clever" and changing the details, and I use NetworkManager on my laptop for convenience.

    Configuration for NetworkManager goes in /etc/NetworkManger/system-connections/foo, and the only thing that should be in your /etc/network/interfaces file is the loopback address:

    Code:
    # interfaces(5) file used by ifup(8) and ifdown(8)
    auto lo
    iface lo inet loopback
    Maybe it's possible to have all of the settings for your connecitons in the network manager file - there are some settings in the NetworkManagement widget for configuring DNS (under the IPv4 andn IPv6 tabs) - the "search domains" setting will do one of your options.

    However, I'm not sure about send user-class - in fact, I can't find much information on that option at all. Sounds interesting though - are you using it to tell your router to assign your machine to a certain IP range (this is what came up in my searches)?

    I think maybe the best thing to do to pinpoint what has gone wrong with your connection is to look in your syslog:

    Code:
    [B]$ cat /var/log/syslog | grep 'NetworkManager\|systemd'[/B]
    Apr 27 11:02:48 Hobbs-T440s NetworkManager[737]: <info> (wlan0): DHCPv4 state changed renew -> renew
    Apr 27 11:02:48 Hobbs-T440s NetworkManager[737]: <info>   address 192.168.1.112
    Apr 27 11:02:48 Hobbs-T440s NetworkManager[737]: <info>   plen 24 (255.255.255.0)
    Apr 27 11:02:48 Hobbs-T440s NetworkManager[737]: <info>   gateway 192.168.1.1
    Apr 27 11:02:48 Hobbs-T440s NetworkManager[737]: <info>   server identifier 192.168.1.1
    Apr 27 11:02:48 Hobbs-T440s NetworkManager[737]: <info>   lease time 43200
    Apr 27 11:02:48 Hobbs-T440s NetworkManager[737]: <info>   hostname 'Hobbs-T440s'
    Apr 27 11:02:48 Hobbs-T440s NetworkManager[737]: <info>   nameserver '192.168.1.103'
    Apr 27 11:02:48 Hobbs-T440s NetworkManager[737]: <info>   domain name 'lan'
    Apr 27 11:02:48 Hobbs-T440s dbus[767]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
    Apr 27 11:02:48 Hobbs-T440s systemd[1]: Starting Network Manager Script Dispatcher Service...
    Apr 27 11:02:48 Hobbs-T440s systemd[1]: Started Network Manager Script Dispatcher Service.
    Apr 27 11:33:45 Hobbs-T440s systemd[1]: Starting Cleanup of Temporary Directories...
    Apr 27 11:33:45 Hobbs-T440s systemd-tmpfiles[13854]: [/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for path "/var/log", ignoring.
    Apr 27 11:33:45 Hobbs-T440s systemd[1]: Started Cleanup of Temporary Directories.
    Apr 27 16:10:13 Hobbs-T440s NetworkManager[737]: <info> (wlan0): DHCPv4 state changed renew -> renew
    Apr 27 16:10:13 Hobbs-T440s NetworkManager[737]: <info>   address 192.168.1.112
    Apr 27 16:10:13 Hobbs-T440s NetworkManager[737]: <info>   plen 24 (255.255.255.0)
    Apr 27 16:10:13 Hobbs-T440s NetworkManager[737]: <info>   gateway 192.168.1.1
    Apr 27 16:10:13 Hobbs-T440s NetworkManager[737]: <info>   server identifier 192.168.1.1
    Apr 27 16:10:13 Hobbs-T440s NetworkManager[737]: <info>   lease time 43200
    Apr 27 16:10:13 Hobbs-T440s NetworkManager[737]: <info>   hostname 'Hobbs-T440s'
    Apr 27 16:10:13 Hobbs-T440s NetworkManager[737]: <info>   nameserver '192.168.1.103'
    Apr 27 16:10:13 Hobbs-T440s NetworkManager[737]: <info>   domain name 'lan'
    Apr 27 16:10:13 Hobbs-T440s dbus[767]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
    Apr 27 16:10:13 Hobbs-T440s systemd[1]: Starting Network Manager Script Dispatcher Service...
    Apr 27 16:10:13 Hobbs-T440s systemd[1]: Started Network Manager Script Dispatcher Service.
    ...and if necessary, compare to your router's syslog to see if it is rejecting you for some reason!
    samhobbs.co.uk

    Comment


      #3
      Hi there,

      What a great reply -- thank you so much. That makes perfect sense. In the meantime and with this help I got the minerals together to try to manually configure routes without NetworkManager managing eth0. Happily, it actually appears to have worked perfectly so far, although we'll give it more time.

      I did wanna check the logs though, per your request. I saw this stuff, which I'm sanitising here, repeated over, as well as some systemd stuff saying "Starting Network Manager Script Dispatcher Service.." followed by "Started Network Manager Script Dispatcher Service." Then a number of things about Mysql.service (and "MySQL Community Server") failing to start. Which I assume indicates that my MySQL server ain't working, but is completely unrelated. Anyway, here's my sanitised output

      Code:
      [FONT=monospace]Apr 27 14:12:20 kms1 [/FONT][COLOR=#FF5454][FONT=monospace][B]NetworkManager[/B][/FONT][/COLOR][FONT=monospace][767]: <info> (wlan0): DHCPv4 state changed renew -> renew
      [/FONT][FONT=monospace]Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: <info>   address !!WLAN IP ADDR!! 
      Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: <info>   plen 23 (255.255.254.0)
      Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: <info>   gateway !!WLAN GATEWAY!! 
      Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: <info>   server identifier 5.5.5.5
      Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: <info>   lease time 3600
      Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: <info>   nameserver '!!IP I DON'T RECOGNISE IMMEDIATELY!!'
      Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: <info>   nameserver '[/FONT][FONT=monospace]!!IP I DON'T RECOGNISE IMMEDIATELY!![/FONT][FONT=monospace]'
      Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: <info>   domain name ''
      Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: nm_ip4_config_add_domain: assertion 'domain[0] != '\0'' failed
      Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: <info>   domain name '!!CUSTOM DOMAIN NAME FROM DHCLIENT.CONF!!'
      Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: <info>   domain name '[/FONT][FONT=monospace]!!CUSTOM DOMAIN NAME FROM DHCLIENT.CONF!![/FONT][FONT=monospace]'
      Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: <info>   domain name ''
      Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: nm_ip4_config_add_domain: assertion 'domain[0] != '\0'' failed
      Apr 27 14:12:20 kms1 dbus[825]: [system] Activating via [COLOR=#FF5454][B]systemd[/B][/COLOR]: service name='org.freedesktop.nm_dispatcher' unit='dbus-o
      rg.freedesktop.nm-dispatcher.service'
      [/FONT]
      Mean anything to you?

      In other news, it's worth noting that I'm on a Linux PC (..obviously) in a Windows network. That is, we are a Windows-tied workplace and my Linux system, uh, is not, erm, "strictly supported". The user-class line is something that previous Linux-using renegades have gleaned here over the years, but I'm not sure the origin of it. Anyway, as such, I don't have the ability to look at the router logs.

      Comment


        #4
        Originally posted by offlein View Post
        What a great reply -- thank you so much.
        you're welcome - setting networks manually is actually something I have found quite difficult/confusing, mainly because people often say to do things the /etc/network/interfaces way without explaining how it bypasses the "normal"/friendly GUI way of doing things. The benefit of doing things that way is that it always works (provided you don't mess up your configuration), regardless of which desktop environment or even which distribution you're using. So, I can see why people recommend it... it's a useful skill to have, but it needs some context.

        here's my sanitised output
        Code:
        Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: <info>   nameserver '[/FONT][FONT=monospace]!!IP I DON'T RECOGNISE IMMEDIATELY!![/FONT][FONT=monospace]'
        that'll be the LAN IP of your company's local DNS server. The router can tell the clients which DNS server to use when they connect. I do this at home too, to point them at my local BIND9 server... usually on small home networks the DNS resolver is the router, which basically just forwards queries to your ISP without much caching due to its limited RAM; being able to take this load off my router and transfer it to a machine with more RAM probably has some small speed benefits, but tbh i mainly did it to learn.

        Code:
        Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: nm_ip4_config_add_domain: assertion 'domain[0] != '\0'' failed
        Apr 27 14:12:20 kms1 [COLOR=#FF5454][B]NetworkManager[/B][/COLOR][767]: <info>   domain name '!!CUSTOM DOMAIN NAME FROM DHCLIENT.CONF!!'
        that error looks like the first value in the list you gave it is an empty string - did you accidentally put a comma in the front of the list, or fill in a box that used to be empty with just a space?

        The user-class line is something that previous Linux-using renegades have gleaned here over the years, but I'm not sure the origin of it.
        Plenty of other "linux using renegades" here, you're in good company! lol.

        Can you ask them if you get the chance? It isn't all that important, but it does sound interesting...
        Last edited by Feathers McGraw; Apr 28, 2015, 11:11 AM.
        samhobbs.co.uk

        Comment

        Working...
        X