raspbian wheezy does not send hostname to DNS

Hi everybody,

I have some Raspberries (B+ and B) which I use for experiments under different OSes.

The hardware is connected via eth0 to a switch and obtains its IP from built-in DHCP-/DNS service of a Fritzbox SL.

Under Pidora, dhclient sends the hostname to the DNS-server, and so this box can be accessed via hostname, and not only via IP.

This is not the case when running "Linux raspbian 3.12.35+", no matter if booted from ready-to-use SD card which was included in the package, or booted from self-written SD card using the latest downloaded NOOBs image.

Does this work on any other box, anybody got it to work?

It looks that raspbian does not provide this feature, at least it does not when using it "out of the box".

Any information highly appreciated!

Best regards,

Markus

--
Please reply to group only. 
For private email please use http://www.dipl-ing-kessler.de/email.htm
Reply to
Markus R. Kessler
Loading thread data ...

Edit the hostname into /etc/dhcp/dhclient.conf

Gordon

Reply to
Gordon Henderson

Hi,

I already tried to hardcode the hostname in /etc/dhcp/dhclient.conf like

send host-name "andare.fugue.com"; #send host-name = gethostname();

as this is recommended in some fora, but in the DNS there's still "name = noname."

Do you know some other tricks?

Thanks in advance, best regards,

Markus

--
Please reply to group only. 
For private email please use http://www.dipl-ing-kessler.de/email.htm
Reply to
Markus R. Kessler

It does. Out of the box. Both of my Raspberries have their hostnames in /etc/hostname. Usual way is to set the hostname in raspi-config -> Advanced Options -> Hostname when installing/configuring.

P
Reply to
Paul Berger

Hi,

primary config during install indeed writes the desired hostname (raspbian) into /etc/hostname.

Also, in the /etc/hosts there's a line reading "127.0.1.1 raspbian".

Networkmanager ist not (yet) installed.

And, both raspberries can send the hostname to the DNS server when loaded with the "pidora" SD card. So, the hardware, as well as the DNS seem OK.

Best regards,

Markus

--
Please reply to group only. 
For private email please use http://www.dipl-ing-kessler.de/email.htm
Reply to
Markus R. Kessler

Try this link.

I used this years ago to tell my router what my debian box was called..

formatting link

--
Everything you read in newspapers is absolutely true, except for the  
rare story of which you happen to have first-hand knowledge. ? Erwin Knoll
Reply to
The Natural Philosopher

I wonder if it's the /etc/dhcp3/dhclient.conf file instead then...

All mine have static IPs so it's never been a problem here..

Gordon

Reply to
Gordon Henderson

Hi Gordon,

some years ago I was able to use static IPs, but well, mea culpa -- in the meantime I have so many machines and often use them in parallel, that it's impossible to remember all their IPs, or to put them into all the /etc/hosts files. I need dhcp, I have no other choice :-)

Well, out of these files

root@raspbian:/etc# find | grep dhcp ./dhcp3 ./dhcp3/dhclient-enter-hooks.d ./dhcp3/dhclient-enter-hooks.d/samba ./samba/dhcp.conf ./dhcp ./dhcp/dhclient-exit-hooks.d ./dhcp/dhclient-exit-hooks.d/debug ./dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes ./dhcp/dhclient-exit-hooks.d/ntp ./dhcp/dhclient-enter-hooks.d ./dhcp/dhclient-enter-hooks.d/samba ./dhcp/dhclient-enter-hooks.d/debug ./dhcp/dhclient.conf

I edited the downmost one.

Installed packages are

root@raspbian:/etc# dpkg -l | grep -i dhc ii isc-dhcp-client 4.2.2.dfsg.1-5+deb70u6 armhf ISC DHCP client ii isc-dhcp-common 4.2.2.dfsg.1-5+deb70u6 armhf common files used by all the isc-dhcp* packages

Best regards,

Markus

--
Please reply to group only. 
For private email please use http://www.dipl-ing-kessler.de/email.htm
Reply to
Markus R. Kessler

Hi Gordon, Philosopher, Paul, hi everybody!

Many thanks for your help -- finally I remembered a trick that helped a lot on Mandriva Linux some time ago.

Since it seems to be just destiniy whether dhclient works or not in debain OSes, I threw it down and replaced it with dhcpcd ==>

apt-get remove isc-dhcp-client isc-dhcp-common apt-get install dhcpcd

After reboot nmap, nslookup &Co finds the box by name now and I can log into it by simply doing a "ssh root@raspbian".

Thanks again, best regards,

Markus

--
Please reply to group only. 
For private email please use http://www.dipl-ing-kessler.de/email.htm
Reply to
Markus R. Kessler

Markus,

I see you already solved this by going with dhcpcd, but in case someone looks at this in the future...

Is it possible that the missing '=' in the uncommented line messed things up? (I could try removing the '=' from my dhclient.conf, but I'm not in the mood to mess with things which are working :-)

Cheers.

Jim

Reply to
Jim Diamond

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.