I have a rocky 9 with two network cards installed. The network card with the lowest metric has no internet connection and I can’t change the metric.
How do I update the pc. Do I have to add routes? How? Thanks
You don’t get equivalent of this (below) with ip ro
?
default via 192.168.1.1 dev eno2 proto dhcp src 192.168.1.3
10.20.20.0/24 via 10.20.20.6 dev eno1 proto dhcp metric 100
192.168.1.0/24 via 192.168.1.3 dev eno2 proto dhcp metric 103
Note how there is no “default via 10.20.20.x” – no gateway for the 10.20.20.0/24.
with the ip route command I had the following output
default via 10.20.20.254 dev ens1 proto dhcp src 10.20.20.6 metric 100
default via 192.168.1.1 dev ens2 proto dhcp src 192.168.1.3 metric 101
10.20.20.0/24 via 10.20.20.6 dev ens1 proto dhcp metric 100
192.168.1.0/24 via 192.168.1.3 dev ens2 proto dhcp metric 101
I deleted the first line (default via 10.20.20.254 dev ens1 proto dhcp src 10.20.20.6 metric 100) and now, i’ve this error:
Errors during downloading metadata for repository ‘baseos’:
- Curl error (28): Timeout was reached for https://mirrors.rockylinux.org/mirrorlist?arch=x86_64&repo=BaseOS-9 [Resolving timed out after 30001 milliseconds]
I’m wrong or I’m leaving something out?
thanks
If the “192.168.1.1” is the machine that acts as router between subnet 192.168.1.0/24 and the rest of internet, then “default via 192.168.1.1” should be the correct default route.
If you did lose access to internet by saying that 10.20.20.254 is not a router for you, then it was a router and the 192.168.1.1 is not.
NetworkManager connection has property ipv4.never-default
If set to ‘yes’, connection will not set gateway (i.e. add default route) that DHCP offers.