IMX6ULL Network priority

Hi,

How can i change the network priority so that when i create a PPP connection (ppp0) with my GSM modem it is used instead of the network connection (eth0)

I want to be able to debug my code via the ethernet connection but get it to use the GSM connection once the ppp connection has been established.

I have looked in /etc/network as i have seen mention of an interfaces file but this is not there

Hi @adrian

Do you do the configuration manually or with connman or NetworkManager? You can change the priority by changing the route metric:
NetworkManager: nm-settings man page - NetworkManager - File Formats
iproute2: ip-route(8) - Linux manual page

Regards,
Stefan

Hi,

Currently neither.

I have eth0 installed via the kernel.
I start my GSM modem and create a PPP connection which then gives me the ppp0 connection

Then you can change the metric with iproute2:
https://man7.org/linux/man-pages/man8/ip-route.8.html

That’s probably the easiest.

So the simplest solution was to add

route add default dev ppp0

into the file

/etc/ppp/ip-up

Good to know that is now solved.

Thanks for the feedback.