You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.7 KiB
51 lines
1.7 KiB
2 years ago
|
+++
|
||
|
title = "Changing network metrics on linux"
|
||
|
summary = """Because I use two network interfaces with more subnets/routes on one of them.
|
||
|
But I use the other interface for internet because of speed..."""
|
||
|
date = "2022-11-24T20:15:44+02:00"
|
||
2 years ago
|
lastmod = "2022-12-08T15:35:37+01:00"
|
||
2 years ago
|
categories = ["computerstuff"]
|
||
|
tags = ["linux","networking"]
|
||
|
|
||
|
+++
|
||
|
|
||
|
Check for connection names.
|
||
|
|
||
|
~~~console
|
||
|
$ nmcli connection
|
||
|
NAME UUID TYPE DEVICE >
|
||
2 years ago
|
MagentaNET 923ab10b-be81-4668-9aab-************ wifi wlx00259ce03>
|
||
|
DreiNET b2bcc61c-19df-41f0-9790-************ wifi wlo1 >
|
||
2 years ago
|
Kabelgebundene Verbindung 1 c75abc26-19eb-3fec-81b1-************ ethernet --
|
||
|
~~~
|
||
|
|
||
|
Start editing the affected connection:
|
||
|
|
||
|
{{< highlight console "hl_lines=12-14" >}}
|
||
2 years ago
|
$ nmcli connection edit MagentaNET
|
||
2 years ago
|
|
||
|
===| nmcli interaktive Verbindungsbearbeitung |===
|
||
|
|
||
2 years ago
|
Bestehende Verbindung »802-11-wireless« wird bearbeitet: »MagentaNET«
|
||
2 years ago
|
|
||
|
Tippen Sie »help« oder »?«, um verfügbare Befehle anzuzeigen.
|
||
|
Geben Sie »print« ein, um alle Verbindungseigenschaften anzuzeigen.
|
||
|
Tippen Sie »describe [<Einstellung>.<Eigenschaft>]« für eine detaillierte Eigenschaftenbeschreibung.
|
||
|
|
||
|
Sie können die folgenden Einstellungen bearbeiten: connection, 802-11-wireless (wifi), 802-11-wireless-security (wifi-sec), 802-1x, ethtool, match, ipv4, ipv6, hostname, tc, proxy
|
||
|
nmcli> set ipv4.route-metric 599
|
||
|
nmcli> save
|
||
|
nmcli> quit
|
||
|
{{< /highlight >}}
|
||
|
|
||
|
~~~console
|
||
|
$ sudo systemctl restart NetworkManager
|
||
|
~~~
|
||
|
|
||
|
Check routing table with
|
||
|
|
||
|
~~~console
|
||
|
$ ip route
|
||
|
~~~
|
||
|
|
||
|
Source: <https://dev.to/emamirazavi/how-to-set-metric-in-networkmanager-system-4525>
|