Which network interface is actually used, eth0, wlan0 or wwan0?

I just finished setting up a QMI interface for Telit C9101-EU using libqmi (Setting up a data connection over QMI interface using libqmi) and connecting to the carrier network (T-Mobile SIM card) using APN info provided by the carrier. I’m accessing the Raspberry Pi 4 through pitunnel ssh (I don’t have physical access to the device). When I ran the command sudo udhcpc -q -f -i wwan0, I got disconnected after udhcpc: sending select for message. What happened exactly and why can’t I reconnect to the RPi now? Also, which interface is actually used, eth0, wlan0 or wwan0, if all are connected?


It can be controlled with the routing table(route -n). The metric is the deciding factor, and the lower value would be prioritized.