Losing ethernet after uninstalling connman

Hello.

I want to be able to set static IP address and I was tinkering with the networking and I’m facing this problem.

When I remove connman to be able to make my configurations through systemd, i lose my eth0 interface. I still have wifi (I use wpa_supplicant and bcmdhd driver for that) but I lose my eth0.

This is what I get after uninstalling connman

root@apalis-imx6:~# opkg remove connman-client
Removing connman-client (1.34) from root...
root@apalis-imx6:~# opkg remove connman
Removing connman (1.34) from root...
update-alternatives: Linking /etc/resolv.conf to /etc/resolv-conf.systemd
Removed /etc/systemd/system/multi-user.target.wants/connman.service.

When I reboot afterwards I notice that I no longer have eth0. When I reinstall I lose the wifi that was already started (a reboot fixes this).

I would like to know what’s the best way to fix it and have both eth0 and wlan0 working and able to configure (commute between static IP / DHCP) through systemd-networking, if possible. Thanks

Best regards,

Joao

Hi

Are you sure that eth0 is really gone. Note that ‘ifconfig’ only shows interfaces which are up, try ‘ifconfig -a’ or ‘ip addr’ to see all interfaces and their status.

For me removing the connman packages and then configuring systemd-networkd and reboot as explained here works.

Max

Hi Max,

This works, thank you.

I am facing another issue that came up with this method.

The DHCP, unless i execute udhcpc -i eth0, it does not return the IP that is assigned to the board, which causes me issues. Is there a reason for it? It seems the DHCP=ipv4 is not enough

Hi Max,

This worked, thank you.

I am now facing another issue. The DHCP using this method does not return the expected IP for the board. It is configured to always return an assigned IP and with this config it does not. Is there an issue with this? It seems DHCP=ipv4 is not enough

The Static part works fine so far though.

Hi Joao, you are welcome.

Usually the DHCP Server is assigning depending on the Mac Address of the client. The Mac address of the Module is given the serial number which is saved in the configuration block. Could you check if the configuration block is present on the module? If there is no configuration block on the module, you will get a message during the startup of the module.

If you install the image using Toradex Easy Installer and there is no config block present, the user will be prompted to create the config block.

Hi jaski

My module has a config block. The weird thing is, before I removed connman, it would always be assigned to the desired IP. If I use systemd-network it doesn’t. And to confuse me even more, if i use the udhcpc command, it gets the IP!

I don’t use TEZI and I don’t get any messages regarding the block.

Could you check if the DHCP Server is trying to assign the expected IP address or if the DHCP Client is denying the given address?

At this point I’m not able to test i’ll reach as soon as I have additional information.

I just tried with my wlan0 and I got similar results - when I use udhcpc I get a different IP that systemd-networking gave (this one is not pre-assigned, just wanted to test it)

Hi.

After digging a little I found out systemd-network enables ipv6 by default and that breaks things. Is there a way to disable it?

I disabled ipv6 according to [this] 1 but it’s still broken. ill keep digging

[    2.422672] IPv6: Loaded, but administratively disabled, reboot required to enable

OK, found it.

The configuration was not using the MAC for identification - it was using DUID for default it seems.

Adding

[DHCP]
ClientIdentifier=mac

fixes the issue

Thank you everyone!

Perfect, that it works. Thanks for the update.