CN105207803B - A kind of method and system of the trap message of the multiple network elements of simulation - Google Patents

A kind of method and system of the trap message of the multiple network elements of simulation Download PDF

Info

Publication number
CN105207803B
CN105207803B CN201510504588.9A CN201510504588A CN105207803B CN 105207803 B CN105207803 B CN 105207803B CN 201510504588 A CN201510504588 A CN 201510504588A CN 105207803 B CN105207803 B CN 105207803B
Authority
CN
China
Prior art keywords
network element
analogue
under test
ip address
mac address
Prior art date
Application number
CN201510504588.9A
Other languages
Chinese (zh)
Other versions
CN105207803A (en
Inventor
蔡磊磊
李�杰
Original Assignee
华讯方舟科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华讯方舟科技有限公司 filed Critical 华讯方舟科技有限公司
Priority to CN201510504588.9A priority Critical patent/CN105207803B/en
Publication of CN105207803A publication Critical patent/CN105207803A/en
Application granted granted Critical
Publication of CN105207803B publication Critical patent/CN105207803B/en

Links

Abstract

The present invention provides a kind of method and system of the trap message of the multiple network elements of simulation, is related to field of communication technology.This method includes:The configuration file for reading network under test management system, to obtain and preserve the configuration parameter that network under test manages system;The command parameter that user is inputted by pseudo-terminal is received and preserved, while reading the MAC Address and IP address of pseudo-terminal, and generates the MAC Address and IP address of analogue network element according to pre-defined rule according to the MAC Address and IP address of command parameter and pseudo-terminal;The Snmp trap messages of analogue network element are assembled according to the MAC Address and IP address of above-mentioned configuration parameter and analogue network element using raw socket programming techniques;Function being sent by raw socket, Snmp trap messages being sent to network under test management system, network under test management system is made to be tested for the property according to Snmp trap messages.The present invention can realize that really simulate multiple network elements sends Snmp trap messages to webmaster to be measured, and networking test, the effective reliability and stability for examining webmaster can be fast, easily carried out with webmaster.

Description

A kind of method and system of the trap message of the multiple network elements of simulation

Technical field

The invention belongs to the method for field of communication technology more particularly to a kind of trap message of the multiple network elements of simulation and it is System.

Background technology

SNMP (Simple Network Management Protocol, Simple Network Management Protocol) is proposed earliest One of Network Management Protocol, due to its simplicity, it is widely used and supports once releasing.Currently, SNMP has become For the working stamndard in field of network management, most of Network Management System and platform are all based on snmp protocol to realize.

With the extensive use of snmp protocol, then NSM (Network Management System, a network management System) management network element it is thousands of or even hundreds thousand of, then in existing net application environment, these network element at any times Warning information is generated, and NMS is sent to by Trap message, at this moment NMS must have while handle hundreds thousand of reported by network elements The ability of Trap message, therefore, in order to ensure being smoothed out for network management, when NMS comes into operation again, it is necessary to its performance into Row test.Agent (agency) on NMS and managed element carries out the joint debugging stage, it tends to be difficult to dispose a large-scale survey The problems such as test ring border, in addition to fund, place the problems such as, are intricate there is also the connection relation of real network.Therefore, city at present A set of analog simulation testing tool is developed to replace various network elements realizations pair in actual environment in the joint debugging stage on The performance test of Network Management System.

But since snmp protocol belongs to application layer protocol, and according to TCP/IP (Transmission Control Protocol/Internet Protocol, transmission control protocol/Internet Protocol) procotol stack mechanism, transport layer And its mechanism below is provided by kernel, application layer is provided by consumer process, and the analog simulation tool operates in a PC On (Personal Computer, personal computer) machine, therefore the IP of network layer heads are the TCP/IP network protocol stack groups by kernel Dress, transmitted Snmp trap are (when the trap message that managed devices report, i.e. managed devices break down or change Proactive notification) IP address in message is all identical, although then the analog simulation tool can send Snmp with analogue network element Trap message, but can only also simulate a network element and send Snmp trap message, and multiple network elements cannot be simulated simultaneously to network pipe Reason system sends Snmp trap message.Therefore, current analog simulation tool has significant limitation, can not simulate true Test environment.For this problem, traditional solution is to utilize the Variable-Bindings pair in Snmp trap message formats, definition Privately owned definition message format, as provided second Variable-Bindings in Snmp trap messages to the IP address of expression network element, NMS After collecting this message, second Variable-Bindings pair is parsed, the IP address of network element is obtained, according still further to process flow processing.The method Also there is the Snmp trap message of certain limitation, essence or a network element, can not really receive the multiple network elements of complete simulation Send out the flow of snmp message.

To sum up, multiple network elements can not really be simulated by still having in the prior art lacks to what Network Management System was tested It falls into.

Invention content

The embodiment of the present invention is designed to provide a kind of method and system of the trap message of the multiple network elements of simulation, it is intended to It solves the problems, such as existing in the prior art can not really simulate multiple network elements and test Network Management System.

The embodiment of the present invention is achieved in that a kind of method of the trap message of the multiple network elements of simulation, including:

The configuration file for reading network under test management system, to obtain the configuration parameter that the network under test manages system;

The command parameter that user is inputted by pseudo-terminal is received and preserves, while with reading the MAC of the pseudo-terminal Location and IP address, and generated according to pre-defined rule according to the MAC Address and IP address of the command parameter and the pseudo-terminal The MAC Address and IP address of analogue network element;

The configuration parameter of system and the simulation net are managed according to the network under test using raw socket programming techniques The MAC Address and IP address of member assemble the Snmp trap messages of the analogue network element;

Function is sent by raw socket, and the Snmp trap messages are sent to the network under test management system, So that the network under test management system is tested for the property according to the Snmp trap messages.

In the method for the trap message of the multiple network elements of simulation described in the embodiment of the present invention, the reading network under test pipe The configuration file of reason system, the configuration parameter to obtain and preserve the network under test management system specifically include:

The configuration file for reading the network under test management system manages system to obtain and preserve the network under test Version number, community and the Snmp of snmp protocol used by MAC Address, IP address and the network under test management system Trap Variable-Bindings pair.

It is described to read the simulation eventually in the method for the trap message of the multiple network elements of simulation described in the embodiment of the present invention The MAC Address and IP address at end, and according to the MAC Address and IP address of the command parameter and the pseudo-terminal according to predetermined Rule generates the MAC Address of analogue network element and IP address specifically includes:

The number and analogue network element of analogue network element needed for user are inputted according to the input prompt message of the pseudo-terminal The period of Snmp trap messages is sent, while reading the MAC Address and IP address of the pseudo-terminal;

Using the number of analogue network element needed for user in the command parameter as the upper limit, with the MAC Address of the pseudo-terminal For plot, adds up and obtain the MAC Address of analogue network element, and the MAC Address of the analogue network element is saved in analogue network element information In list;

Using the number of analogue network element needed for user in the command parameter as the upper limit, the IP address with the pseudo-terminal is Plot adds up and obtains the IP address of analogue network element, and the IP address of the analogue network element is saved in the analogue network element information In list.

It is described using raw socket in the method for the trap message of the multiple network elements of simulation described in the embodiment of the present invention Programming technique manages the configuration parameter of system according to the network under test and the MAC Address and IP address of the analogue network element assemble The Snmp trap messages of the analogue network element specifically include:

Raw socket are created, and the option of socket in raw socket is set, so that raw socket manual handles The packet header IP for the data to be sent;

It is simulated according in the MAC Address of network under test management system and IP address and the analogue network element information list The MAC Address and IP address of network element assemble the Snmp trap messages of the analogue network element ETH heads, IP, UDP and SNMP message bodies.

It is described to pass through raw socket in the method for the trap message of the multiple network elements of simulation described in the embodiment of the present invention It sends function and the Snmp trap messages is sent to the network under test management system, so that network under test management system System is tested for the property according to the Snmp trap messages to be specifically included:

It the period that Snmp trap messages are sent according to the analogue network element input by user, will using the socket id The Snmp trap messages are sent to the network under test management system, so that the network under test manages system according to Snmp trap messages are tested for the property.

The another object of the embodiment of the present invention is to provide a kind of system of the trap message of the multiple network elements of simulation, including:

Initialization module manages the configuration file of system for reading network under test, to obtain the network under test management The configuration parameter of system;

Generation module is acted on behalf of, the command parameter inputted by pseudo-terminal for receiving and preserving user, while reading institute The MAC Address and IP address of pseudo-terminal are stated, and according to the MAC Address and IP address of the command parameter and the pseudo-terminal The MAC Address and IP address of analogue network element are generated according to pre-defined rule;

Message assembles module, the configuration for managing system according to the network under test using raw socket programming techniques The MAC Address and IP address of parameter and the analogue network element assemble the Snmp trap messages of the analogue network element;

Message sending module, for pass through raw socket send function the Snmp trap messages are sent to it is described Network under test manages system, so that network under test management system is tested for the property according to the Snmp trap messages.

In the system of the trap message of the multiple network elements of simulation described in the embodiment of the present invention, the initialization module is specific For:

The configuration file for reading the network under test management system manages system to obtain and preserve the network under test Version number, community and the Snmp of snmp protocol used by MAC Address, IP address and the network under test management system Trap Variable-Bindings pair.

It is described to act on behalf of generation module tool in the system of the trap message of the multiple network elements of simulation described in the embodiment of the present invention Body includes:

User input unit, for inputting analogue network element needed for user according to the input prompt message of the pseudo-terminal Number and analogue network element send the period of Snmp trap messages, while with reading MAC Address and the IP of the pseudo-terminal Location;

Analogue network element MAC Address generation unit, for being with the number of analogue network element needed for user in the command parameter The upper limit adds up using the MAC Address of the pseudo-terminal as plot and obtains the MAC Address of analogue network element, and by the analogue network element MAC Address be saved in analogue network element information list;

Analogue network element IP address generation unit, for being with the number of analogue network element needed for user in the command parameter Limit adds up using the IP address of the pseudo-terminal as plot and obtains the IP address of analogue network element, and by the IP of the analogue network element Address is saved in the analogue network element information list.

In the system of the trap message of the multiple network elements of simulation described in the embodiment of the present invention, the message assembling module tool Body includes:

For creating raw socket, and the option of socket in raw socket is arranged in raw socket units, so that The packet header IP of the raw socket manual handles data to be sent;

Module units, the MAC Address and IP address for managing system according to the network under test and the analogue network element The MAC Address of analogue network element and IP address assemble the ETH for the Snmp trap messages that the analogue network element is sent in information list Head, IP, UDP and SNMP message bodies.

In the system of the trap message of the multiple network elements of simulation described in the embodiment of the present invention, the message sending module tool Body includes:

Socket id acquiring units, for obtaining the socket id for sending raw socket;

Transmission unit in the period for sending Snmp trap messages according to the analogue network element input by user, uses institute It states socket id and the Snmp trap messages is sent to the network under test management system, so that the network under test management System is tested for the property according to the Snmp trap messages.

Implement the method and system of the trap message of the multiple network elements of simulation provided in an embodiment of the present invention with beneficial below Effect:

Configuration parameter of the embodiment of the present invention due to managing system according to network under test using raw socket programming techniques The MAC Address and IP address oneself of the analogue network element generated in advance according to pre-defined rule assemble the Snmp of the analogue network element Trap messages, so as to make user change MAC Address and IP address in Snmp trap messages, therefore, it is possible to realize really Simulate multiple network elements to network under test management system send Snmp trap messages, can fast, easily with network under test management System carries out networking test, the effective reliability and stability for examining network under test management system.

Description of the drawings

Fig. 1 is the specific implementation flow chart of the method for the trap message of the multiple network elements of simulation provided in an embodiment of the present invention;

Fig. 2 be the trap message of the multiple network elements of simulation provided in an embodiment of the present invention method in S102 specific implementation stream Cheng Tu;

Fig. 3 be the trap message of the multiple network elements of simulation provided in an embodiment of the present invention method in S103 specific implementation stream Cheng Tu;

Fig. 4 is the structure diagram of the system of the trap message of the multiple network elements of simulation provided in an embodiment of the present invention.

Specific implementation mode

In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.

Fig. 1 shows the specific implementation stream of the method for the trap message of the multiple network elements of simulation provided in an embodiment of the present invention Journey.It is shown in Figure 1, the method for the trap message of the multiple network elements of simulation provided in an embodiment of the present invention, including:

In S101, the configuration file of network under test management system is read, system is managed to obtain the network under test Configure parameter.

In embodiments of the present invention, know that the network under test manages the configuration parameter of system by user first, it is described to match It includes MAC (Media Access Control, media access control) address, IP address and the network under test pipe to set parameter The version number, community of snmp protocol used by reason system and Snmp trap Variable-Bindings pair, then by the configuration parameter It is written in the configuration file of the network under test management system and preserves;The network under test pipe is finally read by pseudo-terminal The configuration file of reason system manages the MAC Address of system, IP address and described to be measured to obtain and preserve the network under test Version number, community and the Snmp trap Variable-Bindings pair of snmp protocol used by Network Management System.

In S102, the command parameter that user is inputted by pseudo-terminal is received and preserved, while reading the simulation eventually The MAC Address and IP address at end, and according to the MAC Address and IP address of the command parameter and the pseudo-terminal according to predetermined Rule generates the MAC Address and IP address of analogue network element.

Shown in Figure 2 Fig. 2 shows the specific implementation flow of S102, S102 is specifically included:

In S201, according to the input prompt message of the pseudo-terminal input user needed for analogue network element number and Analogue network element sends the period of Snmp trap messages, while reading the MAC Address and IP address of the pseudo-terminal;

In S202, using the number of analogue network element needed for user in the command parameter as the upper limit, with the pseudo-terminal MAC Address be plot, add up and obtain the MAC Address of analogue network element, and the MAC Address of the analogue network element is saved in simulation In net element information list;

In S203, using the number of analogue network element needed for user in the command parameter as the upper limit, with the pseudo-terminal IP address be plot, add up and obtain the IP address of analogue network element, and the IP address of the analogue network element is saved in the mould In quasi- net element information list.

In embodiments of the present invention, pseudo-terminal can be PC terminals, and user can prompt to believe according to the input of PC terminals Breath sends the period of Snmp trap messages by the number and analogue network element of the keyboard input simulation network element of PC terminals, if user The period that the analogue network element of input sends Snmp trap messages is 0, then it represents that the analogue network element can be recycled uninterruptedly to waiting for survey grid Network manages system and sends Snmp trap messages.

In S103, configuration parameter and the institute of system are managed according to the network under test using raw socket programming techniques State the Snmp trap that the MAC Address of analogue network element and IP address described in analogue network element information list assemble the analogue network element Message.

Fig. 3 shows the specific implementation flow of S103, and shown in Figure 3, S103 is specifically included:

In S301, create raw socket, and the option of socket in raw socket is set, so that raw socket The packet header IP of the manual handle data to be sent.

In embodiments of the present invention, socket function creation raw socket are directly used, setsockopt is then used The option of socket is set, the IP_HDRINCL in socket options is set as true, so that raw socket manual handles are wanted The packet header IP of the data of transmission.

In S302, the MAC Address of system and the MAC of IP address and the analogue network element are managed according to the network under test Address and IP address assemble the ETH heads of the Snmp trap messages of the analogue network element, IP, UDP and SNMP message bodies.

In embodiments of the present invention, the ETH heads for assembling the Snmp trap messages of analogue network element specifically include:With the mould The MAC Address of analogue network element is source address in quasi- net element information list, assemble it is ETH described in source MAC;It is waited for described Survey Network Management System MAC Address be purpose address, assemble it is ETH described in target MAC (Media Access Control) address;Assemble the ETH heads In type field, be fixed as 0X0880, wherein 0X0880 indicates that network layer protocol is IP agreement.

In embodiments of the present invention, the IP heads for assembling the Snmp trap messages of analogue network element specifically include:With the simulation In net element information list the IP address of analogue network element be source address, assemble it is IP described in source IP address;Survey grid is waited for described Network manage system IP address be purpose address, assemble it is IP described in purpose IP address;Assemble it is IP described in type Field is fixed to be 17, wherein 17 indicate that transport layer protocol is udp protocol;Assemble it is IP described in protocol version With other fields;Calculate it is IP described in verification and, and assemble this field.

In embodiments of the present invention, the UDP heads for assembling the Snmp trap messages of analogue network element specifically include:Described in assembling UDP ports are fixed and are more than 1024 for X, wherein X;UDP of the destination interface is assembled, it is 162 to be fixed, Wherein 162 indicate the ports Snmp trap;Length field in assembling UDP;Calculate it is UDP described in verification and, and assemble This field.

The Snmp trap message bodies of assembling analogue network element specifically include in embodiments of the present invention:According to what is got The version number of snmp protocol and community assemble SNMP headings;Assemble the Trap heads of SNMP messages;According to the Snmp of acquisition Snmp trap Variable-Bindings pair of the trap Variable-Bindings to assembling Snmp trap message bodies.

In S104, function is sent by raw socket, the Snmp trap messages are sent to the network under test Management system, so that network under test management system is tested for the property according to the Snmp trap messages.

In embodiments of the present invention, it first has to obtain the socket id for sending raw socket;Then it is inputted according to user The analogue network element send Snmp trap messages period, the Snmp trap messages are sent out using the socket id It send to the network under test and manages system, so that the network under test manages system according to the Snmp trap message progressive It can test.

The method of the trap message of the multiple network elements of simulation provided in an embodiment of the present invention using raw socket due to being programmed Technology according to network under test manage system configuration parameter and in advance according to pre-defined rule generation analogue network element MAC Address and IP address oneself assembles the Snmp trap messages of the analogue network element, so as to make user change in Snmp trap messages MAC Address and IP address, therefore, it is possible to realize that really simulate multiple network elements sends Snmp trap to network under test management system Message fast, easily can carry out networking test with network under test management system, effective that network under test is examined to manage system Reliability and stability.

Fig. 4 shows the structure diagram of the system of the trap message of the multiple network elements of simulation provided in an embodiment of the present invention, should The method that system is used to run the trap message for the multiple network elements of simulation that above-mentioned Fig. 1~embodiment illustrated in fig. 3 provides.For the ease of Illustrate to illustrate only and the relevant part of the embodiment of the present invention.

It is shown in Figure 4, the system of the trap message of the multiple network elements of simulation provided in an embodiment of the present invention, including:

Initialization module 1 manages the configuration file of system for reading network under test, to obtain the network under test management The configuration parameter of system;

Generation module 2 is acted on behalf of, the command parameter inputted by pseudo-terminal for receiving and preserving user, while reading institute The MAC Address and IP address of pseudo-terminal are stated, and according to the MAC Address and IP address of the command parameter and the pseudo-terminal The MAC Address and IP address of analogue network element are generated according to pre-defined rule;

Message assembles module 3, for managing matching for system according to the network under test using raw socket programming techniques It sets the MAC Address of parameter and the analogue network element and IP address assembles the Snmp trap messages of the analogue network element;

Message sending module 4, for pass through raw socket send function the Snmp trap messages are sent to it is described Network under test manages system, so that network under test management system is tested for the property according to the Snmp trap messages.

Optionally, the initialization module 1 is specifically used for:

The configuration file for reading the network under test management system manages system to obtain and preserve the network under test Version number, community and the Snmp of snmp protocol used by MAC Address, IP address and the network under test management system Trap Variable-Bindings pair.

Optionally, the generation module 2 of acting on behalf of specifically includes:

User input unit 21, for inputting analogue network element needed for user according to the input prompt message of the pseudo-terminal Number and analogue network element send periods of Snmp trap messages, while with reading MAC Address and the IP of the pseudo-terminal Location;

Analogue network element MAC Address generation unit 22, for the number of analogue network element needed for user in the command parameter It for the upper limit, using the MAC Address of the pseudo-terminal as plot, adds up and obtains the MAC Address of analogue network element, and by the simulation net The MAC Address of member is saved in analogue network element information list;

Analogue network element IP address generation unit 23, for being with the number of analogue network element needed for user in the command parameter The upper limit adds up using the IP address of the pseudo-terminal as plot and obtains the IP address of analogue network element, and by the analogue network element IP address is saved in the analogue network element information list.

Optionally, the message assembling module 3 specifically includes:

For creating raw socket, and the option of socket in raw socket is arranged in raw socket units 31, with Make the packet header IP of the raw socket manual handles data to be sent;

Module units 32, the MAC Address and IP address for managing system according to the network under test and the simulation net In metamessage list the MAC Address of analogue network element and IP address assemble the Snmp trap messages of the analogue network element ETH heads, IP, UDP and SNMP message bodies.

Optionally, the message sending module 4 specifically includes:

Socket id acquiring units 41, for obtaining the socket id for sending raw socket;

Transmission unit 42 in the period for sending Snmp trap messages according to the analogue network element input by user, uses The Snmp trap messages are sent to the network under test and manage system by the socket id, so that the network under test pipe Reason system is tested for the property according to the Snmp trap messages.

It should be noted that modules in above system, due to being based on same design with the method for the present invention embodiment, The technique effect brought is identical as the method for the present invention embodiment, and particular content can be found in the narration in the method for the present invention embodiment, Details are not described herein again.

The system of the trap message of the multiple network elements of simulation provided in an embodiment of the present invention, also due to using raw socket Programming technique is according to the configuration parameter of network under test management system and the MAC of the analogue network element generated in advance according to pre-defined rule Location and IP address oneself assemble the Snmp trap messages of the analogue network element, so as to make user change Snmp trap messages In MAC Address and IP address, therefore, it is possible to realize really simulate multiple network elements to network under test management system send Snmp Trap messages fast, easily can carry out networking test with network under test management system, effective to examine network under test management The reliability and stability of system.

The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention All any modification, equivalent and improvement etc., should all be included in the protection scope of the present invention made by within refreshing and principle.

Claims (10)

1. a kind of method of the trap message of the multiple network elements of simulation, which is characterized in that including:
The configuration file for reading network under test management system, to obtain and preserve the configuration ginseng that the network under test manages system Number;
Receive and preserve the command parameter that user is inputted by pseudo-terminal, at the same read the pseudo-terminal MAC Address and IP address, and generated and simulated according to pre-defined rule according to the MAC Address and IP address of the command parameter and the pseudo-terminal The MAC Address and IP address of network element;
The configuration parameter of system and the analogue network element are managed according to the network under test using raw socket programming techniques MAC Address and IP address assemble the Snmp trap messages of the analogue network element;
Function is sent by raw socket, and the Snmp trap messages are sent to the network under test management system, so that The network under test management system is tested for the property according to the Snmp trap messages;
Wherein, described to be generated according to pre-defined rule according to the MAC Address and IP address of the command parameter and the pseudo-terminal The MAC Address and IP address of analogue network element include:
Using the number of analogue network element needed for user in the command parameter as the upper limit, using the MAC Address of the pseudo-terminal as base It adds up and obtains the MAC Address of analogue network element, and the MAC Address of the analogue network element is saved in analogue network element information list in location In;
Using the number of analogue network element needed for user in the command parameter as the upper limit, using the IP address of the pseudo-terminal as base Location adds up and obtains the IP address of analogue network element, and the IP address of the analogue network element is saved in the analogue network element information and is arranged In table.
2. the method for simulating the trap message of multiple network elements as described in claim 1, which is characterized in that the reading waits for survey grid Network manages the configuration file of system, and the configuration parameter to obtain and preserve the network under test management system specifically includes:
The configuration file for reading the network under test management system, to obtain and preserve the MAC that the network under test manages system Version number, community and the Snmp trap of snmp protocol used by address, IP address and the network under test management system Variable-Bindings pair.
3. the method for simulating the trap message of multiple network elements as claimed in claim 2, which is characterized in that described to read the mould The MAC Address and IP address of quasi- terminal specifically include:
The number of analogue network element and analogue network element needed for user are inputted according to the input prompt message of the pseudo-terminal to send The period of Snmp trap messages, while reading the MAC Address and IP address of the pseudo-terminal.
4. the method for simulating the trap message of multiple network elements as claimed in claim 3, which is characterized in that described to use raw Socket programming techniques are according to the configuration parameter of network under test management system and the MAC Address of the analogue network element and IP The Snmp trap messages that location assembles the analogue network element specifically include:
Raw socket are created, and the option of socket in raw socket is set, so that raw socket manual handles will be sent out The packet header IP for the data sent;
According to analogue network element in the MAC Address of network under test management system and IP address and the analogue network element information list MAC Address and IP address assemble the analogue network element Snmp trap messages ETH heads, IP, UDP and SNMP report Style.
5. the method for simulating the trap message of multiple network elements as claimed in claim 4, which is characterized in that described to pass through raw Socket sends function and the Snmp trap messages is sent to the network under test management system, so that the network under test Management system is tested for the property according to the Snmp trap messages and specifically includes:
Obtain the socket id for sending raw socket;
It the period that Snmp trap messages are sent according to the analogue network element input by user, will be described using the socket id Snmp trap messages are sent to the network under test management system, so that the network under test manages system according to the Snmp Trap messages are tested for the property.
6. a kind of system of the trap message of the multiple network elements of simulation, which is characterized in that including:
Initialization module manages the configuration file of system for reading network under test, and system is managed to obtain the network under test Configuration parameter;
Generation module is acted on behalf of, the command parameter inputted by pseudo-terminal for receiving and preserving user, while reading the mould The MAC Address and IP address of quasi- terminal, and according to the MAC Address and IP address of the command parameter and the pseudo-terminal according to Pre-defined rule generates the MAC Address and IP address of analogue network element;
Message assembles module, the configuration parameter for managing system according to the network under test using raw socket programming techniques The Snmp trap messages of the analogue network element are assembled with the MAC Address and IP address of the analogue network element;
Message sending module, for pass through raw socket send function the Snmp trap messages are sent to it is described to be measured Network Management System, so that network under test management system is tested for the property according to the Snmp trap messages;
The generation module of acting on behalf of includes:
Analogue network element MAC Address generation unit is used for using the number of analogue network element needed for user in the command parameter as the upper limit, Using the MAC Address of the pseudo-terminal as plot, adds up and obtain the MAC Address of analogue network element, and by the MAC of the analogue network element Address is saved in analogue network element information list;
Analogue network element IP address generation unit is used for using the number of analogue network element needed for user in the command parameter as the upper limit, Using the IP address of the pseudo-terminal as plot, adds up and obtain the IP address of analogue network element, and by the IP of the analogue network element Location is saved in the analogue network element information list.
7. the system for simulating the trap message of multiple network elements as claimed in claim 6, which is characterized in that the initialization module It is specifically used for:
The configuration file for reading the network under test management system, to obtain and preserve the MAC that the network under test manages system Version number, community and the Snmp trap of snmp protocol used by address, IP address and the network under test management system Variable-Bindings pair.
8. the system for simulating the trap message of multiple network elements as claimed in claim 7, which is characterized in that the agency generates mould Block further includes:
User input unit, the number for inputting analogue network element needed for user according to the input prompt message of the pseudo-terminal And analogue network element sends the period of Snmp trap messages, while reading the MAC Address and IP address of the pseudo-terminal.
9. the system for simulating the trap message of multiple network elements as claimed in claim 8, which is characterized in that the message group is die-filling Block specifically includes:
For creating raw socket, and the option of socket in raw socket is arranged, so that raw in raw socket units The packet header IP of the socket manual handles data to be sent;
Module units, the MAC Address and IP address for managing system according to the network under test and the analogue network element information In list the MAC Address of analogue network element and IP address assemble the Snmp trap messages of the analogue network element ETH heads, IP, UDP and SNMP message bodies.
10. the system for simulating the trap message of multiple network elements as claimed in claim 9, which is characterized in that the message is sent Module specifically includes:
Socket id acquiring units, for obtaining the socket id for sending raw socket;
Transmission unit, the period for sending Snmp trap messages according to the analogue network element input by user, using described The Snmp trap messages are sent to the network under test and manage system by socket id, so that network under test management system System is tested for the property according to the Snmp trap messages.
CN201510504588.9A 2015-08-17 2015-08-17 A kind of method and system of the trap message of the multiple network elements of simulation CN105207803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510504588.9A CN105207803B (en) 2015-08-17 2015-08-17 A kind of method and system of the trap message of the multiple network elements of simulation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510504588.9A CN105207803B (en) 2015-08-17 2015-08-17 A kind of method and system of the trap message of the multiple network elements of simulation

Publications (2)

Publication Number Publication Date
CN105207803A CN105207803A (en) 2015-12-30
CN105207803B true CN105207803B (en) 2018-09-21

Family

ID=54955256

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510504588.9A CN105207803B (en) 2015-08-17 2015-08-17 A kind of method and system of the trap message of the multiple network elements of simulation

Country Status (1)

Country Link
CN (1) CN105207803B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106357457B (en) * 2016-10-31 2019-10-25 瑞斯康达科技发展股份有限公司 A kind of alarm test method, apparatus and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1773941A (en) * 2004-11-11 2006-05-17 中兴通讯股份有限公司 Performance test method and apparatus for identification service
CN1992635A (en) * 2005-12-27 2007-07-04 中兴通讯股份有限公司 Method of simulating SNMP network element and performing network management system test with the network element
CN102740342A (en) * 2012-06-08 2012-10-17 大唐移动通信设备有限公司 Network management equipment performance simulation test method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9043130B2 (en) * 2011-11-16 2015-05-26 Flextronics Ap, Llc Object sensing (pedestrian avoidance/accident avoidance)

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1773941A (en) * 2004-11-11 2006-05-17 中兴通讯股份有限公司 Performance test method and apparatus for identification service
CN1992635A (en) * 2005-12-27 2007-07-04 中兴通讯股份有限公司 Method of simulating SNMP network element and performing network management system test with the network element
CN102740342A (en) * 2012-06-08 2012-10-17 大唐移动通信设备有限公司 Network management equipment performance simulation test method and system

Also Published As

Publication number Publication date
CN105207803A (en) 2015-12-30

Similar Documents

Publication Publication Date Title
Girod et al. A system for simulation, emulation, and deployment of heterogeneous sensor networks
Mahadevan et al. Orbis: rescaling degree correlations to generate annotated internet topologies
Ahrenholz Comparison of CORE network emulation platforms
Mendling et al. From inter-organizational workflows to process execution: Generating BPEL from WS-CDL
Pras et al. Key research challenges in network management
US7631227B2 (en) Automated testing and control of networked devices
Li et al. WebProphet: Automating Performance Prediction for Web Services.
Gibb et al. NetFPGA—an open platform for teaching how to build gigabit-rate network switches and routers
Carneiro et al. FlowMonitor: a network monitoring framework for the network simulator 3 (NS-3)
US20110282642A1 (en) Network emulation in manual and automated testing tools
Watson et al. NetFPGA: A tool for network research and education
Baumgart et al. OverSim: A scalable and flexible overlay framework for simulation and real network applications
Fisher et al. Open hardware: A role to play in wireless sensor networks?
CN1722681A (en) Portable distributed application framework
Kirichek et al. Internet of things laboratory test bed
Bauer et al. ExperimenTor: A Testbed for Safe and Realistic Tor Experimentation.
Rahman et al. Network modelling and simulation tools
US7555421B1 (en) Device emulation for testing data network configurations
Carneiro NS-3: Network simulator 3
US20110142057A1 (en) Interfacing Real and Virtual Networks in Hardware-in-the-Loop (HITL) Simulations
Nayyar et al. A comprehensive review of simulation tools for wireless sensor networks (WSNs)
Kristensen et al. Specification and validation of an edge router discovery protocol for mobile ad hoc networks
Yang et al. SNAMP: A multi-sniffer and multi-view visualization platform for wireless sensor networks
US8667119B2 (en) System and method for re-generating packet load for load test
Prete et al. Simulation in an SDN network scenario using the POX Controller

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
COR Change of bibliographic data
CB02 Change of applicant information

Address after: 518000 Guangdong city of Shenzhen province Baoan District Xixiang Bao Tian Yi Lu Chen Tian Industrial District 37 Building 1 floor

Applicant after: Shenzhen Huaxunark Technology Co., Ltd.

Applicant after: SHENZHEN HUAXUN FANGZHOU SOFTWARE INFORMATION SCIENCE & TECHNOLOGY CO., LTD.

Address before: 518000 Guangdong city of Shenzhen province Baoan District Xixiang Bao Tian Yi Lu Chen Tian Industrial District 37 Building 1 floor

Applicant before: Shenzhen City Huaxun Fangzhou Technology Co., Ltd.

Applicant before: SHENZHEN HUAXUN FANGZHOU SOFTWARE INFORMATION SCIENCE & TECHNOLOGY CO., LTD.

COR Change of bibliographic data
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20161230

Address after: 518000 Guangdong city of Shenzhen province Baoan District Xixiang Bao Tian Yi Lu Chen Tian Industrial District 37 Building 1 floor

Applicant after: Shenzhen Huaxunark Technology Co., Ltd.

Address before: 518000 Guangdong city of Shenzhen province Baoan District Xixiang Bao Tian Yi Lu Chen Tian Industrial District 37 Building 1 floor

Applicant before: Shenzhen Huaxunark Technology Co., Ltd.

Applicant before: China's Ark wisdom information technology (Shenzhen) Co., Ltd.

CB02 Change of applicant information

Address after: 518000 Guangdong city of Shenzhen province Baoan District Xixiang Bao Tian Yi Lu Chen Tian Industrial District 37 Building 1 floor

Applicant after: Shenzhen Huaxunark Technology Co., Ltd.

Applicant after: China's Ark wisdom information technology (Shenzhen) Co., Ltd.

Address before: 518000 Guangdong city of Shenzhen province Baoan District Xixiang Bao Tian Yi Lu Chen Tian Industrial District 37 Building 1 floor

Applicant before: Shenzhen Huaxunark Technology Co., Ltd.

Applicant before: SHENZHEN HUAXUN FANGZHOU SOFTWARE INFORMATION SCIENCE & TECHNOLOGY CO., LTD.

GR01 Patent grant
GR01 Patent grant