Buildroot networkmanager No suitable device found

leprechaun

New Member
Joined
Jul 8, 2024
Messages
4
Reaction score
0
Credits
43
hi,
Trying to get networkmanager running on a costum board built using buildroot. But when i try and bring upp the connection I get:
nmcli con up eth0
"No suitable device found for this connection

and if i try and add eth0 to managed it accepts the command but still shows as unmanaged. Using busybox as init system.
Bring it up with ifup works without any issues.

Options I added in buildroot for this:

BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_PACKAGE_NETWORK_MANAGER=y
BR2_PACKAGE_NETWORK_MANAGER_TUI=y
BR2_PACKAGE_NETWORK_MANAGER_CLI=y

And /etc/networking/interface looks as the following:

# Loopback interface lo
auto lo
iface lo inet loopback

Unsure what to check next. Is there some kernel option I should check for to see if they are enabled? Or does it not work with busybox as an init system?
 


ip link:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 2a:70:63:3b:12:2b brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 00:0c:c6:7e:c4:29 brd ff:ff:ff:ff:ff:ff
4: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
5: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 94:1d:1c:01:01:95 brd ff:ff:ff:ff:ff:ff


nmcli connection:

NAME UUID TYPE DEVICE
eth0 50f19019-c49c-4602-bc9d-01604287b5c4 ethernet --
 
I would prefer a full over view of what you are working with, can you run live from pendrive inxi -Fnxxxz and paste back the full report

in the interim try
ifup -a
 
3: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 00:0c:c6:7e:c4:29 brd ff:ff:ff:ff:ff:ff

Without using NetworkManager you can configure interface as follows, just make sure to set correct IP which depends on your subnet set in router.

Bash:
# Delete all IP's from interface
sudo ip addr flush dev eth0

# Assign IP to interface (replace with correct IP)
sudo ip addr add 172.21.2.1/24 dev eth0

# Bring interface up (after NIC configuration)
ip link set eth0 up

Then assuming DNS client works you should be able to browse the net.

An alternative to second command sudo ip addr add 172.21.2.1/24 dev eth0 is to set nothing and set DHCP in NetworkManager GUI.
 
5: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 94:1d:1c:01:01:95 brd ff:ff:ff:ff:ff:ff

All of your other interfaces are in "DOWN" state. This is the only one in "UP" state.
What is the output of

lspci
# Assign IP to interface (replace with correct IP) sudo ip addr add 172.21.2.1/24 dev eth0

He will still need a default gateway at the least.

ip route add default via 192.168.1.1 dev eth1

Are you wanting a dhcp address, or a static address?
 
Is it not auto added when you bring interface up?
Or perhaps it's auto added by NetworkManager, I forgot.

dhcp will automatically add an IP address, a netmask, a default gateway, and DNS servers for you.

If you add a static IP address manually yourself. You will have to add a gateway, netmask and DNS servers yourself.
 
Last edited:
Thanks for all the tips. The issue for me with using ip is that need system also has to support bonding interfaces which I don't think ip command supports?

ifup -a:
does bring up the interface, is what is used before but as i understand the if packages have become deprecated? Reason i'm looking to replace it.

Will try and build a version with lspci and also looking on how to get inxi working.
 
ifup -a:
does bring up the interface, is what is used before but as i understand the if packages have become deprecated? Reason i'm looking to replace it.

Most Linux distro's do not support network interface bonding and teaming out of the box.
Depending on your distro, NetworkManager doesn't even support it without adding some other packages.
Most of the Redhat/Fedora clones support this.
A few distro's still support networkd, but the vast majority use NetworkManager now.

The old ifup and ifdown commands have all but disappeared. Most newer distro's no longer use
the files in /etc/sysconfig/network-scripts

Now instead of ifup eth0. You would use...
nmcli con up eth0.

However, under networkManager, the connection name doesn't usually match the interface name.
So you have to do "nmcli con show" in order to know the name of the connection.

Also keep in mind, that to use bonding, your switched will likely have to be a managed switch that supports it.
 
Here are the steps to create a bonded interface (bond0) using nmcli:

Check Existing Connections: First, let’s see the details of your existing connections. Run the following command to view information about eth0:
nmcli con show eth0
Note down any specific settings or configurations you want to preserve.
Create the Bonded Connection: Now, let’s create the bonded connection. Replace eth0 and eth1 with your actual interface names. You can choose a different name for the bonded connection if you prefer:
sudo nmcli con add type bond ifname bond0 mode active-backup primary eth0 arp_interval 100 arp_ip_target 192.168.1.1

mode active-backup: Sets the bonding mode to active-backup (failover).
primary eth0: Specifies that eth0 is the primary interface.
arp_interval 100 and arp_ip_target 192.168.1.1: Adjust these values based on your network requirements.
Add Slave Interfaces: Next, add the slave interfaces (eth0 and eth1) to the bonded connection:
sudo nmcli con add type ethernet ifname eth0 master bond0
sudo nmcli con add type ethernet ifname eth1 master bond0


Configure IP Address and Gateway: Set the IP address and gateway for the bonded interface:
sudo nmcli con modify bond0 ipv4.addresses "192.168.1.10/24" ipv4.gateway "192.168.1.1"
Adjust the IP address and subnet mask as needed.
Activate the Connection: Finally, activate the bonded connection:
sudo nmcli con up bond0

Verify the Configuration: Confirm that the bonded interface is up and configured correctly:
nmcli con show bond0
You should see the bonded interface with the specified IP address.

Optionally you can test this with ethtool

ethtool bond0
 
Got it up and running with everything i needed thanks for everyone that took time to help me out!
 

Staff online

Members online


Top