Summary of the invention
The invention provides and realize controlling, forwarding the method and apparatus be separated from each other, to avoid the functional module overlapping development of datum plane and control plane, improve code reuse degree and development efficiency.
Technical scheme provided by the invention comprises:
Realize controlling, forwarding the method that is separated from each other, the method is applied in the system that control plane and datum plane be separated from each other, and described control plane is connected with data channel by control channel with datum plane; The method comprises:
Control unit in control plane is sent control information to datum plane by control channel and preserves;
Data cell in datum plane performs the business forward process of message according to the described control information of preserving;
Protocol stacking unit in control plane receives the data message needing the process of native system application program sent from described data cell by means of only data channel, and this data message is put into buffer queue, from described buffer queue, described data message is obtained for native system application program, and receive and encapsulate the data message that native system application program sends, the data message after encapsulation is sent to described data cell by data channel and carries out business forward process.
Realize controlling, forwarding the device that is separated from each other, in the system that this application of installation is separated from each other in control plane and datum plane, described control plane is connected with data channel by control channel with datum plane; Described device comprises: the data cell in datum plane and the control unit in control plane and protocol stacking unit;
Wherein, the control unit in described control plane is sent control information to datum plane by control channel;
Data cell in described datum plane receives and preserves the control information from described control unit, and performs the business forward process of message according to the control information of preserving when receiving message;
Protocol stacking unit in described control plane receives the data message needing the process of native system application program from described data cell by means of only data channel, and this data message is put into buffer queue, from described buffer queue, described data message is obtained for native system application program, and receive and encapsulate native system application program send data message, by encapsulation after data message be issued to described data cell.
As can be seen from the above technical solutions, in the present invention, control unit in control plane is sent control information to datum plane by control channel and preserves, data cell in datum plane performs the business forward process of message according to the described control information of preserving, protocol stacking unit in control plane receives the data message needing the process of native system application program from described data cell by means of only data channel, and this data message is put into buffer queue, from described buffer queue, described data message is obtained for native system application program, and receive and encapsulate native system application program send data message, data message after encapsulation is sent to described data cell by data channel and carries out business forward process, this obviously specify that the operation performed by datum plane and control plane, function and residing position that the unit in control plane and datum plane has clearly are gone out, this is avoided the Implement of Function Module code overlapping development of datum plane and control plane, improve code reuse degree and development efficiency,
Further, in the present invention, when protocol stacking unit receives the data message from described data cell, no longer carry out link, enter direction Business Processing.This is compared to prior art, specify that the function of datum plane and control plane further, avoids the functional module overlapping development of datum plane and control plane, improves code reuse degree and development efficiency.
Embodiment
In order to make the object, technical solutions and advantages of the present invention clearly, describe the present invention below in conjunction with the drawings and specific embodiments.
In the system that application of installation provided by the invention is separated from each other in control plane and datum plane, within the system, described control plane is connected with data channel by control channel with datum plane.
Wherein, described control plane is mainly used in the control to datum plane, and be not used further to forwarding and the Business Processing of message, it comprises control unit and protocol stacking unit.As for described datum plane, it has been mainly used in forwarding, the process of message, and it comprises data cell, specifically structure as shown in Figure 1.
Based on the structure shown in Fig. 1, then method provided by the invention comprises the flow process shown in Fig. 2:
See the flow chart that Fig. 2, Fig. 2 provide for the embodiment of the present invention.As shown in Figure 2, this flow process can comprise the following steps:
Step 201, the control unit in control plane is sent control information to datum plane by control channel and preserves.
The flow process of this control information is the control unit active initiation in control plane.
Step 202, the data cell in datum plane performs the business forward process of message according to the described control information of preserving.
Step 203, protocol stacking unit in control plane receives the data message needing the process of native system application program sent from described data cell by means of only data channel, and this data message is put into buffer queue, from described buffer queue, described data message is obtained for native system application program, and receive and encapsulate the data message that native system application program sends, the data message after encapsulation is sent to described data cell by data channel and carries out business forward process.
In this step 203, data message is put into buffer queue and is specially by protocol stacking unit: the validity of described protocol stacking unit verification msg message, and after checking effectively, this data message is carried out to the protocol processes such as protocol processes such as UDP, TCP, afterwards the message after process is put into buffer queue.Wherein, can be socket (Socket) buffer queue during described buffer queue specific implementation.
Can find out, when protocol stacking unit receives the data message from described data cell, no longer carry out link, enter direction Business Processing.This is compared to prior art, specify that the function of datum plane and control plane, avoids the functional module overlapping development of datum plane and control plane, improves code reuse degree and development efficiency.
So far, the flow process shown in Fig. 2 is completed.
Preferably, in the present invention, can comprise during described data cell specific implementation shown in Fig. 3 with lower module: interface module, link module, business module and routing module; Can comprise during described control unit specific implementation shown in Fig. 3 with lower module: for control described routing module routing module control, for control described link module link control module, for controlling the message control module of described business module and the interface driver module for controlling described interface module.
Based on Fig. 3, then in above-mentioned steps 101, the control unit in described control plane is sent control information to datum plane preservation by shown in Fig. 4 by control channel.
Be that step 101 flow process that the embodiment of the present invention provides realizes schematic diagram see Fig. 4, Fig. 4.In the diagram, illustrate only the transmission of control information, data channel does not show.
In the diagram, the control unit in described control plane by control channel send control information to datum plane preserve comprise:
Described interface driver module is sent control information to described interface module by control channel, and described interface module receives the control information sent from described interface driver module, and the control information described control information being converted to self identification is preserved;
Described link control module by control channel to described come link module send control information, described link module receives the control information sent from described link control module, and described control information is converted to self identify control information preserve;
Described message control module is sent control information to described business module by control channel, and described business module receives the control information sent from described message control module, and the control information described control information being converted to self identification is preserved;
Described routing module control is sent control information to described routing module by control channel, and described routing module receives the control information sent from described routing module control, and the control information described control information being converted to self identification is preserved.
It should be noted that, in the present invention, the control information that module different in datum plane needs is different, and being sent control information to described routing module by control channel for routing module control below describes the transmission of control information, and other control information transmission principle are similar:
For routing module control, it is routing iinformation to the control information that described routing module sends, and realizes especially by following steps:
First, routing module control utilizes the agreements such as Routing Protocol such as OSPF, BGP to learn routing iinformation;
Afterwards, routing module control will learn the routing iinformation uniform packing that arrives, by control channel the routing iinformation after this packing will be issued to the routing module in datum plane afterwards.
So, when after the routing iinformation after routing module receives packing, forwarding-table item can be formed, for use in the forwarding of subsequent packet.
In addition, based on Fig. 3, in step 102, described data cell performs the business forward process of message by shown in Fig. 5 according to the control information of preserving.
Be that step 102 flow process that the embodiment of the present invention provides realizes schematic diagram see Fig. 5, Fig. 5.In Figure 5, illustrate only message transmissions, control channel does not illustrate.Further, in Fig. 5, the four-headed arrow between control unit and protocol stacking unit is used for realizing control unit transmitting-receiving and controls message.
As shown in Figure 5, the business forward process that this data cell performs message according to the control information of preserving comprises:
When described interface module receives message, the message of this reception is sent to described link module;
Described link module is when entering direction link processing to the message from described interface module, if find that described message is that (this link packet is generally control message for the link packet of native system, such as carry out link negotiation message etc.), then send this message to the control unit in described control plane by described data channel, by described this message of control unit process; Otherwise, send described message and carry out Business Processing to business module;
Described business module enters direction Business Processing to the message received, and the message after process is sent to routing module; Wherein, enter direction Business Processing described in and specifically can be the operations such as speed limit, QOS, fire compartment wall;
Described routing module is when carrying out route processing to the message from described business module, if find that described message is the data message needing the process of native system application program, then send described message to described protocol stacking unit by data channel, otherwise, determine the outgoing interface sending described message, described message is sent to described business module; It should be noted that, if routing module does not find the route of described message, then directly abandon this message.
Described business module carries out outgoing direction Business Processing to the message from described routing module, and the message after process is sent to link module;
Described link module carries out outgoing direction link processing such as link layer packaging etc. to the message from described business module, message after process is sent to described interface module, sends message from described link module by described interface module by described outgoing interface.
So far, data cell performs message business forward process operation according to the control information of preserving is completed.
It should be noted that, in the present invention, above-mentioned described data cell is by software or hardware implementing.Wherein, if when passing through hardware implementing, then this hardware must provide the interface of some necessity, for completing logic corresponding to above-mentioned datum plane modules, or, complete logic corresponding to described datum plane modules by software.
So, when above-mentioned data cell operates according to the business forward process of the control information execution message preserved, if described data cell passes through hardware implementing, then when above-mentioned arbitrary module cannot continue process message due to fault, need message to give software process, and inform software fault reason further.
In addition, in above-mentioned steps 103, network layer that what the data message that described protocol stacking unit sends native system application program carried out be encapsulated as encapsulation or be link layer packaging;
Based on this, the data message after encapsulation is sent to described data cell by data channel by described protocol stacking unit to carry out business forward process and comprises:
First described protocol stacking unit selects according to the destination address of data message the outgoing interface that this data message is corresponding;
Protocol stacking unit described be encapsulated as link layer packaging time, directly by data channel, the data message after encapsulation is sent to the link module of data cell, link module carries out outgoing direction link processing to the data message from described protocol stacking unit, data message after process is sent to described interface module, and described interface module sends this data message by the outgoing interface that described protocol stacking unit is selected;
Described protocol stacking unit described be encapsulated as network layer encapsulation time, data message after encapsulation is sent to described business module by data channel, described business module carries out outgoing direction Business Processing to the data message from described protocol stacking unit, data message after process is sent to link module, described link module carries out outgoing direction link processing to the data message from described business module, data message after process is sent to described interface module, and described interface module sends this data message by the outgoing interface that described protocol stacking unit is selected.
Can find out, described protocol stacking unit is after having encapsulated the data message sent from native system application program, and no longer outgoing direction Business Processing, link layer packaging process, interface transmission processing are carried out to this data message, but directly by data channel, this data message is sent to datum plane, be responsible for the outgoing direction Business Processing of message, link layer packaging process, interface transmission processing by datum plane, this improves the reusing degree of functional module code further.
So far, description of the invention is completed.
As can be seen from the above technical solutions, in the present invention, control unit in control plane is sent control information to datum plane by control channel and preserves, data cell in datum plane performs the business forward process of message according to the described control information of preserving, protocol stacking unit in control plane only receives the data message needing the process of native system application program that described data cell is sent by data channel, and this data message is put into buffer queue, from described buffer queue, described data message is obtained for native system application program, and receive and encapsulate native system application program send data message, data message after encapsulation is sent to described data cell by data channel and carries out the operation of business forward process first performed by explicit data plane and control plane, function and residing position that the unit in control plane and datum plane has clearly are gone out, this is avoided the Implement of Function Module code overlapping development of datum plane and control plane, improve code reuse degree and development efficiency,
Further, in the present invention, when protocol stacking unit receives the data message from described data cell, no longer carry out link, enter direction Business Processing.This is compared to prior art, specify that the function of datum plane and control plane further, avoids the functional module overlapping development of datum plane and control plane, improves code reuse degree and development efficiency.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.