Check Dhcpv6 Trap Target

This scenario checks that the SNMP trap-target can be discovered via DHCPv6 vendor-options and that changing the vendor-option dynamically updates the trap destination.

Test SNMP Trap-Target Via DHCPv6

Description

Verify that SNMP trap-target is discovered via DHCPv6 vendor-options. First, traps are sent to DUT1. Then the vendor-option is changed to point to DUT2 with a different port, and traps are sent to DUT2.

Scenario

Step 1: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address '10::1/64'
set interfaces ethernet eth0 ipv6 router-advert interval 2
set interfaces ethernet eth1 address '20::1/64'
set service dhcpv6-server options vendor-options data ascii '[TRAP_SERVER,10::1,162]'
set service dhcpv6-server shared-network dhcpv6server subnet '20::/64' address-range start '20::50' stop '20::50'
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT2 :

set interfaces ethernet eth0 address '10::2/64'
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Set the following configuration in DUT0 :

set interfaces dummy dum0 address 20.0.0.1/24
set interfaces dummy dum0 alarm down ALARM2TEST
set interfaces ethernet eth0 ipv6 address autoconf
set interfaces ethernet eth0 ipv6 disable-forwarding
set interfaces ethernet eth1 address dhcpv6
set interfaces ethernet eth1 dhcpv6 client parameters-only
set service snmp engine-id 0x80000009010a0101c1
set service snmp log-level debug
set service snmp trap-target dhcpv6 version v3 interface eth1
set service snmp trap-target dhcpv6 version v3 user USER2TEST
set service snmp user USER2TEST notify-traps advisor all
set service snmp user USER2TEST notify-traps alarm ALARM2TEST
set system advisor ADVISOR2TEST test ALARM2TEST
set system alarm ALARM2TEST
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 4: Run the command show monitor-db system dhcpv6 interface eth1 on DUT0 and check whether the output contains the following tokens:

snmp-servers
Show output
reason: RENEW6
snmp-servers: [10::1]:162

Step 5: Run the command service snmp monitor traps user USER2TEST engine-id 0x80000009010a0101c1 ipv6 port 162 on DUT1.

Step 6: Modify the following configuration lines in DUT0 :

set interfaces dummy dum0 disable

Step 7: Run the command service snmp monitor traps user USER2TEST engine-id 0x80000009010a0101c1 ipv6 port 162 on DUT1.

Step 8: Modify the following configuration lines in DUT0 :

delete interfaces dummy dum0 disable

Step 9: Modify the following configuration lines in DUT1 :

set service dhcpv6-server options vendor-options data ascii '[TRAP_SERVER,10::2,164]'

Step 10: Run the command service dhcpv6-client renew interface eth1 on DUT0.

Step 11: Run the command show monitor-db system dhcpv6 interface eth1 on DUT0 and check whether the output contains the following tokens:

snmp-servers: [10::2]:164
Show output
reason: RENEW6
snmp-servers: [10::2]:164

Step 12: Run the command service snmp monitor traps user USER2TEST engine-id 0x80000009010a0101c1 ipv6 port 164 on DUT2.

Step 13: Modify the following configuration lines in DUT0 :

set interfaces dummy dum0 disable

Step 14: Run the command service snmp monitor traps user USER2TEST engine-id 0x80000009010a0101c1 ipv6 port 164 on DUT2.

Step 15: Modify the following configuration lines in DUT0 :

delete interfaces dummy dum0 disable