Gentoo Archives: gentoo-user

From: Fernando Rodriguez <cyklonite@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Wireless DHCP takes over resolv.conf
Date: Sat, 09 Jul 2016 15:34:17
Message-Id: 0d999f80-f3b5-a853-289e-ff0ea830c292@gmail.com
In Reply to: [gentoo-user] Wireless DHCP takes over resolv.conf by Mick
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA256
3
4 On 07/09/2016 10:53 AM, Mick wrote:
5 > Hi All,
6 >
7 > I just noticed my resolv.conf is topped up with the nameservers of the
8 > wireless LAN I happen to be associated at the time and my wired ethernet
9 > nameserver(s) are pushed further down. This happens despite the fact that I
10 > have configured my wired ethernet to have a lesser priority than the wired NIC.
11 >
12 > For example:
13 >
14 > less /etc/resolv.conf
15 > # Generated by dhcpcd from wlan0.dhcp, enp11s0.dhcp
16 > # /etc/resolv.conf.head can replace this lineL
17 > domain openwifi
18 > nameserver 192.168.22.22
19 > nameserver 192.168.22.23
20 > nameserver 10.10.10.254
21 > # /etc/resolv.conf.tail can replace this line
22 >
23 > The first 3 non-commented entries were produced by wlan0, demoting my wired
24 > ethernet nameserver.
25 >
26 > ip route show
27 > default via 10.10.10.254 dev enp11s0 metric 10
28 > default via 10.160.95.1 dev wlan0 metric 20
29 > 10.10.10.0/24 dev enp11s0 proto kernel scope link src 10.10.10.7 metric 10
30 > 10.160.95.0/29 dev wlan0 proto kernel scope link src 10.160.95.2 metric 20
31 > 127.0.0.0/8 dev lo scope host
32 >
33 > If I am associated, but not authenticated with the wireless LAN, any URLs I
34 > try to visit will be queried with the 192.168.22.2* nameserver, before it
35 > times out and 10.10.10.254 takes over.
36 >
37 > Waiting for URLs to resolve becomes tedious after a while. Is there a way to
38 > prioritise nameservers so that the NIC metric is respected, whenever the
39 > resolv.conf content is updated?
40 >
41
42 Look at the -C option on dhcpcd's man page. It is done by a dhcpcd hook that you
43 can disable with that option. Where to specify it depends on what you're using to
44 manage your network connections.
45 -----BEGIN PGP SIGNATURE-----
46 Version: GnuPG v2
47
48 iQIcBAEBCAAGBQJXgRmiAAoJEPbOFX/5UlwckloP/RS5QM9FrJN/EGk5F2v3vakC
49 DP5EIqx103d2Qte91zmBPNGpq3PKCDi2aQza3dIspQ6zfR/I4P8u3ODbsclIc1U9
50 gikAKos+fVB+6nVCAVKKrpyWsDGJ7Qgupu+x1SOP1MDLNBkDnIgS2n72S0Z6FCUF
51 d5q4lUyp5w8G/+A+m01FnpFZCcBZBfBLQY9cccUR6CkkuJW1+vjPzppJoeQ032CT
52 FRqebV17htnJzuME85KcVTuawiO8xuHM/Y9tkVupe8fyEPlG8k53WY4XNh3KuuEZ
53 gIqjsYJWEJeH0HQp9MFM+HBesJrRAgaTT0jAmEXiNcKeVx0UHZppNfSl8q/NKT+o
54 rChcHJ62lrW8Q4gHtf7I5tkXyZdfLM1TdiViLTKUR9EGkV+lnoQFHDbe0+MCirkC
55 /2XsbYTUBWb5zMwCH0I9QCjA8LsCD5I4YK+strXld+6+yaGRDNh2XUo36uJCoJNZ
56 6fbOweDHCV9CMgkHH78swYZa3Fu7z8n4my7i/lEo9L+7r0IIcspDrxhgtP4T7qLu
57 UYrWoOTALUwiyqtIry7FnciifdlrCoURm9rAp9jZAz8PTha33d2Vhlj/tKiL8v3x
58 YmuB+Tz9/yLp8VXpR5h2hO4i2WTOQnW+vgugw0v3DJqE3JRKqqGsfhX9gA4JTDz2
59 Jwp9Faoag1hKEf8Dl8I9
60 =TqPa
61 -----END PGP SIGNATURE-----

Replies

Subject Author
Re: [gentoo-user] Wireless DHCP takes over resolv.conf Mick <michaelkintzios@×××××.com>