DNS and MTU

Aleksander Morgado aleksandermj at chromium.org
Mon Nov 28 10:23:53 UTC 2022


Hey Tom,

On Tue, Nov 22, 2022 at 9:35 AM Tom Isaacson <tom.isaacson at teknique.com> wrote:
>
> I'm moving over to ModemManager / NetworkManager integration but I'm
> not sure I understand how DNS and MTU are handled.
>
> My device has a Sierra RC7611 or RC7620 (depending on location). I'm
> setting up the data connection using:
> nmcli connection add type gsm ifname 'cdc-wdm0' con-name 'sierra'
> connection.autoconnect yes
>
> That works fine for data, but I'm confused as to how DNS and MTU are
> supposed to be setup. Systemd correctly sets up
> /var/run/systemd/resolve/resolv.conf
> with the DNS settings, but /etc/resolv.conf gets setup with:
> # Generated by NetworkManager
> nameserver 127.0.0.1
>
> I have to delete it and setup a symbolic link to
> /var/run/systemd/resolve/resolv.conf. Shouldn't Systemd take care of
> this?
>
> Secondly, the bearer sets the MTU at 1428:
> # mmcli --modem=0 --bearer=0
>   --------------------------------
>   General            |  dbus path: /org/freedesktop/ModemManager1/Bearer/0
>                      |       type: default
>   --------------------------------
>   Status             |  connected: yes
>                      |  suspended: no
>                      |  interface: wwan0
>                      | ip timeout: 20
>   --------------------------------
>   Properties         |        apn: internet
>                      |    roaming: allowed
>                      |    ip type: ipv4v6
>   --------------------------------
>   IPv4 configuration |     method: static
>                      |    address: 100.95.39.213
>                      |     prefix: 30
>                      |    gateway: 100.95.39.214
>                      |        dns: 198.224.183.135, 198.224.182.135
>                      |        mtu: 1428
>   --------------------------------
>   Statistics         |   duration: 240
>                      |   bytes rx: 28188070
>                      |   bytes tx: 1066621
>
> But that doesn't seem to be applied automatically? Do I have to read
> it then apply it myself?
>

I have absolutely no idea how the systemd-resolved integration works
along with NetworkManager, they may be clashing.
When using MM+NM, NM should take the DNS servers reported by
ModemManager and apply them if the WWAN connection is the primary one.
NM should also apply the MTU reported by ModemManager to the specific
network interface.

-- 
Aleksander


More information about the ModemManager-devel mailing list