Using the container feature it can be done like this with Kea DHCP for example on RB5009 on ether2 to ether8
/file/edit config/dhcp4.json contents
{
"Dhcp4": {
"valid-lifetime": 4000, "renew-timer": 1000, "rebind-timer": 2000,
"subnet4": [{
"subnet": "192.168.88.0/24",
"id": 1, "reservations": [
{ "circuit-id": "'MikroTik eth 0/3'", "ip-address": "192.168.88.12" },
{ "circuit-id": "'MikroTik eth 0/4'", "ip-address": "192.168.88.13" },
{ "circuit-id": "'MikroTik eth 0/5'", "ip-address": "192.168.88.14" },
{ "circuit-id": "'MikroTik eth 0/6'", "ip-address": "192.168.88.15" },
{ "circuit-id": "'MikroTik eth 0/7'", "ip-address": "192.168.88.16" },
{ "circuit-id": "'MikroTik eth 0/8'", "ip-address": "192.168.88.17" },
{ "circuit-id": "'MikroTik eth 0/9'", "ip-address": "192.168.88.18" }
] }],
"option-data": [
{ "data": "192.168.88.1", "name": "domain-name-servers" },
{ "data": "192.168.88.1", "name": "routers" }],
"interfaces-config": { "interfaces": [ "eth0" ], "dhcp-socket-type": "raw" },
"host-reservation-identifiers": [ "circuit-id" ],
"loggers": [{ "name": "*", "severity": "DEBUG" }]
}
}
/container mounts add dst=/kea/config name=MOUNT_KEA src=/config
/interface veth add address=192.168.88.2/24 name=veth1
/interface bridge port add bridge=bridge interface=veth1 trusted=yes
/interface bridge set add-dhcp-option82=yes dhcp-snooping=yes name=bridge 0
/container config set registry-url=https://registry-1.docker.io
/container add cmd="-c /kea/config/dhcp4.json" interface=veth1 logging=yes mounts=MOUNT_KEA name=kea-dhcp4:3.0.1 start-on-boot=yes
/container/start 0
Live view of leases:
/log/print follow where message ~"allocated"
Anyway it would have been much simpler and nicer if the built in DHCP Server allows for matching on circuit-id