When creating a static-mapping on DHCP Server in VyOS, the MAC Address must be entered as XX:XX:XX:XX:XX:XX. If you enter the MAC Address as XX-XX-XX-XX-XX-XX then the DHCP service will crash and not recover until you alter the configuration to the prior.
Some validation in the setting of the config, or the script which deals with the config to DHCP service config to change to the correct format would be good.
Broken Configuration
dickins@gateway# show service dhcp-server shared-network-name LAN authoritative subnet 10.242.0.0/24 { default-router 10.242.0.254 dns-server 10.242.0.254 domain-name dickins.dev domain-search dickins.dev lease 28800 range 10.242.0.0/25 { start 10.242.0.1 stop 10.242.0.128 } static-mapping AlexPC { ip-address 10.242.0.17 mac-address 00-d8-61-9e-78-2b } static-mapping EpsonPrinter { ip-address 10.242.0.252 mac-address 9c:ae:d3:be:5f:8c } } [edit]
root@gateway:/home/dickins# systemctl status isc-dhcp-server.service ● isc-dhcp-server.service - ISC DHCP IPv4 server Loaded: loaded (/lib/systemd/system/isc-dhcp-server.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2021-01-21 16:23:39 UTC; 8s ago Docs: man:dhcpd(8) Process: 51984 ExecStartPre=/bin/sh -ec touch ${LEASE_FILE}; chown dhcpd:nogroup ${LEASE_FILE}* ; chmod 664 ${LEASE Jan 21 16:23:39 gateway systemd[1]: isc-dhcp-server.service: Service RestartSec=100ms expired, scheduling restart. Jan 21 16:23:39 gateway systemd[1]: isc-dhcp-server.service: Scheduled restart job, restart counter is at 5. Jan 21 16:23:39 gateway systemd[1]: Stopped ISC DHCP IPv4 server. Jan 21 16:23:39 gateway systemd[1]: isc-dhcp-server.service: Start request repeated too quickly. Jan 21 16:23:39 gateway systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'. Jan 21 16:23:39 gateway systemd[1]: Failed to start ISC DHCP IPv4 server. root@gateway:/home/dickins# service isc-dhcp-server start Job for isc-dhcp-server.service failed because the control process exited with error code. See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details. root@gateway:/home/dickins# systemctl status isc-dhcp-server.service ● isc-dhcp-server.service - ISC DHCP IPv4 server Loaded: loaded (/lib/systemd/system/isc-dhcp-server.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2021-01-21 16:24:05 UTC; 371ms ago Docs: man:dhcpd(8) Process: 52050 ExecStartPre=/bin/sh -ec touch ${LEASE_FILE}; chown dhcpd:nogroup ${LEASE_FILE}* ; chmod 664 ${LEASE Jan 21 16:24:05 gateway systemd[1]: isc-dhcp-server.service: Service RestartSec=100ms expired, scheduling restart. Jan 21 16:24:05 gateway systemd[1]: isc-dhcp-server.service: Scheduled restart job, restart counter is at 5. Jan 21 16:24:05 gateway systemd[1]: Stopped ISC DHCP IPv4 server. Jan 21 16:24:05 gateway systemd[1]: isc-dhcp-server.service: Start request repeated too quickly. Jan 21 16:24:05 gateway systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'. Jan 21 16:24:05 gateway systemd[1]: Failed to start ISC DHCP IPv4 server.
Working Configuration
dickins@gateway# set service dhcp-server shared-network-name LAN subnet 10.242.0.0/24 static-mapping AlexPC mac-address 00:d8:61:9e:78:2b [edit] dickins@gateway# commit save [edit] dickins@gateway# save Saving configuration to '/config/config.boot'... Done [edit]
root@gateway:/home/dickins# systemctl status isc-dhcp-server.service ● isc-dhcp-server.service - ISC DHCP IPv4 server Loaded: loaded (/lib/systemd/system/isc-dhcp-server.service; disabled; vendor preset: enabled) Active: active (running) since Thu 2021-01-21 16:24:56 UTC; 9s ago Docs: man:dhcpd(8) Process: 52411 ExecStartPre=/bin/sh -ec touch ${LEASE_FILE}; chown dhcpd:nogroup ${LEASE_FILE}* ; chmod 664 ${LEASE Process: 52416 ExecStart=/usr/sbin/dhcpd -4 -q -user dhcpd -group nogroup -pf ${PID_FILE} -cf ${CONFIG_FILE} -lf ${LEA Main PID: 52417 (dhcpd) Tasks: 1 (limit: 817) Memory: 7.2M CGroup: /system.slice/isc-dhcp-server.service └─52417 /usr/sbin/dhcpd -4 -q -user dhcpd -group nogroup -pf /run/dhcp-server/dhcpd.pid -cf /run/dhcp-server/ Jan 21 16:24:56 gateway dhcpd[52417]: No subnet declaration for eth0 (no IPv4 addresses). Jan 21 16:24:56 gateway dhcpd[52417]: ** Ignoring requests on eth0. If this is not what Jan 21 16:24:56 gateway dhcpd[52417]: you want, please write a subnet declaration Jan 21 16:24:56 gateway dhcpd[52417]: in your dhcpd.conf file for the network segment Jan 21 16:24:56 gateway dhcpd[52417]: to which interface eth0 is attached. ** Jan 21 16:24:56 gateway dhcpd[52417]: Jan 21 16:24:56 gateway dhcpd[52417]: Server starting service. Jan 21 16:24:56 gateway systemd[1]: Started ISC DHCP IPv4 server. Jan 21 16:25:02 gateway dhcpd[52417]: DHCPREQUEST for 10.242.0.3 from 70:7c:69:03:e2:83 (AVX03E283) via eth1 Jan 21 16:25:02 gateway dhcpd[52417]: DHCPACK on 10.242.0.3 to 70:7c:69:03:e2:83 (AVX03E283) via eth1