mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
import of dnsmasq-2.46.tar.gz
This commit is contained in:
@@ -385,6 +385,14 @@ Return a PTR DNS record.
|
||||
.B --naptr-record=<name>,<order>,<preference>,<flags>,<service>,<regexp>[,<replacement>]
|
||||
Return an NAPTR DNS record, as specified in RFC3403.
|
||||
.TP
|
||||
.B --cname=<cname>,<target>
|
||||
Return a CNAME record which indicates that <cname> is really
|
||||
<target>. There are significant limitations on the target; it must be a
|
||||
DNS name which is known to dnsmasq from /etc/hosts (or additional
|
||||
hosts files) or from DHCP. If the target does not satisfy this
|
||||
criteria, the whole cname is ignored. The cname must be unique, but it
|
||||
is permissable to have more than one cname pointing to the same target.
|
||||
.TP
|
||||
.B --interface-name=<name>,<interface>
|
||||
Return a DNS record associating the name with the primary address on
|
||||
the given interface. This flag specifies an A record for the given
|
||||
@@ -465,9 +473,11 @@ hardware addresses to identify hosts by prefixing with 'id:'. Thus:
|
||||
refers to the host with client identifier 01:02:03:04. It is also
|
||||
allowed to specify the client ID as text, like this:
|
||||
.B --dhcp-host=id:clientidastext,.....
|
||||
|
||||
The special option id:* means "ignore any client-id
|
||||
and use MAC addresses only." This is useful when a client presents a client-id sometimes
|
||||
but not others.
|
||||
|
||||
If a name appears in /etc/hosts, the associated address can be
|
||||
allocated to a DHCP lease, but only if a
|
||||
.B --dhcp-host
|
||||
@@ -478,8 +488,10 @@ instance
|
||||
.B --dhcp-host=00:20:e0:3b:13:af,ignore
|
||||
This is
|
||||
useful when there is another DHCP server on the network which should
|
||||
be used by some machines. The net:<network-id> sets the network-id tag
|
||||
whenever this dhcp-host directive is in use.This can be used to
|
||||
be used by some machines.
|
||||
|
||||
The net:<network-id> sets the network-id tag
|
||||
whenever this dhcp-host directive is in use. This can be used to
|
||||
selectively send DHCP options just for this host. When a host matches any
|
||||
dhcp-host directive (or one implied by /etc/ethers) then the special
|
||||
network-id tag "known" is set. This allows dnsmasq to be configured to
|
||||
@@ -490,13 +502,25 @@ wildcard bytes, so for example
|
||||
.B --dhcp-host=00:20:e0:3b:13:*,ignore
|
||||
will cause dnsmasq to ignore a range of hardware addresses. Note that
|
||||
the "*" will need to be escaped or quoted on a command line, but not
|
||||
in the configuration file. Hardware addresses normally match any
|
||||
in the configuration file.
|
||||
|
||||
Hardware addresses normally match any
|
||||
network (ARP) type, but it is possible to restrict them to a single
|
||||
ARP type by preceding them with the ARP-type (in HEX) and "-". so
|
||||
.B --dhcp-host=06-00:20:e0:3b:13:af,1.2.3.4
|
||||
will only match a
|
||||
Token-Ring hardware address, since the ARP-address type for token ring
|
||||
is 6.
|
||||
is 6.
|
||||
|
||||
As a special case, it is possible to include more than one
|
||||
hardware address. This allows an IP address to be associated with
|
||||
multiple hardware addresses, and gives dnsmasq permission to abandon a
|
||||
DHCP lease to one of the hardware addresses when another one asks for
|
||||
a lease. Beware that this is a dangerous thing to do, it will only
|
||||
work reliably if only one of the hardware addresses is active at any
|
||||
time and there is no way for dnsmasq to enforce this. It is, however
|
||||
useful, for instance to allocate a stable IP address to a laptop which
|
||||
has both wired and wireless interfaces.
|
||||
.TP
|
||||
.B --dhcp-hostsfile=<file>
|
||||
Read DHCP host information from the specified file. The file contains
|
||||
@@ -693,11 +717,13 @@ port number is used for the server and the port number plus one used
|
||||
for the client. Finally, two port numbers allows arbitrary
|
||||
specification of both server and client ports for DHCP.
|
||||
.TP
|
||||
.B \-3, --bootp-dynamic
|
||||
.B \-3, --bootp-dynamic[=<network-id>[,<network-id>]]
|
||||
Enable dynamic allocation of IP addresses to BOOTP clients. Use this
|
||||
with care, since each address allocated to a BOOTP client is leased
|
||||
forever, and therefore becomes permanently unavailable for re-use by
|
||||
other hosts.
|
||||
other hosts. if this is given without tags, then it unconditionally
|
||||
enables dynamic allocation. With tags, only when the tags are all
|
||||
set. It may be repeated with different tag sets.
|
||||
.TP
|
||||
.B \-5, --no-ping
|
||||
By default, the DHCP server will attempt to ensure that an address in
|
||||
@@ -723,18 +749,22 @@ removed in a future release.
|
||||
.TP
|
||||
.B \-6 --dhcp-script=<path>
|
||||
Whenever a new DHCP lease is created, or an old one destroyed, the
|
||||
binary specified by this option is run. The arguments to the process
|
||||
executable specified by this option is run. The arguments to the process
|
||||
are "add", "old" or "del", the MAC
|
||||
address of the host (or "<null>"), the IP address, and the hostname,
|
||||
address of the host, the IP address, and the hostname,
|
||||
if known. "add" means a lease has been created, "del" means it has
|
||||
been destroyed, "old" is a notification of an existing lease when
|
||||
dnsmasq starts or a change to MAC address or hostname of an existing
|
||||
lease (also, lease length or expiry and client-id, if leasefile-ro is set).
|
||||
The process is run as root (assuming that dnsmasq was originally run as
|
||||
If the MAC address is from a network type other than ethernet,
|
||||
it will have the network type prepended, eg "06-01:23:45:67:89:ab" for
|
||||
token ring. The process is run as root (assuming that dnsmasq was originally run as
|
||||
root) even if dnsmasq is configured to change UID to an unprivileged user.
|
||||
The environment is inherited from the invoker of dnsmasq, and if the
|
||||
host provided a client-id, this is stored in the environment variable
|
||||
DNSMASQ_CLIENT_ID. If the client provides vendor-class or user-class
|
||||
DNSMASQ_CLIENT_ID. If the fully-qualified domain name of the host is
|
||||
known, the domain part is stored in DNSMASQ_DOMAIN.
|
||||
If the client provides vendor-class or user-class
|
||||
information, these are provided in DNSMASQ_VENDOR_CLASS and
|
||||
DNSMASQ_USER_CLASS0..DNSMASQ_USER_CLASSn variables, but only for
|
||||
"add" actions or "old" actions when a host resumes an existing lease,
|
||||
@@ -785,8 +815,9 @@ as if they had arrived at <interface>. This option is only available
|
||||
on BSD platforms, and is necessary when using "old style" bridging, since
|
||||
packets arrive at tap interfaces which don't have an IP address.
|
||||
.TP
|
||||
.B \-s, --domain=<domain>
|
||||
Specifies the domain for the DHCP server. This has two effects;
|
||||
.B \-s, --domain=<domain>[,<address range>]
|
||||
Specifies DNS domains for the DHCP server. Domains may be be given
|
||||
unconditionally (without the IP range) or for limited IP ranges. This has two effects;
|
||||
firstly it causes the DHCP server to return the domain to any hosts
|
||||
which request it, and secondly it sets the domain which it is legal
|
||||
for DHCP-configured hosts to claim. The intention is to constrain
|
||||
@@ -803,7 +834,28 @@ and have a machine whose DHCP hostname is "laptop". The IP address for that mach
|
||||
.B dnsmasq
|
||||
both as "laptop" and "laptop.thekelleys.org.uk". If the domain is
|
||||
given as "#" then the domain is read from the first "search" directive
|
||||
in /etc/resolv.conf (or equivalent).
|
||||
in /etc/resolv.conf (or equivalent). The address range can be of the form
|
||||
<ip address>,<ip address> or <ip address>/<netmask> or just a single
|
||||
<ip address>. See
|
||||
.B --dhcp-fqdn
|
||||
which can change the behaviour of dnsmasq with domains.
|
||||
.TP
|
||||
.B --dhcp-fqdn
|
||||
In the default mode, dnsmasq inserts the unqualified names of
|
||||
DHCP clients into the DNS. For this reason, the names must be unique,
|
||||
even if two clients which have the same name are in different
|
||||
domains. If a second DHCP client appears which has the same name as an
|
||||
existing client, the name is transfered to the new client. If
|
||||
.B --dhcp-fqdn
|
||||
is set, this behaviour changes: the unqualified name is no longer
|
||||
put in the DNS, only the qualified name. Two DHCP clients with the
|
||||
same name may both keep the name, provided that the domain part is
|
||||
different (ie the fully qualified names differ.) To ensure that all
|
||||
names have a domain part, there must be at least
|
||||
.B --domain
|
||||
without an address specified when
|
||||
.B --dhcp-fqdn
|
||||
is set.
|
||||
.TP
|
||||
.B --enable-tftp
|
||||
Enable the TFTP server function. This is deliberately limited to that
|
||||
@@ -1006,6 +1058,9 @@ collects a set of valid network-id tags, one from the
|
||||
.B dhcp-range
|
||||
used to allocate the address, one from any matching
|
||||
.B dhcp-host
|
||||
(and "known" if a dhcp-host matches)
|
||||
the tag "bootp" for BOOTP requests, a tag whose name is the
|
||||
name if the interface on which the request arrived,
|
||||
and possibly many from matching vendor classes and user
|
||||
classes sent by the DHCP client. Any
|
||||
.B dhcp-option
|
||||
|
||||
Reference in New Issue
Block a user