DNS not working

Ask questions about Arch Linux ARM. Please search before making a new topic.

DNS not working

Postby georgebrough » Sat May 14, 2011 10:56 am

Hi,

I've set up static IP by following the details here https://wiki.archlinux.org/index.php/Configuring_Network#For_Static_IP now my Arch Linux ARM install can't resolve domain names. I can ping my router, other machines on the LAN and a google IP address. If i try to ping www.google.com it say's unknown host.

Any suggestions?

Thanks

George
georgebrough
 
Posts: 7
Joined: Tue Oct 05, 2010 9:50 pm

Re: DNS not working

Postby pepedog » Sat May 14, 2011 2:05 pm

Look at file /etc/resolve.conf
Does it mention resolve.conf.footer ?
Create that file and put name servers there
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: DNS not working

Postby georgebrough » Sat May 14, 2011 10:31 pm

Hi,

/etc/resolv.conf looks like this

$this->bbcode_second_pass_code('', '# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line
')
georgebrough
 
Posts: 7
Joined: Tue Oct 05, 2010 9:50 pm

Re: DNS not working

Postby pepedog » Sat May 14, 2011 10:38 pm

OK, I was lazy, create /etc/resolv.conf.tail and put the nameserver(s) there
touch /etc/resolv.conf.tail
nano /etc/resolv.conf.tail
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: DNS not working

Postby georgebrough » Sat May 14, 2011 11:25 pm

Thanks for the quick reply.

I created the file and input the ip of my router to the file (don't know if it needs any formatting?). I edited resolve.conf so that the only uncommented line read "/etc/resolv.conf.tail". I restarted the network and still I can't ping google or run any updates.
georgebrough
 
Posts: 7
Joined: Tue Oct 05, 2010 9:50 pm

Re: DNS not working

Postby pepedog » Sat May 14, 2011 11:48 pm

Maybe try putting in your ISP nameservers.
You didn't need to edit resolve.conf, comment that line out again. Possibly resolve.conf was regenerated anyway, hence using the tail file.

Instead of rebooting, try
/etc/rc.d/network restart
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: DNS not working

Postby georgebrough » Sun May 15, 2011 12:06 am

Thanks for your help

After playing around with those two files I found that if I deleted everything out of them both and ran "/etc/rc.d/network restart" it would regen the resolv.conf file and establish the DNS for it's self.

Cheers

George
georgebrough
 
Posts: 7
Joined: Tue Oct 05, 2010 9:50 pm

Re: DNS not working

Postby georgebrough » Sun May 15, 2011 4:42 pm

In case anyone finds the post in the future....

After a reboot it lost the DNS's it had found, so after a bit of playing around I found that if I put "nameserver 192.168.x.x" or "nameserver 8.8.8.8" in to resolve.conf it would work (replace 192.168.x.x with the default gateway/router IP, all the 8's is the google DNS)
georgebrough
 
Posts: 7
Joined: Tue Oct 05, 2010 9:50 pm

Re: DNS not working

Postby pepedog » Sun May 15, 2011 5:56 pm

That is the point of the tail file, it doesn't get overwritten
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK


Return to User Questions

Who is online

Users browsing this forum: No registered users and 15 guests