Example:
# Private Network
iface=em3
subnet=192.168.1
1,c8:1f:66:dd:f0:cc,himrod
10,c8:1f:66:df:69:7c,himrod-storage
11,c8:1f:66:dd:d8:ee,himrod-big-1
12,c8:1f:66:dd:db:3b,himrod-big-2
13,c8:1f:66:dd:d7:62,himrod-big-3
14,c8:1f:66:dd:f1:44,himrod-big-4
101,c8:1f:66:dd:da:1a,himrod-1
...
<verbatim>
* Example DNS query after dnsmasq is running:
* *host himrod*
* *himrod.localnet has address 192.168.1.1*
* *host himrod.cs*
* *himrod.cs has address 129.97.152.5*
---++++ dnsmasq.common
* just a symlink to *dnsmasq.common.himrod* created by make install process
---+++ DNSMASQ Template Files
* * These files are preprocessed and added to the top of the automatically generated */etc/dnsmasq.hosts* file
* *dnsmasq/dnsmasq.template.private*
* default DNSMASQ settings for ONE private network
* *dnsmasq/dnsmasq.template.private_two*
* default DNSMASQ settings for TWO private networks
* *dnsmasq/dnsmasq.template.private_three*
* default DNSMASQ settings for THREE private networks
* *dnsmasq/hosts.template*
* defines fixed records we always want in the */etc/hosts* file
* *dnsmasq/resolv.template*
* defines fixed record we want added to the top of the */etc/resolv.conf* file
* Default external DNS servers - should be moved into [[https://cs.uwaterloo.ca/twiki/pub/CF/HimrodTools/common_host][common_host]]
---+++ DNSMASQ Compiled files
* To recreate these files:
* *cd /cscf-adm/src/dnsmasq*
* *make*
---++++ /etc/hosts
* Create from *mkhosts* and *install_dnsmasq* using *dnsmasq.common.himrod* and *hosts.template*
---++++ /etc/resolv.conf
* Create from *mkhosts* and *install_dnsmasq* using *resolv.template*
---++++ /etc/dnsmasq.hosts
* Create from *mkhosts* and *install_dnsmasq* using dnsmasq template files
---+++ dnsmasq.compiled.himrod
* The top level include for dnsmasq created by the make install process
* includes preporocessed *dnsmasq.template* files
* includes *dnsmasq.common*
---+++ DNSMASQ mkhosts and mkhosts.c
* preprocessor program that reads *dnsmasq.common.himrod*
* *dnsmasq.compiled.himrod* and *hosts.template*
* Writes */etc/dnsmasq.hosts* - a file included from the otherwise totally blank */etc/dnsmasq.conf* file
* Write */etc/hosts*
* Creates DHCP entries, *DNS* records - both forward and reverse lookups for local networks
---++++ mkhosts Ducumenation
* What: mkhosts.c a preprocessor for dnsmasq configuration files
* The preprocessor handles creating reverse dns records and settings from
* a simpilfied syntax
* Syntax:
* *ttl=* time
* *time* is a ttl as per the *dnsmasq* man pages
* Example: *ttl=1440m* - set the default ttl to 1440 minutes until the next ttl keyword
* * *subnet=* *subnet* specify the subnet
* *subnet* is a subnet specification - *LIMITATIONS* mkhosts uses hard coded /24 network - first 24 bits
* Example: *subnet=192.168.1* - this defines the subnet the same as 192.168.1.0 .. 192.168.1.255
* *ip*,*mac*,*cname* [,*cname*]...
* *ip* is the last digit of the subnet only
* *mac* is the MAC address of the interface you want to assign the address to
* *cname* a common separated list of cnames
* Example: 101,00:25:90:29:eb:ec,m160-1-local-comm,m160-1
* * Creates
* <verbatim>
* dhcp-host=192.168.2.101,00:25:90:29:eb:ec,m160-1-local-comm,1440m
* ptr-record=101.2.168.192.in-addr.arpa.,"m160-1-local-comm"
* address=/m160-1-local-comm/192.168.2.101
* cname=m160-1,m160-1-local-comm
* </verbatim>
* *prefix=* We can redefine dhcp name prefix for reverse lookups
* *iface=* just puts a comment in the output file
* *tag=* defind tags to be appened to dhcp-host
* *pxelinux=* Define the pxelinux subnet - hosts under this section can get a private boot file
* Each mac address will simlink to the file pxelinux.cfg/nodes
* *include=* process an include file
*
* Example:
* ttl=1440m
* subnet=192.168.2
* 1,00:25:90:0e:5b:a2,m160-local-comm,m160-comm,m160
* 101,00:25:90:29:eb:ec,m160-1-local-comm,m160-1
* ...</verbatim>
<nop>