Configuration

Configuration consists of two parts. The first is the configuration file that has to be given on commandline:

# dhcpy6d -c dhcpy6d.conf

The second is either a client config file or a database on a MySQL or PostgreSQL server or in a SQLite file following the database schemes. This part is defined in the mentioned config file.

Dhcpy6d source code contains a dhcp6d-example.conf as well as a clients-example.conf.

Since version 1.0 the volatile leases database is created automatically, so you would need the following steps only for the configuration database.

To get a SQLite database for volatile storage use the one coming in var/lib/volatile.sqlite or use sqlite commandline client with doc/volatile.sql:

# sqlite volatile.sqlite < volatile.sql

The latter applies to MySQL databases:

# mysql dhcpy6d < config.sql
# mysql dhcpy6d < volatile.sql

General and client configuration files are in RFC 822 style parsed by Python ConfigParser module.

The general configuration file consists of 4 types of sections:

  • [dhcpy6d] – general settings
  • [address_<address>] – definition of one <address> type, there can be many of
  • [prefix_<prefix>] – definition of one <prefix> type, there can be many of
  • [class_<class>] – definition of <class> of clients, also several are allowed, refers to address and prefix definitions

Find more information about these sections here:

See some example configuration files:

If clients are configured in a file instead of a database it might look like this:

If you use an ISP with dynamically changing prefixes you can make use of the dynamic prefix:


©2024 Henri Wahl et al.