I have mainly found questions on how to set up one network interface to have a certain IP address and the other on a different network, but I am interesting in what happens if I have two network cards (eth/wan or two wireless) set up to connect to the same router and both to the Internet.

Which of the two does my computer use to connect to websites? Do I experience drop in connection if either of the two disconnects?


If you have multiple WAN connections and both are set up correctly, the system will set up default routes for you. Those are a "catch-all" rule for everything that is sent.

If an interface does not have a WAN connection (or if the network should not be the default for other reasons), that default route won't be created (or rather, the router won't advertise that route) and only a "targeted route" is present.

In my case, the route list looks like this:

$ ip route
default via dev enp9s0 proto dhcp metric 100 
default via dev wlp6s0 proto dhcp metric 600 dev enp9s0 proto kernel scope link src metric 100 dev virbr0 proto kernel scope link src linkdown dev wlp6s0 proto kernel scope link src metric 600

One of those connections ( is a LAN connection, the other is wireless ( If both are present, the number at the end decides which connection should be preferred, the lower number having higher importance.

As far as I know, a drop of one connection won't be unnoticable (since it usually takes a few seconds to recognize that a connection was actually dropped), but it should fail over to the other without issues (unless you are within a transfer, which not all clients/servers can handle).

  • And if both default routes have the same metric, then the first one added will take priority.
    – Criggie
    Feb 18 '20 at 0:18
  • I wouldnt rely on the automatic default route creation - do it yourself - and make sure it involves only 1 interface .. the behavior with 2 or more interfaces is "questionable" at best (i.e. It occurs to be similar to no route at all .. )
    – eagle275
    Feb 18 '20 at 9:57
  • @Criggie: No, because you cannot add multiple routes with the same destination and same metric. (Unless they're merged into a single ECMP route.)
    – user1686
    Feb 18 '20 at 10:33
route -n

will show the active connection.

By default the one with the lowest priority number takes precedence. You can set up your network to have both wired active at the same time. Same can be done with wireless (but will require a unique router connection for each).

For wireless you can set a priority for all wireless but not in relation with wired. It is called connection.autoconnect-priority. In case you have a desktop: networkmanager has it also in its options under "general".

nmcli connection modify {networkwifiname} connection.autoconnect-priority 10

where 10 is the priority (lower is more). nmcli -f NAME,UUID,AUTOCONNECT,AUTOCONNECT-PRIORITY c will list the current priority.

Wired will always override wireless but you can use ifmetric (apt install ifmetric) if you want to set wireless before a wired network.

ifmetric {networkname} 10

will set it to 10.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.