Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unbound DNS delay
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Sat May 07, 2016 7:49 pm    Post subject: Unbound DNS delay Reply with quote

I run unbound for DNS on my Gentoo laptop (which also acts as the network router) and my wife does the same. Mine always works right away but there is a long delay of at least a couple minutes before her's starts working after a reboot or if she doesn't use it for a bit. Any idea what could be causing that? I'd prefer to have her system run unbound instead of querying my system for DNS.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sat May 07, 2016 8:21 pm    Post subject: Reply with quote

grant123 ...

the ubound version, useflags, and unbound.conf would probably be a good start.

Code:
# emerge -pvq unbound
# egrep -v '(^.*#|^$) /etc/unbound/unbound.conf

best ... khay
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Sun May 08, 2016 6:12 am    Post subject: Reply with quote

Hi Khay! I should also mention that there is no such delay when we're traveling. It only happens when we're on the road at which time I normally USB tether to an Android phone for connectivity.

Code:
# emerge -pvq unbound
[ebuild   R   ] net-dns/unbound-1.5.1-r2  USE="ecdsa -debug -dnstap -gost -python (-selinux) -static-libs {-test} -threads" ABI_X86="32 (64) (-x32)" PYTHON_TARGETS="python2_7"


Code:
# egrep -v '(^.*#|^$)' /etc/unbound/unbound.conf
server:
   verbosity: 1
   
   
   
   
   
   
   
python:
remote-control:


Missed a ' in the egrep line before. :)
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sun May 08, 2016 7:04 am    Post subject: Reply with quote

grant123 wrote:
Hi Khay! I should also mention that there is no such delay when we're traveling. It only happens when we're on the road at which time I normally USB tether to an Android phone for connectivity.

hey grant ... that makes it very difficult to debug ;) ... and didn't you say it was only your wifes install that was effected? Anyhow, as you have nothing defined in unbound.conf, I'm going to suggest you try a couple of things (most of which is pure speculation as there isn't much to go on).

1). try adding 'options edns0' to resolv.conf ... you can do this via /etc/conf.d/net like so:

/etc/conf.d/net:
dns_servers_<interface>="127.0.0.1"
dns_options_<interface>="edns0"

1.1) I would also disable ipv6 if it's currently enabled:

/etc/conf.d/net:
enable_ipv6_<interface>="false"

You might also disable ipv6 in the kernel, or prevent the modules loading via /etc/modprobe.d/blacklist.conf ... if you're not using it, that is.

2). Try adding the 'threads' useflag, and adding 'num-threads: <number of cores>' to unbound.conf

3). Try adding a 'root-hints:' file (in fact this, I think, is required for normal operation).

Code:
# wget ftp://ftp.internic.net/domain/named.cache -O /etc/unbound/named.cache

/etc/unbound/unbound.conf:
root-hints: "/etc/unbound/named.cache"

3). tune 'outgoing range:', I'm not sure what the OS will support but something like '$((1024/<number of cores> - 50))' would be the optimal (with threads).

There is a howto optimise guide on the unbound site that, though targeting a server, provides some suggestions are to what other parameters you might tune.

HTH & best ... khay
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Sun May 08, 2016 7:40 am    Post subject: Reply with quote

First of all, I mistyped the following:

Quote:
I should also mention that there is no such delay when we're traveling.


That should have been:

Quote:
I should also mention that there is only a delay when we're traveling.


The issue never happens at home, only when we're traveling. It only happens to my wife's system which is connected to my system. My system acts as the router at home and when we're traveling. We both run unbound.

SOLVED!

I looked more closely and DNS actually does work on her system at all times but a domain name ping doesn't come back (but does resolve) while an IP ping does come back. When I noticed that I remembered a special MTU setting my wife's system has that mine doesn't and the rest is history. :) Thank you for helping me figure this out Khay!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum