NetworkManager issues

Hello everyone,

I’m having troubles with Network manager and interface configuration files.

I’m configuring my raspberry PI eth0 to have a static IP with no gateway and some routes to others ips with the configuration that follows.
I need this configuration because sometimes my usb to ethernet enp1s0u1 interface might have a same sub-network address such as 192.168.1.x and make devices unreachable in both sides.

[connection]
id=int-net
type=ethernet
interface-name=eth0
permissions=
secondaries=

[ipv4]
address1=192.168.1.1
method=manual
ignore-auto-routes=1
never-default=1
route-metric=0
route1=192.168.1.3/32
route2=192.168.1.10/32

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

Those settings are parsed successfully by NetworkManager but the routing part is where i do have problems.

According to NetworkManager documentation with ignore-auto-routes set to true i should not have the default route to gateway but as i can see this route is still configured.

I would like to know if this is expected behavior or if i’m missing something somewhere.

After having done a lot of network configuration theses days i can suggest that Netplan could be a great addition to BalenaOS instead of digging through NetworkManager configuration files.

Have a nice day!

Hello! I am not proficient with NetworkManager and I am not sure my reply is correct, but here’s some food for thought and some ideas.

My understanding is NetworkManager’s philosophy is to always try to configure things automatically – unless you tell it not to. I guess we are more or less on the same page – I assume you are using ignore-auto-routes=1 exactly because of that!

Anyway, as per my understanding of the docs, ignore-auto-routes is valid only when method=auto.

I believe adding never-default=true to your config will have the desired effect, independent of other settings.

I hope this helps!