Hero Image

Setting default route on Fedora VM with nmcli

Assumption
  • Virtual machine is already established and virtual network interfaces are plumbed
  • Multiple interfaces (most likely DHCP configured are establishing multiple default routes
Using nmcli to remove superfluous routes

Show the connection statuses

nmcli c show

From the status report, identify the offending connection(s), then force default routes off

nmcli c mod '_connection name_' ipv4.never-default true

Restart the interface(s)

nmcli c down '_connection name_'; nmcli c up '_connection name_'

Verify your work

ip r