log
Syntax
log { session { client; all; dhcpv6 { client; server; relay; dynamic-server; all; } server; relay; } }
Hierarchy Level
[edit system processes dhcp-service]
Description
Enable DHCP session log on the device. Session logs include the information on the session creation, deletion and renew events. You can use the session logs for monitoring and troubleshooting purposes.
DHCP logs are written to system syslog that you define using the following command:
set system syslog ( file filename | host destination) user
logging-level
Example:
syslog { host 10.10.10.10 { user any; } file file-1 { user any; } }
In the example:
Syslog messages are stored on the host with IP address 10.10.10.10 for all severity levels.
Syslog messages are stored in the file file-1 at /var/log/<file-name> for all severity levels.
Options
session
—Logs of the DHCP sessions.client
—Log sessions of the DHCP client.all
—Log sessions of the DHCP client, server and relay.dhcpv6
—Log sessions of the DHCPv6.client
—Log sessions of the DHCPv6 client.dynamic-server
—Log sessions of the DHCPv6 dynamic server.all
—Log sessions of the DHCPv6 client, server, relay and dynamic server.server
—Log sessions of the DHCP server.relay
—Log sessions of the DHCP relay.
Required Privilege Level
admin—To view this statement in the configuration.
admin-control—To add this statement to the configuration.
Release Information
Statement introduced in Junos OS Release 19.1R1.