Presentation is loading. Please wait.

Presentation is loading. Please wait.

Revised Spring 2006 Rudimentary NMS Software Components 1 Rudimentary NMS Software Components (Chapter 7) Network Management, MIBs, and MPLS Stephen B.

Similar presentations


Presentation on theme: "Revised Spring 2006 Rudimentary NMS Software Components 1 Rudimentary NMS Software Components (Chapter 7) Network Management, MIBs, and MPLS Stephen B."— Presentation transcript:

1 Revised Spring 2006 Rudimentary NMS Software Components 1 Rudimentary NMS Software Components (Chapter 7) Network Management, MIBs, and MPLS Stephen B. Morris

2 Revised Spring 2006 Rudimentary NMS Software Components2 Overview How to build and use Simple Network Management Protocol (SNMP) code components How to build and use Simple Network Management Protocol (SNMP) code components Two commercial Application Programming Interfaces (APIs) Two commercial Application Programming Interfaces (APIs) Microsoft Visual C++ version 6.0 Microsoft Visual C++ version 6.0 Sun Microsystems Java Development Management Kit (JDMK) version 4.2 Sun Microsystems Java Development Management Kit (JDMK) version 4.2

3 Revised Spring 2006 Rudimentary NMS Software Components3 Building a Rudimentary Management System Minimum Required Components Minimum Required Components SNMP manager SNMP manager Management Information Bases (MIBs) Management Information Bases (MIBs) Database Database SNMP agents SNMP agents

4 Revised Spring 2006 Rudimentary NMS Software Components4 Configuring SNMP on Windows NT/2000/XP Windows NT Windows NT If the SNMP Service is already installed: If the SNMP Service is already installed: Click Start-Settings-Control Panel Click Start-Settings-Control Panel Select Services and scroll down to the SNMP Service Select Services and scroll down to the SNMP Service If the SNMP Service is not installed: If the SNMP Service is not installed: Double click the Control Panel icon and select the Services tab Double click the Control Panel icon and select the Services tab Click the Add button and the scroll down to the SNMP Service and then click OK Click the Add button and the scroll down to the SNMP Service and then click OK

5 Revised Spring 2006 Rudimentary NMS Software Components5 Configuring SNMP on Windows NT/2000/XP (continued) Windows 2000/XP Windows 2000/XP If the SNMP Service is already installed: If the SNMP Service is already installed: Double click the Control Panel Administrative Tools icon and select the Services tab Double click the Control Panel Administrative Tools icon and select the Services tab Right click on the SNMP Service and select the Properties option Right click on the SNMP Service and select the Properties option If the SNMP Service is not installed: If the SNMP Service is not installed: Double click the Control Panel icon and select the Add Remove Programs tab Double click the Control Panel icon and select the Add Remove Programs tab Click the Add /Remove Windows Components button and the scroll down to the Management and Monitoring Tools and then click Details Click the Add /Remove Windows Components button and the scroll down to the Management and Monitoring Tools and then click Details Check the box next to Simple Network Management Protocol and click OK Check the box next to Simple Network Management Protocol and click OK

6 Revised Spring 2006 Rudimentary NMS Software Components6 Setup Required for the Visual C++ Program Supplied software was tested in the following environments Supplied software was tested in the following environments Windows NT Workstation Version 4.00 Build 1381 Service Pack 6a Windows NT Workstation Version 4.00 Build 1381 Service Pack 6a Windows 2000 Version 5.0.2195 Service Pack 2 Build 2195 Windows 2000 Version 5.0.2195 Service Pack 2 Build 2195

7 Revised Spring 2006 Rudimentary NMS Software Components7 Building the Sample Visual C++ SNMP Manager Get.bat – Executes single SNMP GET Get.bat – Executes single SNMP GET Set.bat – Executes single SNMP SET Set.bat – Executes single SNMP SET Walk.bat – Walks a specified agent MIB table Walk.bat – Walks a specified agent MIB table Gettraps.bat – Prepares program for receiving traps Gettraps.bat – Prepares program for receiving traps Getnext.bat – Executes single SNMP getNext Getnext.bat – Executes single SNMP getNext snmpdefs.h – Header file snmpdefs.h – Header file snmpmgr.c – C code snmpmgr.c – C code snmpmgr.exe – Executable snmpmgr.exe – Executable

8 Revised Spring 2006 Rudimentary NMS Software Components8 Building the Sample Visual C++ SNMP Manager The Source Code Components snmpdefs.h and snmpmgr.c provide the codebase snmpdefs.h and snmpmgr.c provide the codebase snmpdefs.h is comprised of three main sections snmpdefs.h is comprised of three main sections Symbolic constants for SNMP operations Symbolic constants for SNMP operations Global variables Global variables Available function calls Available function calls

9 Revised Spring 2006 Rudimentary NMS Software Components9 Building the Sample Visual C++ SNMP Manager Structure of the Sample Program Supports the following operations Supports the following operations GET GET GETNEXT GETNEXT SET SET WALK WALK TRAP TRAP

10 Revised Spring 2006 Rudimentary NMS Software Components10 Using the Rudimentary Management System Basic Architecture

11 Revised Spring 2006 Rudimentary NMS Software Components11 Using the Rudimentary Management System An SNMP GET

12 Revised Spring 2006 Rudimentary NMS Software Components12 Using the Rudimentary Management System An SNMP GETNEXT

13 Revised Spring 2006 Rudimentary NMS Software Components13 Using the Rudimentary Management System An SNMP SET

14 Revised Spring 2006 Rudimentary NMS Software Components14 Using the Rudimentary Management System An SNMP TRAP

15 Revised Spring 2006 Rudimentary NMS Software Components15 Using the Rudimentary Management System Combining the Batch Files These batch files can be chained together These batch files can be chained together For example, a SET followed by a GET For example, a SET followed by a GET A real NMS uses this type of logic to create rich sets of functions A real NMS uses this type of logic to create rich sets of functions

16 Revised Spring 2006 Rudimentary NMS Software Components16 Using the Rudimentary Management System A Security Violation Security is increasingly important in network management Security is increasingly important in network management Two actions a remote agent should take upon receiving an incorrect community string Two actions a remote agent should take upon receiving an incorrect community string Discard the message so that no reply occurs Discard the message so that no reply occurs Emit an authenticationFailure(4) trap Emit an authenticationFailure(4) trap

17 Revised Spring 2006 Rudimentary NMS Software Components17 Using the Rudimentary Management System Security Failure and Associated Actions

18 Revised Spring 2006 Rudimentary NMS Software Components18 Using the Rudimentary Management System Security Violations and Retries

19 Revised Spring 2006 Rudimentary NMS Software Components19 A Note On Security Types of network attacks Types of network attacks Hacking Hacking Denial of Service Denial of Service Message interception Message interception Message modification Message modification Message replay Message replay Protection must be provided at all levels Protection must be provided at all levels

20 Revised Spring 2006 Rudimentary NMS Software Components20 The Sample JDMK Java SNMP Manager Evaluation copies of JDMK toolkit can be downloaded from Sun Microsystems Evaluation copies of JDMK toolkit can be downloaded from Sun Microsystems The code used for this example implements the following SNMP requests The code used for this example implements the following SNMP requests GetRequest GetRequest GetNext GetNext

21 Revised Spring 2006 Rudimentary NMS Software Components21 The Sample JDMK Java SNMP Manager Installing JDMK Install the Java Development Kit (JDK). Text example used Java 2 SDK Standard Edition v1.3.1_02 Install the Java Development Kit (JDK). Text example used Java 2 SDK Standard Edition v1.3.1_02 Install JDMK. Text example used JDMK 4.2 for JDK 1.1.8 and for Java 2 Platform Install JDMK. Text example used JDMK 4.2 for JDK 1.1.8 and for Java 2 Platform Run Setup.bat Run Setup.bat Extracts JDMK class files Extracts JDMK class files jdmk42_nt-12.class jdmk42_nt-12.class jdmk42_nt_11.class jdmk42_nt_11.class

22 Revised Spring 2006 Rudimentary NMS Software Components22 The Sample JDMK Java SNMP Manager Installing JDMK (continued) Set environment variables. Text examples shown below Set environment variables. Text examples shown below JDMKPATH=C:\Program Files\SUN\Wjdmk\jdmk4.2\1.2 JDMKPATH=C:\Program Files\SUN\Wjdmk\jdmk4.2\1.2 PATH=%JDMKPATH%\bin;C:\jdk1.3.1_02\bin PATH=%JDMKPATH%\bin;C:\jdk1.3.1_02\bin CLASSPATH=%JDMKPATH%\lib\collections.jar; %JDMKPATH%\lib\jdmkrt.jar; %JDMKPATH%\lib\jdmktk.jar; CLASSPATH=%JDMKPATH%\lib\collections.jar; %JDMKPATH%\lib\jdmkrt.jar; %JDMKPATH%\lib\jdmktk.jar; Ensure SNMP agent has two configured community strings Ensure SNMP agent has two configured community strings public (read-only) public (read-only) private (read-write) private (read-write)

23 Revised Spring 2006 Rudimentary NMS Software Components23 Building the Sample Java Manager mib_II.txt – Contains the definition of the MIB II standard objects mib_II.txt – Contains the definition of the MIB II standard objects SynchronousManager. java – Contains the Java class that sends either and SNMP GET or getNext message SynchronousManager. java – Contains the Java class that sends either and SNMP GET or getNext message Get.bat – Executes single SNMP GET Get.bat – Executes single SNMP GET GetNext.bat – Executes single SNMP getNext GetNext.bat – Executes single SNMP getNext

24 Revised Spring 2006 Rudimentary NMS Software Components24 Building the Sample Java Manager To Build the Java Program Two commands are required Two commands are required mibgen –mo –d. mib_II.txt mibgen –mo –d. mib_II.txt This builds a file called RFC1213_MIBOidTable.java This builds a file called RFC1213_MIBOidTable.java javac –d. *.java javac –d. *.java Creates the bytecode file SynchronousManager.class Creates the bytecode file SynchronousManager.class

25 Revised Spring 2006 Rudimentary NMS Software Components25 Building the Sample Java Manager An SNMP GET

26 Revised Spring 2006 Rudimentary NMS Software Components26 Building the Sample Java Manager An SNMP GETNEXT

27 Revised Spring 2006 Rudimentary NMS Software Components27 Building the Sample Java Manager The Structure of the Synchronous Manager Simple. All of the code is contained in one file that also contains a Java class Simple. All of the code is contained in one file that also contains a Java class Operation Operation Command line options are validated Command line options are validated Required operation is recorded Required operation is recorded API is prepared for making SNMP calls API is prepared for making SNMP calls SNMP request is executed SNMP request is executed Exceptions are caught in a try/catch block Exceptions are caught in a try/catch block

28 Revised Spring 2006 Rudimentary NMS Software Components28 Building the Sample Java Manager The Synchronous Manager JDMK API provide synchronous and asynchronous operation JDMK API provide synchronous and asynchronous operation Production standard NMS needs to be asynchronous. It could be synchronous if it used multiple threads Production standard NMS needs to be asynchronous. It could be synchronous if it used multiple threads Book examples are synchronous for simplicity Book examples are synchronous for simplicity

29 Revised Spring 2006 Rudimentary NMS Software Components29 Building the Sample Java Manager Comparing the Visual C++ and JDMK 4.2 APIs

30 Revised Spring 2006 Rudimentary NMS Software Components30 Ways to Improve the Two Sample Programs Make operations asynchronous Make operations asynchronous Move parameters off the command line or encrypt them Move parameters off the command line or encrypt them Make the programs independent of MIB object specifications Make the programs independent of MIB object specifications Provide a facility for adding support for new MIBS Provide a facility for adding support for new MIBS

31 Revised Spring 2006 Rudimentary NMS Software Components31 Ways to Improve the Two Sample Programs (continued) Allow multiple OIDs in one PDU Allow multiple OIDs in one PDU Move all SNMP API code into a separate module or a separate server Move all SNMP API code into a separate module or a separate server Remove global variables Remove global variables Provide a non-debug version of the C++ program Provide a non-debug version of the C++ program

32 Revised Spring 2006 Rudimentary NMS Software Components32 Ways to Improve the Two Sample Programs (continued) Allow table-based operations Allow table-based operations Provide an external data sourse other than the command line Provide an external data sourse other than the command line Support SNMPv3 Support SNMPv3

33 Revised Spring 2006 Rudimentary NMS Software Components33 Extending the Sample SNMP Programs Utilize distinct or possibly distributed components Utilize distinct or possibly distributed components Fault server Fault server Configuration server Configuration server Accounting server Accounting server Performance server Performance server Security server Security server Straight-forward to build a complex system once basic agent and management entities are in place Straight-forward to build a complex system once basic agent and management entities are in place

34 Revised Spring 2006 Rudimentary NMS Software Components34 Selected Bibliography Microsoft Visual C++ Microsoft Visual C++ Link to Microsoft Visual C++ (http://msdn.microsoft.com/visualc/) Link to Microsoft Visual C++ (http://msdn.microsoft.com/visualc/)http://msdn.microsoft.com/visualc/) Link to SNMP Builder for C++ (http://www.hallogram.com/snmpc++/) Link to SNMP Builder for C++ (http://www.hallogram.com/snmpc++/)http://www.hallogram.com/snmpc++/ Sun Microsystems JDMK Sun Microsystems JDMK Link to Sun Microsystems JDMK (http://www.sun.com/software/jdmk/) Link to Sun Microsystems JDMK (http://www.sun.com/software/jdmk/)http://www.sun.com/software/jdmk/

35 Revised Spring 2006 Rudimentary NMS Software Components35 Summary Two simple programs that interact with Windows NT/2000/XP SNMP agents Two simple programs that interact with Windows NT/2000/XP SNMP agents Visual C++ Visual C++ Java Java SNMP’s process of handling security violations was demonstrated SNMP’s process of handling security violations was demonstrated These programs can be used individually or together as building blocks for more complex systems or a NMS These programs can be used individually or together as building blocks for more complex systems or a NMS

36 Revised Spring 2006 Rudimentary NMS Software Components 36 CIS 516 (Sec 001001) Spring 2006 Professor Anvari This presentation was created by Lee Kriebaum as Project #1 for this class.


Download ppt "Revised Spring 2006 Rudimentary NMS Software Components 1 Rudimentary NMS Software Components (Chapter 7) Network Management, MIBs, and MPLS Stephen B."

Similar presentations


Ads by Google