Hello.
I would like to give a name to the host that run as dhcp and dns server the same way it is done for other computer on the network.
I can get dnsmasq working only if the network card is configured manually that way using yast2 :
-
Untick : change default route by dhcp
-
Statically assigned address
-
Set default route to gateway on the subnet
-
Untick : change hostname by dhcp
Here is dnsmasq config file :
# Configuration file for dnsmasq.
#
#
# If Command line : Run in foreground for debug mode : -d
#
strict-order
bogus-priv
domain-needed
no-hosts
#
# set the gateway to 192.168.130.230
# --> syntax 1 [dhcp-option=3,192.168.130.230]
# --> syntax 2 [dhcp-option=option:router,192.168.130.230]
dhcp-option=option:router,192.168.130.230
#
# The conf-file option is also allowed in configuration files,
# to include multiple configuration files
#conf-file=
#
interface=srv_eth0
listen-address=192.168.130.234
#
domain=my-dom-test.nwk,192.168.130.0/24
#
# PUBLIC DNS
#
server=8.8.8.8
server=8.8.4.4
#
expand-hosts
#
dhcp-leasefile=/var/lib/misc/dnsmasq.leases
dhcp-lease-max=50
#
dhcp-range=192.168.130.65,192.168.130.99,16h
#NOTEBOOKS
dhcp-host=40:26:2d:62:64:90,PORTABLE-ACER
dhcp-host=60:a4:4c:7d:b9:28,PORTABLE-ASUS
dhcp-host=33:1b:24:56:f1:36,PORTABLE-HP
# PRINTERS
dhcp-host=00:1b:a9:3c:be:76,192.168.130.103,BROTHER-HL2150N
dhcp-host=00:15:99:8a:a0:19,192.168.130.104,SAMSUNG-CLP325W
#
#
dhcp-no-override
# LOGS
log-queries
log-dhcp
When they connects, each of the 3 hosts get their name depending of the mac address.
I would like to add a ligne like this for the server :
dhcp-host=12:34:56:78:9a:bc,MY-SERVER
So that the hostname in use is the one in the dnsmasq config file and not the one defined with yast2 during the card configuration.
I have try different configuration on the Ethernet card with yast 2, but I did not succeed.