230 likes | 333 Views
Test Case Generation for testing SNMP agents. Diana Serbanescu (Fraunhofer FOKUS) & Theofanis Vassiliou-Gioles (Testing Technologies). Contact. Diana Serbanescu Fraunhofer FOKUS diana.serbanescu@ fokus.fraunhofer.de. Theo Vassiliou Testing Technologies vassiliou@testingtech.com. Agenda.
E N D
Test Case Generation for testing SNMP agents Diana Serbanescu (Fraunhofer FOKUS) & Theofanis Vassiliou-Gioles (Testing Technologies)
Contact Diana Serbanescu Fraunhofer FOKUS diana.serbanescu@fokus.fraunhofer.de Theo Vassiliou Testing Technologies vassiliou@testingtech.com
Agenda • Why SNMP? • An Introduction to SNMP • Technical Solution
Why bother for SNMP at all? • First version has been defined in the late 1980s • RFC 1067, 1098, 1157 • A protocol to monitor and manage network elements • Defines a message structure and communication flows • Widely deployed and heavily used in the IT datacom industry • Router, switches, servers, network printers, ... • One would think that SNMP is • Well established • Well deployed and there • Well tested!
Summary – Why SNMP • SNMP is well established in the IT community • Application to new domains require thorough testing • of existing functionality • in sometimes hazard environments • by not native IT/datacom experts
Introduction to SNMP (I) • SNMP is a tool (protocol) that allows for remote and local management of items on the network including servers, workstations, routers, switches and other managed devices • Comprised of • agents and • managers • SNMP is a “client pull” model • The management system (client) “pulls” data from the agent (server) • SNMP is a “server push” model • The agent (server) “pushes” out a trap message to a (client) management system
Introduction to SNMP (II) • SNMP management • SNMP Protocol • Definition of message format • Operation specification • Structure of Management Information (SMI) • Rules specifying the format used to define objects managed • Management Information Base (MIB) • A map all managed objects • Languages of SNMP • Structure of Management Information (SMI) • ASN.1 • Used to define the MIBs • Basic Encoding Rules (BER) • For SNMP message encoding • Three different versions of SNMP defined over the years • v1, v2 and v3 • V3 adds authorization and encryption
The Object Identifier (OID) • A scheme that allows two vendors or products within a vendor to compare like items • Object identifiers (OID) as the identification scheme • An OID is an ordered sequence of non-negative integerswrittenlefttoright, containingat least twoelements • Once a MIB module is published, OIDs are bound for all time to the objects defined • Objects cannot be deleted • Can only be made obsolete • Even minor changes to an object are discouraged 10
SNMP Operations (v1, v2& v3) Get Get-next Get-bulk (SNMPv2 and SNMPv3) Set Get-response Trap Inform (SNMPv2 and SNMPv3) Report (SNMP2 and SNMPv3) 11
Manager Agent Manager Agent GetNextRequest PDU GetRequest PDU GetResponse PDU GetResponse PDU (b) Get next values (a) Get values Manager Agent Manager Agent Trap PDU SetRequest PDU GetResponse PDU (d) Send trap (c) Set values SNMP PDU Sequences 12
Summary – What is SNMP? • A protocol to manage network agents • Communication is ASN.1/BER based • MIBs define the managed objects • Different versions of SNMP are available • Security plays a major role in v3 but it is considered difficult to handle by users.
Test Aspects • Single and multiple (table) values for the objects defined in the given MIB file(s) should be verified for type and value conformance • Test the main operations for each version of the SNMP protocol that is being used • GET/GET-NEXT/GET-BULK/SET • Negative and positive tests • Positive: e.g. GET a read-write object • Negative: e.g. SET a read-only object • Test the main operations within different security levels 15
Abstract Test Architecture for SNMP SNMPv3 Testing: Basic Test Concept Configuration TTCN-3 Test System Convert MIB definitions to TTCN-3 and import them in TTCN-3 modules Actas a SMP Manager SNMP Transmission SNMP Entity Compile MIB definitions SUT SNMP Agent MIB document 16
Abstract Architecture for Testing SNMP jointly with other Protocols/Test Access SNMP TTCN-3Test System SUT SET (USM) SNMP SNMP Testing Module GET / GETNEXTGET BULK GET RESPONSE / TRAP Generic Test Access IP LPT WebService 17
TTplugin-SNMP Generated Artefacts Pattern 1 Pattern 2 Pattern 3 MIB MIB MIB Pattern 4 MIB TestCases TypeSystem TestCases Pattern 5 TestCases TestCases TestCases Pattern 6 Pattern 7 SUT
The Patterns • Testing for type conformance • T1, T3 • Testing for values • T5, T6, T7 • Testing for access rights • T2, T4 • Testing for values can be enhanced by value enforcement via additional test access • Web Service, IP Packets,
The Complete Test System TypeSystem TestCases TestCases TestCases TestCases TestCases Codec Port External Functions SUT TTworkbench
Summary & Outlook • Summary • A test architecture as TTplugin-SNMP for testing SNMPv1,2,3 was developed • Focus was on the seamless management of the different SNMP version and security mechanisms • Test case templates that cover the main groups of tests for SNMP are defined and implemented in the framework • A very powerful framework to quickly define test cases to SNMP agents and/or SNMP masters • TTplugin –SNMP can also be used to manipulate SNMP manged system in non-SNMP testing context • Outlook • To generate more test cases based on generic patterns 22
Further information • Fraunhofer FOKUS – MOTION • www.fokus.fraunhofer.de/de/motion/index.html • Testing Technologies • testingtech.com • facebook.com -> Testing-Technologies • TTplugin-SNMP • testingtech.com/products/ttplugins_snmp.php • testingtech.com/download/datasheets/PlugSNMP.pdf