Network Management System: LIGHT-WEIGHT SNMP Implementation

Chapter 6

  1. Implementation

Initially the Java (JDK 1. 6) and Netbeans IDE 5. 4 should be installed in something. Then your SNMP4J API should be put into the Netbeans collection. The Mysql-JDBC sever should be put into the catalogue for using the databases purpose. Then your SNMP is examined in the same system for working condition, afterwards the destination devices are enabled with SNMP agent and are examined. The system must have the requirements as follows.

6. 1 About NetBeans:

NetBeans IDE is a designer tool for software development systems. The IDE carries a multi-language editor, Profiler, Debugger and also tools for developer requirement. The IDE provides layouts to build Java EE, Java SE, and Java ME applications. A number of technology and frameworks are recognized. The language-aware editor picks up errors when you type and suggest individual with documents popups and smart code conclusion with the velocity and simplicity. To identify and solve problems in your applications, such as deadlocks and storage leaks, the IDE offers a feature wealthy debugger and profiler. When consumer is examining applications, it provides tools for Testing, as well as code analyzers and, in particular, integration with the popular open source Problem discovering tool.

NetBeans is an built in development environment (IDE) for developing primarily with Java, but also with other languages, in particular PHP, C/C++, and HTML5. It is also an application platform platform for Java desktop applications yet others. The NetBeans IDE is written in Java and can operate on Windows, OS X, Linux, Solaris and other systems supporting a compatible JVM. The NetBeans Platform allows applications to be developed from a couple of modular software components called modules NetBeans began in 1996 as Xelfi (phrase play on Delphi), a Java IDE pupil job under the information of the Faculty of Mathematics and Physics at Charles University in Prague. In 1997 Roman Stanєk produced a company across the task and produced commercial versions of the NetBeans IDE until it was bought by Sunlight Microsystems in 1999. Sunshine opensourced the NetBeans IDE in June of the next year. Since then, the NetBeans community has prolonged to grow. This year 2010, Sun (and therefore NetBeans) was purchased by Oracle.

6. 1. 1 NetBeans System:

The NetBeans Platform is a reusable framework for simplifying the introduction of Java Golf swing desktop applications. The NetBeans IDE package for Java SE has what's needed to begin producing NetBeans plugins and NetBeans Program structured applications; no additional SDK is necessary. Applications can install modules dynamically.

Any application can include the Update Centre module to permit users of the application to download agreed upon updates and new features straight into the running program. Reinstalling an upgrade or a new release does not induce users to down load the entire request again. The program offers reusable services common to desktop applications, allowing builders to focus on the reasoning specific to their application. One of the features of the system are:

  • User program management (e. g. selections and toolbars).
  • User settings management.
  • Storage management (conserving and loading any type of data).
  • Window management.
  • Wizard platform (facilitates step-by-step dialogs).
  • NetBeans Visual Catalogue.
  • Integrated development tools.

NetBeans IDE is a free of charge, open-source, cross-platform IDE with built-in-support for Java Programming Language.

6. 1. 2 NetBeans IDE:

NetBeans IDE can be an open-source integrated development environment. NetBeans IDE helps development of all Java software types (Java SE(including JavaFX), Java Me personally, web, EJB and mobile applications) from the box.

Modularity:

All the functions of the IDE are provided by modules. Each module offers a well defined function, such as support for the Java language, editing and enhancing, or support for the CVS versioning system, and SVN. NetBeans contains all the modules necessary for Java development in one download, allowing the user to get started on working immediately. Modules also allow NetBeans to be long. New features, such as support for other development languages, can be added by installing additional modules. For instance, Sun Studio, Sunlight Java Studio Organization, and Sun Java Studio Inventor from Sun Microsystems are predicated on the NetBeans IDE.

6. 2 System selection:

Java is an object oriented application programming language produced by Sunshine Microsystems in the first 1990s. Java software is typically put together to byte code, although compilation to indigenous machine code is also possible. At runtime, byte code is usually either interpreted or put together to native code for execution, although immediate hardware execution of byte code by the java processor chip is also possible. The version of java used to run the application form is JDK1. 6. It is because the APIs used in this application specifies this requirement.

6. 2. 1 Known reasons for Using Java

Java was chosen as the programming language because of its versatility. It really is an object focused program writing language with the next important features.

a) Program Independent-The idea of Write-once-run-anywhere (known as the platform self-employed) is one of quite key feature of java vocabulary that makes java as the most powerful vocabulary. The programs written on one platform can operate on any system provided the program must have the JVM.

b) Simple - There are various features that make the java as a simple dialect. Programs are easy to create and debug because java does not use the pointers explicitly. Java provides the bug free system because of the strong memory space management. It also has the computerized recollection allocation and de-allocation system.

c) Robust - Java gets the strong ram allocation and computerized garbage collection mechanism. It offers the powerful exemption handling and type checking device as compare to other encoding languages. Compiler checks this program whether there are any errors and interpreter assessments any run time error and makes the system secure from crash. Every one of the above features make the java language robust.

d) Distributed - The widely used protocols like HTTP and FTP are developed in java. Internet developers can call functions on these protocols and can get access the files from any remote control machine on the internet rather than writing rules on their local system.

e) Portable - The feature Write-once-run-anywhere makes the java dialect portable provided that the system will need to have interpreter for the JVM. Java also has the typical data size regardless of operating-system or the processor chip. These features make the java as a lightweight language.

f) Active - While performing the java program an individual can get the required files dynamically from an area drive or from a pc thousands of miles away from the consumer just by hooking up with the web.

g) Secure - Java does not use memory guidelines explicitly. All of the programs in java are run under an area known as the sand box. Security manager determines the ease of access options of a school like reading and writing a record to the neighborhood disk. Java uses the general public key encryption system to allow the java applications to transfer online in the secure encrypted form. The byte code verifier bank checks the classes after loading.

h) Performance - Java uses native code utilization, and light-weight process called threads. In the beginning interpretation of byte code led to the sluggish performance but the move forward version of JVM uses the adaptive and just with time compilation strategy that boosts the performance.

i) Multithreaded - Java is also a multithreaded program writing language. Multithreading means a single program having different threads executing independently at the same time. Multithreading programming is an extremely interesting theory in Java. In multithreaded programs not even an individual thread disturbs the execution of other thread.

j) Architecture Neutral - The Java compiler creates byte code instructions, to be easily interpreted on any machine and also to be easily translated into local machine code on the take a flight. The compiler creates an architecture-neutral object extendable to allow a Java software to execute anywhere on the network and then your compiled code is carried out on many processors, given the existence of the Java runtime system.

6. 3 About SNMP:

Simple Network Management Protocol (SNMP) can be an application-layer protocolusedfor exchanging management information between network devices. SNMP is one of the greatly accepted protocols to control and monitor network elements. Most of the professional-grade network elements include bundled SNMP agent.

In the following body the SNMP director, SNMP real estate agents and MIBs (Management information foundation) are the major elements of structures. Here the administrator will send the get-next obtain particular OID (object identifier) to the agent. The SNMP agent will get the info from the MIB for a specific OID and will send the reaction to the supervisor. If any caution subject matter occurs in the agent area, agent will send the trap notifications to administrator.

6. 4 Usage of API:

The SNMP4J API should be added effectively to the tool which the end user is using in the job. It may be eclipse or Netbeans. Simply the APIs which needed in our project are JFreechart, Mysql and the SNMP4J.

JFreechart APIs are added in to the tool by their jar data files, it should contain the JCommon and JFreechart JAR files and the records. These should be added in to the catalogue here. Mysql JDBC Connector JAR documents should be added into the catalogue for using the databases.

6. 5 Modules of task:

A) The following code snippet clarifies how the group of all the Ip and Macintosh personal computer address are retrieved for the given insight switch. That is the all the devices connected to this turn is retrieved and stored.

for (i = 0; i < nodesSwi. getLength(); i++)

Node nodSwi = nodesSwi. item(i);

if (nodSwi. getNodeType() == Node. Aspect_NODE)

Element aspect = (Component) nodSwi;

String MacAddress = xjava. getValue("MacAddr", factor);

String MacAddressEnd = xjava. getValue("MacAddrEnd", component);

out. println("

");

out. println("SL no");

out. println("IP Address");

out. println("MAC Binding");

stroid_final result = MacAddress;

do

stroid_effect = ip. CreateOID(ipAddress, stroid_end result, port);

temp = stroid_effect. substring(stroid_final result. indexOf(". ") + 20, stroid_final result. size());

ipA = temp. substring(temp. indexOf(". ") + 1, temperature. indexOf("="));

MacAddr = temp. substring(temp. indexOf("=") + 2, temperature. length());

stroid_result = stroid_consequence. substring(0, stroid_consequence. indexOf("=") - 1);

if (!stroid_end result. contains(MacAddressEnd))

out. println("" + ++i + "");

out. println("

" + ipA + "

");

 

out. println("" + MacAddr + "");

while (!stroid_final result. contains(MacAddressEnd));

out. println("

");

out. println("

");

out. println("");

B) The next code is typed and examined in the JSP data file. Here the connection discovery component is described and the connection between the jacks and the devices are revealed.

stroid_final result = MacAddress;

do

stroid_end result = ip. CreateOID(ipAddress, stroid_effect, slot);

temp = stroid_final result. substring(stroid_final result. indexOf(". ") + 20, stroid_effect. length());

ipA = temperature. substring(temp. indexOf(". ") + 1, temp. indexOf("="));

MacAddr = temp. substring(temp. indexOf("=") + 2, temp. size());

stroid_consequence = stroid_final result. substring(0, stroid_effect. indexOf("=") - 1);

if (stroid_final result. contains(MacAddress))

//Slot Index

objip_MacResult[index] = new ClsOid_Input_Rslt();

objip_MacResult[index]. Str_Macaddress = MacAddr;

objip_MacResult[index]. Str_Ip = ipA;

m++;

index++;

while (!stroid_effect. contains(MacAddrEnd));

/*TO GET Macintosh personal computer ADDRESS AND Interface COUNT*/

do

stroid_consequence = ip. CreateOID(ipAddress, stroid_final result, interface);

temp = stroid_consequence. substring(stroid_consequence. indexOf("=") + 2, stroid_end result. size());

stroid_final result = stroid_result. substring(0, stroid_consequence. indexOf("=") - 1);

if (stroid_final result. contains(Macintosh personal computer))

//Port Index

count++;

while (!stroid_result. contains(MacEnd));

ClsOid_Suggestions_Rslt[] objMac_PortResult;

objMac_PortResult = new ClsOid_Input_Rslt[count];

/*TO GET Mac pc ADDRESS AND Interface */

do

stroid_effect = ip. CreateOID(ipAddress, stroid_end result, interface);

temp = stroid_consequence. substring(stroid_result. indexOf("=") + 2, stroid_effect. span());

stroid_final result = stroid_end result. substring(0, stroid_end result. indexOf("=") - 1);

if (stroid_final result. contains(Macintosh personal computer))

objMac_PortResult[index] = new ClsOid_Suggestions_Rslt();

objMac_PortResult[index]. Str_Apple pc = temp;

m++;

index++;

if (stroid_end result. contains(PortNum))

if (index > n)

index = (n - 1);

objMac_PortResult[index]. Str_PortNum = temperature;

n++;

index++;

while (!stroid_final result. contains(MacEnd));

HashMap<String, String> map = new HashMap<String, String>();

/* TO GET IPADDRESS, MACADDRESS AND Jacks */

out. println("

");

out. println("IP ADDRESSPORT NUMBER");

for (int Macportcount = 0; Macportcount < objMac_PortResult. size; Macportcount++)

String Macaddress = new String();

String MacPort = new String();

MacPort = objMac_PortResult[Macportcount]. Str_Mac pc;

for (int IpMaccount = 0; IpMaccount < objip_MacResult. span; IpMaccount++)

Macaddress = objip_MacResult[IpMaccount]. Str_Macaddress;

if (MacPort. equals(Macaddress))

if (!map. containsKey(objMac_PortResult[Macportcount]. Str_PortNum))

map. put(objMac_PortResult[Macportcount]. Str_PortNum, objip_MacResult[IpMaccount]. Str_Ip);

else

map. remove(objMac_PortResult[Macportcount]. Str_PortNum);

map. put(objMac_PortResult[Macportcount]. Str_PortNum, "uplink");

Set<Map. Entry<String, String>> arranged = map. entrySet();

for (Map. Entry<String, String> me : set)

out. println("" + me. getValue() + "");

out. println("" + me. getKey() + "");

out. println("

");

out. println("

");

out. println("");

}

C) The following code is to make clear about the device type discovery of the network. The device type and the change type are recognized applying this code.

stroid_effect = Service;

stroid_result = ip. CreateOID(ipAdd[ipCount], stroid_end result, slot);

temp = stroid_result. substring(stroid_consequence. indexOf("=") + 2, stroid_effect. period());

stroid_consequence = stroid_result. substring(0, stroid_result. indexOf("=") - 1);

if (temp. contains("7") || temperature. contains("6"))

out. println("Switch Type :L3 ");

else

out. println("Switch Type :L2 ");

/*code for Type of Switch ENDS*/

/* these devices type finding code begins from here*/

stroid_consequence = name;

stroid_final result = ip. CreateOID(ipAddress, stroid_end result, interface);

if (stroid_consequence. indexOf("=") > 0)

out. println("

");

stroid_consequence = print;

stroid_consequence = ip. CreateOID(ipAddress, stroid_result, dock);

stroid_final result = stroid_consequence. substring(0, stroid_consequence. indexOf("=") - 1);

if (stroid_result. contains(print out))

out. println("

");

out. println("");

else

stroid_consequence = Numberofuser;

stroid_effect = ip. CreateOID(ipAddress, stroid_final result, interface);

stroid_effect = stroid_end result. substring(0, stroid_effect. indexOf("=") - 1);

if (stroid_effect. contains(Numberofuser))

out. println("

");

out. println("");

else

out. println("

");

out. println("");

stroid_final result = name;

stroid_effect = ip. CreateOID(ipAddress, stroid_effect, dock);

temp = stroid_result. substring(stroid_effect. indexOf("=") + 2, stroid_end result. duration());

out. println("

" + temp + "

");

out. println("

");

out. println("");

6. 6 Execution part:

Here JDK 1. 6 with Netbeans 6. 9. 1 tool can be used, SNMP API(SNMP4J) [11], and Jfreechart for visual representation. The machine is developed and tested on Red Hat Linux 5. 4 operating system with 2. 80-GHz, Intel Pentium 4 CPU with 512 MB RAM.

The way is analyzed in the subnet of a network or can say that office of an company. With this subnet found variety of devices connected to the switches, their details as well as the connection between them. These are examined multiple times and literally verified. The condition we faced is the fact some devices are having multiple Mac pc Addresses so that it is problematic for the system to find the connectivity of the device to interface. Except this everything is working well enough. The major thing done is when these devices is not helping for SNMP then attempted to get the facts of this system by ICMP echo requests.

The time taken to discover the devices connected to switch are weighed against the previous research. And it is very less in comparison to other research. In very short time nearly 8-9 mere seconds we can discover all the devices linked to the swap in the network.

  • More than 7,000 students prefer us to work on their projects
  • 90% of customers trust us with more than 5 assignments
Special
price
£5
/page
submit a project

Latest posts

Read more informative topics on our blog
Shiseido Company Limited Is A Japanese Makeup Company Marketing Essay
Marketing Strength: Among the main talents of Shiseido is its high quality products. To be able to satisfy customers, the company invested a great deal...
Fail To Plan You Plan To Fail Management Essay
Management This report will concentrate on two aspects of project management, their importance within the overall project management process. The report...
Waste To Prosperity Program Environmental Sciences Essay
Environmental Sciences Urban and rural regions of India produce very much garbage daily and hurting by various kinds of pollutions which are increasing...
Water POLLUTING OF THE ENVIRONMENT | Analysis
Environmental Studies Pollution Introduction Many people across the world can remember having walked on the street and seen smoke cigars in the air or...
Soft System Methodology
Information Technology Andrzej Werner Soft System Methodology can be described as a 7-step process aimed to help provide a solution to true to life...
Strategic and Coherent methods to Recruiting management
Business Traditionally HRM has been regarded as the tactical and coherent method of the management of the organizations most appreciated assets - the...
Enterprise Rent AN AUTOMOBILE Case Analysis Business Essay
Commerce With a massive network of over 6,000 local rental locations and 850,000 automobiles, Organization Rent-A-Car is the greatest rental car company...
The Work OF ANY Hotels Front Office Staff Travel and leisure Essay
Tourism When in a hotel there are careers for everyone levels where in fact the front office manager job and responsibilities,assistant professionals...
Strategy and international procedures on the Hershey Company
Marketing The Hershey Company was incorporated on October 24, 1927 as an heir to an industry founded in 1894 by Milton S. Hershey fiscal interest. The...
Check the price
for your project
we accept
Money back
guarantee
100% quality