<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 4, 2022 at 9:43 AM Aleksander Morgado <<a href="mailto:aleksander@aleksander.es">aleksander@aleksander.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey,<br>
<br>
> I need some help in establishing simultaneous interfaces to multiple APNs.<br>
><br>
> I have an Ubuntu 20.04 system with a single cellular modem attached via USB in an IoT application. My problem is that I need to drive traffic through two different APNs when registered to the same cellular network. Each APN serves a different purpose -- different services with different billing are to occur on each.<br>
><br>
> I've tried multiple ways to do this. While I can get connected with two APNs, I can only get an interface name for one of the connections. I need a separate interface name for each so that I can place the respective flow of traffic through the appropriate interface and onto the correct APN. My application needs both to be available simultaneously. Going back and forth between building up and tearing down each of them is not an acceptable solution.<br>
><br>
> I tried three different things and none have brought happiness:<br>
><br>
> (1) Using mmcli in debug mode with a set of AT commands for each APN: using the sequence AT+GDCONT, AT+XGAUTH, and AT+CGACT with parameters relevant for the first APN and then again with the sequence AT+GDCONT, AT+XGAUTH, and AT+CGACT for the second APN. This is successful, and I obtain assigned IP addresses for each APN. However, neither of the APNs are assigned to an interface and I don't know how to funnel traffic to each.<br>
><br>
> (2) I have used the bearer features of mmcli. I have run "mmcli -m <modem-number> --create-bearer=<key-value pairs>" two times, each with the proper key-value pairs for the respective APNs. When I later run "mmcli -m <modem_number>", I see both bearers. I then run "mmcli -m <modem-number> --bearer <bearer-number> --connect". This works the first time for the first APN/bearer, and I have an interface assigned. But I get the following error when next running " mmcli -m <modem-number> --bearer <bearer-number> --connect" for the second APN/bearer:<br>
> error: couldn't connect the bearer: 'GDBusError: org.freedesktop.ModemManager1.Error.Core.NotFound: No valid data port to launch connection'<br>
><br>
> (3) I've put multiple connection keyfiles in the /etc/NetworkManager/system-connections directory. I run "nmcli con reload" and then "nmcli --wait 120 con up id <name_of_first_connection>". This works as I get connected to the first APN, get assigned an IP address, and get an interface association (wwan0). However, when I run "nmcli --wait 120 con up id <name_of_second_connection>", this works, but it displaces the first connection, so I am only left with the second connection on interface wwan0. The first connection is no longer available.<br>
><br>
> My Ubuntu 20.04 system has mmcli 1.16.6 and nmcli 1.22.10. I could also install mbimcli 1.24.8, although it is not currently part of the system image.<br>
><br>
> Ideas on how to accomplish what I am after?<br>
<br>
Your modem needs to be QMI or MBIM based, and you need to install<br>
ModemManager 1.18, which is the first version supporting multiplexing.<br>
Once you have that, you can:<br>
 *  run Modem.SimpleConnect() with"multiplex=required"<br>
Or:<br>
 * start the ModemManager daemon with the additional<br>
--test-multiplex-requested option.<br>
<br>
My suggestion is to use the 2nd option, just start MM with<br>
--test-multiplex-requested so that any attempt to start a connection<br>
(e.g. via NetworkManager) will trigger the multiplex setup. When<br>
running with multiplex enabled, ModemManager will create a new virtual<br>
network interface for each APN connection, and then you can handle<br>
custom routing rules in the host for each of them.<br>
<br>
I talked a bit about this feature in the FOSDEM2022 talk earlier this<br>
year, if you're interested:<br>
<a href="https://fosdem.org/2022/schedule/event/mobile_modemmanager/" rel="noreferrer" target="_blank">https://fosdem.org/2022/schedule/event/mobile_modemmanager/</a><br>
<br>
-- <br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a></blockquote><p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><br></p><p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">I attempted to use mmcli 1.18.6 and nmcli 1.36.0 with
network manager and keyfiles to create multiple simultaneous connections to two
different APNs with a USB cellular modem on an Ubuntu Jammy Jellyfish 22.04
system. The ModemManager.service file had the debug and test-multiplex-requested
options activated on the ExecStart line.</p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Short summary of results:</p>

<p class="gmail-MsoNoSpacing" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">This sequence of commands (sudo nmcli con reload, sudo nmcli
--wait 300 con up id conn1,  sudo nmcli --wait
300 con up id conn2) did not produce multiple simultaneous packet data network
connections, but rather the second connection displaced the first. </p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"> <span style="font-size:11pt">More details starting from the beginning:</span></p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">After booting and logging in, I plugged in the modem into the
system, it reported this configuration:</p>

<pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">user@ubuntu22a:~$ ifconfig</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        inet6 fe80::ad94:11a5:b4a6:eada  prefixlen 64  scopeid 0x20<link></span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        ether 00:0c:29:df:a4:a1  txqueuelen 1000  (Ethernet)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        RX packets 0  bytes 0 (0.0 B)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        RX errors 0  dropped 0  overruns 0  frame 0</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        TX packets 43  bytes 7024 (7.0 KB)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        device interrupt 19  base 0x2000  </span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt"> </span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        inet 127.0.0.1  netmask 255.0.0.0</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        inet6 ::1  prefixlen 128  scopeid 0x10<host></span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        loop  txqueuelen 1000  (Local Loopback)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        RX packets 407  bytes 30924 (30.9 KB)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        RX errors 0  dropped 0  overruns 0  frame 0</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        TX packets 407  bytes 30924 (30.9 KB)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0</span></pre>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:10pt;line-height:107%"> </span></p>

<pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">user@ubuntu22a:~/Documents$ ip link list</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 1000</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">    link/ether 00:0c:29:df:a4:a1 brd ff:ff:ff:ff:ff:ff</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">    altname enp2s1</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">4: wwan0: <BROADCAST,MULTICAST,NOARP> mtu 1428 qdisc noop state DOWN mode DEFAULT group default qlen 1000</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">    link/ether 2a:b3:6e:9a:d3:6a brd ff:ff:ff:ff:ff:ff</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt"> </span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">user@ubuntu22a:~/Documents$ route</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">Kernel IP routing table</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">Destination     Gateway         Genmask         Flags Metric Ref    Use Iface</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><i><span style="font-size:9pt"><empty></span></i></pre>

<p class="gmail-MsoNoSpacing" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">I placed two files, named conn1 and conn2, into /etc/NetworkManager/system-connections.
These files were both structured like the following, although the id, uuid, apn,
username and password were set to appropriately different values:</p>

<pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">[connection]</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">id=conn1</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">uuid=201846b6-5c29-4475-8d07-91fca39beb35</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">type=gsm</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">autoconnect=false</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">secondaries=</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">interface-name=cdc-wdm0</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt"> </span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">[gsm]</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">apn=apnname1</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">number=*99#</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">password-flags=0</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">username=apnuser1</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">password=apnpass1</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt"> </span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">[ppp]</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">noauth=false</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">refuse-chap=true</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">refuse-eap=true</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">refuse-mschap=true</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">refuse-mschapv2=true</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt"> </span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">[ipv4]</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">dns-search=</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">method=auto</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt"> </span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">[ipv6]</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">addr-gen-mode=stable-privacy</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">dns-search=</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">ip6-privacy=0</span></pre><pre style="margin:0in 0in 0.0001pt 0.5in;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">method=ignore</span></pre>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">I ran “sudo nmcli con reload” and then “sudo nmcli --wait 300
con up id conn1”. This worked. This was the result on the networking
arrangements:</p>

<pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">user@ubuntu22a:~/Documents$ ifconfig</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><i><span style="font-size:9pt"><ens33 and lo omitted for brevity’s sake; they are identical to first listing></span></i></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">mbimmux0.1: flags=4291<UP,BROADCAST,RUNNING,NOARP,MULTICAST>  mtu 1428</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        inet 10.3.1.2  netmask 255.255.255.0  broadcast 10.3.1.255</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        ether 2a:b3:6e:9a:d3:6a  txqueuelen 1000  (Ethernet)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        RX packets 0  bytes 0 (0.0 B)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        RX errors 0  dropped 0  overruns 0  frame 0</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        TX packets 28  bytes 3117 (3.1 KB)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt"> </span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">wwan0: flags=67<UP,BROADCAST,RUNNING>  mtu 1428</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        inet6 fe80::28b3:6eff:fe9a:d36a  prefixlen 64  scopeid 0x20<link></span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        ether 2a:b3:6e:9a:d3:6a  txqueuelen 1000  (Ethernet)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        RX packets 0  bytes 0 (0.0 B)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        RX errors 0  dropped 0  overruns 0  frame 0</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        TX packets 33  bytes 3169 (3.1 KB)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt"> </span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">user@ubuntu22a:~/Documents$ ip link list</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><i><span style="font-size:9pt"><1: lo and 2: ens33 omitted for brevity’s sake; they are identical to first listing></span></i></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">4: wwan0: <BROADCAST,UP,LOWER_UP> mtu 1428 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 1000</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">    link/ether 2a:b3:6e:9a:d3:6a brd ff:ff:ff:ff:ff:ff</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">5: mbimmux0.1@wwan0: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1428 qdisc noqueue state UP mode DEFAULT group default qlen 1000</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">    link/ether 2a:b3:6e:9a:d3:6a brd ff:ff:ff:ff:ff:ff</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt"> </span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">user@ubuntu22a:~/Documents$ route</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">Kernel IP routing table</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">Destination     Gateway         Genmask         Flags Metric Ref    Use Iface</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">default         _gateway        0.0.0.0         UG    20700  0        0 mbimmux0.1</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">10.3.1.0        0.0.0.0         255.255.255.0   U     700    0        0 mbimmux0.1</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">link-local      0.0.0.0         255.255.0.0     U     1000   0        0 mbimmux0.1</span></pre>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">The connectivity through this connection to the first APN
worked fine.</p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">I then attempted to establish a connection to the second APN
with “sudo nmcli --wait 300 con up id conn2”. The command reported “Connection
successfully activated (D-Bus active path:
/org/freedesktop/NetworkManager/ActiveConnection/14)”.</p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">However, the connection to the first APN no longer worked and
my connectivity was only to the second APN. This was the result on the
networking arrangements:</p>

<pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">user@ubuntu22a:~/Documents$ ifconfig</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><i><span style="font-size:9pt"><ens33 and lo omitted for brevity’s sake; they are identical to first listing></span></i></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">mbimmux0.1: flags=67<UP,BROADCAST,RUNNING>  mtu 1428</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        inet 10.3.1.2  netmask 255.255.255.0  broadcast 10.3.1.255</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        ether 2a:b3:6e:9a:d3:6a  txqueuelen 1000  (Ethernet)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        RX packets 0  bytes 0 (0.0 B)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        RX errors 0  dropped 0  overruns 0  frame 0</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        TX packets 3  bytes 126 (126.0 B)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt"> </span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">wwan0: flags=67<UP,BROADCAST,RUNNING>  mtu 1428</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        inet6 fe80::28b3:6eff:fe9a:d36a  prefixlen 64  scopeid 0x20<link></span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        ether 2a:b3:6e:9a:d3:6a  txqueuelen 1000  (Ethernet)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        RX packets 0  bytes 0 (0.0 B)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        RX errors 0  dropped 0  overruns 0  frame 0</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        TX packets 39  bytes 3556 (3.5 KB)</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt"> </span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">user@ubuntu22a:~/Documents$ ip link list</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><i><span style="font-size:9pt"><1: lo and 2: ens33 omitted for brevity’s sake; they are identical to first listing></span></i></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">4: wwan0: <BROADCAST,UP,LOWER_UP> mtu 1428 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 1000</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">    link/ether 2a:b3:6e:9a:d3:6a brd ff:ff:ff:ff:ff:ff</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">6: mbimmux0.1@wwan0: <BROADCAST,UP,LOWER_UP> mtu 1428 qdisc noqueue state UP mode DEFAULT group default qlen 1000</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">    link/ether 2a:b3:6e:9a:d3:6a brd ff:ff:ff:ff:ff:ff</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt"> </span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">user@ubuntu22a:~/Documents$ route</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">Kernel IP routing table</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">Destination     Gateway         Genmask         Flags Metric Ref    Use Iface</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">default         _gateway        0.0.0.0         UG    20700  0        0 mbimmux0.1</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">10.3.1.0        0.0.0.0         255.255.255.0   U     700    0        0 mbimmux0.1</span></pre><pre style="margin:0in 0in 0.0001pt;font-size:10pt;font-family:"Courier New""><span style="font-size:9pt">link-local      0.0.0.0         255.255.0.0     U     1000   0        0 mbimmux0.1</span></pre>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Notice that in comparing the output from “ip link list” that
the index number for “mbimmux0.1@wwan0” has changed from 5 to 6. </p>

<p class="gmail-MsoNoSpacing" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif">Thus, using this sequence of commands,<span style="font-size:11pt"> </span></p>

<p class="gmail-MsoNoSpacing" style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif">sudo nmcli con reload</p>

<p class="gmail-MsoNoSpacing" style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif">nmcli --wait 300 con up id conn1</p>

<p class="gmail-MsoNoSpacing" style="margin:0in 0in 0in 0.5in;font-size:11pt;font-family:Calibri,sans-serif">nmcli --wait 300 con up id conn2</p>

<p class="gmail-MsoNoSpacing" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> <span style="font-size:11pt">did not achieve two simultaneous packet data network connections,
but rather the second connection has displaced the first. This seems to have
involved the multiplexing in some way, as evidenced by the mbimmux.0.1
appearing in the “ifconfig” and “ip link list” outputs.</span></p>

<p class="gmail-MsoNoSpacing" style="margin:0in;font-size:11pt;font-family:Calibri,sans-serif"> </p>

<div><span style="font-family:Calibri,sans-serif;font-size:11pt">Any suggestions on how to make this work using the nmcli
and connection keyfiles?</span> </div></div></div>