<< Previous Contents Index Next >>

9. Advanced configuration

9.1. Dynamic IP addressing

Dynamic IP addressing relies on a log being kept of dynamic IP assignments. This log is read completely by the charging process on every run, so should be aged frequently. To support frequent updates, backup copies of the file are also read.

9.1.1. Dynamic file format

The format of the files is one line per address assignment. The lines are formatted:

time is the time of the update, in time_t format. ip is the IP address that was assigned, in normal dotted decimal format.

network is the network name that will be assigned to this session for charging purposes. If network is missing or consists of just a minus sign, it is treated as an indication that the session ended for that IP address at the given time.

group is an optional topology group name to assign. The dynamic statement allows multiple groups to be assigned within a dynamic block, to allow for differential charging. The group field must match one of the groups listed on the dynamic statement.

9.1.2. Configuring dynamic addressing

The dynamic assignment file(s) read by ipacc are specified in the source block by the dynamic-file filename [versions] statement. filename can start with a "!" to indicate that an external program be run, the output of which will be parsed as records in the above format. (The versions parameter is illegal in this case.)

The versions parameter indicates that the same file with .1 through to .versions should also be read.

Multiple dynamic-file statements can be provided.


<< Previous Contents Index Next >>