Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Wireless DHCP takes over resolv.conf
Date: Sat, 09 Jul 2016 14:53:35
Message-Id: 1659782.mMxfcyeGIg@dell_xps
1 Hi All,
2
3 I just noticed my resolv.conf is topped up with the nameservers of the
4 wireless LAN I happen to be associated at the time and my wired ethernet
5 nameserver(s) are pushed further down. This happens despite the fact that I
6 have configured my wired ethernet to have a lesser priority than the wired NIC.
7
8 For example:
9
10 less /etc/resolv.conf
11 # Generated by dhcpcd from wlan0.dhcp, enp11s0.dhcp
12 # /etc/resolv.conf.head can replace this line
13 domain openwifi
14 nameserver 192.168.22.22
15 nameserver 192.168.22.23
16 nameserver 10.10.10.254
17 # /etc/resolv.conf.tail can replace this line
18
19 The first 3 non-commented entries were produced by wlan0, demoting my wired
20 ethernet nameserver.
21
22 ip route show
23 default via 10.10.10.254 dev enp11s0 metric 10
24 default via 10.160.95.1 dev wlan0 metric 20
25 10.10.10.0/24 dev enp11s0 proto kernel scope link src 10.10.10.7 metric 10
26 10.160.95.0/29 dev wlan0 proto kernel scope link src 10.160.95.2 metric 20
27 127.0.0.0/8 dev lo scope host
28
29 If I am associated, but not authenticated with the wireless LAN, any URLs I
30 try to visit will be queried with the 192.168.22.2* nameserver, before it
31 times out and 10.10.10.254 takes over.
32
33 Waiting for URLs to resolve becomes tedious after a while. Is there a way to
34 prioritise nameservers so that the NIC metric is respected, whenever the
35 resolv.conf content is updated?
36
37 --
38 Regards,
39 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Wireless DHCP takes over resolv.conf Fernando Rodriguez <cyklonite@×××××.com>
Re: [gentoo-user] Wireless DHCP takes over resolv.conf Marat BN <maratbn@×××××.com>