1

How can I define my DHCP zone using a variable instead of an IP address or name (in /etc/hosts):

Instead of :

zone z.example.com {
     primary 192.168.0.1;
     secondary 192.168.0.2;
}

Defining a primaryIPAddress and secondaryIPAddress in a conf file:

zone z.example.com {
     primary primaryIPAddress;
     secondary secondaryIPAddress;
}
  • Where would the content of the variable be stored? In the same config file? Somewhere else? – Jakob Lenfers Apr 12 '16 at 16:02
  • In a file located under /etc/dhcp and included in the /etc/dhcp/dhcpd.conf – heroedeleyenda Apr 14 '16 at 14:19
  • I can already do that for a key for instance, and I am lookig for an equivalent for an IP address. The aim is to have a separated file where the IPs are stored and be able to change it easyly. – heroedeleyenda Apr 15 '16 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.