Readers will learn how to increase the log level of the DHCP server in order to track static mappings assigned by DHCP.
NOTES & REQUIREMENTS:
Applicable to the latest EdgeOS firmware on all EdgeRouter models. Please see the Related Articles below for more information.
Device used in this article:
Increasing the Default DHCP Log Levels
By default, the EdgeRouter only tracks and displays dynamic lease information. In order to track static mappings (reservations), the log level for the dhcpd service needs to be increased. In this example we'll use
local2 syslog facility to log all DHCP related message to a custom log file.
CLI: Access the Command Line Interface. You can do this using the CLI button in the GUI or by using a program such as PuTTY.
1. Enter configuration mode.
2. Attach the local2 log facility to the DHCP service.
set service dhcp-server global-parameters 'log-facility local2;'
3. Send the DHCP server log output to a custom file.
set system syslog file dhcpd facility local2 level debug
set system syslog file dhcpd archive files 5
set system syslog file dhcpd archive size 5000
4. Commit the changes and save the configuration.
commit ; save
In order to view the logs, run the following command from operational mode:
show log file dhcpd
dhcpd: DHCPINFORM from 192.168.1.11 via eth1
dhcpd: DHCPACK to 192.168.1.70 (ab:cd:ef:12:34:56) via eth1
dhcpd: DHCPDISCOVER from 12:34:56:ab:cd:ef (test) via eth1
dhcpd: DHCPOFFER on 192.168.1.12 to 12:34:56:ab:cd:ef (test) via eth1