Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?



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

QFX Series Switches, EX4600, OCX1100

Hierarchy Level


Using SNMP trap options, you can set the source address of every SNMP trap packet sent by the router or switch to a single address, regardless of the outgoing interface. In addition, you can set the agent address of each SNMPv1 trap. For more information about the contents of SNMPv1 traps, see RFC 1157.





Add context oid in varbind of all traps originating from non-default logical system and routing instance. If your network management system is not able to handle prefixes such as <routing-instance name>@<trap-group-name> or <logical-system name>/<routing-instance name>@<trap-group-name>, setting the context-oid configuration statement will send only the <trap-group-name> and add <logical-system name>/<routing-instance name> as an additional varbind.

The remaining statements are explained separately. See CLI Explorer.

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.

context-oid option introduced in Junos OS Release 17.1.