Budgie
Posts: 36
Joined: Mon Jan 19, 2015 3:30 pm

Setting prioity when both lan and wlan are connected

Fri Feb 24, 2017 11:35 pm

How can I set priority to the lan (copper) connection when wireless is also running. I hate to say it but there is a neat way of doing this in windoze 10 and I need to do it on my rpi3.
Budgie

epoch1970
Posts: 5131
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Setting prioity when both lan and wlan are connected

Sat Feb 25, 2017 12:04 am

If you're using Raspbian Jessie Lite, this is done by default by dhcpcd.
For the non-lite version I don't know but I guess it is the same.
Without/before dhcpcd, that is the "old" way with /etc/network/interfaces, IIRC you need to install package ifmetric and then you can explicitly set the priority of each interface.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Budgie
Posts: 36
Joined: Mon Jan 19, 2015 3:30 pm

Re: Setting prioity when both lan and wlan are connected

Sat Feb 25, 2017 5:34 pm

Hi and many thanks for the reply. Very new to RPi. I am using Raspbian Jesse but have no recollection of seeing Lite mentioned. AFAIK I am running the standard RPi system, I assume that is Lite.

I asked the question because the network indicator in the top panel shows a lan icon until I enable wifi by entering the password. I then get the WiFi icon. This suggests to me that system has switched to wifi.

How can I check from console?

Ernst
Posts: 1334
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Setting prioity when both lan and wlan are connected

Sat Feb 25, 2017 7:11 pm

Budgie wrote:How can I set priority to the lan (copper) connection when wireless is also running. I hate to say it but there is a neat way of doing this in windoze 10 and I need to do it on my rpi3.
Budgie
The preferred method is to disable the interfaces that are not being used. It is not recommended to have WiFi and Ethernet active at the same time as this can cause a lower transfer speed. You can not compare an RPi with a Windows 10 computer because W10 is a client and the RPi can be a client and server depending on your needs.
The road to insanity is paved with static ip addresses

epoch1970
Posts: 5131
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Setting prioity when both lan and wlan are connected

Sun Feb 26, 2017 12:56 am

Budgie wrote:How can I check from console?
I don't have a machine with the adequate configuration at hand, but look at this post (and perhaps the whole thread), it shows ethernet getting a "metric" of 202 and wifi a metric of 303.
The lower the figure, the higher priority (default is 0, that's max priority.)
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Budgie
Posts: 36
Joined: Mon Jan 19, 2015 3:30 pm

Re: Setting prioity when both lan and wlan are connected

Sun Feb 26, 2017 8:38 pm

Hi and many thanks for that. In fact I have the same metrics as the thread to which you referred but do not understand why the indicator icon shows wifi if it has lower priority than eth0.
Meanwhile simplest solution is to enter wrong pw. (Ugh!)

Return to “Troubleshooting”