1

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

pi@raspberrypi:~ $ ip route
default via 10.111.100.1 dev wlan0 proto dhcp src 10.111.100.143 metric 302 
10.64.64.64 dev ppp0 proto kernel scope link src 10.82.126.194 
10.111.100.0/24 dev wlan0 proto dhcp scope link src 10.111.100.143 metric 302 
169.254.0.0/16 dev wwan0 scope link src 169.254.170.232 metric 203 

then:

sudo ip route del default via 10.111.100.1 dev wlan0
sudo ip route add default via 10.64.64.64 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

7
  • What operating system do you use? Do you respect the special issues using /etc/network/interfaces together with dhcpcd?
    – Ingo
    Jul 15, 2019 at 15:01
  • I'm using Raspbian Buster, what do you mean with special issues?
    – Miky
    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
    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
    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
    Jul 16, 2019 at 9:30

1 Answer 1

0

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 that you have read and understand our privacy policy and code of conduct.

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