Re: how network-manager chose connection?



On Wed, 2010-07-07 at 14:26 +0200, Pierre-Marie Coron wrote:
> Hello everybody,
> 
> I'm just coming from forum.ubuntu-fr.org (topic :
> http://forum.ubuntu-fr.org/viewtopic.php?pid=3589852#p3589852 for
> french users) and the suggest me to ask my question here.
> I explain my problem : I'm using ubuntu 10.04 and I have 3 way to
> connect to internet  : one though a network area connected to a
> satellite modem, one is using a GPRS key and the last one is using a
> 56K modem.
> The connection though satellite modem has a speed witch decrease
> according to the data volume exchange.
> I noticed that network-manager chose the kind of connection according
> to the speed and so prefer use an ethernet connection than use a
> wireless connection if both are avialable.
> Can we change this order? Or can we affect a kind of connection for a
> kind of software?

At the moment the order can't be changed, it's a function of the
"default route" that is set, either by NM or (if you don't use NM)
normal system networking scripts.  It all depends on which connection is
started, either  manually by you, or automatically by NM.

NM will autostart the last-used connection by default if it's wired or
wifi.  When multiple connections are active, the ordering is wired >
wifi > 3G.

> I want to make a proxy server who chose the connection according to
> the aviability of it or the kind of protocol witch is using.
> For exemple instant messaging don't need a big bandwidth but streaming
> yes so  instant messaging could be used though 56k modem or GPRS key
> instead of  using the ethernet connection.

This is somewhat complicated, because it's not about which connections
are active and which aren't, but it's about IP routing which
NetworkManager doesn't really get into (other than setting the default
route).

You can *simulate* this by adding specific routes to the servers you
want to use to the routing table.  So if you know your IM server's IP
address you could:

ip route add <im server ip>/32 dev <gprs interface name>

If that IP address is stable, you can add it to the NetworkManager
connection infromation for your GPRS connetion in the connection
editor's IPv4 Routes dialog and all your IM should then go over GPRS.
You can do that with NM today.

You can't use the kernels IP routing table for *classes* of traffic
right now, but you might be able to use the Linux firewall (iptables) to
do this for you since it's quite a flexible packet filter and does a lot
more than just firewalling.

So the short answer is:

- yes, you can make traffic to specific IP address or subnets use a
specific interface by adding those subnets as routes to the NM IPv4
Routes dialog

- it's a lot more complicated to send classes of traffic (ie, all web
traffic) out over a specific interface

Dan

> I already see documentation about QoS software like wondershaper but
> it is made for one connection.
> I hope my message is clear and i apologize for my poor English.
> 
> Best regards
> 
> PM
> _______________________________________________
> networkmanager-list mailing list
> networkmanager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]