Understanding Default Bearers and PDP Contexts

Jaden Young jyoung at appareo.com
Mon May 8 15:31:38 UTC 2023


Hello,

Thanks for ModemManager!

Should a bearer of type MM_BEARER_TYPE_DEFAULT correspond 1-1 with a
modem PDP context?

Said another way, if I have a default bearer with APN B, should `mmcli
-m 0 --3gpp-profile-list` and `AT+CGDCONT` show a profile/PDP context
with APN B?

If there isn't a direct correspondence then the rest of this message can
be ignored. Pessimistically dumping more information here in case this
is a bug, and for searchability should another find themselves as
confused as I am.

Configuration Info:
- Modem: Quectel EG95-NAXD, FW version EG95NAXDGAR07A01M1G
- Location: US
- Carrier: AT&T
- Platform: Yocto Linux (kirkstone)
- ModemManager version: 1.18.6
- NetworkManager version: 1.36.2

Problem Description:
My goal is verifying that traffic is being sent directly to a private
APN without flowing through the PDN addressed by the initial-attach APN.

My intuition says that this should be possible, and that there would be
a correspondence between default bearers and PDP contexts. A source [1]
for which I have no sense of reputation quotes:

> According to 3GPP TS 23.401 [82], there is a 1 to 1 mapping between
> active EPS bearer context and active PDP context

Reading through 3GPP TS 23.401 version 18.1.0 [2] I haven't been able to
verify that claim.

In NetworkManager, I have a connection config with
`[gsm]\napn="m2m.com.attz"` (well, goal is a different APN, but this
suffices for example). I can see that this creates bearer 1, and
generating traffic will augment stats on `mmcli -b 1`. However,
`AT+CGDCONT` and `AT+CGREG` indicate that there isn't a PDP context
defined with `m2m.com.attz` as APN, and that the active PDP context is
using the APN of the default-attach bearer 0, `broadband`.

#+begin_quote
# mmcli -m 0
  -----------------------------------
  General  |                    path: /org/freedesktop/ModemManager1/Modem/0
           |               device id: <snip, valid>
  -----------------------------------
  Hardware |            manufacturer: QUALCOMM INCORPORATED
           |                   model: QUECTEL Mobile Broadband Module
           |       firmware revision: EG95NAXDGAR07A01M1G
           |          carrier config: VoLTE-ATT
           | carrier config revision: 0501033C
           |            h/w revision: 10000
           |               supported: gsm-umts, lte
           |                 current: gsm-umts, lte
           |            equipment id: <snip, valid>
  -----------------------------------
  System   |                  device: /sys/devices/platform/bus at 5b000000/5b0e0000.usb/ci_hdrc.1/usb1/1-1
           |                 drivers: option, qmi_wwan
           |                  plugin: quectel
           |            primary port: cdc-wdm0
           |                   ports: cdc-wdm0 (qmi), ttyUSB0 (qcdm), ttyUSB2 (at), wwan0 (net)
  -----------------------------------
  Status   |                    lock: sim-pin2
           |          unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
           |                   state: connected
           |             power state: on
           |             access tech: lte
           |          signal quality: 67% (cached)
  -----------------------------------
  Modes    |               supported: allowed: 3g; preferred: none
           |                          allowed: 4g; preferred: none
           |                          allowed: 3g, 4g; preferred: 4g
           |                          allowed: 3g, 4g; preferred: 3g
           |                 current: allowed: 2g, 3g, 4g; preferred: 4g
  -----------------------------------
  Bands    |               supported: utran-4, utran-5, utran-2, eutran-2, eutran-4, eutran-5,
           |                          eutran-12, eutran-13, eutran-25, eutran-26
           |                 current: utran-4, utran-5, utran-2, eutran-2, eutran-4, eutran-5,
           |                          eutran-12, eutran-13, eutran-25, eutran-26
  -----------------------------------
  IP       |               supported: ipv4, ipv6, ipv4v6
  -----------------------------------
  3GPP     |                    imei: <snip, valid>
           |           enabled locks: fixed-dialing
           |             operator id: 310410
           |           operator name: AT&T
           |            registration: home
  -----------------------------------
  3GPP EPS |    ue mode of operation: csps-2
           |     initial bearer path: /org/freedesktop/ModemManager1/Bearer/0
           |      initial bearer apn: broadband
           |  initial bearer ip type: ipv4
  -----------------------------------
  SIM      |        primary sim path: /org/freedesktop/ModemManager1/SIM/0
           |          sim slot paths: slot 1: /org/freedesktop/ModemManager1/SIM/0 (active)
           |                          slot 2: none
  -----------------------------------
  Bearer   |                   paths: /org/freedesktop/ModemManager1/Bearer/1

# mmcli -b 0
  -------------------------
  General    |        path: /org/freedesktop/ModemManager1/Bearer/0
             |        type: default-attach
  -------------------------
  Status     |   connected: yes
             |   suspended: no
             | multiplexed: no
             |  ip timeout: 20
  -------------------------
  Properties |         apn: broadband
             |     ip type: ipv4
# mmcli -b 1
  ------------------------------------
  General            |           path: /org/freedesktop/ModemManager1/Bearer/1
                     |           type: default
  ------------------------------------
  Status             |      connected: yes
                     |      suspended: no
                     |    multiplexed: no
                     |      interface: wwan0
                     |     ip timeout: 20
  ------------------------------------
  Properties         |            apn: m2m.com.attz
                     |        roaming: allowed
                     |        ip type: ipv4v6
  ------------------------------------
  IPv4 configuration |         method: static
                     |        address: 10.45.22.52
                     |         prefix: 29
                     |        gateway: 10.45.22.53
                     |            dns: 8.8.8.8, 8.8.4.4
                     |            mtu: 1430
  ------------------------------------
  Statistics         |       duration: 119
                     |       bytes rx: 27608
                     |       bytes tx: 26331
                     |       attempts: 1
                     | total-duration: 119
                     | total-bytes rx: 27608
                     | total-bytes tx: 26331

# at 'AT+CGDCONT?'

+CGDCONT: 1,"IP","broadband","0.0.0.0",0,0,0,0
+CGDCONT: 16,"IPV4V6","attm2mglobal","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 2,"IPV4V6","ims","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT: 3,"IPV4V6","sos","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,1

OK

# at 'AT+CGREG?'

+CGREG: 0,1

OK
#+end_quote

[1] https://itecspec.com/spec/3gpp-27-007-10-1-0-general-remark-about-eps-bearer-contexts-and-pdp-contexts/
[2] https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=849


Thank you,
Jaden Young

-- 
NOTICE: This message {including attachments} is covered by the Electronic 
Communication Privacy Act, 18 U.S.C. sections 2510-2521, is CONFIDENTIAL 
and may also be protected by ATTORNEY-CLIENT OR OTHER PRIVILEGE. If you 
believe that it has been sent to you in error, do not read it. If you are 
not the intended recipient, you are hereby notified that any retention, 
dissemination, distribution, or copying of this communication is strictly 
prohibited. Please reply to the sender that you have received the message 
in error and then delete it.


More information about the ModemManager-devel mailing list