Skip to main content
Version: current

matcher


ip/dhcp-server/matcher​

Type: Directory

Assigns addresses from a specific IP pool to clients whose request contains a matching DHCP option, for example a vendor class identifier or host name. Clients with a static lease keep their static lease even when a matcher matches them. For examples, see DHCP Server.

FlagNameDescription
XdisabledThe matcher is disabled.
ArgumentTypeDescription
name ( mandatory )stringName of the matcher.
server ( mandatory )enum (all)DHCP server the matcher applies to, or all for every server.
address-poolenum (static-only)IP pool to give matching clients an address from.
option-setenum (none)Option set (/ip/dhcp-server/option/sets) to send to matching clients.
code ( mandatory )alt { number: num [1 .. 254] , option: enum (vendor-specific) { vendor-specific:43 } }Code of the DHCP option to match (1-254).
value ( mandatory )stringValue to look for in the option, as text or as hex with the 0x prefix.
matching-type ( mandatory )enum (exact | substring)

How value is compared with the option:

  • exact - The option must be equal to value.
  • substring - value can appear anywhere in the option.

When two substring matchers match the same option, it is random which one applies.