You are not logged in.

#1 2013-01-07 09:27:40

geekinthesticks
Member
From: England
Registered: 2011-09-21
Posts: 143
Website

[Solved] dhcp Name Resolution Problem

I am running a dhcp server on an Ubuntu box. I have a mixture of Linux OS's connecting, including several Arch boxes. I have just installed Arch on a new computer and while it gets assigned an IP address by the DHCP server, name resolution fails. I can ping the ip address from another box, but not the computer name. Here is an extract of the dhcp log that demonstrates the problem:

Jan  7 09:15:04 shorewall dhcpd: DHCPREQUEST for 192.168.0.182 from 00:1d:7d:95:b0:da via br0
Jan  7 09:15:04 shorewall dhcpd: DHCPACK on 192.168.0.182 to 00:1d:7d:95:b0:da via br0
Jan  7 09:15:15 shorewall dhcpd: DHCPREQUEST for 192.168.0.129 from 00:01:6c:6c:cb:4c (myth3) via br0
Jan  7 09:15:15 shorewall dhcpd: DHCPACK on 192.168.0.129 to 00:01:6c:6c:cb:4c (myth3) via br0
Jan  7 09:15:51 shorewall dhcpd: DHCPREQUEST for 192.168.0.132 from 00:01:6c:6c:c7:6b (myth2) via br0
Jan  7 09:15:51 shorewall dhcpd: DHCPACK on 192.168.0.132 to 00:01:6c:6c:c7:6b (myth2) via br0
Jan  7 09:15:52 shorewall kernel: [477481.010900] Shorewall:net2fw:DROP:IN=ppp0 OUT= MAC= SRC=46.218.85.108 DST=46.33.134.31 LEN=48 TOS=0x00 PREC=0x00 TTL=119 ID=18789 PROTO=TCP SPT=59436 DPT=22 WINDOW=65535 RES=0x00 SYN URGP=0
Jan  7 09:16:54 shorewall dhcpd: DHCPDISCOVER from 00:26:82:5d:d1:bd via br0
Jan  7 09:16:55 shorewall dhcpd: DHCPOFFER on 192.168.0.218 to 00:26:82:5d:d1:bd via br0
Jan  7 09:16:55 shorewall dhcpd: DHCPREQUEST for 192.168.0.218 (192.168.0.1) from 00:26:82:5d:d1:bd via br0
Jan  7 09:16:55 shorewall dhcpd: DHCPACK on 192.168.0.218 to 00:26:82:5d:d1:bd via br0

The problem computer is 192.168.0.218.

Here is the hosts file:

127.0.0.1       sooty.bantercat.co.uk sooty localhost
::1             sooty localhost

hostname -f on the computer returns the expected result of sooty.bantercat.co.uk.

Since dhcp works correctly for all my other boxes, I am assuming that this is a problem with the configuration on the arch box. However, I can't work out what the problem is.

Last edited by geekinthesticks (2013-01-08 18:12:32)

Offline

#2 2013-01-07 16:46:39

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: [Solved] dhcp Name Resolution Problem

What's the Ubuntooslow's entries for option name-server?
What is the problemchild's /etc/resolv.conf?


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#3 2013-01-07 17:03:18

geekinthesticks
Member
From: England
Registered: 2011-09-21
Posts: 143
Website

Re: [Solved] dhcp Name Resolution Problem

Problem child's resolv.conf is:

# Generated by NetworkManager
domain bantercat.co.uk
search bantercat.co.uk
nameserver 192.168.0.1
nameserver 192.168.0.8

Which appears correct.


dhcp servers option-nameservers

option domain-name-servers 192.168.0.1, 192.168.0.8;

I don't think the problem is at the dhcp server end, as all other dhcp clients, including several arch ones, work as expected.

Offline

#4 2013-01-07 17:23:08

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: [Solved] dhcp Name Resolution Problem

Interesting shorewall is creating a bridge between interfaces.
192.168.0.1 I guess is the router and 192.168.0.8 is the Ubuntooslow.
Since Ubuntu is already routing your traffic, you can use a numerical address such as 8.8.8.8 (for google dns), directly. 
I don't even specify domain or search, just name-server, with an address already out of the internal network.  When you out to the internet all of that is pasted on by the ISP. 
Might be a cable/network card problem.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#5 2013-01-07 18:02:38

geekinthesticks
Member
From: England
Registered: 2011-09-21
Posts: 143
Website

Re: [Solved] dhcp Name Resolution Problem

192.168.0.1 is my main name server, which runs on a box acting as a host for several VM's. It also acts as a firewall and has two NIC's, hence the network bridge. The 192.168.0.8 is a backup DNS server running on a different box - this doesn't run the DHCP server. The problem computer is connecting via WiFi.

As an experiment I set up another Arch install on a separate box connecting via cable. This displays exactly the same symptoms. This leads me to think that either something has changed in the basic Arch setup, or I have made a configuration mistake. I have three other Arch boxes, which have been around sometime and which all play nicely with my DHCP server.

I tried assigning the experimental problem box a fixed ip on the dhcp server, using its mac address. I can now ping this by name. However, if I let the dhcp server assign an address from the pool, I can ping it by ip, but not by name.

Offline

#6 2013-01-07 18:18:52

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: [Solved] dhcp Name Resolution Problem

There was a name brand printer I was troubleshooting with this same behaviour.  I'm not sure what the cause is but wifi was definitely a problem for some devices with dhcp assigned addresses.  If you could figure out what it is, you could add extra settings that apply for the troublesome machines in your dhcp configuration.  Wireless could be another problem.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#7 2013-01-08 09:03:26

geekinthesticks
Member
From: England
Registered: 2011-09-21
Posts: 143
Website

Re: [Solved] dhcp Name Resolution Problem

Some progress. If I restart dhcp on the problem client:

sudo systemctl restart dhcpcd

It all works correctly:

Jan  8 09:05:28 shorewall dhcpd: DHCPDISCOVER from 00:26:82:5d:d1:bd via br0
Jan  8 09:05:28 shorewall dhcpd: Abandoning IP address 192.168.0.218: pinged before offer
Jan  8 09:05:31 shorewall dhcpd: DHCPDISCOVER from 00:26:82:5d:d1:bd via br0
Jan  8 09:05:32 shorewall dhcpd: DHCPOFFER on 192.168.0.219 to 00:26:82:5d:d1:bd (sooty) via br0
Jan  8 09:05:32 shorewall named[10976]: client 192.168.0.1#60355: signer "rndc-key" approved
Jan  8 09:05:32 shorewall named[10976]: client 192.168.0.1#60355: updating zone 'bantercat.co.uk/IN': adding an RR at 'sooty.bantercat.co.uk' A
Jan  8 09:05:32 shorewall named[10976]: client 192.168.0.1#60355: updating zone 'bantercat.co.uk/IN': adding an RR at 'sooty.bantercat.co.uk' TXT
Jan  8 09:05:32 shorewall dhcpd: Added new forward map from sooty.bantercat.co.uk to 192.168.0.219
Jan  8 09:05:32 shorewall named[10976]: client 192.168.0.1#47941: signer "rndc-key" approved
Jan  8 09:05:32 shorewall named[10976]: client 192.168.0.1#47941: updating zone '0.168.192.in-addr.arpa/IN': deleting rrset at '219.0.168.192.in-addr.arpa' PTR
Jan  8 09:05:32 shorewall named[10976]: client 192.168.0.1#47941: updating zone '0.168.192.in-addr.arpa/IN': adding an RR at '219.0.168.192.in-addr.arpa' PTR
Jan  8 09:05:32 shorewall dhcpd: added reverse map from 219.0.168.192.in-addr.arpa. to sooty.bantercat.co.uk
Jan  8 09:05:32 shorewall dhcpd: DHCPREQUEST for 192.168.0.219 (192.168.0.1) from 00:26:82:5d:d1:bd (sooty) via br0
Jan  8 09:05:32 shorewall dhcpd: DHCPACK on 192.168.0.219 to 00:26:82:5d:d1:bd (sooty) via br0

Offline

#8 2013-01-08 18:12:07

geekinthesticks
Member
From: England
Registered: 2011-09-21
Posts: 143
Website

Re: [Solved] dhcp Name Resolution Problem

Finally solved this, but I am not sure why the solution works. I realised that I had dhcpcd@eth0 enabled, even though I am using Network Manager. So I tried disabling it, but that didn't work although Network Manager could connect to the network OK. Finally I tried:

sudo systemctl enable dhcpcd.service

Now I can ping the workstation by both name and ip address and the dhcp log shows the network name being correctly assigned.

Offline

Board footer

Powered by FluxBB