← Back to team overview

cloud-init team mailing list archive

Network configuration with 2+ interfaces

 

Hello,

I'm running a VM with 2+ interfaces on SLES 15SP3.

Each interface is configured via DHCP.
If I attach any interface as a single connection, the network configuration works as expected including default gateway and DNS.

However, with 2+ interfaces, the default gateway and DNS settings are set randomly.
One can identify first, second and all other interfaces by its name:
ens192
ens224
ens256
...

In my interpretation ens192 is the first interface.
But default gateway and DNS are always configured from any of the other interfaces.

My understanding is that cloud-init configures all interfaces sequentially.
This is ok, but I must define a priority in order to declare which default gateway and DNS to use. Otherwise a setup with 2+ interfaces and cloud-init will never work reliable.

Can you please advise how to fix this issue?
Is it possible to define a priority for all attached interfaces?

THX
Thomas