title: How does linux choose which gateway to use if there are multiple defaults?
body: <p>I use <code>NetworkManager</code> to connect to VPN servers. My VPN has multiple servers, so I configured a dozen or so profiles. <code>NetworkManager</code> allows you to connect to multiple VPNs at once; if I do this, the routing table can end up with multiple default routes. </p>
  
  <ol>
  <li>What does Linux do in this situation? </li>
  <li>Is there any way to configure it so that it'll pick faster gateways?</li>
  </ol>
  
  <p>Example (partial table):</p>
  
  <pre><code>Kernel IP routing table
  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  0.0.0.0         10.8.8.1        0.0.0.0         UG    50     0        0 tun0
  0.0.0.0         10.7.7.1        0.0.0.0         UG    51     0        0 tun1
  0.0.0.0         10.8.8.1        0.0.0.0         UG    52     0        0 tun2
  0.0.0.0         10.7.7.1        0.0.0.0         UG    53     0        0 tun3
  0.0.0.0         10.8.8.1        0.0.0.0         UG    54     0        0 tun4
  0.0.0.0         192.168.50.1    0.0.0.0         UG    100    0        0 enp0s31f6
  </code></pre>