3

I want to change the internet connection from ethernet cable to an LTE sim card. For this, I need to configure the netplan .yaml file correctly.

The current file is

network:
 version: 2
 renderer: networkd
 ethernets:
   es160:
     dhcp4: yes
     dhcp6: no

How would I need to configure this file so that an LTE connection is established?

cheesus
  • 471

2 Answers2

4
  1. A cellular connection is a modem connection, so the device type have to be modems instead of ethernets.

  2. The netplan documentation says:

GSM/CDMA modem configuration is only supported for the NetworkManager backend. systemd-networkd does not support modems.

Therefore you have to use NetworkManager instead of Networkd as renderer. To use it you have to install NetworkManager and ModemManager first. Install it as described in the networkManager documentation :

snap install network-manager

and

snap install modem-manager
  1. For an easy setup you can use:
  version: 2
  renderer: NetworkManager
  modems:
    <INTERFACE_NAME>:
      auto-config: true
      pin: <PIN>  
fabKirs
  • 158
  • 1
  • 7
3

Long time listener, first time caller...

I didn't even learn this my engineer just taught me so I figure I would share:

  1. sudo apt install network-manager

  2. Update netplan yaml with modem stanza's for device name, apn, and DHCP. The example below uses any cdc-wdm device.

Hopefully this helps someone.

I just overwrote the default yaml in /etc/netplan/00-installer-config.yaml

network:
  version: 2
  renderer: NetworkManager
  ethernets:
    enp1s0:
      dhcp4: true
    enp2s0:
      dhcp4: true
    enp3s0:
      dhcp4: true
    enp4s0:
      dhcp4: true
  modems:
    cdc-wdm:
      apn: yourapnhere
      dhcp4: true
      match:
        name: cdc-wdm*