From: Fernando Rodriguez <cyklonite@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Wireless DHCP takes over resolv.conf
Date: Sat, 9 Jul 2016 15:53:18 -0400 [thread overview]
Message-ID: <bbaa7df2-ed11-838d-1aaa-fde44910e218@gmail.com> (raw)
In-Reply-To: <6677826.UpoQaKC3Hd@dell_xps>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 07/09/2016 03:25 PM, Mick wrote:
> On Saturday 09 Jul 2016 11:34:59 Fernando Rodriguez wrote:
>> On 07/09/2016 10: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 lineL
>>> 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?
>>
>> Look at the -C option on dhcpcd's man page. It is done by a dhcpcd hook that
>> you can disable with that option. Where to specify it depends on what
>> you're using to manage your network connections.
>
> Thanks, that'll work, but it is a nuclear option because, as I understand it,
> it will work all the time. So when the ethernet cable is disconnected the
> wireless will not be able to obtain nameservers.
Check out net-dns/openresolv [1]. I've never used it but it's mean to solve that problem.
If you use NetworkManager I think all you need to do is enable that use flag.
[1] http://roy.marples.name/projects/openresolv/index
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJXgVYtAAoJEPbOFX/5Ulwc0MIP/RcyQ6dAed9YAC9KOMwCrfmu
SsONlWAaBgCSrHKGZcI3a4G9WKd8kyGPUM2deSP02JBNTDiHwZxwb494dQk2u2HN
Y6WoHE65F7LE6er5HaPBW28qTSHQ0BaH2SNQzJsId+hl0CnVfFr8t6IU+Qav7W2m
Oyeh3Wph5kDHx2cX80Czs45lWkxIbcsx2bN8a4G9ZjSk23KDtkvG5F5CgZgU/aYK
F0815O0lqzA+CLhSgzQsYOeF5aRBQ1jEh+EHSWC6Py6AuSNHmw5YanrnpelzFNHD
GhG26b2aKuXcUI7DW2MtF3vnMqcQ8nXIZjpkoKF0JAy31ruPvKJVCWMuVUrZD/l1
uTqo1DhfUyaynjG2cX5TZ9+pk8GfAaRG+W9bq/xu/v4zAKxfVZS8DUo2VOMvZqdv
YO8azzbwqyPfG7M6mF6NPLBR4h+EQYpCHoh8B8u+gsXkRxsDB5zlKqaXGO579p15
tvaAxbpW6veDH8taQITEnG7cGLm+cv9raVYmBK2rcOvPSnbfYE/A+UifmQ9gBNp7
CzEpEryIuUIL+ztkgQpLxZY1ldAt3WuiB99i+rcksVvsOO3mSHq10298M+PcfM0g
tvCkL6ttDhPiTQCXvzHuaH8lvxfHdN70LUrKngnC2NtQpzXdgFcSJynJ26wx6xrU
P6Txb5Q7nzPO+bdF7otO
=2Z4B
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2016-07-09 19:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-09 14:53 [gentoo-user] Wireless DHCP takes over resolv.conf Mick
2016-07-09 15:34 ` Fernando Rodriguez
2016-07-09 19:25 ` Mick
2016-07-09 19:53 ` Fernando Rodriguez [this message]
2016-07-11 8:32 ` Emanuele Rusconi
2016-07-11 15:31 ` Alan McKinnon
2016-07-11 18:13 ` Mick
2016-07-11 20:07 ` Alan McKinnon
2016-07-11 20:29 ` [gentoo-user] " Grant Edwards
2016-07-11 20:34 ` Alan McKinnon
2016-07-11 21:03 ` Grant Edwards
2016-07-11 21:50 ` Alan McKinnon
2016-07-11 22:32 ` Mick
2016-07-12 21:18 ` [gentoo-user] " Emanuele Rusconi
2016-07-12 22:36 ` [gentoo-user] " Grant Edwards
2016-07-12 22:58 ` [gentoo-user] " Marat BN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bbaa7df2-ed11-838d-1aaa-fde44910e218@gmail.com \
--to=cyklonite@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox