Check Sending Link Changes
This scenario shows how to configure a ‘trap-target‘ to send linkDown and linkUp notifications and specifying the source address to be used in those notifications. In addition, the SNMP ‘service snmp monitor traps’ command is checked.
Test SNMP Send Traps
Description
A ‘trap-target‘ is configured to send linkDown and linkUp traps for a user in DUT0 and the ‘monitor’ command is used to check sending notifications in SNMPv3. Setting ‘local-address‘ to DUT0 specifies the source address to use in sent notifications.
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces dummy dum0 address 20.0.0.1/24 set interfaces dummy dum1 address 30.0.0.1/24 set interfaces ethernet eth0 address 10.0.0.1/24 set service snmp engine-id 0x80000009010a0101c1 set service snmp trap-target 10.0.0.2 version v3 user USER2TEST set service snmp user USER2TEST notify-traps link-down set service snmp user USER2TEST notify-traps link-up set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1
:
set interfaces ethernet eth0 address 10.0.0.2/24 set protocols static route 20.0.0.0/24 next-hop 10.0.0.1 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Note
Initially, the source address used in notifications is the one corresponding to the interface through which they are sent (10.0.0.1).
Step 3: Run command service snmp monitor traps user USER2TEST engine-id 0x80000009010a0101c1
at DUT1
.
Step 4: Modify the following configuration lines in DUT0
:
set interfaces dummy dum1 disable
Step 5: Run command service snmp monitor traps user USER2TEST engine-id 0x80000009010a0101c1
at DUT1
.
Step 6: Modify the following configuration lines in DUT0
:
delete interfaces dummy dum1 disable
Note
After setting the ‘local-address‘ in DUT0, the source address used in notifications will be the one specified in this setting (20.0.0.1).
Step 7: Modify the following configuration lines in DUT0
:
set service snmp local-address 20.0.0.1
Step 8: Run command service snmp monitor traps user USER2TEST engine-id 0x80000009010a0101c1
at DUT1
.
Step 9: Modify the following configuration lines in DUT0
:
set interfaces dummy dum1 disable
Step 10: Run command service snmp monitor traps user USER2TEST engine-id 0x80000009010a0101c1
at DUT1
.
Step 11: Modify the following configuration lines in DUT0
:
delete interfaces dummy dum1 disable
Test SNMP Send Informs
Description
A ‘trap-target‘ is configured to send linkDown and linkUp informs for a user in DUT0 and the ‘monitor’ command is used to check sending notifications in SNMPv3. Setting ‘local-address‘ to DUT0 specifies the source address to use in sent notifications.
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces dummy dum0 address 20.0.0.1/24 set interfaces dummy dum1 address 30.0.0.1/24 set interfaces ethernet eth0 address 10.0.0.1/24 set service snmp engine-id 0x80000009010a0101c1 set service snmp trap-target 10.0.0.2 version v3 type inform set service snmp trap-target 10.0.0.2 version v3 user USER2TEST set service snmp user USER2TEST notify-traps link-down set service snmp user USER2TEST notify-traps link-up set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1
:
set interfaces ethernet eth0 address 10.0.0.2/24 set protocols static route 20.0.0.0/24 next-hop 10.0.0.1 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Note
Initially, the source address used in notifications is the one corresponding to the interface through which they are sent (10.0.0.1).
Step 3: Run command service snmp monitor traps user USER2TEST
at DUT1
.
Step 4: Modify the following configuration lines in DUT0
:
set interfaces dummy dum1 disable
Step 5: Run command service snmp monitor traps user USER2TEST
at DUT1
.
Step 6: Modify the following configuration lines in DUT0
:
delete interfaces dummy dum1 disable
Note
After setting the ‘local-address‘ in DUT0, the source address used in notifications will be the one specified in this setting (20.0.0.1).
Step 7: Modify the following configuration lines in DUT0
:
set service snmp local-address 20.0.0.1
Step 8: Run command service snmp monitor traps user USER2TEST
at DUT1
.
Step 9: Modify the following configuration lines in DUT0
:
set interfaces dummy dum1 disable
Step 10: Run command service snmp monitor traps user USER2TEST
at DUT1
.
Step 11: Modify the following configuration lines in DUT0
:
delete interfaces dummy dum1 disable