Hi, I just setup CentOS 7 on three boxes to fiddle with it. 1. amandine.sandbox.lan is a headless LAN server 2. bernadette.sandbox.lan is a client desktop 3. raymonde.sandbox.lan is another client desktop I've setup Dnsmasq on amandine.sandbox.lan. Here's the very basic configuration: # /etc/dnsmasq.conf domain-needed bogus-priv interface=enp3s1 dhcp-range=192.168.3.100,192.168.3.200,24h local=/sandbox.lan/ domain=sandbox.lan expand-hosts no-resolv # DNS server=192.168.2.1 # Postes fixes dhcp-host=00:1E:C9:43:A7:BF,bernadette,192.168.3.2 dhcp-host=00:1D:09:15:4A:D8,raymonde,192.168.3.3 With this setup as such, I can resolve bernadette from raymonde, and I can also resolve raymonde from bernadette. But when I try to resolve either bernadette or raymonde from the server, I get an unknown hostname. The only way to solve this is to add two corresponding lines to /etc/hosts: # /etc/hosts 127.0.0.1 localhost.localdomain localhost 192.168.3.1 amandine.sandbox.lan amandine 192.168.3.2 bernadette.sandbox.lan bernadette 192.168.3.3 raymonde.sandbox.lan raymonde This strikes me as a benign redundancy, which makes me wonder if I'm doing something unorthodox here. Any suggestions? Niki -- Microlinux - Solutions informatiques durables 7, place de l'?glise - 30730 Montpezat Web : http://www.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32
On Thu, 24 Nov 2016 09:25, Nicolas Kovacs <info at ...> wrote:> Hi, > > I just setup CentOS 7 on three boxes to fiddle with it. > > 1. amandine.sandbox.lan is a headless LAN server > > 2. bernadette.sandbox.lan is a client desktop > > 3. raymonde.sandbox.lan is another client desktop > > I've setup Dnsmasq on amandine.sandbox.lan. Here's the very basic > configuration: > > # /etc/dnsmasq.conf > domain-needed > bogus-priv > interface=enp3s1 > dhcp-range=192.168.3.100,192.168.3.200,24h > local=/sandbox.lan/ > domain=sandbox.lan > expand-hosts > no-resolv > # DNS > server=192.168.2.1 > # Postes fixes > dhcp-host=00:1E:C9:43:A7:BF,bernadette,192.168.3.2 > dhcp-host=00:1D:09:15:4A:D8,raymonde,192.168.3.3 > > With this setup as such, I can resolve bernadette from raymonde, and I > can also resolve raymonde from bernadette. But when I try to resolve > either bernadette or raymonde from the server, I get an unknown > hostname. The only way to solve this is to add two corresponding lines > to /etc/hosts: > > # /etc/hosts > 127.0.0.1 localhost.localdomain localhost > 192.168.3.1 amandine.sandbox.lan amandine > 192.168.3.2 bernadette.sandbox.lan bernadette > 192.168.3.3 raymonde.sandbox.lan raymonde > > This strikes me as a benign redundancy, which makes me wonder if I'm > doing something unorthodox here. > > Any suggestions?Hmmm, looks like the "lookup question" from amandine(server) is not resolved in the same way it is resoved from bernadette or raymonde (clients). How about adding a reverse lookup for your lan ip group, pointing to your server? server=/168.192.3.in-addr.arpa/192.168.3.1 Otherwise, little to no idea. - Yamaban.
Le 24/11/2016 ? 10:22, Yamaban a ?crit :> Hmmm, looks like the "lookup question" from amandine(server) is not > resolved in the same way it is resoved from bernadette or raymonde > (clients).After some more fiddling, I guess I found a solution to my problem. If we formulate the problem differently, we can say that the clients use the information provided by Dnsmasq, but the server does not. So in order to make the server use that information, here's how I changed the configuration. First, point /etc/resolv.conf to the server itself: # /etc/resolv.conf nameserver 127.0.0.1 Next, get rid of the 'no-resolv' option in '/etc/dnsmasq.conf': # /etc/dnsmasq.conf domain-needed bogus-priv interface=enp3s1 dhcp-range=192.168.3.100,192.168.3.200,24h local=/sandbox.lan/ domain=sandbox.lan expand-hosts # DNS server=192.168.2.1 # Postes fixes dhcp-host=00:1E:C9:43:A7:BF,bernadette,192.168.3.2 dhcp-host=00:1D:09:15:4A:D8,raymonde,192.168.3.3 After restarting Dnsmasq, everything seems fine now: [root at amandine:~] # host bernadette bernadette has address 192.168.3.2 [root at amandine:~] # host raymonde raymonde has address 192.168.3.3 Cheers, Niki -- Microlinux - Solutions informatiques durables 7, place de l'?glise - 30730 Montpezat Web : http://www.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32