title: How to set up a network-manager service to configure a modem connection automatically?
body: <p>I try to connect USB Huawei E8372 modem on my Ubuntu 18.04. <strong>dmesg</strong> command gives an information:</p>
  
  <pre><code>[  371.616615] cdc_ether 1-6:1.0 eth0: register 'cdc_ether' at usb-0000:00:14.0-6, CDC Ethernet Device, 0c:5b:8f:27:9a:64
  [  371.616948] usb-storage 1-6:1.2: USB Mass Storage device detected
  [  371.617603] scsi host4: usb-storage 1-6:1.2
  [  371.625478] cdc_ether 1-6:1.0 enx0c5b8f279a64: renamed from eth0
  [  372.636698] scsi 4:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
  [  372.637021] sd 4:0:0:0: Attached scsi generic sg2 type 0
  [  372.637270] sd 4:0:0:0: Power-on or device reset occurred
  [  372.637965] sd 4:0:0:0: [sdc] Attached SCSI removable disk
  [  372.856712] usbcore: registered new interface driver usbserial_generic
  [  372.856727] usbserial: USB Serial support registered for generic
  [  372.860310] usbcore: registered new interface driver option
  [  372.860325] usbserial: USB Serial support registered for GSM modem (1-port)
  </code></pre>
  
  <p>So I have the <strong>enx0c5b8f279a64</strong> interface. network-manager service adds this device (logs from <code>service network-manager status</code>):</p>
  
  <pre><code>[1561201979.1919] devices added (path: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/net/enx0c5b8f279a64, iface: enx0c5b8f279a64)
  [1561201979.1919] device added (path: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/net/enx0c5b8f279a64, iface: enx0c5b8f279a64)
  </code></pre>
  
  <p>But I can't access the Internet. Moreover, <strong>ifconfig</strong> doesn't show this interface.</p>
  
  <p>I can use <strong>dhclient</strong>:
  <code>dhclient -v enx0c5b8f279a64</code>:</p>
  
  <pre><code>Listening on LPF/enx0c5b8f279a64/0c:5b:8f:27:9a:64
  Sending on   LPF/enx0c5b8f279a64/0c:5b:8f:27:9a:64
  Sending on   Socket/fallback
  DHCPREQUEST of 192.168.8.100 on enx0c5b8f279a64 to 255.255.255.255 port 67 (xid=0x36f4d377)
  DHCPNAK from 192.168.8.1 (xid=0x77d3f436)
  DHCPDISCOVER on enx0c5b8f279a64 to 255.255.255.255 port 67 interval 3 (xid=0x5ad85374)
  DHCPDISCOVER on enx0c5b8f279a64 to 255.255.255.255 port 67 interval 7 (xid=0x5ad85374)
  DHCPREQUEST of 192.168.8.100 on enx0c5b8f279a64 to 255.255.255.255 port 67 (xid=0x7453d85a)
  DHCPOFFER of 192.168.8.100 from 192.168.8.1
  DHCPACK of 192.168.8.100 from 192.168.8.1
  bound to 192.168.8.100 -- renewal in 41121 seconds.
  </code></pre>
  
  <p>After that, I will access the Internet, and network-manager logs:</p>
  
  <pre><code>[1561202049.0339] device (enx0c5b8f279a64): carrier: link connected
  [1561202049.0415] device (enx0c5b8f279a64): carrier: link connected
  </code></pre>
  
  <p>I want that network-manager service set up the interface of the modem automatically without any manual steps like running <em>dhclient</em>. How to do it?</p>
  
  <p>Thanks.</p>