[Networkmanager] Multiple connections for the same device

Fabio Porcedda fabio.porcedda at gmail.com
Tue Jul 11 12:22:39 UTC 2023


Il giorno mar 11 lug 2023 alle ore 14:19 Greg Oliver
<oliver.greg at gmail.com> ha scritto:
>
> On Tue, Jul 11, 2023 at 1:19 AM Fabio Porcedda <fabio.porcedda at gmail.com> wrote:
>>
>>
>>
>> Il giorno mar 11 lug 2023 alle ore 00:49 Greg Oliver <oliver.greg at gmail.com> ha scritto:
>>>
>>> On Mon, Jul 10, 2023 at 6:51 AM Fabio Porcedda <fabio.porcedda at gmail.com> wrote:
>>>>
>>>>
>>>>
>>>> Il giorno sab 8 lug 2023 alle ore 10:59 Frédéric Martinsons <frederic.martinsons at gmail.com> ha scritto:
>>>>>
>>>>> s/limbmm/libmm
>>>>>
>>>>> Le sam. 8 juil. 2023, 10:58, Frédéric Martinsons <frederic.martinsons at gmail.com> a écrit :
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I have a similar use case, to have multiple GSM configuration for a device, I disabled autoconnect on Networkmanager and I have a dedicated service (which is built around libnm et limbmm) to be able to actovate/deactivate/monitor these multiple connection.
>>>>>>
>>>>>> I don't think it is possible in NM to have multiple active connection on the same device.
>>>>
>>>>
>>>> I think the same, so in order to have it I would like to change the source code, I appreciate any suggestion about the parts to change.
>>>> I'm searching for the code where the old connection is disconnected when a new one is made for the same device.
>>>>
>>>>
>>>>>>
>>>>>> Le sam. 8 juil. 2023, 10:31, Fabio Porcedda <fabio.porcedda at gmail.com> a écrit :
>>>>>>>
>>>>>>>
>>>>>>> Il giorno ven 7 lug 2023 alle ore 16:19 Andrei Borzenkov <arvidjaar at gmail.com> ha scritto:
>>>>>>>>
>>>>>>>> On Fri, Jul 7, 2023 at 5:10 PM Fabio Porcedda <fabio.porcedda at gmail.com> wrote:
>>>>>>>> >
>>>>>>>> > Hi all,
>>>>>>>> > I would like to implement multiple connections for the same device, My idea is to avoid disconnecting a connection even if a new connection is requested for the same device. Does anyone have some suggestions about the file or function to change?
>>>>>>>> >
>>>>>>>>
>>>>>>>> I am not sure I understand what device you mean. Do you mean ethernet
>>>>>>>> interface? Do you want to apply multiple connection profiles to the
>>>>>>>> same ethernet interface concurrently?
>>>>>>>
>>>>>>>
>>>>>>> I mean gsm type device. I would like to activate multiple connection profiles for the same gsm device at the same time.
>>>>>>> Sometimes it is useful to have multiple active apn for the same broadband device enabled at the same time because each apn can have different capabilities.
>>>
>>>
>>> Good luck - the "modems" do not have the capability to connect to more than a single APN simultaneously with a multi-APN device (shich I know of none).
>>
>>
>> Modems do have this kind of capability, for example It's possible using ModemManager with a modem that support MBIM or QMI, e.g.:
>>
>> mmcli -m <modem_id> --create-bearer="apn=<apn1>,multiplex=required"
>> mmcli -m <modem_id> --create-bearer="apn=<apn2>,multiplex=required"
>>
>> mmcli -m <modem_id> -b <bearer1_id> --connect
>> mmcli -m <modem_id> -b <bearer1_id>
>> ip addr add <bearer1_adddres>/<bearer1_prefix> dev <bearer1_interface>
>> ip link set <bearer1_interface> up
>> ip route add <bearer1_network>/<prefix> dev <bearer1_interface>
>>
>> mmcli -m <modem_id> -b <bearer2_id> --connect
>> mmcli -m <modem_id> -b <bearer2_id>
>> ip addr add <bearer2_adddres>/<prefix> dev <bearer2_interface>
>> ip link set <bearer2_interface> up
>> ip route add <bearer2_network>/<prefix> dev <bearer2_interface>
>>
>> Regards
>> --
>> Fabio Porcedda
>
>
> And after your <bearer2> commands, the <bearer1> stuff will be gone...  I imagine this is the problem you are encountering.

Using Modem Manager works, the problem I'm encountering is that I want
to do that through NetworkManager instead of ModemManager and the ip
tool.


More information about the Networkmanager mailing list