Artica Wiki

Artica Meta: Import DHCP reservations in bulk

Import up to 5,000 DHCP reservations into a Meta policy from a CSV file, including the computers export of Artica.

Typing hundreds of reservations by hand takes hours and invites mistakes.
Artica Meta imports them from a CSV file in one step.

MetaImportReservations.png

The file can come from a spreadsheet, from another DHCP server, or straight from the Computers > Import CSV export of an Artica server.
Meta checks every line, keeps the valid ones and tells you exactly which lines it left out and why.

Benefits

Use cases

File format

One device per line, with its MAC address, its IP address and an optional name.

mac;ip;hostname
00:11:22:33:44:55;192.168.1.50;printer-hall
00:11:22:33:44:66;192.168.1.51;camera-gate
Rule Detail
Separator Semicolon, tab or comma. Meta picks the most frequent one on the first line.
First line When the first column of the first line is not a MAC address, the line is read as a header.
Column names mac, macaddress or hwaddr for the MAC address. ip, ipaddr, ipaddress or address for the IP address. hostname, name or host for the name. Case, spaces, _ and - are ignored.
Column order Free when the header names the columns. Without a recognized header, the order is mac, ip, hostname.
Other columns Ignored.
MAC address Colons or dashes, upper or lower case. Meta stores it in lower case with colons.
Name Optional. Lowercase letters, digits, dashes and dots.
Quotes A field can be quoted. "" inside quotes is one quote.
Ignored lines Empty lines and lines starting with #.
Encoding UTF-8, with or without BOM. Windows line endings are accepted.
Limits 2 MB, 50,000 lines, 5,000 reservations in the policy after the import.

Import the computers export of Artica

On an Artica server, Computers > Import CSV uses this format:

mac;ipaddr;hostname;dhcpfixed;proxyalias;hostalias1;hostalias2;hostalias3;hostalias4;computeros

Meta reads it as it is:

Example:

mac;ipaddr;hostname;dhcpfixed;proxyalias;hostalias1;hostalias2;hostalias3;hostalias4;computeros
00:50:56:a1:20:01;10.10.20.21;cam-entrance;1;;;;;;Linux
00:50:56:a1:20:02;10.10.20.22;cam-parking;1;;;;;;Linux
00:50:56:A1:20:04;10.10.20.24;ap-floor2;1;;;;;;Linux
00-50-56-a1-20-05;10.10.20.25;badge-reader;1;;;;;;Windows
00:50:56:a1:20:06;10.10.20.26;laptop-sales;0;;;;;;Windows

The first four lines become reservations.
laptop-sales is skipped because dhcpfixed is 0.

Run the import

The import dialog

Mode Effect
Merge (default) The file is added to the list. A device already listed takes the address given in the file.
Replace The list becomes exactly the content of the file. Reservations missing from the file are removed from the policy. Meta asks for a confirmation.

A computers export ready to import

Meta answers with a summary:

Result of the import

Counter Meaning
added New devices
updated Devices already listed whose address or name changed
unchanged Devices already listed with the same values
reservations in the policy Size of the list after the import

Below the summary, Meta lists the lines that need your attention, with their line number:

The list shows the first 1,000 entries and the total count.

The reservations after the import

The new reservations are in the policy draft.
Click Apply to send them to the nodes.

Reasons for a line left out

Reason Cause and fix
hostname is invalid, reservation kept without it The name contains a _, a space or an accent, for example PC_ACCOUNTING. The reservation is imported without a name. Rename the device with lowercase letters, digits, dashes and dots.
reservation: field mac is invalid The MAC address cannot be read.
reservation: field ip is invalid The IP address is not a valid IPv4 address.
IP address already used by line N Two lines of the file give the same IP address to two devices. The first one is kept.
duplicate MAC address, line N kept The same device appears twice in the file. The last line wins.
IP address already used by an existing reservation In Merge mode, the IP address belongs to another device already in the policy.
interface reservation, not served by the policy The line comes from a dhcpiface column and is bound to one network interface.
missing columns The line has no value in the MAC or IP column, or the header has no IP column.
unreadable line A quote is opened and never closed.

When no line is valid, nothing is written and Meta answers no valid reservation in the file.
Nothing is written either when the file is larger than 2 MB (file too large), has more than 50,000 lines (too many lines in the file), or would bring the policy over 5,000 reservations (more than 5000 reservations).

Tips