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 1Q9yST-00016k-4x for garchives@archives.gentoo.org; Wed, 13 Apr 2011 11:42:09 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 13D461C01D; Wed, 13 Apr 2011 11:40:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D0DB91C01D for ; Wed, 13 Apr 2011 11:40:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 6998E1B400B for ; Wed, 13 Apr 2011 11:40:27 +0000 (UTC) X-Virus-Scanned: by amavisd-new using ClamAV at gentoo.org X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 required=5.5 tests=[BAYES_00=-2.599] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gOf-iFY0kiyk for ; Wed, 13 Apr 2011 11:40:21 +0000 (UTC) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by smtp.gentoo.org (Postfix) with ESMTP id 04E041B400E for ; Wed, 13 Apr 2011 11:40:19 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q9yQk-0004DX-2M for gentoo-user@gentoo.org; Wed, 13 Apr 2011 13:40:18 +0200 Received: from d5152C92C.static.telenet.be ([81.82.201.44]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Apr 2011 13:40:18 +0200 Received: from gvm999 by d5152C92C.static.telenet.be with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 13 Apr 2011 13:40:18 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: deadeyes Subject: [gentoo-user] Re: configure wlan0 route metric Date: Wed, 13 Apr 2011 11:40:06 +0000 (UTC) Message-ID: References: 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 81.82.201.44 (Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.16) Gecko/20110330 Gentoo Firefox/3.6.16) X-Archives-Salt: X-Archives-Hash: 826820b7c4ba0c26408b246f39776b39 Mick gmail.com> writes: > > You can define the priority in your /etc/conf.d/net > > You can set this per wired/wireless interface; e.g. > > metric_eth0="100" > > Look at your /etc/conf.d/net.example for more details. > > HTH. No offense, I had found out about this option (and tried it already): "I found out I can modify the metric for the default route using metric_wlan0." This however only changes the default route. Not the route for the local network route. Also metric_eth0 would give less priority to my wired network, which is not what I want. I was searching around the gentoo forums for ifmetric and found this piece of code that can be added in /etc/conf.d/net: postup() { local metric=0 case "${IFACE}" in eth0) metric=0 ;; eth1) metric=1 ;; esac ifmetric "${IFACE}" "${metric}" return 0 } I'll try as soon as I can and add my experience with this.