[Dnsmasq-discuss] Obtain IP from DHCP sever but set DNS servers statically with dnsmasq.
Geert Stappers
stappers at stappers.nl
Wed Nov 27 18:11:52 GMT 2019
On Wed, Nov 27, 2019 at 12:06:12PM +0100, john doe wrote:
> On 11/27/2019 11:26 AM, Hongyi Zhao wrote:
> > Hi,
> >
> > I use ubuntu 19.10, and the default network settings is using dhcp.
> > The info is as follows:
> >
> > $ nmcli
> > enp2s0: connected to Wired connection 1
> > "Realtek RTL8111/8168/8411"
> > ethernet (r8169), 30:9C:23:2E:1A:E5, hw, mtu 1500
> > ip4 default
> > inet4 172.16.0.157/24
> > route4 0.0.0.0/0
> > route4 172.16.0.0/24
> > route4 169.254.0.0/16
> > inet6 fe80::8eec:33ef:676e:e4d7/64
> > route6 fe80::/64
> > route6 ff00::/8
> >
> > lo: unmanaged
> > "lo"
> > loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536
> >
> > DNS configuration:
> > servers: 172.16.0.1
> > interface: enp2s0
> >
> >
> > However, I want to set one locally dns server which listening on
> > 127.0.0.1:53, and at the same time using the dhcp method to obtain ip
> > for my case.
> >
> > How to do this job with dnsmasq?
> >
>
> As far as I understand your question, this looks to me like you should
> fiddle with your dhcp client and not with Dnsmasq.
Mostly true.
It is indeed a "client side thing", not "dnsmasq server side". But it is
not complete a "DHCP client thing" to get 127.0.0.1 as name server.
Groeten
Geert Stappers
--
Leven en laten leven
More information about the Dnsmasq-discuss
mailing list