Snmp Operations
In this scenario, the SNMP GET and GETNEXT operational commands are tested, using the values provided by some SNMPv2-MIB OIDs.
Test SNMP Get Request SNMPv1
Description
SNMP GET operation with SNMPv1
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.215.168.64/24 set protocols static route 0.0.0.0/0 next-hop 10.215.168.1 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Note
First configure an IP and gateway in order to have internet access.
Step 2: Modify the following configuration lines in DUT0
:
set service snmp community COMMUNITY2TEST
Step 3: Run command service snmp get 10.215.168.64 oid SNMPv2-MIB::sysName.0 version v1 community COMMUNITY2TEST
at DUT0
and check if output contains the following tokens:
SNMPv2-MIB::sysName.0 = STRING: osdxShow output
SNMPv2-MIB::sysName.0 = STRING: osdx
Test SNMP Get Request SNMPv2c
Description
SNMP GET operation with SNMPv2c
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.215.168.64/24 set protocols static route 0.0.0.0/0 next-hop 10.215.168.1 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Note
First configure an IP and gateway in order to have internet access.
Step 2: Modify the following configuration lines in DUT0
:
set service snmp community COMMUNITY2TEST
Step 3: Run command service snmp get 10.215.168.64 oid SNMPv2-MIB::sysName.0 version v2c community COMMUNITY2TEST
at DUT0
and check if output contains the following tokens:
SNMPv2-MIB::sysName.0 = STRING: osdxShow output
SNMPv2-MIB::sysName.0 = STRING: osdx
Test SNMP Get Request SNMPv3
Description
SNMP GET operation with SNMPv3
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.215.168.64/24 set protocols static route 0.0.0.0/0 next-hop 10.215.168.1 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Note
First configure an IP and gateway in order to have internet access.
Step 2: Modify the following configuration lines in DUT0
:
set service snmp user USER2TEST authentication encrypted-password U2FsdGVkX18+I0f8yfBiv743ODwjetttcMBkJ8lF964= set service snmp user USER2TEST authentication protocol MD5 set service snmp user USER2TEST privacy encrypted-password U2FsdGVkX1/xF0sFozMTBYLOd3otZmO358uKaUWb0EM= set service snmp user USER2TEST privacy protocol AES
Step 3: Run command service snmp get 10.215.168.64 oid SNMPv2-MIB::sysName.0 version v3 user USER2TEST auth-protocol MD5 auth-key PASSWORD priv-protocol AES priv-key PASSWORD security-level authPriv
at DUT0
and check if output contains the following tokens:
SNMPv2-MIB::sysName.0 = STRING: osdxShow output
SNMPv2-MIB::sysName.0 = STRING: osdx
Test SNMP GetNext Request SNMPv1
Description
SNMP GETNEXT operation with SNMPv1
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.215.168.64/24 set protocols static route 0.0.0.0/0 next-hop 10.215.168.1 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Note
First configure an IP and gateway in order to have internet access.
Step 2: Modify the following configuration lines in DUT0
:
set service snmp community COMMUNITY2TEST
Step 3: Run command service snmp getnext 10.215.168.64 oid SNMPv2-MIB::sysName version v1 community COMMUNITY2TEST
at DUT0
and check if output contains the following tokens:
SNMPv2-MIB::sysName.0 = STRING: osdxShow output
SNMPv2-MIB::sysName.0 = STRING: osdx
Test SNMP GetNext Request SNMPv2c
Description
SNMP GETNEXT operation with SNMPv2c
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.215.168.64/24 set protocols static route 0.0.0.0/0 next-hop 10.215.168.1 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Note
First configure an IP and gateway in order to have internet access.
Step 2: Modify the following configuration lines in DUT0
:
set service snmp community COMMUNITY2TEST
Step 3: Run command service snmp getnext 10.215.168.64 oid SNMPv2-MIB::sysName version v2c community COMMUNITY2TEST
at DUT0
and check if output contains the following tokens:
SNMPv2-MIB::sysName.0 = STRING: osdxShow output
SNMPv2-MIB::sysName.0 = STRING: osdx
Test SNMP GetNext Request SNMPv3
Description
SNMP GETNEXT operation with SNMPv3
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.215.168.64/24 set protocols static route 0.0.0.0/0 next-hop 10.215.168.1 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Note
First configure an IP and gateway in order to have internet access.
Step 2: Modify the following configuration lines in DUT0
:
set service snmp user USER2TEST authentication encrypted-password U2FsdGVkX19EigN6x3xPGNPJLHOnJgxRNnYaJIKcXxo= set service snmp user USER2TEST authentication protocol MD5 set service snmp user USER2TEST privacy encrypted-password U2FsdGVkX1/vG57JiQCNa3x7/pvH8XSrJee2aEjdFlE= set service snmp user USER2TEST privacy protocol AES
Step 3: Run command service snmp getnext 10.215.168.64 oid SNMPv2-MIB::sysName version v3 user USER2TEST auth-protocol MD5 auth-key PASSWORD priv-protocol AES priv-key PASSWORD security-level authPriv
at DUT0
and check if output contains the following tokens:
SNMPv2-MIB::sysName.0 = STRING: osdxShow output
SNMPv2-MIB::sysName.0 = STRING: osdx