A month of Mobian
#11
(04-10-2021, 11:56 PM)RTP Wrote:
(04-08-2021, 02:56 PM)Ri3qXkW4hjb Wrote: My desktop (debian) got disconnected from its network each time I plugged in the pine phone. USB networking 

On your #10 try the ifmetric command. It allows you to change routing device priority. Allowing you to use internet while having your device hooked up (so 'ethernet' does not take over priority).

This got me going in the right direction: route metrics. USB gets a higher default priority (metric 100) than wifi (metric 600). Lower numeric metrics are higher priority, so traffic goes to the route with the lowest numeric metric.

Show metrics
To know what effect anything's having, I need to read the current metrics. The route tool and nmcli are both useful. The first example shows all routes and their metrics. The second one shows the metrics for the wireless network called PineNet.

Code:
/sbin/route -n

Code:
nmcli connection show PineNet | grep route-metric


Change current metric
To change the current metric for an interface, ifmetric and nmcli work. I prefer nmcli since I'm using it elsewhere, and it's included in the base packages for Mobian (by being part of NetworkManager). If desired, ifmetric is easy enough to get with apt install ifmetric. The examples below each set the wlan0 interface's routes' metrics to 8. This does not persist over restarting the network or interface, or over system restarts.

Code:
ifmetric wlan0 8

Code:
nmcli device modify wlan0 ipv4.route-metric 8


Change connection metric
To make the route metrics persist for a specific "connection", nmcli works. Connections are stored configuration for network interfaces, and can be used variously. Wifi is a typical way to use connections - each wifi network is a different connection for the SSID and key. The routing metric can also be added. However, this would need to be done for each wifi network. The first example below changes the metric for the PineNet wireless network to 8. The second one is my solution, to change the USB interface's routes' metrics to 1024.

Code:
nmcli connection modify PineNet ipv4.route-metric 8


Code:
nmcli connection modify 'Wired connection 1' ipv4.route-metric 1024


Automatic metrics
With my goal and setup, I'm lucky. I can just set the USB network's metric to be significantly larger than 600. I also considered changing all of the wifi connections' metrics, too. Glad I don't have to. I didn't test it, but this answer looked promising, for a way to affect all connections on an interface. I might use that later to make changes to wifi, e.g. to more thoroughly disable LLMNR across all connections including future wifi networks.
  Reply


Messages In This Thread
A month of Mobian - by Ri3qXkW4hjb - 04-08-2021, 02:56 PM
RE: A month of Mobian - by Ri3qXkW4hjb - 04-08-2021, 06:38 PM
RE: A month of Mobian - by MtnSk8 - 04-09-2021, 11:56 PM
RE: A month of Mobian - by kqlnut - 04-11-2021, 04:15 AM
RE: A month of Mobian - by wibble - 04-12-2021, 10:47 AM
RE: A month of Mobian - by kqlnut - 04-13-2021, 02:56 AM
RE: A month of Mobian - by devrtz - 05-01-2021, 08:18 PM
RE: A month of Mobian - by Zebulon Walton - 04-10-2021, 06:14 AM
RE: A month of Mobian - by Ri3qXkW4hjb - 04-10-2021, 12:42 PM
RE: A month of Mobian - by RTP - 04-10-2021, 11:56 PM
RE: A month of Mobian - by Ri3qXkW4hjb - 04-13-2021, 11:54 AM
RE: A month of Mobian - by Ri3qXkW4hjb - 04-29-2021, 01:11 AM
RE: A month of Mobian - by steves - 05-09-2021, 12:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Mobian repository status henrythemouse 16 8,584 04-10-2024, 10:02 AM
Last Post: diederik
  bookworm vs trixie discussion for mobian in pinephone regular. zetabeta 15 1,858 03-25-2024, 09:07 AM
Last Post: anonymous
  cant verify mobian image at website gnugpg penguins_rule 0 116 03-18-2024, 08:54 PM
Last Post: penguins_rule
  mobian installed to eMMC - how to install tow-boot grump_fiddle_reinstall 6 1,903 11-22-2023, 11:46 AM
Last Post: aLoop100o
  What actions needed to keep on mobian testing user641 3 1,772 09-05-2023, 06:44 AM
Last Post: Zebulon Walton
  Mobian boot failed with zstd message after upgrade. Mahgue 0 619 09-01-2023, 11:29 AM
Last Post: Mahgue
  how to update mobian over tor vusra 13 6,811 07-09-2023, 08:57 PM
Last Post: vusra
  opensnitch outbound firewall now works on mobian vusra 2 1,875 07-09-2023, 01:37 AM
Last Post: vusra
  Using Nativefier on PP64 with Mobian paulcarton 0 615 07-05-2023, 03:57 AM
Last Post: paulcarton
  Has anyone got briar-desktop running on mobian? vusra 5 2,969 06-19-2023, 03:02 PM
Last Post: vusra

Forum Jump:


Users browsing this thread: 1 Guest(s)