System information
ChrisBlackburn@vyos-lab:~$ show version
Version: VyOS 1.5-rolling-202503131633
Release train: current
Release flavor: generic
Built by: chris.blackburn
Built on: Thu 13 Mar 2025 16:33 UTC
Build UUID: a8acc548-6e2b-4d59-86d7-d1f0c12a11c7
Build commit ID: 0423450c3a4382
Architecture: x86_64
Boot via: installed image
System type: KVM guest
Secure Boot: n/a (BIOS)
Hardware vendor: QEMU
Hardware model: Standard PC (Q35 + ICH9, 2009)
Hardware S/N:
Hardware UUID: 68d74cab-595a-47cf-8dcc-f28e581ac711
Copyright: VyOS maintainers and contributors
ChrisBlackburn@vyos-lab:~$ show hardware cpu
CPU socket: 0
CPU Vendor: GenuineIntel
Model: QEMU Virtual CPU version 2.5+
Cores: 2
Current MHz: 1593.600
ChrisBlackburn@vyos-lab:~$ show hardware pci
00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller
00:01.0 VGA compatible controller: Device 1234:1111 (rev 02)
00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)
00:1a.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)
00:1a.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
00:1c.1 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
00:1c.2 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
00:1c.3 PCI bridge: Red Hat, Inc. QEMU PCIe Root port
00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)
00:1f.0 ISA bridge: Intel Corporation 82801IB (ICH9) LPC Interface Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)
05:01.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge
05:02.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge
05:03.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge
05:04.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge
06:03.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon
06:08.0 Communication controller: Red Hat, Inc. Virtio console
06:10.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)
06:12.0 Ethernet controller: Red Hat, Inc. Virtio network device
06:13.0 Ethernet controller: Red Hat, Inc. Virtio network device
06:14.0 Ethernet controller: Red Hat, Inc. Virtio network device
06:15.0 Ethernet controller: Red Hat, Inc. Virtio network device
06:16.0 Ethernet controller: Red Hat, Inc. Virtio network device
06:17.0 Ethernet controller: Red Hat, Inc. Virtio network device
07:01.0 Ethernet controller: Red Hat, Inc. Virtio network device
09:01.0 SCSI storage controller: Red Hat, Inc. Virtio SCSI
ChrisBlackburn@vyos-lab:~$ show hardware usb
/: Bus 10.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 09.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 08.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
|__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=qcserial, 5000M
|__ Port 1: Dev 2, If 2, Class=Vendor Specific Class, Driver=qcserial, 5000M
|__ Port 1: Dev 2, If 3, Class=Vendor Specific Class, Driver=qcserial, 5000M
|__ Port 1: Dev 2, If 8, Class=Vendor Specific Class, Driver=qmi_wwan, 5000M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
|__ Port 3: Dev 2, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
|__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480MIssue
When working with 3/4/5G WWAN Cards it's common for the connection to drop out intermittently, especially when VyOS is operating on a moving platform such as a vehicle. When this happens, depending on the length of the signal outage, it's necessary for the modem to be manually reconnected. This is performed in the CLI by using the following CLI commands:-
disconnect interface wwan0 connect interface wwan0
We were noticing, however, that when running the above commands, the disconnect command did work however the connect command did not work. Some fault finding with the debugging turned on lead to the following output (some personally identifiable information has been replaced with <REDACTED>)
DEBUG/COMMAND cmd 'systemctl show --value -p ActiveState ModemManager.service'
DEBUG/COMMAND returned (out):
active
DEBUG/COMMAND cmd 'mmcli --modem 0 --output-json'
DEBUG/COMMAND returned (out):
{"modem":{"3gpp":{"5gnr":{"registration-settings":{"drx-cycle":"--","mico-mode":"--"}},"enabled-locks":["fixed-dialing"],"eps":{"initial-bearer":{"dbus-path":"/org/freedesktop/ModemManager1/Bearer/4","settings":{"apn":"<REDACTED>","ip-type":"ipv4v6","password":"--","user":"--"}},"ue-mode-operation":"csps-2"},"imei":"<REDACTED>","operator-code":"<REDACTED>","operator-name":"<REDACTED>","packet-service-state":"attached","pco":"--","registration-state":"home"},"cdma":{"activation-state":"--","cdma1x-registration-state":"--","esn":"--","evdo-registration-state":"--","meid":"--","nid":"--","sid":"--"},"dbus-path":"/org/freedesktop/ModemManager1/Modem/0","generic":{"access-technologies":["lte"],"bearers":["/org/freedesktop/ModemManager1/Bearer/7","/org/freedesktop/ModemManager1/Bearer/6","/org/freedesktop/ModemManager1/Bearer/5","/org/freedesktop/ModemManager1/Bearer/3","/org/freedesktop/ModemManager1/Bearer/2","/org/freedesktop/ModemManager1/Bearer/1"],"carrier-configuration":"default","carrier-configuration-revision":"--","current-bands":["utran-1","utran-5","utran-8","eutran-1","eutran-3","eutran-7","eutran-8","eutran-20","eutran-28","eutran-32","eutran-38","eutran-40","eutran-41","eutran-42","eutran-43"],"current-capabilities":["gsm-umts, lte"],"current-modes":"allowed: 4g; preferred: none","device":"/sys/devices/pci0000:00/0000:00:1e.0/0000:05:01.0/0000:06:10.0/usb5/5-1","device-identifier":"<REDACTED>","drivers":["qcserial","qmi_wwan"],"equipment-identifier":"<REDACTED>","hardware-revision":"1.0","manufacturer":"Sierra Wireless, Incorporated","model":"EM7421","own-numbers":[],"plugin":"sierra","ports":["cdc-wdm0 (qmi)","ttyUSB1 (qcdm)","ttyUSB2 (gps)","ttyUSB3 (at)","wwan0 (net)"],"power-state":"on","primary-port":"cdc-wdm0","primary-sim-slot":"1","revision":"SWI9X50C_01.14.22.00 ba8ef1 jenkins 2022/11/11 09:59:48","signal-quality":{"recent":"yes","value":"39"},"sim":"/org/freedesktop/ModemManager1/SIM/0","sim-slots":["/org/freedesktop/ModemManager1/SIM/0","/"],"state":"connected","state-failed-reason":"--","supported-bands":["utran-1","utran-5","utran-8","eutran-1","eutran-3","eutran-7","eutran-8","eutran-20","eutran-28","eutran-32","eutran-38","eutran-40","eutran-41","eutran-42","eutran-43"],"supported-capabilities":["gsm-umts, lte"],"supported-ip-families":["ipv4","ipv6","ipv4v6"],"supported-modes":["allowed: 3g; preferred: none","allowed: 4g; preferred: none","allowed: 3g, 4g; preferred: 4g","allowed: 3g, 4g; preferred: 3g"],"unlock-required":"sim-pin2","unlock-retries":["sim-pin (3)","sim-puk (10)","sim-pin2 (3)","sim-puk2 (10)"]}}}
Interface wwan0: already connected!
ChrisBlackburn@vyos-lab:~$ disconnect interface wwan0
DEBUG/COMMAND cmd 'systemctl show --value -p ActiveState ModemManager.service'
DEBUG/COMMAND returned (out):
active
DEBUG/COMMAND cmd 'mmcli --modem 0 --output-json'
DEBUG/COMMAND returned (out):
{"modem":{"3gpp":{"5gnr":{"registration-settings":{"drx-cycle":"--","mico-mode":"--"}},"enabled-locks":["fixed-dialing"],"eps":{"initial-bearer":{"dbus-path":"/org/freedesktop/ModemManager1/Bearer/4","settings":{"apn":"<REDACTED>","ip-type":"ipv4v6","password":"--","user":"--"}},"ue-mode-operation":"csps-2"},"imei":"<REDACTED>","operator-code":"<REDACTED>","operator-name":"<REDACTED>","packet-service-state":"attached","pco":"--","registration-state":"home"},"cdma":{"activation-state":"--","cdma1x-registration-state":"--","esn":"--","evdo-registration-state":"--","meid":"--","nid":"--","sid":"--"},"dbus-path":"/org/freedesktop/ModemManager1/Modem/0","generic":{"access-technologies":["lte"],"bearers":["/org/freedesktop/ModemManager1/Bearer/7","/org/freedesktop/ModemManager1/Bearer/6","/org/freedesktop/ModemManager1/Bearer/5","/org/freedesktop/ModemManager1/Bearer/3","/org/freedesktop/ModemManager1/Bearer/2","/org/freedesktop/ModemManager1/Bearer/1"],"carrier-configuration":"default","carrier-configuration-revision":"--","current-bands":["utran-1","utran-5","utran-8","eutran-1","eutran-3","eutran-7","eutran-8","eutran-20","eutran-28","eutran-32","eutran-38","eutran-40","eutran-41","eutran-42","eutran-43"],"current-capabilities":["gsm-umts, lte"],"current-modes":"allowed: 4g; preferred: none","device":"/sys/devices/pci0000:00/0000:00:1e.0/0000:05:01.0/0000:06:10.0/usb5/5-1","device-identifier":"<REDACTED>","drivers":["qcserial","qmi_wwan"],"equipment-identifier":"<REDACTED>","hardware-revision":"1.0","manufacturer":"Sierra Wireless, Incorporated","model":"EM7421","own-numbers":[],"plugin":"sierra","ports":["cdc-wdm0 (qmi)","ttyUSB1 (qcdm)","ttyUSB2 (gps)","ttyUSB3 (at)","wwan0 (net)"],"power-state":"on","primary-port":"cdc-wdm0","primary-sim-slot":"1","revision":"SWI9X50C_01.14.22.00 ba8ef1 jenkins 2022/11/11 09:59:48","signal-quality":{"recent":"yes","value":"31"},"sim":"/org/freedesktop/ModemManager1/SIM/0","sim-slots":["/org/freedesktop/ModemManager1/SIM/0","/"],"state":"connected","state-failed-reason":"--","supported-bands":["utran-1","utran-5","utran-8","eutran-1","eutran-3","eutran-7","eutran-8","eutran-20","eutran-28","eutran-32","eutran-38","eutran-40","eutran-41","eutran-42","eutran-43"],"supported-capabilities":["gsm-umts, lte"],"supported-ip-families":["ipv4","ipv6","ipv4v6"],"supported-modes":["allowed: 3g; preferred: none","allowed: 4g; preferred: none","allowed: 3g, 4g; preferred: 4g","allowed: 3g, 4g; preferred: 3g"],"unlock-required":"sim-pin2","unlock-retries":["sim-pin (3)","sim-puk (10)","sim-pin2 (3)","sim-puk2 (10)"]}}}
DEBUG/COMMAND cmd 'mmcli --modem 0 --simple-disconnect'
ChrisBlackburn@vyos-lab:~$ connect interface wwan0
DEBUG/COMMAND cmd 'systemctl show --value -p ActiveState ModemManager.service'
DEBUG/COMMAND returned (out):
active
DEBUG/COMMAND cmd 'mmcli --modem 0 --output-json'
DEBUG/COMMAND returned (out):
{"modem":{"3gpp":{"5gnr":{"registration-settings":{"drx-cycle":"--","mico-mode":"--"}},"enabled-locks":["fixed-dialing"],"eps":{"initial-bearer":{"dbus-path":"/org/freedesktop/ModemManager1/Bearer/4","settings":{"apn":"everywhere","ip-type":"ipv4v6","password":"--","user":"--"}},"ue-mode-operation":"csps-2"},"imei":"<REDACTED>","operator-code":"<REDACTED>","operator-name":"<REDACTED>","packet-service-state":"attached","pco":"--","registration-state":"home"},"cdma":{"activation-state":"--","cdma1x-registration-state":"--","esn":"--","evdo-registration-state":"--","meid":"--","nid":"--","sid":"--"},"dbus-path":"/org/freedesktop/ModemManager1/Modem/0","generic":{"access-technologies":["lte"],"bearers":["/org/freedesktop/ModemManager1/Bearer/7","/org/freedesktop/ModemManager1/Bearer/6","/org/freedesktop/ModemManager1/Bearer/5","/org/freedesktop/ModemManager1/Bearer/3","/org/freedesktop/ModemManager1/Bearer/2","/org/freedesktop/ModemManager1/Bearer/1"],"carrier-configuration":"default","carrier-configuration-revision":"--","current-bands":["utran-1","utran-5","utran-8","eutran-1","eutran-3","eutran-7","eutran-8","eutran-20","eutran-28","eutran-32","eutran-38","eutran-40","eutran-41","eutran-42","eutran-43"],"current-capabilities":["gsm-umts, lte"],"current-modes":"allowed: 4g; preferred: none","device":"/sys/devices/pci0000:00/0000:00:1e.0/0000:05:01.0/0000:06:10.0/usb5/5-1","device-identifier":"<REDACTED>","drivers":["qcserial","qmi_wwan"],"equipment-identifier":"<REDACTED>","hardware-revision":"1.0","manufacturer":"Sierra Wireless, Incorporated","model":"EM7421","own-numbers":[],"plugin":"sierra","ports":["cdc-wdm0 (qmi)","ttyUSB1 (qcdm)","ttyUSB2 (gps)","ttyUSB3 (at)","wwan0 (net)"],"power-state":"on","primary-port":"cdc-wdm0","primary-sim-slot":"1","revision":"SWI9X50C_01.14.22.00 ba8ef1 jenkins 2022/11/11 09:59:48","signal-quality":{"recent":"yes","value":"42"},"sim":"/org/freedesktop/ModemManager1/SIM/0","sim-slots":["/org/freedesktop/ModemManager1/SIM/0","/"],"state":"registered","state-failed-reason":"--","supported-bands":["utran-1","utran-5","utran-8","eutran-1","eutran-3","eutran-7","eutran-8","eutran-20","eutran-28","eutran-32","eutran-38","eutran-40","eutran-41","eutran-42","eutran-43"],"supported-capabilities":["gsm-umts, lte"],"supported-ip-families":["ipv4","ipv6","ipv4v6"],"supported-modes":["allowed: 3g; preferred: none","allowed: 4g; preferred: none","allowed: 3g, 4g; preferred: 4g","allowed: 3g, 4g; preferred: 3g"],"unlock-required":"sim-pin2","unlock-retries":["sim-pin (3)","sim-puk (10)","sim-pin2 (3)","sim-puk2 (10)"]}}}
DEBUG/COMMAND cmd 'VYOS_TAGNODE_VALUE=wwan0 /usr/libexec/vyos/conf_mode/interfaces_wwan.py'
DEBUG/COMMAND cmd 'systemctl show --value -p ActiveState ModemManager.service'
DEBUG/COMMAND returned (out):
active
DEBUG/COMMAND cmd 'ip link show dev wwan0'
DEBUG/COMMAND cmd 'ip -json -detail link list dev wwan0'
DEBUG/COMMAND returned (out):
[{"ifindex":9,"ifname":"wwan0","flags":["POINTOPOINT","MULTICAST","NOARP","UP","LOWER_UP"],"mtu":1500,"qdisc":"fq_codel","operstate":"UNKNOWN","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"none","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":65535,"num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"usb","parentdev":"5-1:1.8","ifalias":"Tesco"}]
DEBUG/COMMAND cmd 'systemctl show --value -p ActiveState dhcp6c@wwan0.service'
DEBUG/COMMAND returned (out):
inactive
DEBUG/COMMAND cmd 'ip -json -detail link list dev wwan0'
DEBUG/COMMAND returned (out):
[{"ifindex":9,"ifname":"wwan0","flags":["POINTOPOINT","MULTICAST","NOARP","UP","LOWER_UP"],"mtu":1500,"qdisc":"fq_codel","operstate":"UNKNOWN","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"none","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":65535,"num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"usb","parentdev":"5-1:1.8","ifalias":"Tesco"}]
DEBUG/COMMAND cmd 'ip --detail --json link show dev wwan0'
DEBUG/COMMAND returned (out):
[{"ifindex":9,"ifname":"wwan0","flags":["POINTOPOINT","MULTICAST","NOARP","UP","LOWER_UP"],"mtu":1500,"qdisc":"fq_codel","operstate":"UNKNOWN","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"none","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":65535,"num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"usb","parentdev":"5-1:1.8","ifalias":"Tesco"}]
DEBUG/COMMAND cmd 'systemctl show --value -p ActiveState dhclient@wwan0.service'
DEBUG/COMMAND returned (out):
active
DEBUG/COMMAND cmd 'systemctl stop dhclient@wwan0.service'
DEBUG/COMMAND cmd 'ip --detail --json addr show dev wwan0'
DEBUG/COMMAND returned (out):
[{"ifindex":9,"ifname":"wwan0","flags":["POINTOPOINT","MULTICAST","NOARP","UP","LOWER_UP"],"mtu":1500,"qdisc":"fq_codel","operstate":"UNKNOWN","group":"default","txqlen":1000,"link_type":"none","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":65535,"num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"usb","parentdev":"5-1:1.8","ifalias":"Tesco","addr_info":[]}]
DEBUG/COMMAND cmd 'systemctl show --value -p ActiveState dhcp6c@wwan0.service'
DEBUG/COMMAND returned (out):
inactive
DEBUG/COMMAND cmd 'ip link set dev wwan0 nomaster'
DEBUG/COMMAND cmd 'ip --detail --json link show dev wwan0'
DEBUG/COMMAND returned (out):
[{"ifindex":9,"ifname":"wwan0","flags":["POINTOPOINT","MULTICAST","NOARP","UP","LOWER_UP"],"mtu":1500,"qdisc":"fq_codel","operstate":"UNKNOWN","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"none","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":65535,"num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"usb","parentdev":"5-1:1.8","ifalias":"Tesco"}]
DEBUG/COMMAND cmd 'systemctl daemon-reload'
DEBUG/COMMAND cmd 'systemctl show --value -p ActiveState dhclient@wwan0.service'
DEBUG/COMMAND returned (out):
inactive
DEBUG/COMMAND cmd 'systemctl restart dhclient@wwan0.service'
DEBUG/COMMAND cmd 'nft -a list chain raw VYOS_TCP_MSS'
DEBUG/COMMAND returned (out):
table ip raw {
chain VYOS_TCP_MSS { # handle 1
type filter hook forward priority raw; policy accept;
}
}
DEBUG/COMMAND cmd 'nft -a list chain ip raw vyos_rpfilter'
DEBUG/COMMAND returned (out):
table ip raw {
chain vyos_rpfilter { # handle 3
type filter hook prerouting priority raw; policy accept;
counter packets 865486 bytes 152160343 jump vyos_global_rpfilter # handle 6
}
}
DEBUG/COMMAND cmd 'nft -a list chain ip6 raw vyos_rpfilter'
DEBUG/COMMAND returned (out):
table ip6 raw {
chain vyos_rpfilter { # handle 3
type filter hook prerouting priority raw; policy accept;
counter packets 867 bytes 59645 jump vyos_global_rpfilter # handle 6
}
}
DEBUG/COMMAND cmd 'ip -json -detail link list dev wwan0'
DEBUG/COMMAND returned (out):
[{"ifindex":9,"ifname":"wwan0","flags":["POINTOPOINT","MULTICAST","NOARP","UP","LOWER_UP"],"mtu":1500,"qdisc":"fq_codel","operstate":"UNKNOWN","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"none","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":65535,"num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"usb","parentdev":"5-1:1.8","ifalias":"Tesco"}]
DEBUG/COMMAND cmd 'ip -j -d link show dev wwan0'
DEBUG/COMMAND returned (out):
[{"ifindex":9,"ifname":"wwan0","flags":["POINTOPOINT","MULTICAST","NOARP","UP","LOWER_UP"],"mtu":1500,"qdisc":"fq_codel","operstate":"UNKNOWN","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"none","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":65535,"num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"usb","parentdev":"5-1:1.8","ifalias":"Tesco"}]
DEBUG/COMMAND cmd 'ip link set dev wwan0 mtu 1430'
DEBUG/COMMAND cmd 'nft -a list chain ip6 raw VYOS_TCP_MSS'
DEBUG/COMMAND returned (out):
table ip6 raw {
chain VYOS_TCP_MSS { # handle 1
type filter hook forward priority raw; policy accept;
}
}
DEBUG/COMMAND cmd 'ip -json -detail link list dev wwan0'
DEBUG/COMMAND returned (out):
[{"ifindex":9,"ifname":"wwan0","flags":["POINTOPOINT","MULTICAST","NOARP","UP","LOWER_UP"],"mtu":1430,"qdisc":"fq_codel","operstate":"UNKNOWN","linkmode":"DEFAULT","group":"default","txqlen":1000,"link_type":"none","promiscuity":0,"allmulti":0,"min_mtu":0,"max_mtu":65535,"num_tx_queues":1,"num_rx_queues":1,"gso_max_size":65536,"gso_max_segs":65535,"tso_max_size":65536,"tso_max_segs":65535,"gro_max_size":65536,"gso_ipv4_max_size":65536,"gro_ipv4_max_size":65536,"parentbus":"usb","parentdev":"5-1:1.8","ifalias":"Tesco"}]
DEBUG/COMMAND cmd 'tc qdisc del dev wwan0 parent ffff: 2>/dev/null'
DEBUG/COMMAND cmd 'tc qdisc del dev wwan0 parent 1: 2>/dev/null'
DEBUG/COMMAND cmd 'ip link set dev wwan0 up'Throughout the whole of the operation the code never calls the command mmcli -m 0 --simple-connect="apn=<REDACTED>" which is necessary for the modem to perform the actual connection to the mobile network. Without this the modem never connects.
So, after falling down a rabbit hole looking through the code to see what the connect interface wwan0 CLI command is actually doing we end up in the file /usr/libexec/vyos/op_mode/connect_disconnect.py. For wwan interfaces this code actually calls out the the configuration code in /usr/libexec/vyos/conf_mode/interfaces_wwan.py. Because this code is expecting to handle configuration, rather than operation, it has some checks in place to make sure that it only takes action if there has been a change to certain critical configuration tags. Otherwise, it deliberately does nothing to make sure that it does not unnecessarily disconnect the modem during production. Whilst this is a good protection for the configuration code, it does not work with the operation code and means that the modem never reconnects. Hence the connect interface wwan0 command is broken.
Potential Fixes
I can see two ways to fix this problem. One quick patch which will just get it working for now and one way this should be done "properly" in the future
Quick Patch
For now, I think we can work around this bug by changing the check code in /usr/libexec/vyos/conf_mode/interfaces_wwan.py line 160 from
if 'shutdown_required' in wwan:
to
if 'shutdown_required' in wwan or (not is_wwan_connected(interface)):
This will change the check so that it will execute the reconnection code if there has been a change to critical configuration tags or if the modem is disconnected. This should cause it to hit the right code path and reconnect the modem when instructed.
"Proper" Solution
In the long term we should probably not rely on the configuration code to perform operational tasks. There may be other complex interactions in the future where it will have undesirable behaviour. This is an easy thing to say and a hard thing to do, however, as this may incur a lot of development effort. For now, I suspect it's better to simply do the quick fix and take the technical debt for the future in order to close this bug out.