From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 596981382FE for ; Tue, 12 Jul 2016 22:58:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CD6E921C1B9; Tue, 12 Jul 2016 22:58:43 +0000 (UTC) Received: from mail-pa0-f65.google.com (mail-pa0-f65.google.com [209.85.220.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 125D321C1B5 for ; Tue, 12 Jul 2016 22:58:41 +0000 (UTC) Received: by mail-pa0-f65.google.com with SMTP id hh10so1849862pac.1 for ; Tue, 12 Jul 2016 15:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=LZjtRJuPoSzUxnwRnEI6gvcMsqnQCm044oov+umv8MY=; b=USYu18bNdBVHT1G7rWeUSILo6Wdb8dT1sqTcG6dOpx1oZBuWvc2eYVykvwZ+iIEObL u9cabHdkefRWRFwkwucfbt4PJlncVanuf2QuWlPuzhFgMfi+7/s33/L9t8KCCA4Y34eK SYyiKyJ2JsYhTMyJYIbTnFhYfcB08XcOHAkrMViewqi2EtsYtNz7bJXGgD5whi8+qTEb Tu8JfqDUd300Ve1Pd8s11sI1F//cp+1KRVG1yQ0cCRbVEzKxwNAfSSibv6rf0GG34MeN vf1zd6JAnIAUTtInA5q3pVmobizq8N3VOCXxjUHmqsKYlmRR9ttyl1bp01AG6KY+3Cyc fuJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=LZjtRJuPoSzUxnwRnEI6gvcMsqnQCm044oov+umv8MY=; b=Gu1/ygtPWPsiy3lK8ZJETGmFUpE2YYoOtqin70Nt8euRJTcq73j2vLXkPBKP5rbmh7 8HJRY9qh9tmkk22o5YK18tY6wDULWPuyiuXW7BDRAqe/mL9hhQkRhGMtG+DrV7dniSWs 0sMrpHsA14jCRseVbTFAoiBysbBo74Y4ddNlSnLGrYwG4xDJuNyK5bnLMRSnpYSvFU2J mZQH4TTDd+c+Yt0iAxjfh1joHiyivvFYikUusm7JR6Qo5zGEEuVkntcgFazVU7FpSkai 3QqdHRQJKo4QsoM7bf8lw/vbUdPbrVyyxNEsuE22lZ/XxlmQ8nT5tgaSifouQUSo9cPK 0xbA== X-Gm-Message-State: ALyK8tJa5U6aNarS6UzPbHxShIOhE5/KLsefZYvzHCabGoV7nmzIJ0F0/WlK5OHUBeMVFQ== X-Received: by 10.66.218.234 with SMTP id pj10mr8117745pac.81.1468364320959; Tue, 12 Jul 2016 15:58:40 -0700 (PDT) Received: from ?IPv6:::1? ([204.13.232.42]) by smtp.googlemail.com with ESMTPSA id 75sm7095550pfw.92.2016.07.12.15.58.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jul 2016 15:58:39 -0700 (PDT) Subject: Re: [gentoo-user] Wireless DHCP takes over resolv.conf To: gentoo-user@lists.gentoo.org References: <1659782.mMxfcyeGIg@dell_xps> From: Marat BN Message-ID: <57857619.9000609@gmail.com> Date: Tue, 12 Jul 2016 15:58:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 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 In-Reply-To: <1659782.mMxfcyeGIg@dell_xps> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: 6ca34919-1344-4d75-9a1a-00f20c080d91 X-Archives-Hash: 87ae16618b8682762d7b2f8156de1eab The solution I use when dealing with the problem of network software overwriting '/etc/resolf.conf' is to make that file immutable with 'chattr +i'. Not quite an answer to your question on nameserver prioritization, but could be useful to prevent your nameservers from being changed. -- Marat On 07/09/2016 07:53 AM, Mick wrote: > Hi All, > > I just noticed my resolv.conf is topped up with the nameservers of the > wireless LAN I happen to be associated at the time and my wired ethernet > nameserver(s) are pushed further down. This happens despite the fact that I > have configured my wired ethernet to have a lesser priority than the wired NIC. > > For example: > > less /etc/resolv.conf > # Generated by dhcpcd from wlan0.dhcp, enp11s0.dhcp > # /etc/resolv.conf.head can replace this line > domain openwifi > nameserver 192.168.22.22 > nameserver 192.168.22.23 > nameserver 10.10.10.254 > # /etc/resolv.conf.tail can replace this line > > The first 3 non-commented entries were produced by wlan0, demoting my wired > ethernet nameserver. > > ip route show > default via 10.10.10.254 dev enp11s0 metric 10 > default via 10.160.95.1 dev wlan0 metric 20 > 10.10.10.0/24 dev enp11s0 proto kernel scope link src 10.10.10.7 metric 10 > 10.160.95.0/29 dev wlan0 proto kernel scope link src 10.160.95.2 metric 20 > 127.0.0.0/8 dev lo scope host > > If I am associated, but not authenticated with the wireless LAN, any URLs I > try to visit will be queried with the 192.168.22.2* nameserver, before it > times out and 10.10.10.254 takes over. > > Waiting for URLs to resolve becomes tedious after a while. Is there a way to > prioritise nameservers so that the NIC metric is respected, whenever the > resolv.conf content is updated? >