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 <gentoo-user+bounces-121609-garchives=archives.gentoo.org@lists.gentoo.org>) 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 <gentoo-user@lists.gentoo.org>; Wed, 13 Apr 2011 09:34:02 +0000 (UTC) Received: by iwn2 with SMTP id 2so604160iwn.40 for <gentoo-user@lists.gentoo.org>; 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: <mailto:gentoo-user@lists.gentoo.org> List-Help: <mailto:gentoo-user+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-user.gentoo.org> 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: <loom.20110412T231016-866@post.gmane.org> References: <loom.20110412T231016-866@post.gmane.org> From: Kfir Lavi <lavi.kfir@gmail.com> Date: Wed, 13 Apr 2011 12:33:42 +0300 Message-ID: <BANLkTind3i72Hy42Uc47nh3BuY1n4QKjFA@mail.gmail.com> 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 <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_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 <div dir=3D"ltr"><br><br><div class=3D"gmail_quote">On Wed, Apr 13, 2011 at= 12:14 AM, deadeyes <span dir=3D"ltr"><<a href=3D"mailto:gvm999@gmail.co= m">gvm999@gmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_quo= te" style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204= , 204); padding-left: 1ex;"> Hi all,<br> <br> For my home network I am generally using wireless to get connected to the<b= r> network and the internet.<br> <br> However for copying some large files I use the wire.<br> <br> That means I get 2 IPs in the same range.<br> And both interfaces get the same metric : 0.<br> <br> I found out I can modify the metric for the default route using metric_wlan= 0.<br> Code:<br> <br> 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<br> 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<br> 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<br> 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<br> 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<br> <br> (this is not the full routing table)<br> However this changes the metric of the default route.<br> Not of the route that is specifically for the local network.<br> of course I can do this manually.<br> However that is alot of hassle and seems to be something that should be<br> configurable use files.<br> <br> Does anyone knows how I can accomplish this? Or how I can change the metric= for<br> each route for the wlan0 interface?<br> <br> Thanks in advance!<br> <br> <br> </blockquote></div>Hi,<br>you can use net-analyzer/ifmetric.<br>I found thi= s solution not satisfying, but don't remember why. <br>I guess some cor= ner cases. <br><br>I have bonded the interfaces on my laptop. The bonding d= river will prefer using the wired when<br> it is connected. <br>Here is my /etc/conf.d/net:<br># eth0<br>config_eth0= =3D( "null" )<br><br># wlan<br>modules=3D( "wpa_supplicant&q= uot; )<br>wpa_supplicant_wlan0=3D"-Dwext"<br>config_wlan0=3D( &qu= ot;null" )<br> modules_wlan0=3D( "!plug" )<br>ifplugd_wlan0=3D"--api-mode= =3Dwlan"<br><br># bond<br>slaves_bond0=3D"eth0 wlan0"<br>dhc= pcd_bond0=3D"--noipv4ll --nolink -t 15"<br>config_bond0=3D( "= ;dhcp" )<br> <br><br>Regards,<br>Kfir<br></div> --bcaec5299bf550ee5a04a0c98231--