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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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 ??

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)!
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

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)

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.