0

I have the following netplan file to setup a system with ethernet interfaces and multiple modems.

network:
  version: 2
  renderer: NetworkManager

  ethernets:
    eth0:
      dhcp4: false
      addresses:
        - 172.16.0.151/24

  modems:
    cdc-wdm0:
      apn: xxx-apn
      dhcp4: yes
      device-id: xxx
    cdc-wdm1:
      apn: yyy-apn
      dhcp4: yes
      device-id: yyy

However, it occasionally seems to boot with the modems having swapped interface names and they don't get configured properly. I confirm this by logging into the system and checking with mmcli.

It seems that the match options for Netplan only take name, macaddress, or driver. name is out, since that changes across boots. macaddress doesn't appear to work, as the interfaces don't have macaddresses (see below). And driver is only supported in networkd renderer, which I can't use since it doesn't support modems.

$ ip link show wwan0
13: wwan0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1430 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 1000
    link/none
$ ip link show wwan1
14: wwan1: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 1000
    link/none

I also looked at the Netplan modem settings for netplan but didn't see anything obvious. I thought maybe the sim-id property could help, but I don't quite understand what it is saying, or which number is the correct sim-id.

sim-id (scalar) – since 0.99

Specify the SIM unique identifier (as given by the WWAN management service) which this connection applies to. If given, the connection will apply to any device also allowed by device-id which contains a SIM card matching the given identifier.

Is there a netplan feature I am missing that can help me solve this? Alternatively, is there a way for me to create reliable names based on some other ids that allow me to configure them regardless of what order they get named as? Thanks for any help.

0

You must log in to answer this question.

Browse other questions tagged .