Human-Readable DHCP Options for DNSMASQ

Cheatsheet to a more maintainable configuration.

Example: LAN-Only Network

To do this, provide no router (gateway) and dns-server.

In the config file, add

dhcp-option=3
dhcp-option=6

or

dhcp-option=option:router
dhcp-option=option:dns-server

IPv4 Options

# dnsmasq --help dhcp
Known DHCP options:
  1 netmask
  2 time-offset
  3 router
  6 dns-server
  7 log-server
  9 lpr-server
 13 boot-file-size
 15 domain-name
 16 swap-server
 17 root-path
 18 extension-path
 19 ip-forward-enable
 20 non-local-source-routing
 21 policy-filter
 22 max-datagram-reassembly
 23 default-ttl
 26 mtu
 27 all-subnets-local
 31 router-discovery
 32 router-solicitation
 33 static-route
 34 trailer-encapsulation
 35 arp-timeout
 36 ethernet-encap
 37 tcp-ttl
 38 tcp-keepalive
 40 nis-domain
 41 nis-server
 42 ntp-server
 44 netbios-ns
 45 netbios-dd
 46 netbios-nodetype
 47 netbios-scope
 48 x-windows-fs
 49 x-windows-dm
 58 T1
 59 T2
 60 vendor-class
 64 nis+-domain
 65 nis+-server
 66 tftp-server
 67 bootfile-name
 68 mobile-ip-home
 69 smtp-server
 70 pop3-server
 71 nntp-server
 74 irc-server
 77 user-class
 80 rapid-commit
 93 client-arch
 94 client-interface-id
 97 client-machine-id
119 domain-search
120 sip-server
121 classless-static-route
125 vendor-id-encap
150 tftp-server-address
255 server-ip-address
#

IPv6 Options

# dnsmasq --help dhcp6
Known DHCPv6 options:
 21 sip-server-domain
 22 sip-server
 23 dns-server
 24 domain-search
 27 nis-server
 28 nis+-server
 29 nis-domain
 30 nis+-domain
 31 sntp-server
 32 information-refresh-time
 56 ntp-server
 59 bootfile-url
 60 bootfile-param
#

References

Posted in Technical.

Leave a Reply

Your email address will not be published.

Captcha loading...