From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q9wU5-0007uL-1z for garchives@archives.gentoo.org; Wed, 13 Apr 2011 09:35:37 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C92521C085; Wed, 13 Apr 2011 09:34:02 +0000 (UTC) Received: from mail-iw0-f181.google.com (mail-iw0-f181.google.com [209.85.214.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 9B24B1C085 for ; Wed, 13 Apr 2011 09:34:02 +0000 (UTC) Received: by iwn2 with SMTP id 2so604160iwn.40 for ; Wed, 13 Apr 2011 02:34:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=0r6jXyf8bW6YAlt4iAeC8zzW44+XbEHacKq0ZN4yIwI=; b=qVuEvDqdToM7GhfUVLscv1FIQ1/Zzu7r08CNxLBBW5ESwqqk2LQbw8YhQYyvavjj9a SJhTB6ty9A35a4HzbZFTrTXH8szkkIoI7/jNszpCtUmUpluXtsRxSVX9++dLGGWYxRd3 T97NiucEgrGpNTWoHo6fCMFqJDODkGDzrRVyA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=dag1IqvZ5WyYEsFwiVIE7bUl0kwBHwhhz7R2Y6clo8yK3IJsiD5jQh9/N6Inm6B2h7 LjHlef2pH53MLe3IwE2jiGmI6DODjRZq4XWldwsGlfbakLyINXhuhvugm5sO/WebGu2z /UjFejlSwuukvui70fswb7D6p0lyeVuR+OiBY= Received: by 10.43.46.69 with SMTP id un5mr12083498icb.394.1302687242055; Wed, 13 Apr 2011 02:34:02 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.42.221.201 with HTTP; Wed, 13 Apr 2011 02:33:42 -0700 (PDT) In-Reply-To: References: From: Kfir Lavi Date: Wed, 13 Apr 2011 12:33:42 +0300 Message-ID: Subject: Re: [gentoo-user] configure wlan0 route metric To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=bcaec5299bf550ee5a04a0c98231 X-Archives-Salt: X-Archives-Hash: afdb508db30cc41e69e193fa46de7e28 --bcaec5299bf550ee5a04a0c98231 Content-Type: text/plain; charset=UTF-8 On Wed, Apr 13, 2011 at 12:14 AM, deadeyes 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 Ref Use > Iface > 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 > eth0 > 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 > wlan0 > 0.0.0.0 192.168.1.1 0.0.0.0 UG 2 0 0 > eth0 > 0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 > 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 --bcaec5299bf550ee5a04a0c98231 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Wed, Apr 13, 2011 at= 12:14 AM, deadeyes <gvm999@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_wlan= 0.
Code:

Destination =C2=A0 =C2=A0 Gateway =C2=A0 =C2=A0 =C2=A0 =C2=A0 Genmask =C2= =A0 =C2=A0 =C2=A0 =C2=A0 Flags Metric Ref =C2=A0 =C2=A0Use Iface
192.168.1.0 =C2=A0 =C2=A0 0.0.0.0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 255.255.255.0= =C2=A0 U =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 =C2=A00 =C2=A0 =C2=A0 =C2=A0 =C2=A0= 0 eth0
192.168.1.0 =C2=A0 =C2=A0 0.0.0.0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 255.255.255.0= =C2=A0 U =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 =C2=A00 =C2=A0 =C2=A0 =C2=A0 =C2=A0= 0 wlan0
0.0.0.0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 192.168.1.1 =C2=A0 =C2=A0 0.0.0.0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 UG =C2=A0 =C2=A02 =C2=A0 =C2=A0 =C2=A00 =C2=A0 =C2= =A0 =C2=A0 =C2=A00 eth0
0.0.0.0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 192.168.1.1 =C2=A0 =C2=A0 0.0.0.0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 UG =C2=A0 =C2=A0100 =C2=A0 =C2=A00 =C2=A0 =C2=A0 = =C2=A0 =C2=A00 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 thi= s solution not satisfying, but don't remember why.
I guess some cor= ner cases.

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

# wlan
modules=3D( "wpa_supplicant&q= uot; )
wpa_supplicant_wlan0=3D"-Dwext"
config_wlan0=3D( &qu= ot;null" )
modules_wlan0=3D( "!plug" )
ifplugd_wlan0=3D"--api-mode= =3Dwlan"

# bond
slaves_bond0=3D"eth0 wlan0"
dhc= pcd_bond0=3D"--noipv4ll --nolink -t 15"
config_bond0=3D( "= ;dhcp" )


Regards,
Kfir
--bcaec5299bf550ee5a04a0c98231--