system connections file skipping gateway configuration

I’m using balenaOS 2.8 development image on rpi4 and, my system connections file for the ethernet interface is as follows

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

[ethernet]
mac-address-blacklist=

[ipv4]
never-default=true
route-metric=2000
dns-search=
address1=192.168.1.111/24,192.168.1.1
dns=8.8.8.8;8.8.4.4;
method=manual

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

it seems balena is not setting up the default gateway for the eth interface, i have no internet access until i manually register the route:

route add default gw 192.168.1.1 eth0

I would appreciate any help, thanks

Hello @jose_barrero could you please share the results of the ip route result on your HostOS?

looks like your eth0 route metric is 2000 and i’m wondering if there is another interface with more priority in your device.

on the other hand are you using another DNS server?

hello @mpous, thanks for your answer, here is the output of the route command:

root@localhost:~# ip route
10.114.101.0/24 dev balena0 scope link src 10.114.101.1
10.114.102.0/24 dev resin-dns scope link src 10.114.102.1
10.114.104.0/25 dev supervisor0 scope link src 10.114.104.1
192.168.1.0/24 dev eth0 scope link src 192.168.1.111 metric 2000

@jose_barrero that’s odd! could you please try to change route metric from 2.000 to 100? Here you have an example https://youtu.be/e5-r_9ggHqI?list=PLT5WZl9m5WoPmruqPG8_BGzVSOdtfX8Rk&t=2995

Hey @jose_barrero … were you able to try what Marc suggested?

@jose_barrero that’s odd! could you please try to change route metric from 2.000 to 100? Here you have an example IoT Happy Hour #57: balenaOS network setup with NetworkManager - YouTube

Setting never-default=true would instruct NM not to set a default route, which is evident in its absence from ip route output. Is there a particular reason you are setting this configuration variable?

1 Like