1

I setup my ubuntu as DHCP server and specified some fixed IP addresses for certain devices using the syntax:

host client1 { hardware ethernet b8:27:eb:ce:02:83; fixed-address 192.168.1.1; option host-name "client1"; }

Now it seems that the correct IP addresses are given to the clients, but I cannot access the clients over ssh using

ssh username@client1

I am very new to networking and I am wondering, what is the host-name for if not for accesing the IP address? Is there a mistake in my config file or is it really not possible to use the hostname on the server for ssh connection to the client (instead of ip)? Thanks

1 Answers1

1

The host-name option is used to tell the client host to take this specified host-name
An option host-name statement within a host declaration will override the use of the name in the host declaration.

But, as the man dhcpd.conf says:
It should be noted here that most DHCP clients completely ignore the host-name option sent by the DHCP server, and there is no way to configure them not to do this. So you generally have a choice of either not having any hostname to client IP address mapping that the client will recognize, or doing DNS updates. It is beyond the scope of this document to describe how to make this determination.

For more insformation:
- How to get the hostname from a DHCP server
- https://www.isc.org/wp-content/uploads/2017/08/dhcp41conf.html

cmak.fr
  • 8,976