CN102946395A - Method and device of simulating network element - Google Patents

Method and device of simulating network element Download PDF

Info

Publication number
CN102946395A
CN102946395A CN2012104808742A CN201210480874A CN102946395A CN 102946395 A CN102946395 A CN 102946395A CN 2012104808742 A CN2012104808742 A CN 2012104808742A CN 201210480874 A CN201210480874 A CN 201210480874A CN 102946395 A CN102946395 A CN 102946395A
Authority
CN
China
Prior art keywords
identification information
message
response message
virtual
network equipment
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN2012104808742A
Other languages
Chinese (zh)
Other versions
CN102946395B (en
Inventor
吴卫斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210480874.2A priority Critical patent/CN102946395B/en
Publication of CN102946395A publication Critical patent/CN102946395A/en
Application granted granted Critical
Publication of CN102946395B publication Critical patent/CN102946395B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method and a device of a simulating network element. The method includes: receiving message transmitted by a network device through an interface based on a libpcap/winpcap dynamic base; comparing identification information of a virtual network element with preset identification information files, and generating response message when the preset identification information files contain identification information containing the virtual network element; and transmitting the response message to the network device through the interface based on the libpcap/winpcap dynamic base according to the identification information of the network device in the response message. According to the method and device, the interface based on the libpcap/winpcap dynamic base receives the message without executing operation for configuring internet protocol (IP) addresses and maintaining the IP addresses for the network elements, so that load of the interface is greatly reduced, efficiency in receiving and transmitting the message of the interface is ensured, and further normal operation of the whole simulation network element is ensured.

Description

The method and apparatus of analogue network element
Technical field
The present invention relates to the network communications technology, relate in particular to a kind of method and apparatus of analogue network element.
Background technology
In the prior art, many times need thousands of telecommunication apparatus to cooperate for the test of some product (for example gateway software).But telecommunication apparatus is expensive, can not use a large amount of real equipment for a certain test.In order to address this problem, produced the analogue network element technology.
Need in the analogue network element technology to be equipped with IP(Internet Protocol for each network element, the Internet Interconnection agreement) address, in order to simulate large batch of network element, just must use large batch of IP address, normally used in the analogue network element technology is virtual IP address, namely do not need the IP address all approved by network elements all on the network, and only be operable IP address in the network in particular range.
Existing analogue network element technology, when using virtual ip address, be by operating system based on TCP/IP(Transmission Control Protocol/Internet Protocol, transmission control protocol/Internet Interconnection agreement) module be the network element configuration virtual ip address.But because based on the complexity of the module of ICP/IP protocol, IP address of every increase, just need to be the certain system resource of this IP address assignment, distributing this system resource is in order to safeguard all IP addresses, and whether for example detect has the IP address to clash etc. a series of activities.After the IP address reaches certain data volume, very high based on the resource of the consumption of the module of ICP/IP protocol, thus causing the network processes Efficiency Decreasing of whole operating system, the operational efficiency of analogue network element obviously descends.
Summary of the invention
The invention provides a kind of method and apparatus of analogue network element, in order to improve the operational efficiency of analogue network element.
First aspect present invention provides a kind of method of analogue network element, comprising: receive the message that the network equipment sends by the interface based on the libpcap/winpcap dynamic base, comprise the identification information of the described network equipment and the identification information of Virtual NE in the described message; Resolve the identification information that obtains described Virtual NE, and identification information and the default identification information file of described Virtual NE compared, when comprising the identification information of described Virtual NE in the described default identification information file, generate response message, described default identification information file is used for storing the identification information of the Virtual NE that can simulate, and described response message comprises the identification information of the described network equipment and the identification information of described Virtual NE; According to the identification information of the network equipment described in the described response message, described response message is sent to the described network equipment by described interface based on the libpcap/winpcap dynamic base.
According to first aspect, in the possible implementation of the first, described virtual identifying information comprises at least a in the following information: virtual network protocol IP address information and interface message.
In conjunction with first aspect or the possible implementation of the first, in the possible implementation of the second, when the identification information of described Virtual NE is present in the default virtual identifying file, generates response message and comprise: described message repeating to first in first out is received message queue; Detect described first in first out every Preset Time and receive message queue, when in detecting described first in first out receiving queue, described message being arranged, generate described response message based on Simple Network Management Protocol SNMP, or generate described response message by Web server.
In conjunction with first aspect or possible implementation or the second mode in the cards of the first, in the third possible implementation, described response message is sent to the described network equipment by described interface based on the libpcap/winpcap dynamic base before, also comprise: described response message is forwarded to first in first out sends message queue; Detect described first in first out every Preset Time and send message queue, when in detecting described first in first out transmission message queue, described message being arranged, the identification information of the network equipment described in the described response message of executive basis is sent to described response message the operation of the described network equipment by described interface based on the libpcap/winpcap dynamic base.
In conjunction with first aspect or possible implementation or the second mode in the cards or the third mode in the cards of the first, in the 4th kind of possible implementation before the identification information of described Virtual NE and default identification information file are compared, also comprise: described message is filtered, comparing through identification information and the default identification information file of the Virtual NE in the message that stays after the filter operation.
Second aspect present invention provides a kind of device of analogue network element, comprise: receiver module, be used for receiving the message that the network equipment sends based on the libpcap/winpcap dynamic base, comprise the identification information of the described network equipment and the identification information of Virtual NE in the described message; Parsing module for the message that the described network equipment that receives described receiver module transmission sends, is resolved the identification information that obtains described Virtual NE, and the identification information of described Virtual NE is sent to processing module; Described processing module, identification information for the described Virtual NE that receives described parsing module transmission, when comprising the identification information of described Virtual NE in the described default identification information file, generate response message, and described response message sent to sending module, described default virtual identifying file is used for the identification information of storing virtual network element, and described response message comprises the identification information of the described network equipment and the identification information of described Virtual NE; Described sending module, be used for receiving the described response message that described processing module sends, and according to the identification information of the network equipment described in the described response message, described response message is sent to the described network equipment by described interface based on the libpcap/winpcap dynamic base.
According to second aspect, in the possible implementation of the first, described comparison module specifically is used for receiving the identification information of the described Virtual NE that described parsing module sends; Identification information and the default identification information file of described Virtual NE are compared, when comprising the identification information of described Virtual NE in the described default identification information file, described message repeating to first in first out is received message queue, and described default virtual identifying file is used for the identification information of storing virtual network element; Detect described first in first out every Preset Time and receive message queue, when in detecting described first in first out receiving queue, message being arranged, generate described response message based on Simple Network Management Protocol SNMP, or generate described response message by Web server, and response message sent to described sending module, described response message comprises the identification information of the described network equipment and the identification information of described Virtual NE.
In conjunction with second aspect or the possible implementation of the first, in the possible implementation of the second, also comprise: sending module is used for response message is sent to the described network equipment by described interface based on the libpcap/winpcap dynamic base.
In conjunction with second aspect or possible implementation or the second mode in the cards of the first, in the third possible implementation, described sending module specifically is used for: receive the described response message that described processing module sends; Described response message is forwarded to first in first out sends message queue; Detect described first in first out every Preset Time and send message queue, when in detecting described first in first out transmission message queue, described response message being arranged, with the identification information of the network equipment described in the described response message, described response message is sent to the described network equipment by described interface based on the libpcap/winpcap dynamic base.
In conjunction with second aspect or possible implementation or the second mode in the cards or the third mode in the cards of the first, in the 4th kind of possible implementation, also comprise: filtering module, be used for described message is filtered, and will be sent to comparison module through the message that stays after filtering.
As shown from the above technical solution, the method and apparatus of analogue network element provided by the invention, receive message by the interface based on the libpcap/winpcap dynamic base, only needing to receive message gets final product, do not need to be implemented as each network element configuration IP address, safeguard the operation of IP address, so just greatly alleviate the burden of this interface, guaranteed the efficient that this interface receives message, E-Packets, and then improved the simulation precision of whole analogue network element device.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, the below will do one to the accompanying drawing of required use in embodiment or the description of the Prior Art and introduce simply, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the method flow schematic diagram of according to an embodiment of the invention analogue network element;
Fig. 2 is the method flow schematic diagram of according to another embodiment of the present invention analogue network element;
Fig. 3 is the apparatus structure schematic diagram of analogue network element according to yet another embodiment of the invention;
Fig. 4 is the apparatus structure schematic diagram according to the analogue network element of further embodiment of this invention;
Fig. 5 is the apparatus structure schematic diagram of analogue network element according to yet another embodiment of the invention.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Embodiment one
The present embodiment provides a kind of method of analogue network element.The method is applicable to the device of analogue network element, and the device of this analogue network element has the interface based on the libpcap/winpcap dynamic base, and receives the message of network equipment transmission and send message to the network equipment by this interface.The executive agent of the present embodiment is the device of analogue network element.
As shown in Figure 1, be the schematic flow sheet according to the method for the analogue network element of the present embodiment.The method comprises:
Step 101 is by based on libpcap/winpcap(windows packet capture) interface of dynamic base receives the message that the network equipment sends, and comprises the identification information of the network equipment and the identification information of Virtual NE in the message.
Libpcap and wincap all are that the network packet under the unix/linux platform is caught the function bag.The device of analogue network element has the interface based on libpcap or wincap dynamic base, and this interface can be specially API(Application Programming Interface, application programming interface) interface.Different from module based on ICP/IP protocol based on the interface of libpcap/wincap dynamic base, the receiver module that only needs to receive message and send to the device of analogue network element based on the interface of this libpcap/wincap dynamic base gets final product, carry out subsequent treatment by receiver module again, do not need to be implemented as each network element configuration IP address, safeguard the operation of IP address, so just greatly alleviated the burden of this interface.
The identification information of the network equipment can comprise IP address and/or the interface message of this network equipment, can also comprise MAC Address, is used for finding this network equipment; The identification information of Virtual NE comprises IP address and/or the port information of Virtual NE, can also comprise MAC Address, is used for finding Virtual NE.
Step 102, resolve the identification information that obtains described Virtual NE, and identification information and the default identification information file of Virtual NE compared, when comprising the identification information of Virtual NE in the default identification information file, generate response message, default identification information file is used for storing the identification information of the Virtual NE that can simulate, and response message comprises the identification information of the network equipment and the identification information of Virtual NE.
The identification information that comprises each Virtual NE in the default identification information file, this identification information can comprise at least a in the following information: virtual network protocol IP address information and port information.Should the default concrete implementation of identification information file can be tabulation.
When in default identification information file, finding the identification information of the Virtual NE that comprises in the message, just illustrate this Virtual NE unit simulation this Virtual NE, can process this message, otherwise with this packet loss, disregard.
Comprise simultaneously the identification information of the network equipment and the identification information of Virtual NE in the response message, can make the network equipment think that this response message is this Virtual NE is processed rear generation to this message response message, reaches the effect of analogue network element.
Step 103 according to the identification information of the network equipment in the response message, is sent to the network equipment with response message by the interface based on the libpcap/winpcap dynamic base.
The device of analogue network element is sent to the network equipment with response message by the interface of stating based on the libpcap/winpcap dynamic base, and realization is mutual with the network equipment.
Method according to the analogue network element of the present embodiment, analogue network element in enormous quantities, and by the interface reception message based on the libpcap/winpcap dynamic base, only needing to receive message gets final product, do not need to be implemented as each network element configuration IP address, safeguard the operation of IP address, so just greatly alleviate the burden of this interface, guaranteed the efficient that this interface receives message, E-Packets, and then improved the simulation precision of whole analogue network element device.
Alternatively, after step 101, and before step 102, also comprise:
Message is filtered.
The interface of the device of analogue network element can receive all messages that arrive this interface, but having in these messages much is not the message of being processed by the device of this analogue network element, for example when the device of analogue network element is processed the generation response message based on snmp protocol, can only be to UDP(User Data Protocol, User Datagram Protoco (UDP)) message processes the generation response message.Can adopt filter that message is filtered this moment, for example calls the pcap filter message is filtered, and it is that UDP message and interface number are 161 or 162 that filtercondition is set, and the message that does not meet this condition is all abandoned.
Embodiment two
The present embodiment provides a kind of method of analogue network element based on embodiment one.As shown in Figure 2, be the schematic flow sheet according to the method for the analogue network element of the present embodiment.
Step 201 receives the message that the network equipment sends by the interface based on the libpcap/winpcap dynamic base, comprises identification information and the Virtual NE IP address information of this network equipment in the message.
This step is concrete consistent with step 101, does not repeat them here.
Step 202 is filtered the message that receives.
The device of analogue network element filters the message that receives according to default filtercondition.Default filtercondition can arrange according to the type of message, the interface of reception message.For example, will not that UDP message and interface number are not that 161 or 162 message all abandons.
Step 203 will compare through IP information and the default IP message file of the Virtual NE in the message that stays after the filter operation, judges whether the IP information of the Virtual NE in the message is arranged in default IP message file.When the IP of the Virtual NE in message information is arranged in default IP message file, execution in step 204, otherwise, with this packet loss.
The IP information that it is pointed out that this step also can change port information into, and like this, default identification information file is exactly the preset interface message file.
Step 204, forward the packet to first in first out reception message queue, and every Preset Time detection first in first out reception message queue, when in detecting the first in first out receiving queue, message being arranged, based on SNMP(Simple Network Management Protocol, Simple Network Management Protocol) generates response message, can also adopt Web server to generate response message.This Web server can be integrated in the device of analogue network element, and Web is the Framework of Web service.
Step 205 is forwarded to first in first out with response message and sends message queue, and sends the response message that whether message queue has needs transmission every Preset Time detection first in first out.
Step 206 when in detecting first in first out transmission message queue the response message of the transmission of needing being arranged, is sent to the network equipment with this response message by the interface based on the libpcap/winpcap dynamic base.
The first in first out of the present embodiment receives message queue and first in first out transmission message queue can separately storage in the device of analogue network element.
The setting that first in first out in the present embodiment receives message queue is can be processed first for the message that guarantees to arrive first, and same, the setting of message queue that first in first out sends is can be sent out first for the response message that guarantees to generate first.
Method according to the analogue network element of the present embodiment, receive message by the interface based on the libpcap/winpcap dynamic base, only needing to receive message gets final product, do not need to be implemented as each network element configuration IP address, safeguard the operation of IP address, so just greatly alleviated the burden of this interface, guaranteed that this interface receives message, the efficient that E-Packets, in addition, receive the setting of message queue and first in first out transmission message queue by first in first out, the message that can guarantee to arrive first is by priority treatment, the response message that generates first can preferentially be sent out, thereby further guarantees the normal operation of the device of whole analogue network element.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: the various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
Embodiment three
The present embodiment provides a kind of device of analogue network element, is used for the method for the analogue network element of execution embodiment one.
As shown in Figure 3, be the structural representation according to the device 300 of the analogue network element of the present embodiment.The device 300 of this analogue network element comprises: receiver module 301, parsing module 302, processing module 303 and sending module 304.
Wherein, receiver module 301 is used for receiving the message that the network equipment 310 sends based on the libpcap/winpcap dynamic base, and message is sent to parsing module 302, comprises the identification information of the network equipment 310 and the identification information of Virtual NE in the message; Parsing module 302 is used for the message of the network equipment 310 transmissions of reception receiver module 301 transmissions, resolves the identification information that obtains Virtual NE, and the identification information of Virtual NE is sent to processing module 303; Processing module 303 is used for the identification information of the Virtual NE of reception parsing module 302 transmissions, when comprising the identification information of Virtual NE in the default identification information file, generate response message, and response message sent to sending module 304, default virtual identifying file is used for the identification information of storing virtual network element, and response message comprises the identification information of the network equipment 310 and the identification information of Virtual NE; Sending module 304 is used for the response message that receiving processing module 303 sends, and according to the identification information of the network equipment in the response message 310, response message is sent to the network equipment 310 by the interface based on the libpcap/winpcap dynamic base.
Receiver module 301 in the present embodiment be in above-described embodiment based on a kind of concrete form of the port of libpcap/winpcap dynamic base, namely interface can adopt the mode of module.
The concrete operations of the device 300 of the analogue network element of the present embodiment are consistent with embodiment one, do not repeat them here.
Device 300 according to the analogue network element of the present embodiment, only needing to receive message based on the receiver module 301 of libpcap/winpcap dynamic base gets final product, do not need to be implemented as each network element configuration IP address, safeguard the operation of IP address, so just greatly alleviated the burden of this interface, guaranteed the efficient that this interface receives message, E-Packets, and then guaranteed the normal operation of the device 300 of whole analogue network element, further, the device 300 of this analogue network element can large batch of analogue network element.
Alternatively, as shown in Figure 4, the device 300 of the analogue network element of the present embodiment also comprises filtering module 401, and this filtering module 401 is used for message is filtered, and will be sent to parsing module 302 through the message that stays after filtering.
The interface of the device 300 of analogue network element can receive the message that all arrive this interface, but having in these messages much is not the message of being processed by the device 300 of this analogue network element, for example when the device 300 of analogue network element is processed message based on snmp protocol, can only be to UDP(User DataProtocol, User Datagram Protoco (UDP)) message processes.Can adopt filter that message is filtered this moment, for example calls the pcap filter message is filtered, and it is that UDP message and interface number are 161 or 162 that filtercondition is set, and the message that does not meet this condition is all abandoned.
Embodiment four
The present embodiment is done further supplementary notes to the device of the analogue network element of embodiment three.
Processing module 303 in the device 300 of this analogue network element specifically is used for:
Receive the identification information of the Virtual NE of parsing module 302 transmissions;
Identification information and the default identification information file of Virtual NE are compared, when comprising the identification information of Virtual NE in the default identification information file, forward the packet to first in first out reception message queue, default virtual identifying file is used for the identification information of storing virtual network element;
Detect first in first out every Preset Time and receive message queue, when in detecting the first in first out receiving queue, message being arranged, generate response message based on Simple Network Management Protocol SNMP, or by Web server generation response message, and response message sent to sending module 304, response message comprises the identification information of the network equipment 310 and the identification information of Virtual NE.
Alternatively, sending module 304 specifically is used for:
The response message that receiving processing module 303 sends;
Response message is forwarded to first in first out sends message queue;
Detect first in first out every Preset Time and send message queue, when in detecting first in first out transmission message queue, response message being arranged, according to the identification information of the network equipment in the response message 310, response message is sent to the network equipment 310 by the interface based on the libpcap/winpcap dynamic base.
The function of all the other modules of the device 300 of the analogue network element of the present embodiment is all consistent with embodiment three, does not repeat them here.
The concrete operation method of the device 300 of the analogue network element of the present embodiment is consistent with embodiment two, does not repeat them here.
Device 300 according to the analogue network element of the present embodiment, only needing to receive message based on the receiver module 301 of libpcap/winpcap dynamic base gets final product, do not need to be implemented as each network element configuration IP address, safeguard the operation of IP address, so just greatly alleviated the burden of this interface, guaranteed that this interface receives message, the efficient that E-Packets, in addition, receive the setting of message queue and first in first out transmission message queue by first in first out, the message that can guarantee to arrive first is by priority treatment, generate response message, the response message that generates first can preferentially be sent out, thereby further guarantees the normal operation of the device 300 of whole analogue network element.
Embodiment five
The present embodiment provides the device of another kind of analogue network element, is used for the method for the analogue network element of execution embodiment one and embodiment two.
As shown in Figure 5, be the structural representation according to the device of the analogue network element of the present embodiment.The device 500 of this analogue network element comprises at least one processor 501, communication bus 502, memory 503 and at least one communication interface 504.
Wherein, communication bus 502 is used for connection and the communication between the realization said modules, and communication interface 504 is used for being connected with the network equipment and communicating by letter.This bus can be ISA(Industry Standard Architecture, industry standard architecture) bus, PCI(Peripheral Component, peripheral component interconnect) bus or EISA(ExtendedIndustry Standard Architecture, extended industry-standard architecture) bus etc.Described bus can be one or more physical circuit, can be divided into address bus, data/address bus, control bus etc. when being many physical circuits.
Wherein, memory 503 is used for the stores executable programs code, and wherein, processor 501 moves the program corresponding with executable program code by the executable program code of storage in the read memory 503, to be used for:
Receive the message that the network equipment sends by the interface based on the libpcap/winpcap dynamic base, comprise the identification information of the network equipment and the identification information of Virtual NE in the message;
Identification information and the default identification information file of Virtual NE are compared, when comprising the identification information of Virtual NE in the default identification information file, generate response message, default identification information file is used for storing the identification information of the Virtual NE that can simulate, and response message comprises the identification information of the network equipment and the identification information of Virtual NE;
According to the identification information of the network equipment in the response message, response message is sent to the network equipment by the interface based on the libpcap/winpcap dynamic base.
Wherein, the identification information of Virtual NE comprises at least a in the following information: virtual network protocol IP address information and port information.
Alternatively, the executable program code that processor 501 is stored in by read memory 503 moves the program corresponding with executable program code, when be used for generating response message, specifically can comprise:
Forward the packet to first in first out reception message queue;
Detect first in first out every Preset Time and receive message queue, when in detecting the first in first out receiving queue, message being arranged, generate response message based on Simple Network Management Protocol SNMP, or generate response message by Web server.
Alternatively, the program code held that processor 501 is stored in by read memory 503 moves the program corresponding with executable program code, to be used for the identification information according to the response message network equipment, response message is sent to before the network equipment by the interface based on the libpcap/winpcap dynamic base, can also move program corresponding to executable program code by the executable program code of storage in the read memory 503, to be used for:
Response message is forwarded to first in first out sends message queue;
Detect first in first out every Preset Time and send message queue, when in detecting first in first out transmission message queue, response message being arranged, the identification information of the network equipment in the executive basis response message is sent to response message the operation of the network equipment by the interface based on the libpcap/winpcap dynamic base.
Alternatively, the executable program code that processor 501 is stored in by read memory 503 moves the program corresponding with executable program code, with before being used for the identification information of Virtual NE and default identification information file compared, the executable program code that can also cross storage in the read memory 503 moves the program corresponding with executable program code, to be used for:
Message is filtered, comparing through identification information and the default identification information file of the Virtual NE in the message that stays after the filter operation.
Device 500 according to the analogue network element of the present embodiment, only needing to receive message gets final product, do not need to be implemented as each network element configuration IP address, safeguard the operation of IP address, so just greatly alleviated the burden of this interface, guaranteed the efficient that this interface receives message, E-Packets, in addition, receive the setting of message queue and first in first out transmission message queue by first in first out, the message that can guarantee to arrive first is by priority treatment, generate response message, the response message that generates first can preferentially be sent out, thereby further guarantees the normal operation of the device of whole analogue network element.
The present invention program can describe in the general context of the computer executable instructions of being carried out by computer, for example program unit.Usually, program unit comprises the routine carrying out particular task or realize particular abstract data type, program, object, assembly, data structure etc.Also can in distributed computing environment (DCE), put into practice the present invention program, in these distributed computing environment (DCE), be executed the task by the teleprocessing equipment that is connected by communication network.In distributed computing environment (DCE), program unit can be arranged in the local and remote computer-readable storage medium that comprises memory device.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and identical similar part is mutually referring to getting final product between each embodiment, and each embodiment stresses is difference with other embodiment.Especially, for device embodiment, because its basic simlarity is in embodiment of the method, so describe fairly simplely, relevant part gets final product referring to the part explanation of embodiment of the method.Device embodiment described above only is schematic, wherein said unit as the separating component explanation can or can not be physically to separate also, the parts that show as the unit can be or can not be physical locations also, namely can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select according to the actual needs wherein some or all of module to realize the purpose of the present embodiment scheme.Those of ordinary skills namely can understand and implement in the situation that do not pay creative work.
It should be noted that, device embodiment described above only is schematic, wherein said unit as the separating component explanation can or can not be physically to separate also, the parts that show as the unit can be or can not be physical locations also, namely can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select according to the actual needs wherein some or all of module to realize the purpose of the present embodiment scheme.In addition, in the device embodiment accompanying drawing provided by the invention, the annexation between the module represents to have communication connection between them, specifically can be implemented as one or more communication bus or holding wire.Those of ordinary skills namely can understand and implement in the situation that do not pay creative work.
Through the above description of the embodiments, the those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential common hardware, can certainly comprise that application-specific integrated circuit (ASIC), dedicated cpu, private memory, special-purpose components and parts etc. realize by specialized hardware.Generally speaking, all functions of being finished by computer program can realize with corresponding hardware at an easy rate, and, be used for realizing that the particular hardware structure of same function also can be diversified, such as analog circuit, digital circuit or special circuit etc.But software program realizes it being better execution mode under the more susceptible for the purpose of the present invention condition.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in the storage medium that can read, floppy disk such as computer, USB flash disk, portable hard drive, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc., comprise that some instructions are with so that a computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
The above; be the specific embodiment of the present invention only, but protection scope of the present invention is not limited to this, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of described claim.

Claims (9)

1. the method for an analogue network element is characterized in that, comprising:
Receive the message that the network equipment sends by the interface based on the libpcap/winpcap dynamic base, comprise the identification information of the described network equipment and the identification information of Virtual NE in the described message;
Resolve the identification information that obtains described Virtual NE, and identification information and the default identification information file of described Virtual NE compared, when comprising the identification information of described Virtual NE in the described default identification information file, generate response message, described default identification information file is used for storing the identification information of the Virtual NE that can simulate, and described response message comprises the identification information of the described network equipment and the identification information of described Virtual NE;
According to the identification information of the network equipment described in the described response message, described response message is sent to the described network equipment by described interface based on the libpcap/winpcap dynamic base.
2. the method for analogue network element according to claim 1 is characterized in that, the identification information of described Virtual NE comprises at least a in the following information: virtual network protocol IP address information and port information.
3. the method for analogue network element according to claim 1 and 2 is characterized in that, when the identification information of described Virtual NE is present in the default virtual identifying file, generates response message and comprises:
Described message repeating to first in first out is received message queue;
Detect described first in first out every Preset Time and receive message queue, when in detecting described first in first out receiving queue, described message being arranged, generate described response message based on Simple Network Management Protocol SNMP, or generate described response message by Web server.
4. the method for each described analogue network element according to claim 1 ~ 3, it is characterized in that, at the identification information according to the network equipment described in the described response message, described response message is sent to before the described network equipment by described interface based on the libpcap/winpcap dynamic base, also comprises:
Described response message is forwarded to first in first out sends message queue;
Detect described first in first out every Preset Time and send message queue, when in detecting described first in first out transmission message queue, described response message being arranged, the identification information of the network equipment described in the described response message of executive basis is sent to described response message the operation of the described network equipment by described interface based on the libpcap/winpcap dynamic base.
5. the method for each described analogue network element is characterized in that according to claim 1 ~ 4, before the identification information of described Virtual NE and default identification information file are compared, also comprises:
Described message is filtered, comparing through identification information and the default identification information file of the Virtual NE in the message that stays after the filter operation.
6. the device of an analogue network element is characterized in that, comprising:
Receiver module is used for receiving the message that the network equipment sends based on the libpcap/winpcap dynamic base, and described message is sent to parsing module, comprises the identification information of the described network equipment and the identification information of Virtual NE in the described message;
Parsing module for the message that the described network equipment that receives described receiver module transmission sends, is resolved the identification information that obtains described Virtual NE, and the identification information of described Virtual NE is sent to processing module;
Described processing module, identification information for the described Virtual NE that receives described parsing module transmission, when comprising the identification information of described Virtual NE in the described default identification information file, generate response message, and described response message sent to sending module, described default virtual identifying file is used for the identification information of storing virtual network element, and described response message comprises the identification information of the described network equipment and the identification information of described Virtual NE;
Described sending module, be used for receiving the described response message that described processing module sends, and according to the identification information of the network equipment described in the described response message, described response message is sent to the described network equipment by described interface based on the libpcap/winpcap dynamic base.
7. the device of analogue network element according to claim 6 is characterized in that, described processing module specifically is used for:
Receive the identification information of the described Virtual NE of described parsing module transmission;
Identification information and the default identification information file of described Virtual NE are compared, when comprising the identification information of described Virtual NE in the described default identification information file, described message repeating to first in first out is received message queue, and described default virtual identifying file is used for the identification information of storing virtual network element;
Detect described first in first out every Preset Time and receive message queue, when in detecting described first in first out receiving queue, message being arranged, generate described response message based on Simple Network Management Protocol SNMP, or generate described response message by Web server, and described response message sent to described sending module, described response message comprises the identification information of the described network equipment and the identification information of described Virtual NE.
8. according to claim 6 or the device of 7 described analogue network elements, it is characterized in that, described sending module specifically is used for:
Receive the described response message that described processing module sends;
Described response message is forwarded to first in first out sends message queue;
Detect described first in first out every Preset Time and send message queue, when in detecting described first in first out transmission message queue, described response message being arranged, according to the identification information of the network equipment described in the described response message, described response message is sent to the described network equipment by described interface based on the libpcap/winpcap dynamic base.
9. the device of each described analogue network element is characterized in that according to claim 6 ~ 8, also comprises:
Filtering module is used for described message is filtered, and will be sent to described processing module through the message that stays after filtering.
CN201210480874.2A 2012-11-23 2012-11-23 The method and apparatus of analogue network element Active CN102946395B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210480874.2A CN102946395B (en) 2012-11-23 2012-11-23 The method and apparatus of analogue network element

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210480874.2A CN102946395B (en) 2012-11-23 2012-11-23 The method and apparatus of analogue network element

Publications (2)

Publication Number Publication Date
CN102946395A true CN102946395A (en) 2013-02-27
CN102946395B CN102946395B (en) 2015-12-02

Family

ID=47729302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210480874.2A Active CN102946395B (en) 2012-11-23 2012-11-23 The method and apparatus of analogue network element

Country Status (1)

Country Link
CN (1) CN102946395B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103281335A (en) * 2013-06-18 2013-09-04 东华大学 Embedded network protocol stack development method based on WinPcap

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1434382A (en) * 2002-04-01 2003-08-06 北京港湾网络有限公司 Test method and system for IEEE 802.1x network insertion equipment
CN1571367A (en) * 2003-07-14 2005-01-26 华为技术有限公司 A method for simulating network equipment
CN1735046A (en) * 2004-08-09 2006-02-15 华为技术有限公司 Goal device service realization testing method and system
US20070234428A1 (en) * 2006-03-22 2007-10-04 Rash Michael B Method for secure single-packet remote authorization
CN101719692A (en) * 2009-12-22 2010-06-02 江西省电力科学研究院 Method for acquiring network data and analyzing network performance for digital substation
CN101795173A (en) * 2010-01-21 2010-08-04 福建星网锐捷网络有限公司 Method for transmitting downlink data in wireless network and wireless access equipment
US20100195538A1 (en) * 2009-02-04 2010-08-05 Merkey Jeffrey V Method and apparatus for network packet capture distributed storage system
CN102096734A (en) * 2011-01-26 2011-06-15 北京中星微电子有限公司 Method and device for verifying out-of-order transfer of bus
CN102665239A (en) * 2012-05-16 2012-09-12 大唐移动通信设备有限公司 Mobile communication teaching system and PS (Packet Switch) service data processing method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1434382A (en) * 2002-04-01 2003-08-06 北京港湾网络有限公司 Test method and system for IEEE 802.1x network insertion equipment
CN1571367A (en) * 2003-07-14 2005-01-26 华为技术有限公司 A method for simulating network equipment
CN1735046A (en) * 2004-08-09 2006-02-15 华为技术有限公司 Goal device service realization testing method and system
US20070234428A1 (en) * 2006-03-22 2007-10-04 Rash Michael B Method for secure single-packet remote authorization
US20100195538A1 (en) * 2009-02-04 2010-08-05 Merkey Jeffrey V Method and apparatus for network packet capture distributed storage system
CN101719692A (en) * 2009-12-22 2010-06-02 江西省电力科学研究院 Method for acquiring network data and analyzing network performance for digital substation
CN101795173A (en) * 2010-01-21 2010-08-04 福建星网锐捷网络有限公司 Method for transmitting downlink data in wireless network and wireless access equipment
CN102096734A (en) * 2011-01-26 2011-06-15 北京中星微电子有限公司 Method and device for verifying out-of-order transfer of bus
CN102665239A (en) * 2012-05-16 2012-09-12 大唐移动通信设备有限公司 Mobile communication teaching system and PS (Packet Switch) service data processing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103281335A (en) * 2013-06-18 2013-09-04 东华大学 Embedded network protocol stack development method based on WinPcap

Also Published As

Publication number Publication date
CN102946395B (en) 2015-12-02

Similar Documents

Publication Publication Date Title
CN100471139C (en) System and method for network test
EP3396905A1 (en) Method and device for securely sending a message
CN105721535A (en) Parallel processing of service functions in service function chains
CN108337699B (en) Internet surfing method and device, mobile terminal and storage medium
CN105763472B (en) Cross-board forwarding method and device
CN104993947A (en) Method for upgrading firmware in batches
EP3091708B1 (en) Processing rule modification method and apparatus
CN110830330B (en) Firewall testing method, device and system
CN107517203B (en) User behavior baseline establishing method and device
CN109905412B (en) Network data parallel encryption and decryption processing method, device and medium
CN103346980A (en) Method and device for service dispatching and network equipment
CN103931162A (en) Method for processing service and network equipment
CN104702560A (en) Method and device for preventing message attack
CN103581042A (en) Method and device for sending data package
CN103957214A (en) Computer network data package grabbing method for teaching
CN108304272B (en) Data IO request processing method and device
US20180109684A1 (en) Gate way device, communication system, communication method, and communication program
CN112702311B (en) Port-based message filtering method and device
CN102946395A (en) Method and device of simulating network element
CN110912725A (en) Configuration method and configuration device of OpenFlow virtual switch
US9329960B2 (en) Methods, systems, and computer readable media for utilizing abstracted user-defined data to conduct network protocol testing
US10728171B2 (en) Governing bare metal guests
CN110995542B (en) Network state detection method, system and related equipment
CN104202297B (en) A kind of anti-attack method and equipment adapting dynamically to server performance
CN103618641A (en) Data packet detecting and monitoring system based on multiple-core network processor and capable of being deployed fast

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant