DNS and MTU

Hugo Osvaldo Barrera hugo at whynothugo.nl
Tue Nov 22 10:11:28 UTC 2022



On Tue, 22 Nov 2022, at 09:34, Tom Isaacson 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?

If you want all local processes to use systemd-resolved, you need to
create this symlink yourself:

https://man.archlinux.org/man/systemd-resolved.8#/ETC/RESOLV.CONF

>
> 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?
>
> Thanks.
>
> -- 
> Tom Isaacson

-- 
Hugo


More information about the ModemManager-devel mailing list