From SME Server
Jump to navigationJump to search

Dhcp-dns for SME Server

PythonIcon.png Skill level: beginner
The instructions on this page can be followed by a beginner.


Stéphane de Labrusse AKA Stephdl


Contrib 10:
Contrib 9:
The latest version of smeserver-dhcp-dns is available in the SME repository, click on the version number(s) for more information.


This contribution for SME Server adds the abilities to parse the dhcpd.leases file and feed the data (the name of the computer) into tinydns (the dns server). Original idea from bugzilla:2388

It gives a real dns name to computers on your network instead of the dummy name


after that on your network you can ping, ssh a remote host by its name

Installation SME8, SME9, SME10

yum --enablerepo=smecontribs install smeserver-dhcp-dns
yum --enablerepo=smecontribs install smeserver-dhcp-dns

You will then need to activate the database changes etc. The 'official' way is to perform

signal-event post-upgrade;  signal-event reboot

or if you do not want to restart your server

signal-event dhcp-dns ; config set UnsavedChange no

How it works

Of course all is done by a dhcp service so you need to set up one and play with other computers

If all is ok then you may be able to see the name of your computer in the tinydns record

less /var/service/tinydns/root/data

Then you can ping your host by their name directly in your sme console, test it

ping pc_name


host pc_name

if it doesn't work you can take a look to the dhcpd.leases to see if your host is well written in that configuration file with a correct dhcp lease.

less /var/lib/dhcpd/dhcpd.leases

for example with that kind of records (binding state active;):

lease {
  starts 1 2014/07/28 07:26:59;
  ends 2 2014/07/29 07:26:59;
  binding state active;
  next binding state free;
  hardware ethernet 00:1e:8c:ad:7d:d6;
  uid "\001\000\036\214\255}\326";
  client-hostname "infob14";


yum remove smeserver-dhcp-dns
signal-event post-upgrade;  signal-event reboot


Please raise bugs under the SME-Contribs section in bugzilla and select the smeserver-openvpn-routed component or use this link

"No open bugs found."


Only versions released in smecontrib are listed here.

smeserver-dhcp-dns Changelog: SME 10 (smecontribs)
2021/03/30 Jean-Philippe Pialasse 1.2.0-5.sme
- moving to systemd + update event [SME: 11031]
2020/10/12 Brian Read 1.2.0-4.sme
- Initial import to SME10 tree [SME: 11031]
2015/08/19 stephane de Labrusse 1.2.0-3
- now released in smecontribs
2015/07/30 stephane de Labrusse 1.2.0-2
- finished lease are now prohibited

2015/07/25 stephane de Labrusse 1.2.0-1
- enhancement following the bug [SME: 2388]
- e-smith-tinydns-2.4.0_add_hostname_following_dhcpdleases_hostname.patch

- waiting a release to the core, it is now a contrib for sme9