DNS cache issue

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
cippirimerlo
Level 1
Level 1
Posts: 15
Joined: Fri Jul 15, 2016 10:40 am

DNS cache issue

Postby cippirimerlo » Mon Aug 07, 2017 6:36 am

Hi everyone,
I run LM 18.2 on a client and I have a local DNS on a machine in my network.
The resolving is correct on the DNS server.
The problem is with my machine because if i try to resolve sometimes works sometimes don't.
My eth interface works with dhcp.

I think that the correct flow of resolving is: first my local cache and after the local network DNS

This is my resolv.conf

Code: Select all

andrea@andrea-X550LA ~ $ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
search mylocalnetwork.it


I have nscd installed.

This is my nsswitch.conf

Code: Select all

andrea@andrea-X550LA ~ $ cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat ldap
group:          compat ldap
shadow:         compat ldap
#gshadow:        files

hosts:          files mdns4_minimal [NOTFOUND=return] dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

#netgroup:       nis
netgroup        ldap


This is the interface DHCP lease

Code: Select all

lease {
  interface "enp2s0f1";
  fixed-address 192.168.3.101;
  option subnet-mask 255.255.255.0;
  option routers 192.168.3.2;
  option dhcp-lease-time 86400;
  option dhcp-message-type 5;
  option domain-name-servers 192.168.3.1,8.8.8.8,8.8.4.4;
  option dhcp-server-identifier 192.168.3.1;
  option host-name "XXX";
  option netbios-name-servers 192.168.3.2;
  option domain-name "mylocalnetwork.it";
  renew 1 2017/08/07 20:45:22;
  rebind 2 2017/08/08 07:17:32;
  expire 2 2017/08/08 10:17:32;
}


The problem is that sometimes the resolving works

Code: Select all

andrea@andrea-X550LA ~ $ nslookup hosttest
Server:      127.0.1.1
Address:   127.0.1.1#53

Name:   hosttest.mylocalnetwork.it
Address: 192.168.3.135


and sometimes, after few seconds, don't

Code: Select all

andrea@andrea-X550LA ~ $ nslookup hosttest
Server:      127.0.1.1
Address:   127.0.1.1#53

** server can't find hosttest: NXDOMAIN


Do you have an idea where is the problem?
Could you help me?

Many thanks in advance to everyone.
Last edited by cippirimerlo on Tue Aug 08, 2017 5:09 am, edited 1 time in total.

cippirimerlo
Level 1
Level 1
Posts: 15
Joined: Fri Jul 15, 2016 10:40 am

Re: DNS cache issue

Postby cippirimerlo » Tue Aug 08, 2017 5:08 am

A little update...if I disable dnsmasq the file resolv.conf changes and, with my network DNS, everything works fine.

Code: Select all

andrea@andrea-X550LA ~ $ cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq

[ifupdown]
managed=false


Code: Select all

andrea@andrea-X550LA ~ $ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.3.1
nameserver 8.8.8.8
nameserver 8.8.4.4
search mylocalnetwork.it


So I think the problem is about my DNS cache...

What do you think?

Many thanks for the help

cippirimerlo
Level 1
Level 1
Posts: 15
Joined: Fri Jul 15, 2016 10:40 am

Re: DNS cache issue

Postby cippirimerlo » Wed Aug 09, 2017 5:26 am

No suggestion?

Who is responsible for the local DNS cache, NSCD or DNSMASQ? I don't understand this....

cippirimerlo
Level 1
Level 1
Posts: 15
Joined: Fri Jul 15, 2016 10:40 am

Re: DNS cache issue

Postby cippirimerlo » Wed Aug 16, 2017 6:00 am

Anyone can help me?

cippirimerlo
Level 1
Level 1
Posts: 15
Joined: Fri Jul 15, 2016 10:40 am

Re: DNS cache issue

Postby cippirimerlo » Mon Aug 21, 2017 5:44 am

I'm not able to resolve this issue.
Please could you help me to identify my problem?


Return to “Other networking topics”

Who is online

Users browsing this forum: No registered users and 2 guests