DNS woe

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,

Most of the stuffing around I do with Linux tends to be at a pretty low level; if it boots and all peripherals work then it gets flick-passed across the office and becomes someone else's problem.

Mr Someone Else is currently enjoying a chrissy break leaving me to try and jump some new hurdles.

On a Buildroot 2.1.0 atngw100_defconfig all web apps can use ip addresses but don't even try and resolve domain names. Be it 'ping', 'wget', whatever, entering the IP address of the required server directly works just fine, though any request involving a hostname will fail immediately with 'unknown host' kind of problems.

Everything else on this network can see teh interwebz just fine, what should I be looking for on the NGW which could be causing this?

Regards,
-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,
looks like you don't have a nameserver defined. Are you booting with eth0 or eth1. eth0 (WLAN) uses DHCP as default which will
usually take care of everythig as long as you have a DHCP server in your network.
Can you post the output of 'route'

Regards,
Garry Hayne

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not sure about the distro used on the device, but if DNS is your only issue, check the /etc/resolv.conf and /etc/nsswitch.conf files.

Mike Coles http://blips.net
'bluelip' http://diyaday.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You should also check if you can ping your dns server's IP from the NGW. Look at your DNS service info on your workstion. Make sure you have the same in your ngw.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ghayne wrote:
Hi,
looks like you don't have a nameserver defined. Are you booting with eth0 or eth1. eth0 (WLAN) uses DHCP as default which will
usually take care of everythig as long as you have a DHCP server in your network.
eth0 is connected to my main network. I'm booting over NFS using dhcp. As such, it's the kernel dhcp client rather than a userspace one which grabs all the info. Could that be an issue? (ifup -a fails having not found any dhcp clients, for example)
ghayne wrote:
Can you post the output of 'route'

$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.1.254 0.0.0.0 UG 0 0 0 eth0

bluelip wrote:
Not sure about the distro used on the device, but if DNS is your only issue, check the /etc/resolv.conf and /etc/nsswitch.conf files.
/etc/resolv.conf is a symlink to /tmp/resolv.conf which doesn't exist. /etc/nsswitch.conf doesn't exist either.
Altrez wrote:
You should also check if you can ping your dns server's IP from the NGW. Look at your DNS service info on your workstion. Make sure you have the same in your ngw.
Should I be able to see the dns server's IP from anywhere on my ngw? The DNS IP as reported by the gateway device (whose IP is correctly reported by route) can be pung no worries.

Appreciate the advice :)

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bluelip wrote:
Not sure about the distro used on the device, but if DNS is your only issue, check the /etc/resolv.conf and /etc/nsswitch.conf files.
/etc/resolv.conf is a symlink to /tmp/resolv.conf which doesn't exist. /etc/nsswitch.conf doesn't exist either.

A quick one-line resolv.conf file would be:

nameserver 1.2.3.4

Replace 1.2.3.4 with the ip address of the DNS server.

Most distros include tools to debug DNS. Look to see if host, nslookup, or dig are available. These tools allow you to directly query the DNS server.

Mike Coles http://blips.net
'bluelip' http://diyaday.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That did it, cheers :)

Should this be automagically generated by anything at any time?

Thx,
-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The file should have been created/customized by the DHCP service or the network configuration scripts. I don't have the device so I can't say with certainty why the file was not there.

Glad you're up and running.

Mike Coles http://blips.net
'bluelip' http://diyaday.com