Re: [gentoo-user] configure wlan0 route metric

2011-04-13 Thread Kfir Lavi
On Wed, Apr 13, 2011 at 12:14 AM, deadeyes gvm...@gmail.com wrote:

 Hi all,

 For my home network I am generally using wireless to get connected to the
 network and the internet.

 However for copying some large files I use the wire.

 That means I get 2 IPs in the same range.
 And both interfaces get the same metric : 0.

 I found out I can modify the metric for the default route using
 metric_wlan0.
 Code:

 Destination Gateway Genmask Flags Metric RefUse
 Iface
 192.168.1.0 0.0.0.0 255.255.255.0   U 0  00
 eth0
 192.168.1.0 0.0.0.0 255.255.255.0   U 0  00
 wlan0
 0.0.0.0 192.168.1.1 0.0.0.0 UG2  00
 eth0
 0.0.0.0 192.168.1.1 0.0.0.0 UG10000
 wlan0

 (this is not the full routing table)
 However this changes the metric of the default route.
 Not of the route that is specifically for the local network.
 of course I can do this manually.
 However that is alot of hassle and seems to be something that should be
 configurable use files.

 Does anyone knows how I can accomplish this? Or how I can change the metric
 for
 each route for the wlan0 interface?

 Thanks in advance!


 Hi,
you can use net-analyzer/ifmetric.
I found this solution not satisfying, but don't remember why.
I guess some corner cases.

I have bonded the interfaces on my laptop. The bonding driver will prefer
using the wired when
it is connected.
Here is my /etc/conf.d/net:
# eth0
config_eth0=( null )

# wlan
modules=( wpa_supplicant )
wpa_supplicant_wlan0=-Dwext
config_wlan0=( null )
modules_wlan0=( !plug )
ifplugd_wlan0=--api-mode=wlan

# bond
slaves_bond0=eth0 wlan0
dhcpcd_bond0=--noipv4ll --nolink -t 15
config_bond0=( dhcp )


Regards,
Kfir


[gentoo-user] configure wlan0 route metric

2011-04-12 Thread deadeyes
Hi all,

For my home network I am generally using wireless to get connected to the
network and the internet.

However for copying some large files I use the wire.

That means I get 2 IPs in the same range.
And both interfaces get the same metric : 0.

I found out I can modify the metric for the default route using metric_wlan0.
Code:

Destination Gateway Genmask Flags Metric RefUse Iface
192.168.1.0 0.0.0.0 255.255.255.0   U 0  00 eth0
192.168.1.0 0.0.0.0 255.255.255.0   U 0  00 wlan0
0.0.0.0 192.168.1.1 0.0.0.0 UG2  00 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG10000 wlan0

(this is not the full routing table)
However this changes the metric of the default route.
Not of the route that is specifically for the local network.
of course I can do this manually.
However that is alot of hassle and seems to be something that should be
configurable use files.

Does anyone knows how I can accomplish this? Or how I can change the metric for
each route for the wlan0 interface?

Thanks in advance!