Set static IP on several interface

Hi,

I have a device with 3 network interfaces: 1 wifi and 2 ethernet.
I setup the wifi connection when I created the .img in the balena cloud dashboard.

I would like to set a static IP on one of the eth interfaces, keeping the dynamic IP on the wifi interface. (The device is connected to 2 differrent networks : wifi for internet access and eth for the local network).

I don’t understand if I need to create a second file in system-connection/or if I can use the same as for the wifi and add the eth configuration? If I create a new file, do I need to name it with a specific name?

Also, in

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

[ethernet]
mac-address-blacklist=

[ipv4]
address1=192.168.1.111/24,192.168.1.1
dns=8.8.8.8;8.8.4.4;
dns-search=
method=manual

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

I guess the only required fields are id, type, interface-name and address1 ? What is permissions and secondaries ?

Thanks

Actually I have the solution:

I created a new file named resin-eth-01 :

[connection]
id=resin-eth-01
type=ethernet
interface-name=enp2s0
permissions=
secondaries=

[ethernet]
mac-address-blacklist=

[ipv4]
address1=192.168.0.5/24,192.168.0.1
dns=8.8.8.8;8.8.4.4;
dns-search=
method=manual

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

It works, but i’m still wondering about “not required” fields. Do I really need all these fields?

Hi @lpierrat, glad you found a solution, and as you found, you should create a new file in /system-connections/ with any name. As to the other optional settings, these are described by the Network Manager settings that are used to configure the networking in balenaOS https://developer.gnome.org/NetworkManager/unstable/nm-settings.html