oe7drt-website/content/posts/2022/32-changing-network-metrics-on-linux-with-networkmanagers-cli/index.md

56 lines
1.8 KiB
Markdown
Raw Normal View History

2022-12-06 21:57:11 +01:00
+++
2024-04-06 07:38:38 +02:00
title = "Changing network metrics on linux with NetworkManagers CLI"
aliases = [
'/posts/2022-11-24-changing-network-metrics-on-linux',
'/posts/2022/32-changing-network-metrics-on-linux/'
]
2022-12-06 21:57:11 +01:00
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"
2024-04-06 07:38:45 +02:00
lastmod = '2024-04-06T05:40:08+0000'
2022-12-06 21:57:11 +01:00
categories = ["computerstuff"]
2024-04-06 07:38:45 +02:00
tags = ["linux","networking", "networkmanager"]
2022-12-06 21:57:11 +01:00
+++
Check for connection names.
~~~console
$ nmcli connection
NAME UUID TYPE DEVICE >
2022-12-08 15:58:23 +01:00
MagentaNET 923ab10b-be81-4668-9aab-************ wifi wlx00259ce03>
DreiNET b2bcc61c-19df-41f0-9790-************ wifi wlo1 >
2022-12-06 21:57:11 +01:00
Kabelgebundene Verbindung 1 c75abc26-19eb-3fec-81b1-************ ethernet --
~~~
Start editing the affected connection:
{{< highlight console "hl_lines=12-14" >}}
2022-12-08 15:58:23 +01:00
$ nmcli connection edit MagentaNET
2022-12-06 21:57:11 +01:00
===| nmcli interaktive Verbindungsbearbeitung |===
2022-12-08 15:58:23 +01:00
Bestehende Verbindung »802-11-wireless« wird bearbeitet: »MagentaNET«
2022-12-06 21:57:11 +01:00
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>