Difference between revisions of "dnsmasq dhcp options"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(New page: ==Navigation== computing: software: dnsmasq: dhcp options ==Text== Usage: dnsmasq [options] Valid options are : {| |- | -a, || --listen-address=ipaddr...)
 
(→‎Options: option:name format no worky)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Navigation==
 
==Navigation==
 
[[computing]]: [[software]]: [[dnsmasq]]: [[dnsmasq dhcp options|dhcp options]]
 
[[computing]]: [[software]]: [[dnsmasq]]: [[dnsmasq dhcp options|dhcp options]]
==Text==
+
==Notes==
Usage: dnsmasq [options]
+
The command "[[dnsmasq]] --help" is ''supposed'' to return a list of valid DHCP sub-options for the "--dhcp-option" option, but it just returns a summary of all the available options as given in detail on the [[dnsmasq manpage]]. This page will be for reconstructing what that list should actually be, based on that page and any other sources found.
 +
==Options==
 +
The  option  numbers are specified in RFC 2132 and subsequent [[request for comment|RFC]]s.
  
Valid options are :
+
Usage:
 +
* '''command line''':
 +
** --dhcp-option=<u>number</u>,<u>value</u>
 +
** --dhcp-option=option:<u>name</u>,<u>value</u>
 +
* '''[[dnsmasq.conf]]''':
 +
** dhcp-option=<u>number</u>,<u>value</u>
 +
** dhcp-option=option:<u>name</u>,<u>value</u>
 
{|
 
{|
 
|-
 
|-
| -a, || --listen-address=ipaddr        || Specify local address(es) to listen on.
+
! number || name || description
 
|-
 
|-
| -A, || --address=/domain/ipaddr        || Return ipaddr for all hosts in specified domains.
+
| 3 || router || router to use for communication
 
|-
 
|-
| -b, || --bogus-priv                    || Fake reverse lookups for RFC1918 private address ranges.
+
| 42 || ntp-server || [[network time protocol]] server
|-
 
| -B, || --bogus-nxdomain=ipaddr        || Treat ipaddr as NXDOMAIN (defeats Verisign wildcard).
 
|-
 
| -c, || --cache-size=cachesize          || Specify the size of the cache in entries (defaults to 150).
 
|-
 
| -C, || --conf-file=path                || Specify configuration file (defaults to /etc/dnsmasq.conf).
 
|-
 
| -d, || --no-daemon                    || Do NOT fork into the background: run in debug mode.
 
|-
 
| -D, || --domain-needed                || Do NOT forward queries with no domain part.
 
|-
 
| -e, || --selfmx                        || Return self-pointing MX records for local hosts.
 
|-
 
| -E, || --expand-hosts                  || Expand simple names in /etc/hosts with domain-suffix.
 
|-
 
| -f, || --filterwin2k                  || Don't forward spurious DNS requests from Windows hosts.
 
|-
 
| -F, || --dhcp-range=ipaddr,ipaddr,time || Enable DHCP in the range given with lease duration.
 
|-
 
| -g, || --group=groupname              || Change to this group after startup (defaults to dip).
 
|-
 
| -G, || --dhcp-host=<hostspec>          || Set address or hostname for a specified machine.
 
|-
 
| -h, || --no-hosts                      || Do NOT load /etc/hosts file.
 
|-
 
| -H, || --addn-hosts=path              || Specify a hosts file to be read in addition to /etc/hosts.
 
|-
 
| -i, || --interface=interface          || Specify interface(s) to listen on.
 
|-
 
| -I, || --except-interface=int          || Specify interface(s) NOT to listen on.
 
|-
 
| -j, || --dhcp-userclass=<id>,<class>  || Map DHCP user class to option set.
 
|-
 
| -J, || --dhcp-ignore=<id>              || Don't do DHCP for hosts in option set.
 
|-
 
| -k, || --keep-in-foreground            || Do NOT fork into the background, do NOT run in debug mode.
 
|-
 
| -K, || --dhcp-authoritative            || Assume we are the only DHCP server on the local network.
 
|-
 
| -l, || --dhcp-leasefile=path          || Specify where to store DHCP leases (defaults to /var/lib/misc/dnsmasq.leases).
 
|-
 
| -L, || --localmx                      || Return MX records for local hosts.
 
|-
 
| -m, || --mx-host=host_name,target,pref || Specify an MX record.
 
|-
 
| -M, || --dhcp-boot=<bootp opts>        || Specify [[BOOTP]] options to DHCP server.
 
|-
 
| -n, || --no-poll                      || Do NOT poll /etc/resolv.conf file, reload only on SIGHUP.
 
|-
 
| -N, || --no-negcache                  || Do NOT cache failed search results.
 
|-
 
| -o, || --strict-order                  || Use nameservers strictly in the order given in /etc/resolv.conf.
 
|-
 
| -O, || --dhcp-option=<optspec>        || Set extra options to be set to DHCP clients.
 
|-
 
| -p, || --port=number                  || Specify port to listen for DNS requests on (defaults to 53).
 
|-
 
| -P, || --edns-packet-max=<size>        || Maximum supported UDP packet size for EDNS.0 (defaults to 1280).
 
|-
 
| -q, || --log-queries                  || Log queries.
 
|-
 
| -Q, || --query-port=number            || Force the originating port for upstream queries.
 
|-
 
| -R, || --no-resolv                    || Do NOT read resolv.conf.
 
|-
 
| -r, || --resolv-file=path              || Specify path to resolv.conf (defaults to /etc/resolv.conf).
 
|-
 
| -S, || --server=/domain/ipaddr        || Specify address(es) of upstream servers with optional domains.
 
|-
 
|    || --local=/domain/                || Never forward queries to specified domains.
 
|-
 
| -s, || --domain=domain                || Specify the domain to be assigned in DHCP leases.
 
|-
 
| -t, || --mx-target=host_name          || Specify default target in an MX record.
 
|-
 
| -T, || --local-ttl=time                || Specify time-to-live in seconds for replies from /etc/hosts.
 
|-
 
| -u, || --user=username                || Change to this user after startup. (defaults to nobody).
 
|-
 
| -U, || --dhcp-vendorclass=<id>,<class> || Map DHCP vendor class to option set.
 
|-
 
| -v, || --version                      || Display dnsmasq version and copyright information.
 
|-
 
| -V, || --alias=addr,addr,mask          || Translate [[IPv4]] addresses from upstream servers.
 
|-
 
| -W, || --srv-host=name,target,...      || Specify a SRV record.
 
|-
 
| -w, || --help                          || Display this message.
 
|-
 
| -x, || --pid-file=path                || Specify path of PID file. (defaults to /var/run/dnsmasq.pid).
 
|-
 
| -X, || --dhcp-lease-max=number        || Specify maximum number of DHCP leases (defaults to 150).
 
|-
 
| -y, || --localise-queries              || Answer DNS queries based on the interface a query was sent to.
 
|-
 
| -Y  || --txt-record=name,txt....      || Specify TXT DNS record.
 
|-
 
| -z, || --bind-interfaces              || Bind only to interfaces in use.
 
|-
 
| -Z, || --read-ethers                  || Read DHCP static host information from /etc/ethers.
 
|-
 
| -1, || --enable-dbus                  || Enable the DBus interface for setting upstream servers, etc.
 
|-
 
| -2, || --no-dhcp-interface=interface  || Do not provide DHCP on this interface, only provide DNS.
 
|-
 
| -3, || --bootp-dynamic                || Enable dynamic address allocation for bootp.
 
|-
 
| -4, || --dhcp-mac=<id>,<mac address>  || Map MAC address (with wildcards) to option set.
 
|-
 
| -5, || --no-ping                      || Disable ICMP echo address checking in the DHCP server.
 
|-
 
| -6, || --dhcp-script=path              || Script to run on DHCP lease creation and destruction.
 
|-
 
| -7, || --conf-dir=path                || Read configuration from all the files in this directory.
 
|-
 
| -8, || --log-facility=facilty          || Log to this syslog facility. (defaults to DAEMON)
 
|-
 
| -9, || --leasefile-ro                  || Read leases at startup, but never write the lease file.
 
|-
 
| -0, || --dns-forward-max=<queries>    || Maximum number of concurrent DNS queries. (defaults to 150)
 
 
|}
 
|}
 +
 +
* The "option:<u>name</u>" format '''does not seem to work''', at least in dnsmasq version 2.33. It may be fixed in later versions, or perhaps the syntax is more finicky than is indicated in the documentation.
 +
* The special address 0.0.0.0 is taken to mean "the address of the machine running dnsmasq".
 +
* Data types allowed are comma separated dotted-quad IP addresses, a decimal number, colon-separated hex digits and a text string.
 +
* If the optional network-ids are given then this option is only sent when all the network-ids are matched.

Latest revision as of 17:52, 21 October 2007

Navigation

computing: software: dnsmasq: dhcp options

Notes

The command "dnsmasq --help" is supposed to return a list of valid DHCP sub-options for the "--dhcp-option" option, but it just returns a summary of all the available options as given in detail on the dnsmasq manpage. This page will be for reconstructing what that list should actually be, based on that page and any other sources found.

Options

The option numbers are specified in RFC 2132 and subsequent RFCs.

Usage:

  • command line:
    • --dhcp-option=number,value
    • --dhcp-option=option:name,value
  • dnsmasq.conf:
    • dhcp-option=number,value
    • dhcp-option=option:name,value
number name description
3 router router to use for communication
42 ntp-server network time protocol server
  • The "option:name" format does not seem to work, at least in dnsmasq version 2.33. It may be fixed in later versions, or perhaps the syntax is more finicky than is indicated in the documentation.
  • The special address 0.0.0.0 is taken to mean "the address of the machine running dnsmasq".
  • Data types allowed are comma separated dotted-quad IP addresses, a decimal number, colon-separated hex digits and a text string.
  • If the optional network-ids are given then this option is only sent when all the network-ids are matched.