Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

log

date_range 19-Nov-23

Syntax

content_copy zoom_out_map
log {
    session {
        client;
        all;
        dhcpv6 {
            client;
            server;
            relay;
            dynamic-server;
            all;
        }
        server;
        relay;
    }
}

Hierarchy Level

content_copy zoom_out_map
[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:

content_copy zoom_out_map
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.

footer-navigation