I have installed the DHCP server (isc-dhcp-server) on my Ubuntu 20.04. The client computer (also a Ubuntu 20.04 Desktop machine) gets assigned IP address, but id doesn't get the assigned domain-name (defined via option domain-name "example.local";
)
My dhcpd.conf file looks like this:
default-lease-time 600;
max-lease-time 7200;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;
# DHCP configuration for dynamic IP assignment:
subnet 192.168.5.0 netmask 255.255.255.0 {
option routers 192.168.5.3;
option subnet-mask 255.255.255.0;
option domain-search "example.local";
option domain-name-servers 8.8.8.8, 4.4.4.4;
option domain-name "example.local";
range 192.168.5.10 192.168.5.15;
}
# Static IP assignment
host moj-klient-so-statickou-ipeckou {
hardware ethernet 08:00:27:29:09:9F;
fixed-address 192.168.5.240;
server-name "myclient.example.local";
}
ddns-update-style none;
I have tried commenting out the static IP assignment to try if the dynamic IP assignment would fix the issue, but the result is always the same, specifically resulting in this output on the client machine (which proves that there is no domain-name assigned to the client machine):
client@client-VirtualBox:~$ hostname
client-VirtualBox
client@client-VirtualBox:~$ hostname -f
client-VirtualBox
client@client-VirtualBox:~$ hostname -A
client@client-VirtualBox:~$ domainname
(none)
client@client-VirtualBox:~$ dnsdomainname
client@client-VirtualBox:~$ ypdomainname
ypdomainname: Local domain name not set
client@client-VirtualBox:~$
Does anybody have any idea why is this happening?
Thank you