network unreachable resolving

i configured my bind as Dns server for internal network. Which works fine

but i am seeing this error :

 named[3848]: network unreachable resolving '': 2001:608:6:6::10#53
Apr 20 16:20:41 dnssrv named[3848]: network unreachable resolving '': 2001:502:4612::1#53

From google search ..

i got an idea from where its coming from  :

a) bind is trying to resolved it by ipv6 address, and it failed then its trying to use ip4

which make sense to me.. and solution is to use : named -4

now i am confused , how will u use named -4..

i tryed just executing named -4 ... but does not make sense ..

omm I can try to disable ipv6 module from kernel but dont know if that will help this... so before doing this .. i want to know .. how did you solve this issue ???


LVL 29
Who is Participating?
To disable ipv4 for named on Centos:

vi /etc/sysconfig/named

add to the end of file:


close the file and restart named with:

service named restart
You change it in the /etc/rc.d/rc.bind file
As for why it makes a difference, many routers/swiches etc. especially older ones do not support ipv6, so it is getting an error when trying to use it.  Windows also has issues sometimes with ipv6 as well and needs to be disabled.
fosiul01Author Commented:
there is not any rc.bind file in /etc/rc.d directory in fafact there is none ..

its Centos 5 Server

however i guess you meant by



but thats a big file ... where actually it will go ??

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

check /etc/nsswitch.conf
The hosts entry should be
hosts:          files dns
The important thing is dns (meaning IPv4 only), not dns6 (meaning IPv6 and IPv4)!
fosiul01Author Commented:
Good Day @woolmilkporc !!!

yes i have that setting in /etc/nsswitch

[root@dnssrv ]# cat /etc/nsswitch.conf | grep hosts
#hosts:     db files nisplus nis dns
hosts:      files dns

but still i see this messages ..

put in a flag
Here is an excellent article on BIND

fosiul01Author Commented:
but question is where do you put this flag ???

in which file ??

from google its for freeBSD is rc.conf.. but if i even create an rc.conf file and put this code. it will not make any difference as it will rad file from rc.d/k87named file

so do you put this in k87named.conf file ?? if yes then where ????

To start bind manually execute the daemon using "named -4". To start Bind (named) at boot you can edit your /etc/rc.conf.local file and put in the following line. If you have not made a rc.conf.local file you can always edit the /etc/rc.conf file and put the "-4" option in the named directive. The "-4" argument will simply start bind and listen to ipv4 address only.

is there a /etc/rc.conf if not try making one and see if it picks it up.
fosiul01Author Commented:
ok bottom line is :

you can either type named -4 by your self to make named to look at ipv4.. or create etc/rc.conf.local ( for redhat its /etc/rc.local ) if you want to make it at boot time ...

but as i said in my post ... if i type named -4 ... it does not work.. and still i am seeing error

fosiul01Author Commented:
Extra note :
when i type
named -4

it does not see any file in /etc/named.conf file

when there is named.conf ( var/named/chroot/etc/named.conf)

this is error i get when i run named -4

named[4044]: starting BIND 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 -4
Apr 20 17:21:37 dnssrv named[4044]: adjusted limit on open files from 1024 to 1048576
Apr 20 17:21:37 dnssrv named[4044]: found 2 CPUs, using 2 worker threads
Apr 20 17:21:37 dnssrv named[4044]: using up to 4096 sockets
Apr 20 17:21:37 dnssrv named[4044]: loading configuration from '/etc/named.conf'
Apr 20 17:21:37 dnssrv named[4044]: none:0: open: /etc/named.conf: file not found
Apr 20 17:21:37 dnssrv named[4044]: loading configuration: file not found
Apr 20 17:21:37 dnssrv named[4044]: exiting (due to fatal error)

fosiul01Author Commented:
Good morning

yes, that seems ok
thanks, after adding that i dont see any error

but i just need to find out if that make any improvement or not in dns query ..

i will close this question soon
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.