Note the current metric value:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.xxx.4.1 0.0.0.0 UG 100 0 0 eth0
0.0.0.0 192.xxx.124.1 0.0.0.0 UG 101 0 0 eth1
10.xxx.4.0 0.0.0.0 255.255.254.0 U 100 0 0 eth0
192.xxx.124.0 0.0.0.0 255.255.255.0 U 101 0 0 eth1
Find connection name by running nmcli connection show
# nmcli connection show
NAME UUID TYPE DEVICE
eth0 59821ba0-29ea-xxxx-xxxx-xxxxxxxxxxxx ethernet eth0
eth1 8f6fd7b1-ab72-xxxx-xxxx-xxxxxxxxxxxx ethernet eth1
Run nmcli connection modify ipv4.route-metric
to change the metric value
# nmcli connection modify eth1 ipv4.route-metric 110
Run nmcli connection up
to activate the changes
# nmcli connection up eth1
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/7)
Confirm the changes
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.xxx.4.1 0.0.0.0 UG 100 0 0 eth0
0.0.0.0 192.xxx.124.1 0.0.0.0 UG 110 0 0 eth1
10.xxx.4.0 0.0.0.0 255.255.254.0 U 100 0 0 eth0
192.xxx.124.0 0.0.0.0 255.255.255.0 U 110 0 0 eth1