CN102761436A - Implementation of private network management interface based on TCP (transmission control protocol)/UDP (user datagram protocol) - Google Patents

Implementation of private network management interface based on TCP (transmission control protocol)/UDP (user datagram protocol) Download PDF

Info

Publication number
CN102761436A
CN102761436A CN2012100075352A CN201210007535A CN102761436A CN 102761436 A CN102761436 A CN 102761436A CN 2012100075352 A CN2012100075352 A CN 2012100075352A CN 201210007535 A CN201210007535 A CN 201210007535A CN 102761436 A CN102761436 A CN 102761436A
Authority
CN
China
Prior art keywords
network management
management interface
data
udp
tcp
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.)
Pending
Application number
CN2012100075352A
Other languages
Chinese (zh)
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.)
WUHAN MAIWE OPTOELECTRONICS TECHNOLOGY Co Ltd
Original Assignee
WUHAN MAIWE OPTOELECTRONICS TECHNOLOGY 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 WUHAN MAIWE OPTOELECTRONICS TECHNOLOGY Co Ltd filed Critical WUHAN MAIWE OPTOELECTRONICS TECHNOLOGY Co Ltd
Priority to CN2012100075352A priority Critical patent/CN102761436A/en
Publication of CN102761436A publication Critical patent/CN102761436A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides implementation of a private network management interface based on TCP (transmission control protocol)/UDP (user datagram protocol), which belongs to a server end in a client/server mode, is used for providing reliable data transmission for an upper layer and can also be used for receiving a command from the upper layer to configure network equipment. The network management interface mainly comprises three major modules, namely TCP data transmission, UDP alarm sending and daemon modules. When the upper layer performs data interaction with a bottom layer, the reliable data transmission is provided for the upper layer through a high-efficient code processing way, and system transplantation before different platforms can be facilitated. When the network equipment gives an alarm, information of the alarm can be sent to the upper layer in a unicast way. During the operation process of the network management interface, a daemon exists for monitoring whether the operation of the network management interface is good or not, and once the abnormal withdrawal of a process of the network management interface is found, the network management interface can be restarted immediately for ensuring the good operation of the whole network management interface.

Description

A kind of realization based on the privately owned network management interface of TCP/UDP
Affiliated field
This patent relates to a kind of realization based on the privately owned network management interface of TCP/UDP.In the industrial communication field, the increasing network equipment has begun to be connected on the Internet, for a huge Intranet, needs the reliable NMP of a cover and comes all network equipments are monitored and managed.This network management interface provides reliable transfer of data based on the network programming under the (SuSE) Linux OS through Transmission Control Protocol, and udp protocol sends network equipment alarm.Through the privately owned code skeleton of such cover, limit the concrete function of bottom and realize and the data filling mode, come that webmaster for the upper strata provides efficiently, transfer of data directly perceived, reliable.
Technical background
The most general NMP is SNMP (Simple Network Management Protocol, a Simple Network Management Protocol) at present, but SNMP has following drawback.
At first, SNMP is a kind of Data Transport Protocol based on UDP, and UDP provides a kind of corrupt data transmission, does not have negotiation mechanisms such as overtime re-transmission, and the request meeting that can not guarantee the client end is by response accurately.
Secondly, SNMP is based on management work station/proxy mode, and the computer of operational network hypervisor is called as management work station, and the agency is the process that operates on the network equipment.Management work station is through obtaining the work state information of the network equipment to agency's inquiry; The agency then is responsible for the request of processing and corresponding management work station, and to the local major event (TRAP) that takes place of management work station report.The code framework of SNMP needs elder generation to the agency of trademark registration nodal information, writes the intermediate treatment function, writes corresponding data processing function again.Loaded down with trivial details like this call and implementation procedure can cause the execution efficient of code very low.
In addition, the exploitation of SNMP generally is the outstanding SNMP source code of transplanting in the community that increases income, and requires a great deal of time to go to understand, debug with energy, is unfavorable for quick exploitation.
Therefore, if think more flexibly, efficiently to go to be provided with and to gather bottom data, the bed boundary that more reliably, accurately makes progress provides data, and exploitation becomes very necessary and urgent once the general privately owned network management interface agreement of cover.
Summary of the invention
Figure BSA00000655999700011
tcp data hop
The tcp data hop adopts the pattern of MS master-slave thread, and basic thought is: when main thread is held a connection request through listening to client, can remove to create a sub-thread immediately and go to handle this request.That is to say that the client end initiatively is connected with the server end, and, be elaborated below to server end request (transmission) data.
Process fser can move in switch always; Intercept the connection request that comes from the outside; When fser process during in one of accept request; Can call pthread_create and create a sub-thread, the socketClient that will connect through accept simultaneously, the function sock_decode_cmd (int sockHandle) that receives and analyze data imports in thread and carries out.In order to prevent that a plurality of sub-threads from possibly go get, set data at synchronization, and " dirty data " that cause different client to read brings inconvenience perhaps for because data are set certain some user, must solve the stationary problem in the multithreading.
Linux provides three kinds of synchronization mechanisms: mutual exclusion (mutex), semaphore (semaphore) and conditional-variable (condition variable), this network management interface adopt the method for mutual exclusion carry out before the multithreading synchronously.The mutual exclusion variable st_mutext (pthread_mutext_t type) of an overall situation of definition in the fser process; After getting into function sock_decode_cmd; Can carry out and go up latching operation ((void) pthread_mutex_lock ()), before leaving function sock_decode_cmd, can carry out unlocking operation ((void) pthread_mutext_unlock ()).So just can guarantee, to have only a thread analyzing the packet that socket receives, also can guarantee after having analyzed data the carrying out that soon the get data of execution and set data can mutual exclusions certainly in the same moment.
The tcp data hop, is arranged the frame structure of transmission data at TCP frame structure data division fully based on TCP.Data terminal at TCP inserts Private Data Interface part, and in this part, the data frame structure that definition is privately owned makes things convenient for the client and server end that code is resolved.Describe in the face of each field among the Private Data Interface down.
● Magic: the sign of the proprietary protocol of agreement is 0xBA20A76B if detect 32 bytes of beginning of tcp data part, shows that then this agreement is privately owned network management protocol.
● Tag: command id, be used to identify a certain specific operational order, make things convenient for the network equipment to carry out specific reading or setting operation.
● Sub-Command number: the quantity of the incidental subcommand of some Tag is zero if do not have subcommand, this field.Wherein, Sub-Command attaches the part at Data.
● Data length: the length of valid data part, the just total amount of byte of Data part.
● Data: the active data part, if client is sent request to server end, the Data part also can comprise the subcommand of user end to server end request.
What wherein need specify is that the Data part has used special separator " * #0#* " to distinguish in order to distinguish different data segments.If meet * #0#* at the data segment of TCP, two sections different data before and after then thinking.Likewise, adopt the end of special separator " #*0*# " identification data.
The data owner that this network management interface provides will be divided into two big types: the first kind is the readable type data of writing, and is used to dispose corresponding network device, and second type is read-only type data, is used to obtain switch current certain state or information.Two kinds of data types all with " * #0#* " as separator, " #*0*# " is as the ending symbol.Explain accordingly in the face of two kinds of different data down.
Primary sources are the readable type data of writing, and this part data message is used for configure network devices, need with certain some process interaction in the network equipment, to reach the purpose of configure network devices.All readable partial data of writing all are kept in the text; After having upgraded this text; Can notify the data in the corresponding process text to be updated immediately, let this process remove to read this text again, reconfigure switch according to the new data in the text.When once carrying out a plurality of data manipulation, separate different data with separator " * #0#* ".
Secondary sources are read-only type data, and read-only type data division is structure type (a perhaps structure chained list type), for the network equipment of different platform, only get final product with filling the structure that defines.For structure chained list type, adopt between the structure " * #0#* ", make things convenient for the upper strata to resolve corresponding data.Because universal network management interface must can adapt to multiple host computer language, there is not structure in some language, so still need define separator as differentiation, makes things convenient for the upper strata resolution data.
● the 3rd type of data are the command type data, for example restart orders such as the network equipment, network equipment factory reset.
Figure BSA00000655999700031
UDP message part
The UDP part mainly is the trap alarm information that the server end provides for some client ends.Change when network equipment generation link connects, restart, major event such as network storm the time, often to need in time the equipment (IP), time of this incident and concrete event content to take place to user report.
When certain incident takes place in equipment, need be when alarm be sent on the upper strata, will write the content of trap in the pipeline, can notify network management interface simultaneously, there are data in the pipeline, let network management interface remove the read pipeline.Network management interface is read from pipeline after the trap of regular length, can send this trap to the upper strata with the form of UDP clean culture.Below the data frame structure is carried out detailed explanation:
● Magic: the sign of the proprietary protocol of agreement is 0x9B20B79C if detect 32 bytes of beginning of tcp data part, shows that then this agreement is privately owned network management protocol.
● Tag: command id, be used to identify a certain specific operational order, make things convenient for the network equipment to carry out specific reading or setting operation.
● Trap type: the type of alarm Trap.
● the length of Data length:Data part valid data.
● Data: the buffering area of fixed size, the user sends the content of Trap to the upper strata.
After this Trap sent to the upper strata, the UDP of network management interface intercepts the pipeline module can get into the state of intercepting again, waited for the generation of Trap incident.
Figure BSA00000655999700032
finger daemon part
Because the particular surroundingss such as complexity of the operating system at network equipment long-time running and network management interface place, what network management interface may be unusual is out of service, and causes the network equipment to make corresponding to the request of data on upper strata.Therefore,, be used to open the trap pipeline, and guard the network management interface process, not in operation, then can restart the network management interface process if find webmaster mouth process with a very terse process.Be engraved in the middle of the operation in the time of so just can guaranteeing the network management interface process.
Description of drawings
Fig. 1 is based on the data frame structure figure of TCP in the accompanying drawing.
Fig. 2 is based on the structure chart of Data in the tcp data frame (Private Data Interface) part in the accompanying drawing.
Fig. 3 is based on the data frame structure figure of UDP in the accompanying drawing.
Fig. 4 is based on the structure chart of Trap Data in the UDP message frame (Private Data Interface) part in the accompanying drawing.
Practical implementation
Patent of the present invention adopts similar ./configure--prefix DIR-with-endianness little based on the Linux platform ... This mode generates corresponding makfile.Carrying out function when coding, obtaining the mode of data according to different equipment, filling corresponding function framework, using make to compile then, compiling successful file will be copied into--the DIR catalogue that prefix formulated.During file in the DIR catalogue uploaded onto the server directly operation get final product.

Claims (3)

1. realization based on the privately owned network management interface of TCP/UDP; The special character of this realization is the data division of TCP, UDP frame structure; It inserts new private data frame structure, and this private data frame structure has comprised effective informations such as frame identification, order tag, order number, it is characterized in that measured Transmission Control Protocol; On the basis of udp protocol, in the structure of data division definition private data frame.
2. when upper strata and bottom interaction data, the reliable TCP transmission mechanism of employing adopts the MS master-slave thread mode in the request coupling part; The mode that in concrete realization, adopts fixed code to fill; Not only can be for the upper strata provide reliable transfer of data, code process mode efficiently, but also make things convenient for the system transplantation before the different platform; When alarm takes place in the network equipment; Can warning information be sent alarm with the mode of clean culture to the upper strata, it is characterized in that and when the upper strata provides authentic data, also can obtain flexibly, efficiently or configuration data.
3. exist a terse process whether good in the operation of monitoring network management interface; Withdraw from if find that network management framework is improper; Can immediately network management interface be restarted,, it is characterized in that existing a finger daemon in the operation of guarding the network management interface process to guarantee the normal operation of network management interface.
CN2012100075352A 2012-01-11 2012-01-11 Implementation of private network management interface based on TCP (transmission control protocol)/UDP (user datagram protocol) Pending CN102761436A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012100075352A CN102761436A (en) 2012-01-11 2012-01-11 Implementation of private network management interface based on TCP (transmission control protocol)/UDP (user datagram protocol)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012100075352A CN102761436A (en) 2012-01-11 2012-01-11 Implementation of private network management interface based on TCP (transmission control protocol)/UDP (user datagram protocol)

Publications (1)

Publication Number Publication Date
CN102761436A true CN102761436A (en) 2012-10-31

Family

ID=47055763

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012100075352A Pending CN102761436A (en) 2012-01-11 2012-01-11 Implementation of private network management interface based on TCP (transmission control protocol)/UDP (user datagram protocol)

Country Status (1)

Country Link
CN (1) CN102761436A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1453954A (en) * 2002-04-22 2003-11-05 华为技术有限公司 System and method for managing access authority of network users
CN1521990A (en) * 2003-01-28 2004-08-18 华为技术有限公司 Fully dynamic distributed network service management system and service method thereof
CN101295274A (en) * 2007-04-29 2008-10-29 国际商业机器公司 Method and equipment for reducing data error of shared memory
CN101808009A (en) * 2010-03-08 2010-08-18 中兴通讯股份有限公司 Method and system for upgrading network equipment
CN102033778A (en) * 2010-12-16 2011-04-27 电子科技大学 Thread processing method for control, analysis and composition of embedded browser

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1453954A (en) * 2002-04-22 2003-11-05 华为技术有限公司 System and method for managing access authority of network users
CN1521990A (en) * 2003-01-28 2004-08-18 华为技术有限公司 Fully dynamic distributed network service management system and service method thereof
CN101295274A (en) * 2007-04-29 2008-10-29 国际商业机器公司 Method and equipment for reducing data error of shared memory
CN101808009A (en) * 2010-03-08 2010-08-18 中兴通讯股份有限公司 Method and system for upgrading network equipment
CN102033778A (en) * 2010-12-16 2011-04-27 电子科技大学 Thread processing method for control, analysis and composition of embedded browser

Similar Documents

Publication Publication Date Title
US8910172B2 (en) Application resource switchover systems and methods
AU2014399227B2 (en) Fault Processing Method, Related Apparatus and Computer
CN102214128B (en) Repurposable recovery environment
CN102609281B (en) Distributed software patch update method and system
CN103795617A (en) Protocol self-adaptive internet-of-things gateway system
US10445214B2 (en) System and method for tracking callback functions for error identification
CN103812726A (en) Automated testing method and device for data communication equipment
CN103516802A (en) Method and device for achieving seamless transference of across heterogeneous virtual switch
JP2011210064A (en) Log information collection system, device, method and program
US20160072688A1 (en) Fault monitoring in multi-domain networks
WO2019051948A1 (en) Method, apparatus, server, and storage medium for processing monitoring data
Dwaraki et al. GitFlow: Flow revision management for software-defined networks
CN105528273A (en) A server host hardware monitoring method and device and an electronic apparatus
US10015089B1 (en) Enhanced node B (eNB) backhaul network topology mapping
WO2016197688A1 (en) Data collection method and device
US10402282B1 (en) Assisted device recovery
CN111093125B (en) Method, device and storage medium for realizing trunk optical fiber protection of optical line terminal
CN112714022A (en) Control processing method and device for multiple clusters and computer equipment
CN104378231A (en) Control system and control method for enterprise wireless router
CN102761436A (en) Implementation of private network management interface based on TCP (transmission control protocol)/UDP (user datagram protocol)
CN103546500A (en) Method and system for switching servers
CN109792617B (en) Application resiliency system for applications deployed on a platform and method thereof
CN105337781A (en) Network management system and method and network system
CN108270832B (en) Fault replaying method and device
CN102693166A (en) Method, device and system for processing information

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
DD01 Delivery of document by public notice

Addressee: Luo Ling

Document name: the First Notification of an Office Action

C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20121031