Raspberry Pi with Quectel EC25 Modem: DNS Fail on wwan0 Interface

Abstract: Fix DNS resolution failures on Raspberry Pi Quectel EC25 wwan0 by manually configuring static DNS servers in NetworkManager.

Created: 2026-09-29 by

When a Quectel EC25 modem on a Raspberry Pi fails to resolve DNS queries over the wwan0 interface despite having an active data connection, the issue is typically caused by NetworkManager not receiving or applying DNS server addresses provided by the cellular carrier. The most reliable fix involves manually configuring static DNS servers in the NetworkManager connection profile for the modem.

Diagnosing the Connection State

Before modifying configuration files, it is essential to confirm that the data link itself is functional. A common misconception is that a lack of internet access means the modem is disconnected. In reality, the cellular radio may be registered with the network, but the IP layer might be misconfigured or missing critical routing information. First, verify that the wwan0 interface has obtained an IP address. Use the following command to check the interface status:
ip addr show wwan0
You should see an IPv4 address assigned to the interface. If the address is 169.254.x.x, this indicates a link-local address, meaning DHCP failed entirely. However, if you have a valid public or private IP (e.g., 10.x.x.x or 100.64.x.x), the data path is likely established. Next, test basic connectivity using a direct IP ping rather than a domain name:
ping -c 3 8.8.8.8
If this ping succeeds, your routing table and physical connection are correct. The failure is isolated to DNS resolution. You can further inspect the current DNS configuration by running:
resolvectl status wwan0
If this command returns no DNS servers or shows "DNS Servers: none," then NetworkManager has not applied any resolver settings to this connection. This is the core symptom of the problem described in our context.

Configuring Static DNS in NetworkManager

The standard behavior of NetworkManager is to request DNS servers via DHCP from the cellular provider. Many IoT-focused carriers do not push these settings reliably, or the Linux kernel’s PPPoE/NCM driver drops them. The solution is to force specific DNS servers into the connection profile. Identify the exact name of your mobile broadband connection profile. You can list all profiles using:
nmtui connect
Or via command line:
nmcli con show
Look for a connection type named "Mobile Broadband" or similar, associated with the Quectel device. Let us assume the connection name is "Quectel-EC25". To update the DNS settings, use the nmcli command to modify the connection properties. Replace "Quectel-EC25" with your actual connection name.
nmcli con mod "Quectel-EC25" ipv4.dns "8.8.8.8 1.1.1.1"
This command explicitly sets Google and Cloudflare DNS servers. It is crucial to also set the method to manual or auto depending on your preference, but usually, leaving the method as auto while providing explicit DNS servers works best. If you encounter issues, you can explicitly set the method:
nmcli con mod "Quectel-EC25" ipv4.method auto
After modifying the profile, you must restart the connection for changes to take effect. Do not just toggle Wi-Fi; you need to bring down and up the cellular interface.
nmcli con down "Quectel-EC25"
nmcli con up "Quectel-EC25"
Once the connection is re-established, verify that the DNS servers are now active:
resolvectl status wwan0
You should now see the IP addresses you configured listed under DNS Servers. Test resolution again:
ping -c 3 google.com
If this resolves successfully, the issue is fixed.

Alternative Solutions and Kernel Considerations

In some cases, particularly with newer kernels like 6.6 mentioned in the context, there may be bugs in the NCM (Network Control Model) driver used by Quectel modems. If the above steps fail, consider checking the kernel logs for errors related to the USB modem:
dmesg | grep -i quectel
or
dmesg | grep -i cdc_ether
If you see repeated disconnection/reconnection loops, the modem might be failing at the USB level rather than the DNS level. In such scenarios, adding a udev rule to increase the USB timeout or switching to a different USB port on the Raspberry Pi can help stabilize the link. Another potential cause is the use of systemd-resolved conflicting with NetworkManager. Ensure that NetworkManager is managing the resolver:
sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved
Then restart NetworkManager:
sudo systemctl restart NetworkManager
This forces NetworkManager to write directly to /etc/resolv.conf, bypassing any potential conflicts with systemd-resolved's stub listener. For more details on managing Raspberry Pi connections, you might find Cannot Connect Raspberry Pi Computer helpful for broader troubleshooting contexts.

Verifying Long-Term Stability

After applying the fix, monitor the connection over several hours. Cellular networks can sometimes drop DNS leases after long periods of inactivity. Setting static DNS ensures that even if the DHCP lease expires or the carrier fails to renew DNS info, your device continues to resolve domains correctly. If you experience intermittent failures, consider implementing a script that monitors resolvectl status and automatically re-applies the DNS settings if they disappear. This adds resilience to your IoT deployment. Remember that hardware stability, such as ensuring the Quectel EC25 has adequate power supply from the Raspberry Pi, is also critical. Power fluctuations can cause the modem to reset its internal state, leading to temporary loss of service. For users who prefer graphical management, the nmtui tool provides a text-based interface to perform the same steps outlined above without memorizing command-line syntax. Navigate to "Edit a connection," select your cellular profile, and scroll down to the "IPv4 CONFIGURATION" section to enter the DNS servers manually.

Frequently Asked Questions

Why does ping work but nslookup fails?

This confirms that your IP routing and data connection are healthy, but the system lacks valid DNS server addresses. The operating system cannot translate domain names to IPs because no resolver is configured or reachable on the wwan0 interface.

Can I use the carrier's default DNS instead of Google or Cloudflare?

Yes, but you must first identify what those addresses are. Since the automatic retrieval is failing, you would need to consult your SIM provider's documentation for their primary and secondary DNS IPs and enter them manually using the nmcli commands shown above.

Does this issue affect other interfaces like Wi-Fi?

No, this is specific to the cellular modem configuration. Wi-Fi interfaces typically receive DNS settings correctly from home routers. The problem arises specifically because cellular carriers often do not push DNS information via the NCM protocol, unlike traditional ISPs.

What if nmcli says the connection doesn't exist?

Ensure you are using the exact connection name as displayed by nmcli con show. Names are case-sensitive and may include spaces. You can also use the UUID of the connection if the name is ambiguous by replacing the name with the UUID flag in the command.

Is restarting the Raspberry Pi necessary after changing DNS?

No, restarting the entire device is not required. Toggling the specific connection profile with nmcli con down and up is sufficient and faster. Rebooting only helps if there are deeper system-level caching issues that require a full service restart.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More