Description

This article clarifies that when multiple SNMP source-addresses are configured for trap-options, only one address will be used and that there will be no error output during the configuration check.

The recommendation, therefore, is to account for this fact while configuring SNMP source-addresses to avoid unexpected SNMP results.

Symptoms

When you load the following configuration and commit, it will pass commit check:

[edit]
lab@MX104# set snmp trap-options source-address 2001:db8:1:255::1   
[edit]
lab@MX104# set snmp trap-options source-address 192.168.0.1
[edit]
lab@MX104# commit 
commit complete

However, SNMP will still take only one address, and it will always be the last one that was configured before the commit was issued:

[edit]
lab@MX104# show snmp 
trap-options {
    source-address 192.168.0.1;
}

If multiple SNMP sources addresses are configured with the understanding that they will all be used, users may not get SNMP outputs with the expected parameters.

Solution

This behavior is as per design. Since SNMP source-address will take only one address and no error is output when committing multiple addresses for SNMP source-address, users are urged to take care while making the configuration. Otherwise, they may end up with SNMP output results with the wrong parameters.

The other behavior to be considered is when a loopback interface is used for SNMP source-address configuration. In this case, only the lowest IPv4 address will be taken.

Note: For more information about configuring SNMP traps, refer to Configuring the Source Address for SNMP Traps .

Modification History

2022-12-05: Updated non-compliant IP addresses to RFC standards