The method of communication is realized in PON equipment
Technical field
The present invention relates to a kind of PON(passive optical network) method that communication is realized in equipment, more particularly to a kind of rack
AgentX(extension agency is utilized in formula and frame PON equipment) realize the method communicated.
Background technique
Traditional SNMP(Simple Network Management Protocol, Simple Network Management Protocol) act on behalf of quilt
Referred to as one chip is acted on behalf of, without scalability, some management objects pre-defined of management that can only be fixed, and cannot be in pipe
Addition, deletion management object during reason operation.If the management object of managed network physically changes, it is with regard to necessary
It redesigns to realize that managed network physically manages the variation of content.
AgentX meets above-mentioned requirements, it is made of two class processing routines: a primary proxy and one or more son
Agency.Primary proxy follows AgentX and snmp protocol, it is responsible for safeguarding a table to provide sub-agent and its responsible MIB(pipe
Manage information bank) region corresponding relationship.Sub-agent directly operates managed device, and when sub-agent starts, it is to primary proxy
Register various mib areas.Since sub-agent does not know the SNMP even presence of other sub-agents, primary proxy is responsible for filial generation
All possible conflict is arbitrated between reason, and as a part of mediation service, primary proxy provides index distribution and services and solve
The certainly overlap problem of mib area registration.
The overall structure of AgentX extension are as follows:
SNMP engine: sending and receiving SNMP message, executes SNMP access control policy;
AgentX primary proxy and sub-agent engine: AgentX-PDU(extension agency-protocol Data Unit is sended and received);
Manage register machine: primary proxy is that sub-agent creates session, registration MIB subtree OID(object identifier), index point
Match.
Manage and dispatch machine: the SNMP packet parsing received is converted into AgentX-PDU by primary proxy, and according to registration
The judgement of MIB subtree is sent to suitable sub-agent, and the AgentX-PDU to be sent is converted into SNMP message and transfers to SNMP
Engine is sent to NMS(Network Management System).
Management application processor: creation and revocation, the registration of MIB subtree and note of the sub-agent to primary proxy application session
Pin, index are distributed and are de-assigned.
From the above-mentioned AgentX overall structure extended it can be seen that SNMP module is coupled with AgentX module height,
The data of SNMP resume module include AgentX data structure, and SNMP receives the message of NMS after treatment, is sent to AgentX
Data be still SNMP data, AgentX-PDU is converted by SNMP data by the manage and dispatch machine of AgentX, in AgentX
Inside modules handle SNMP data, and the extension as SNMP realizes that NMS passes through management of the SNMP to PON equipment.It is real in this NMS
The mode now communicated relies only on the management of SNMP module and AgentX realization to PON equipment, cannot be using other functions
Module is managed PON equipment with AgentX realization.
In conclusion the prior art is to be implemented in combination with external equipment or system (such as by SNMP module and AgentX
NMS) to the management of some functional modules in PON equipment, and SNMP module is relied only on, and others can not be relied on
Functional module, therefore, there is no how to utilize leading between each functional module in AgentX realization PON equipment in the prior art
Believe, i.e., can not utilize AgentX realization in existing PON equipment if wanting to realize communication between each functional module.
Summary of the invention
The technical problem to be solved by the present invention is in order to overcome rely in the prior art SNMP module and AgentX realize with
The communication of PON equipment, and it is existing there is no the defect communicated between each functional module is realized using AgentX, a kind of PON is provided
The method that communication is realized in equipment has and realizes the function of communicating between each functional module in PON equipment using AgentX.
The present invention is to solve above-mentioned technical problem by following technical proposals:
The present invention provides a kind of method that communication is realized in PON equipment, it is characterized in that comprising following steps:
S1, an IDB(Information Database, information database is a component in VxWorks,
VxWorks are the real time operating systems that Wind River System company, the U.S. (abbreviation Feng He company) releases.) receive
The first solicited message that any functional module is sent, which includes operational order;
S2, after the IDB receives first solicited message, building first message data are simultaneously transmitted to a primary proxy, wherein should
First message data include the operating parameter of first solicited message and sub-agent;
S3, the primary proxy receive and parse through the first message data, judge the corresponding sub-agent of first message data, and
Second solicited message including the operational order is sent to the corresponding sub-agent;
S4, the corresponding sub-agent handles second solicited message and the response message of acquisition is sent to the primary proxy;
S5, the primary proxy building one include the response message second message data and be transmitted to the IDB;
S6, the IDB by the response message in the second message data be transmitted to send first solicited message function
Module.
In the method for the realization communication of this programme, by being realized in PON equipment between each functional module using AgentX
Communication.And because existing AgentX relies only on SNMP module and is just able to achieve communication, this programme is in order to realizing
An IDB is also added in communication between each functional module, and the setting of the IDB allows any functional module in PON equipment real
The now communication between other functional modules in PON equipment.That is, this programme is not only realized in SNMP module and PON equipment
Other functional modules between communication, can also be achieved the communication between other functional modules, such as ACL(Access Control
List, accesses control list) module and QOS(Quality of Service, service quality) communication between module.
In the present solution, the operational order refers to that the instruction demonstrates the need for carrying out a component which kind of operation, such as the operation
Instruction can need to read the operational order of the IP address of another functional module for a functional module.The corresponding sub-agent receives
And after handling the second solicited message including the operational order, the response message is obtained, includes executing the behaviour in the response message
Make the IP address that the information that instruction obtains such as obtains another functional module.
Preferably, first solicited message further includes a sub-agent title, in step S3In, the primary proxy parse this first
Message data extracts the sub-agent title from the first message data, and sends the second request to the sub-agent extracted
Information.
Include the operational order and when the sub-agent title in first solicited message, the primary proxy can directly from this
The sub-agent title is extracted in one message data, the primary proxy, which is known that, in this way be sent to extraction for the second solicited message
Sub-agent out.
In addition, when only including the operational order in first solicited message, which receives and parses through this and first disappears
Breath data are to obtain the corresponding sub-agent of first message data, i.e., according to first request for including in the first message data
Information and the operating parameter can uniquely determine a sub-agent it is found that passing through the first message data, i.e. the first message number
According between sub-agent, there are one-to-one relationships, and the primary proxy is after parsing the first message data, so that it may obtain this first
The corresponding sub-agent of message data, the in this way primary proxy, which are known that, be sent to the filial generation uniquely determined for the second solicited message
Reason.
Preferably, in step S2And S3In, step S2It include: after the IDB receives first solicited message, in the note of the IDB
Volume searches the corresponding registration information of the first solicited message in region, constructs the first message data;
Step S3Include: that the primary proxy parses the first message data, finds this in the registration area of the primary proxy
After the registration information of first message data, the mapping relations of creation IDB request and AgentX request judge the first message data
Corresponding sub-agent, and second solicited message is sent to the corresponding sub-agent.
It is stored with registration area in the IDB, which is stored with many registration informations, which includes son
The operating parameter of agency such as object identifier and other information for needing to register, which searches in its registration area should
The corresponding registration information of first solicited message, according to the operating parameter of the sub-agent in the registration information found and the operation
The integration of instruction, constructing one includes the operating parameter of sub-agent and the first message data of the operational order.
It is stored with registration area in the primary proxy, which is stored with many registration informations, the registration information packet
The operating parameter such as object identifier of enclosed tool agency and other information for needing to register, the primary proxy is in its registration area
The corresponding registration information of first message data is searched, according to the operating parameter of the sub-agent in the registration information found, wound
The mapping relations of IDB request with AgentX request are built, i.e., a specific sub-agent can be uniquely determined according to IDB request.
Preferably, the operating parameter includes that object identifier, object name describe character string, action type and codomain buffering
Area;
Second solicited message further includes that object identifier, object name describe character string, action type and codomain buffer area.
Object identifier (also referred to as OID) is the number for identifying object class or attribute, similar to the identification card number of people
Code.Object name describes character string and refers to that object name is described in the form of character string.Action type includes three kinds, respectively
The data for obtaining the data of existing object, the data of existing object being set and obtain lower an object.The primary proxy parse this first
After message data, according to the operating parameter and operational order in the first message data, which can uniquely determine specified
Which kind of type operations and specifically operate target that sub-agent and specified sub-agent need to be implemented.
Preferably, in step S1Before the following steps are included:
SL, sub-agent to primary proxy send registration request, which establishes filial generation in the registration area of the primary proxy
Manage the MIB subtree of registration;
SM, the primary proxy to the IDB send registration request, which registers sub-agent in the registration area of the IDB
MIB subtree.
Step SLRegistration process using the prior art, therefore just no longer illustrate here.Although in the prior art,
Do not have and registered in IDB, but because of registration process (the step S in IDBM) and registration process phase in primary proxy
Together, therefore, it also no longer elaborates here, those skilled in the art is according in the registration process IDB in primary proxy
Registration process.
Preferably, in step SLBefore the following steps are included:
Sub-agent sends TCP(transmission control protocol to the primary proxy) connection request;
After the primary proxy receives the connection request, TCP connection is established, and records the secondary TCP in the chained list of TCP connection
Connection;
Sub-agent sends creation session request to the primary proxy;
After the primary proxy receives the creation session request, session is established, and records the secondary session in session chained list.
Preferably, the mapping relations include that object identifier, session id (identity number) and current AgentX are asked
Seek ID.
Preferably, step S5It include: to determine and send after the primary proxy receives the response message that the sub-agent is sent
First solicited message and deletes the mapping relations of current IDB request with AgentX request to the functional module of the IDB.
Preferably, the IDB is with TCP/IP(transmission control protocol/Internet Protocol also known as network communication protocol) side
Formula, message queue mode or pipe method receive the response message that the primary proxy is sent.In the present solution, the IDB is received
The mode of the response message selects TCP/IP mode, message queue mode or pipe method, but it will be apparent to one skilled in the art that
The mode that this programme IDB receives the response message is not limited to the mode of above-mentioned selection, and those skilled in the art may be used also
Reception of the IDB to the response message is realized using other communication modes.
Preferably, the functional module is SNMP module, ACL module or QOS module.Those skilled in the art should know
Road, the functional module of this programme are not limited to above-mentioned listed module, can be also other functional modules, such as IGMP
(Internet Group Management Protocol, Internet Group Management Protocol) module.
The positive effect of the present invention is that:
In the method for realization communication of the invention, by being realized in PON equipment between each functional module using AgentX
Communication.And because existing AgentX relies only on SNMP module and is just able to achieve communication, the present invention is in order to realizing
An IDB is also added in communication between each functional module, and the setting of the IDB allows any functional module in PON equipment real
The now communication between other functional modules in PON equipment.
Detailed description of the invention
Fig. 1 is the flow chart of the registration process of each functional module in the PON equipment of the embodiment of the present invention 1.
Fig. 2 be the embodiment of the present invention 1 PON equipment in realize communication method flow chart.
Fig. 3 is the flow chart of the QOS module of the embodiment of the present invention 1 and the communication structure of ACL intermodule.
Specific embodiment
The present invention is further illustrated below by the mode of embodiment, but does not therefore limit the present invention to the reality
It applies among a range.
As shown in Figure 1, the present embodiment provides a kind of method for realizing communication in PON equipment, which includes multiple function
Energy module, an IDB, a primary proxy and an at least sub-agent corresponding with the primary proxy, and the corresponding control of each sub-agent has
One functional module.Before each functional module in PON equipment can be realized communication, need first in the IDB and the primary proxy
The information of each functional module is registered so that there are the registration of each functional module letters in the registration area of the IDB and the primary proxy
Breath.Wherein, functional module can be SNMP module, ACL module or QOS module.
The registration process of registering functional module information includes following step in the registration area in the IDB and the primary proxy
It is rapid:
Step 100, sub-agent corresponding with functional module send TCP connection request to the primary proxy;
After step 101, the primary proxy receive the connection request, TCP connection is established, and remember in the chained list of TCP connection
Record the secondary TCP connection;
The corresponding sub-agent of step 102, functional module sends creation session request to primary proxy;
After step 103, the primary proxy receive the creation session request, session is established, and record should in session chained list
Secondary session.
The corresponding sub-agent of step 104, functional module sends registration request to the primary proxy, and the primary proxy is in the primary proxy
Registration area in establish the MIB subtree of corresponding sub-agent registration;
Step 105, the primary proxy send registration request to the IDB, and it is right which registers this in the registration area of the IDB
The MIB subtree for the sub-agent answered.
Through the above steps, it there is the registration letter of each functional module in the registration area in the IDB and the primary proxy
Cease, the registration information include object identifier, object name describe character string, action type, codomain buffer area and other one
The information of a little necessary registrations.Moreover, the process for registering the information of each functional module in the primary proxy is the prior art, here
It repeats no more.In addition, though in the prior art, not there is the mistake for carrying out registering the registration information of each functional module in IDB
Journey, but because the registration process in IDB is identical with the registration process in primary proxy, therefore, also no longer elaborate here.
There are after the registration information of each functional module in the registration area in the IDB and the primary proxy, in the PON equipment
Each functional module can realize communication by IDB and AgentX, specific communication means the following steps are included:
Step 201, the IDB receive the first solicited message that any functional module is sent, which includes
Operational order and a sub-agent title;
After step 202, the IDB receive first solicited message, the first request letter is searched in the registration area of the IDB
Corresponding registration information is ceased, the first message data are constructed and is transmitted to the primary proxy, wherein the first message data include being somebody's turn to do
The operating parameter of first solicited message and sub-agent, wherein the operating parameter includes that object identifier, object name describe character
String, action type and codomain buffer area;
Step 203, the primary proxy receive and parse through the first message data, find in the registration area of the primary proxy
After the registration information of the first message data, the mapping relations of creation IDB request and AgentX request, from the first message data
In extract the sub-agent title, and to the sub-agent extracted send one include the operational order the second solicited message;
Step 204, the sub-agent extracted handle second solicited message and the response message of acquisition are sent to this
Primary proxy;
After step 205, the primary proxy receive the response message that the sub-agent extracted is sent, determines to send and be somebody's turn to do
First solicited message constructs the second message data including the response message and is simultaneously transmitted to this to the functional module of the IDB
IDB, while deleting the mapping relations of current IDB request and AgentX request;
The response message in the second message data is transmitted to by step 206, the IDB sends first solicited message
Functional module.
Wherein, which further includes that describe character string, action type and codomain slow for object identifier, object name
Area is rushed, which includes object identifier, session id and current AgentX request ID.
Moreover, in step 202, which searches the corresponding registration information of the first solicited message in its registration area,
According to the integration of the operating parameter of the sub-agent in the registration information found and the operational order, constructing one includes son
The first message data of the operating parameter of agency and the operational order.
In step 203, which searches the corresponding registration information of first message data, root in its registration area
It is investigated that the operating parameter of the sub-agent in the registration information found, the mapping relations of creation IDB request and AgentX request, i.e. root
A specific sub-agent can be uniquely determined according to IDB request.
In the present embodiment, which receives the response message that the primary proxy is sent in a manner of TCP/IP.But this field
Technical staff know that the mode that the present embodiment IDB receives the response message is not limited to the mode of above-mentioned selection, ability
The technical staff in domain also can be used other communication modes such as message queue mode or pipe method and realize that the IDB believes the response
The reception of breath.
A specific example is named to illustrate the present invention, so that those skilled in the art better understood when this hair
It is bright:
In the design of ACL module and QOS module, ACL module is identical with the parameter of regularity of QOS module, can be according to need
Same rule is shared, therefore does not create the data of rule in QOS module, but creates regular data in ACL module, with
This achievees the purpose that save system resource.
Below with when configuring QOS module, QOS module is used in ACL module for the IP address of a certain rule, explanation
Pass through the detailed process that AgentX realizes communication between QOS module and ACL module, wherein QOS module and ACL intermodule it is logical
Believe that structure is as shown in Figure 3:
The IDB2 receives the first solicited message that QOS module 1 is sent, which includes that operational order (is read
Take the IP address of ACL module) and sub-agent title (the corresponding sub-agent title of ACL module);The IDB2 receives first request
After information, the corresponding registration information of the first solicited message is searched in the registration area of the IDB2, constructs the first message number
According to and be transmitted to the primary proxy 3, wherein the first message data include that first solicited message, object identifier, object name are retouched
State character string, action type and codomain buffer area etc.;The primary proxy 3 receives and parses through the first message data, in the primary proxy 3
Registration area in find the registration information of the first message data after, creation IDB request with AgentX request mapping close
System extracts the sub-agent title from the first message data, and sending one to the sub-agent 4 extracted includes with reading IP
Second solicited message of location;The corresponding sub-agent 4 of ACL module 5 handles second solicited message and by the ACL module I P of acquisition
Location is sent to the primary proxy 3;The primary proxy 3 receives the ACL module I P address that the corresponding sub-agent 4 of ACL module 5 is sent
Afterwards, the functional module (i.e. QOS module) for sending first solicited message to the IDB2 is determined, building one is including ACL module I P
The second message data of location are simultaneously transmitted to the IDB2, while deleting the mapping relations of current IDB request and AgentX request;It should
ACL module I P address in the second message data is transmitted to the QOS module 1 for sending first solicited message by IDB2.
Embodiment 2
It in embodiment 1, include the operational order and the sub-agent title in first solicited message, which can be straight
It connects and extracts the sub-agent title from the first message data, the primary proxy, which is known that, in this way send out the second solicited message
It send to the sub-agent extracted.And in the present embodiment, the method and embodiment 1 taken are different, specifically: in this reality
It applies in example, only includes the operational order in first solicited message, according to first request for including in the first message data
Information and the operating parameter can uniquely determine a sub-agent it is found that passing through the first message data, i.e. the first message number
According between sub-agent, there are one-to-one relationships, and the primary proxy is after parsing the first message data, so that it may obtain this first
The corresponding sub-agent of message data, the in this way primary proxy, which are known that, be sent to the filial generation uniquely determined for the second solicited message
Reason.
Therefore, the process place that the present embodiment is different from the realizations communication means of embodiment 1 is: the present embodiment this
The operational order is only included in one solicited message, and step 203 is replaced are as follows: the primary proxy receives and parses through the first message number
The corresponding sub-agent of first message data is obtained accordingly, and the first message data are found in the registration area of the primary proxy
Registration information after, creation IDB request with AgentX request mapping relations, and to the sub-agent of acquisition send one include the behaviour
Make the second solicited message instructed.
In the method for realization communication of the invention, by being realized in PON equipment between each functional module using AgentX
Communication.And because existing AgentX relies only on SNMP module and is just able to achieve communication, the present embodiment is in order to reality
An IDB is also added in the now communication between each functional module, and the setting of the IDB is so that any functional module in PON equipment can be with
Communication in realization and PON equipment between other functional modules.
Although specific embodiments of the present invention have been described above, it will be appreciated by those of skill in the art that these
It is merely illustrative of, protection scope of the present invention is defined by the appended claims.Those skilled in the art is not carrying on the back
Under the premise of from the principle and substance of the present invention, many changes and modifications may be made, but these are changed
Protection scope of the present invention is each fallen with modification.