I have a Zero W with a 4G module, to use the sim to access internet I did:

pi@raspberrypi:~ $ ip route
default via dev wlan0 proto dhcp src metric 302 dev ppp0 proto kernel scope link src dev wlan0 proto dhcp scope link src metric 302 dev wwan0 scope link src metric 203 


sudo ip route del default via dev wlan0
sudo ip route add default via dev ppp0

and it works, but after reboot I get the original situation...

I tried to set auto ppp0 in /etc/network/interfaces

I tried to set metric in /etc/dhcpcd.conf

but none worked.how can I do that?

also I have a PPTP VPN, how can start it automatically on system boot?

I'm on Raspbian Buster

  • What operating system do you use? Do you respect the special issues using /etc/network/interfaces together with dhcpcd?
    – Ingo
    Commented Jul 15, 2019 at 15:01
  • I'm using Raspbian Buster, what do you mean with special issues?
    – Miky
    Commented Jul 15, 2019 at 19:26
  • Special issues are the note in /etc/nettwork/interfaces # Please note that this file is written to be used with dhcpcd and raspberrypi.stackexchange.com/a/41187/79866.
    – Ingo
    Commented Jul 15, 2019 at 22:56
  • I still didn't set up anything in /etc/network/interfaces and /etc/dhcpcd.conf, I disabled wifi which I won't need, but after boot I still have wlan0 as default route, also I don't know how to start sudo pon myvpn on boot
    – Miky
    Commented Jul 16, 2019 at 8:48
  • You did not set up anything in /etc/network/interfaces? But you wrote "I tried to set auto ppp0 in /etc/network/interfaces" and "I tried to set metric in /etc/dhcpcd.conf".
    – Ingo
    Commented Jul 16, 2019 at 9:30

1 Answer 1


I don't know what's your setup and what you have tried. But with a default networking setup a ppp connection will give the interface ppp0 on the RasPi an ip address and a default route to the gateway of the ppp device by DHCP. So you should check why your ppp device isn't giving a default route.

In /etc/dhcpcd.conf you can also define static default routes with option static routers=. So ensure that all these options are commented to not overwrite the default route from the ppp device.

Look that /etc/network/interfaces does not contain any stanzas to configure ifupdown. This may have side effects to dhcpcd.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.