Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents
file_download PDF
keyboard_arrow_right

snmp

date_range 20-Nov-23

Syntax: MX, M, T, ACX, PTX Series Routers and EX Series Switches

content_copy zoom_out_map
snmp { ... } 

Syntax: QFX Series Switches, QFabric, OCX1100 and EX4600

content_copy zoom_out_map
snmp {
    client-list client-list-name {
        ip-addresses;
    }
     community community-name {
        authorization authorization; 
        client-list-name client-list-name;
        clients {
            address restrict;
        }
        logical-system logical-system-name {
            routing-instance routing-instance-name {
                clients {
                addresses;
                }
            }
        }
        routing-instance routing-instance-name {
            clients {
            addresses;
            }
        }
        view view-name;
    }
    contact contact; 
    description description; 
    filter-duplicates; 
    filter-interfaces; 
    health-monitor {
        falling-threshold integer;
        interval seconds;
        rising-threshold integer;
    }
    interface [ interface-names ]; 
    location location; 
    name name;
    nonvolatile {
        commit-delay seconds;
    }
    rmon {
        alarm index {
            description description;
            falling-event-index index;
            falling-threshold integer;
            [OBSOLETE] falling-threshold-interval seconds;
            interval seconds;
            [OBSOLETE] request-type;
            [OBSOLETE] rising-event-index index;
            rising-threshold integer;
            [OBSOLETE] sample-type (absolute-value | delta-value);
            [OBSOLETE] startup-alarm (falling-alarm | rising-alarm | rising-or-falling alarm);
            syslog-subtag syslog-subtag;
            variable oid-variable;
        }
        [OBSOLETE] event index {
            community community-name;
            description description;
            type type;
        }
        history history-index {
            bucket-size number;
            interface interface-name;
            interval seconds;
            owner (RMON) owner-name;
        }
    }
    traceoptions { 
        file filename <files number> <size size> <world-readable | no-world-readable> <match regular-expression>;
        flag flag; 
    }
    trap-group group-name {
        categories {
            category;
        }
        destination-port port-number;
        routing-instance routing-instance-name;
        targets {
            address;
        }
        version (all | v1 | v2);
    }
    trap-options {
        agent-address outgoing-interface;
        source-address address;
    }
    [OBSOLETE] v3 {
        notify name {
            tag tag-name;
            type trap;
        }
        notify-filter profile-name {
            oid object-identifier (include | exclude);
        }
        snmp-community community-index {
            community-name community-name;
            security-name security-name;
            tag tag-name;
        }
        target-address target-address-name {
            address address;
            address-mask address-mask;
            logical-system logical-system;
            port port-number;
            retry-count number;
            routing-instance routing-instance-name;
            tag-list tag-list;
            target-parameters target-parameters-name;
            timeout seconds;
        }
        target-parameters target-parameters-name {
            notify-filter profile-name;
            parameters {
                message-processing-model (v1 | v2c | V3);
                security-level (authentication | none | privacy);
                security-model (usm | v1 | v2c);
                security-name security-name;
            }
        }
        usm {
            local-engine {
                user username {
                    authentication-sha {
                        authentication-password authentication-password;
                    }
                    authentication-md5 {
                        authentication-password authentication-password;
                    }
                    authentication-none;
                    privacy-aes128 {
                        privacy-password privacy-password;
                    }
                    privacy-des {
                        privacy-password privacy-password;
                    }
                    privacy-3des {
                        privacy-password privacy-password;
                    }
                    privacy-none;
                }
            }
            remote-engine engine-id {
                user username {
                    authentication-sha {
                        authentication-password authentication-password;
                    }
                    authentication-md5 {
                        authentication-password authentication-password;
                    }
                    authentication-none;
                    privacy-aes128 {
                        privacy-password privacy-password;
                    }
                    privacy-des {
                        privacy-password privacy-password;
                    }
                    privacy-3des {
                        privacy-password privacy-password;
                    }
                    privacy-none {
                        privacy-password privacy-password;
                    }
                }
            }
        }
        vacm {
            access {
                group group-name {
                    (default-context-prefix | context-prefix context-prefix) {
                        security-model (any | usm | v1 | v2c) {
                            security-level (authentication | none | privacy) {
                                notify-view view-name;
                                read-view view-name;
                                write-view view-name;
                            }
                        }
                    }
                }
            }
            security-to-group {
                security-model (usm | v1 | v2c) {
                    security-name security-name {
                        group group-name;
                    }
                }
            }
        }
    }
    view view-name {
        oid object-identifier (include | exclude);
    }
}
} 

Options

notify name is the name assigned to the notification. Each notify entry name must be unique.

tag tag-name defines the target addresses that are sent this notification. The notification is sent to all target addresses that have this tag in their tag list. The tag-name is not included in the notification.

type inform is the type of notification.

target-address target-address-name identifies the target address. The target address defines a management application’s address and parameters that are used to respond to informs.

timeout seconds is the number of seconds to wait for an acknowledgment. If no acknowledgment is received within the timeout period, the inform is retransmitted. The default timeout is 15 seconds.

retry-count number is the maximum number of times an inform is transmitted if no acknowledgment is received. The default is 3. If no acknowledgment is received after the inform is transmitted the maximum number of times, the inform message is discarded.

message-processing-modeldefines which version of SNMP to use when SNMP notifications are generated. Informs require a v3 message processing model.

security-model defines the security model to use when SNMP notifications are generated. Informs require a usm security model.

security-level specifies whether the inform is authenticated and encrypted before it is sent. For the usm security model, the security level must be one of the following:

  • authentication—Provides authentication but no encryption.

  • privacy—Provides authentication and encryption.

security-name identifies the username that is used when generating the inform.

Hierarchy Level

content_copy zoom_out_map
[edit]

Description

Configure SNMP.

SNMP modules cannot have the slash (/) character or the @ character in the name.

Required Privilege Level

snmp—To view this statement in the configuration.

snmp-control—To add this statement to the configuration.

Release Information

Statement introduced before Junos OS Release 7.4.

external-footer-nav