Ask Your Question

Ethernet card priority over Wifi

asked 2015-05-27 12:19:10 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Hello All,

My problem is a classic one: Wifi card works fine but once I plug the wire into Ethernet card the internet goes away. Even if I turn off the wifi card. My wifi is "wlp12s0" and my wired network is "p5p1". See below.

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    1024   0        0 p5p1   U     0      0        0 wlp12s0   U     0      0        0 p5p1

I already tried to set up metric but no success.

sudo route add -net default gw netmask dev wlp12s0 metric 1

My goal would be to use wired connection at home and wifi in public places.

Anyone any idea?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2015-05-28 04:00:14 -0500

hedayat gravatar image

Your "desired behavior" is the default Fedora behavior. So, if there are any problems, you should diagnose your network. There seems to be a problem with your network settings (e.g. router settings) rather than Fedora ones, unless you've changed Fedora default settings. Fedora (NetworkManager) always prefers wired connections to wireless ones, unless you tell it that the wired connection is a LAN connection and shouldn't used to route external traffic.

You can check the network icon to see if it changes when you plug the cable. However, you say that you even can't access Internet if your WiFi is off; therefore there is certainly something wrong with your wired connection. If you have changed any settings in NetworkManager, revert them (or just create a new wired connection profile and use it).

edit flag offensive delete link more


would you specify how you "tell [NetworkManager] that the wired connection is a LAN connection and shouldn't used to route external traffic"?

ingli gravatar imageingli ( 2017-03-25 12:43:25 -0500 )edit

Go to the IPV4 settings tab, there is a checkbox at the end which tells NM that this connection should be used for local resources only.

hedayat gravatar imagehedayat ( 2017-08-17 09:37:52 -0500 )edit

Question Tools

1 follower


Asked: 2015-05-27 12:19:10 -0500

Seen: 931 times

Last updated: May 28 '15