You are not logged in.

#1 2012-09-26 12:25:41

olaf.the.lost.viking
Member
Registered: 2011-07-19
Posts: 21

prioritize cable over wifi

tl;dr How can I prioritize a new cable based ethernet connected over an already running wifi connection without deactivating the latter? I am using systemd and networkmanager.


Hi,

normally I am using the wifi in my notebook to access the different networks I am working in. But sometimes I need to use a cable for different reasons and would like to have this connection be of a higher priority than the old wifi.

Scenario one is quite simple. I am online in the network with the wifi and want to transfer a huge amount of data. For that I can connect the notebook with a cable to the same network (of course getting another IP adress via DHCP). In gentoo I had the situation that a cable based network access had a higher priority than the wireless while still keeping both online. So all new connections (like the scp for the big amount of data) would take the fast route over the cable but all already existing connections kept being online via the still running wifi. When disconnecting the cable again, all previously running services kept on working as the wifi is still online. With this setup my jabber, email client, web radio stream, ssh consoles etc. stay online all the time. How can I achieve a similar setup with systemd and networkmanager on archlinux?

The second scenario is just a little bit different. I am online via wifi in a quite open network which I use for all the normal work (including the afore mentioned running services). But to get a high bandwidth access or reaching specific computers I need to use a cable which connects me to another network. Now I'd like to use this new wired connection for the "special computers" and new connections like scp or downloads. Here, it is even more important to keep old connections running as the wired network is blocking a lot of ports and prevents a reconnection of several services.

Just as a bonus, to make things more interesting ;-): I am also using the internal umts modem quite a lot and it would be great to include it into the mix of connection possibilities. Like in the first case, existing connections should be kept running over 3G, new ones over wifi, as soon a known wifi network gets available. And when I then plug in the cable, new connections should use that. But ok, that's just a gimmick ;-)

Thank you


I switched to OlafLostViking to match the IRC alias.

Offline

#2 2012-09-26 12:59:15

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 348

Re: prioritize cable over wifi

there is an "always swich to wired connection when available" option in wicd.

so networkmanager should have something like that too.

ezik

Offline

#3 2012-09-26 13:10:52

brebs
Member
Registered: 2007-04-03
Posts: 3,465

Re: prioritize cable over wifi

This is what the "metric" value is for, in e.g.:

route add default gw router metric 202

Offline

#4 2012-09-26 16:21:59

olaf.the.lost.viking
Member
Registered: 2011-07-19
Posts: 21

Re: prioritize cable over wifi

Exactly - the metric is the setting I used with gentoo. And of course I can do that manually. But where to setup this for networkmanager (BTW: as a gui I am using the networkmanager-applet in KDE) in an automated way?


I switched to OlafLostViking to match the IRC alias.

Offline

Board footer

Powered by FluxBB