Closed Nosfistis closed 3 years ago
Hmm... this is strange... it's not that nymea-networkmanager requires DCHP to be turned off, but rather that it requires the use of NetworkManager, which brings its own implementation for DHCP (actually uses dhclient internally) and conflicts with dhcpcd. There are a lot of nymea setups on ethernet and so far no problems with DHCP on ethernet were reported.
Are you perhaps suffering from something like this? https://bbs.archlinux.org/viewtopic.php?id=192894
It seems that nymea-networkmanager is not the problem. Indeed I found that it uses the standard NetworkManager behind the scenes. The problem also does not seem to be consistent - different connections to a router and different cables might cause or not a connection, in a way that the ethernet does not even get an IPv4. The logs do not look the same as the link you supplied either:
Dec 25 14:21:24 RPi-3 NetworkManager[356]: <info> [1608898884.7272] device (eth0): carrier: link connected
Dec 25 14:21:24 RPi-3 NetworkManager[356]: <info> [1608898884.7301] device (eth0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
Dec 25 14:21:24 RPi-3 NetworkManager[356]: <info> [1608898884.7381] policy: auto-activating connection 'Wired connection 1' (699f2b07-a157-30fe-809a-dfb3fa5e8614)
Dec 25 14:21:24 RPi-3 nymea-networkmanager[636]: I | NetworkManager: "eth0" --> State changed: "NetworkDeviceStateDisconnected" : "NetworkDeviceStateReasonCarrier"
Dec 25 14:21:24 RPi-3 NetworkManager[356]: <info> [1608898884.7454] device (eth0): Activation: starting connection 'Wired connection 1' (699f2b07-a157-30fe-809a-dfb3fa5e8614)
Dec 25 14:21:24 RPi-3 NetworkManager[356]: <info> [1608898884.7486] device (eth0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Dec 25 14:21:24 RPi-3 NetworkManager[356]: <info> [1608898884.7548] device (eth0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Dec 25 14:21:24 RPi-3 NetworkManager[356]: <info> [1608898884.7626] device (eth0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Dec 25 14:21:24 RPi-3 NetworkManager[356]: <info> [1608898884.7662] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
Dec 25 14:21:24 RPi-3 NetworkManager[356]: <info> [1608898884.7785] dhcp4 (eth0): dhclient started with pid 855
Dec 25 14:21:24 RPi-3 nymea-networkmanager[636]: I | NetworkManager: "eth0" --> State changed: "NetworkDeviceStatePrepare" : "NetworkDeviceStateReasonNone"
Dec 25 14:21:24 RPi-3 nymea-networkmanager[636]: I | NetworkManager: "eth0" --> State changed: "NetworkDeviceStateConfig" : "NetworkDeviceStateReasonNone"
Dec 25 14:21:24 RPi-3 nymea-networkmanager[636]: I | NetworkManager: "eth0" --> State changed: "NetworkDeviceStateIpConfig" : "NetworkDeviceStateReasonNone"
Dec 25 14:21:27 RPi-3 NetworkManager[356]: <info> [1608898887.1559] dhcp6 (eth0): activation: beginning transaction (timeout in 45 seconds)
Dec 25 14:21:27 RPi-3 NetworkManager[356]: <info> [1608898887.1670] dhcp6 (eth0): dhclient started with pid 861
Dec 25 14:21:28 RPi-3 NetworkManager[356]: <info> [1608898888.8744] dhcp4 (eth0): address 192.168.1.115
Dec 25 14:21:28 RPi-3 NetworkManager[356]: <info> [1608898888.8746] dhcp4 (eth0): plen 24 (255.255.255.0)
Dec 25 14:21:28 RPi-3 NetworkManager[356]: <info> [1608898888.8747] dhcp4 (eth0): gateway 192.168.1.1
Dec 25 14:21:28 RPi-3 NetworkManager[356]: <info> [1608898888.8749] dhcp4 (eth0): lease time 86400
Dec 25 14:21:28 RPi-3 NetworkManager[356]: <info> [1608898888.8750] dhcp4 (eth0): nameserver '192.168.1.1'
Dec 25 14:21:28 RPi-3 NetworkManager[356]: <info> [1608898888.8752] dhcp4 (eth0): state changed unknown -> bound
Dec 25 14:21:28 RPi-3 NetworkManager[356]: <info> [1608898888.8951] device (eth0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Dec 25 14:21:28 RPi-3 nymea-networkmanager[636]: I | NetworkManager: "eth0" --> State changed: "NetworkDeviceStateIpCheck" : "NetworkDeviceStateReasonNone"
Dec 25 14:21:28 RPi-3 NetworkManager[356]: <info> [1608898888.9059] device (eth0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Dec 25 14:21:28 RPi-3 NetworkManager[356]: <info> [1608898888.9120] device (eth0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Dec 25 14:21:28 RPi-3 NetworkManager[356]: <info> [1608898888.9380] policy: set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS
Dec 25 14:21:28 RPi-3 NetworkManager[356]: <info> [1608898888.9429] dns-mgr: Writing DNS information to /sbin/resolvconf
Dec 25 14:21:29 RPi-3 NetworkManager[356]: <info> [1608898889.0007] device (eth0): Activation: successful, device activated.
Dec 25 14:21:29 RPi-3 dbus-daemon[336]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.8' (uid=0 pid=356 comm="/usr/sbin/NetworkManager --no-daemon ")
Dec 25 14:21:29 RPi-3 nymea-networkmanager[636]: I | NetworkManager: "eth0" --> State changed: "NetworkDeviceStateSecondaries" : "NetworkDeviceStateReasonNone"
Dec 25 14:21:29 RPi-3 nymea-networkmanager[636]: I | NetworkManager: "eth0" --> State changed: "NetworkDeviceStateActivated" : "NetworkDeviceStateReasonNone"
Dec 25 14:21:40 RPi-3 systemd[1]: NetworkManager-dispatcher.service: Succeeded.
Dec 25 14:22:05 RPi-3 NetworkManager[356]: <info> [1608898925.5465] device (eth0): state change: activated -> unavailable (reason 'carrier-changed', sys-iface-state: 'managed')
Dec 25 14:22:05 RPi-3 NetworkManager[356]: <info> [1608898925.6155] dhcp4 (eth0): canceled DHCP transaction, DHCP client pid 855
Dec 25 14:22:05 RPi-3 NetworkManager[356]: <info> [1608898925.6156] dhcp4 (eth0): state changed bound -> done
Dec 25 14:22:05 RPi-3 NetworkManager[356]: <info> [1608898925.6215] dhcp6 (eth0): canceled DHCP transaction, DHCP client pid 861
Dec 25 14:22:05 RPi-3 NetworkManager[356]: <info> [1608898925.6218] dhcp6 (eth0): state changed unknown -> done
Dec 25 14:22:05 RPi-3 NetworkManager[356]: <info> [1608898925.6336] dns-mgr: Writing DNS information to /sbin/resolvconf
Dec 25 14:22:05 RPi-3 nymea-networkmanager[636]: I | NetworkManager: "eth0" --> State changed: "NetworkDeviceStateUnavailable" : "NetworkDeviceStateReasonCarrier"
Dec 25 14:22:05 RPi-3 NetworkManager[356]: <info> [1608898925.7412] policy: set 'guest-network' (wlan0) as default for IPv4 routing and DNS
Dec 25 14:22:05 RPi-3 dbus-daemon[336]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.8' (uid=0 pid=356 comm="/usr/sbin/NetworkManager --no-daemon ")
Dec 25 14:22:16 RPi-3 systemd[1]: NetworkManager-dispatcher.service: Succeeded.
I am trying to check if this is an issue when using both wlan0 and eth0, but since this is not a fault of nymea-networkmanager, I am closing this issue.
The nymea-networkmanager requires that dhpcd is turned off, however it does not seem to handle connections with ethernet interfaces. In particular, acquiring an IP address works only sometimes, and even then there is a chance that the connection will be dropped off when the IP lease time has expired, without acquiring a new one.
Are there any plans to support ethernet interfaces?