Background technology
Along with the fast development of Network and progressively refinement, traditional network equipment becomes no longer handy when handling these business.Such as, require equipment can do data forwarding and not only can insert voice, require equipment can finish load balancing but also can carry out content safety and filter.At this moment, a family independently technology producer be difficult to offer simultaneously desired all services of user.For this reason, the user need buy the equipment of a plurality of producers usually, and those equipment are linked together.So not only interoperability often goes wrong, equipment room cooperates and to be not easy especially to consult, and the equipment of giving administer and maintain the burden of bringing on the cost.
With switching equipment (described switching equipment comprises switch and router) is example, and at present according to position in the network and effect, switching equipment is divided into low and middle-end switching equipment and core switching device usually.The major function of low and middle-end switching equipment is to compile and carry out service management, and the major function of core switching device is quick forwarding, makes packet pass through IP backbone as far as possible apace.The low and middle-end switching equipment generally is in the marginal position of network, and implementation is the centralized switching equipment of general uniprocessor (CPU).Because centralized switching equipment has Costco Wholesale advantage preferably, so obtain using comparatively widely.Centralized switching equipment can rely on the simple single-processor of built-in function to realize function of exchange, but, in the face of the traffic performance requirement that becomes increasingly abundant, as IPSec (IP Security agreement), IPS (Intrusion Protect System intrusion prevention system), voice and wireless etc., centralized switching equipment can not satisfy those professional demands.
For this reason, consider whether the business components of finishing the miscellaneous service function to be integrated into and form an integrated equipment (seeing also Fig. 1) on the basic components, thereby reduce the appearance of inter-communicating problem and reduce the maintenance and management cost, and then provide more high quality-of-service for the user.Still be example with the switching equipment, the business components such as intelligent interface board that carry processor (CPU) can be integrated in the centralized switching equipment, allow the software or the hardware of business components to provide by each producer, like this, on switching equipment, can finish the miscellaneous service function, thereby the equipment that makes satisfies various abundant business demands.
But, form integrated equipment on the basic components as if realizing that business components is integrated into, between business components and basic components, need data channel and control channel at least.Accordingly, on business components and basic components, all need to be provided with the data-interface that is used for data communication and be used for control information control of communication interface.Now, data-interface can be realized by the Ethernet interface that provides on business components and the basic components, and all do not provide control interface at present a lot of business components and the basic components, as serial line interface, how on existing business components that serial line interface is not provided and basic components, simulate serial line interface, so that make the communication of carrying out control information between two parts, and then make business components to be integrated into to become possibility on the basic components, thereby can provide high quality services for the user, become a present problem that needs solution.
Still be example with the centralized switching equipment, the Ethernet interface that is connected with plate generally only is provided on the hardware configuration on the centralized switching equipment, can dock Data transmission by Ethernet interface between centralized switching equipment and the intelligent interface board, but existing centralized switching equipment can not provide the host CPU of this switching equipment to dock the control of communication interface with the separate CPU of intelligent interface board, as serial line interface.In order to solve this serial line interface problem, can on existing centralized switching equipment, increase corresponding serial line interface, but this change need increase extra hardware, cause the increase of veneer area and hardware cost, especially existing centralized switching equipment can not the integrated intelligent interface board, if can the integrated intelligent interface board and need increase corresponding serial port chip therein, will improve cost greatly.
Summary of the invention
A purpose of the present invention is to provide a kind of method and integrated equipment in analogue Ethernet interface analogue series, need on basic components and business components, not set up new hardware, the technical problem that raises the cost greatly to provide serial line interface on basic components and the business components in the solution prior art.
In order to achieve the above object, the invention discloses a kind of method in analogue Ethernet interface analogue series, may further comprise the steps: (1) transmitting terminal is converted to the Ethernet message with the control information on the universal serial bus earlier, utilizes the Ethernet interface of local terminal to send again; (2) receiving terminal utilizes the Ethernet interface of local terminal to receive the Ethernet message earlier, again the Ethernet message that receives is converted to the serial ports formatted data, to obtain control information.
Step (2) also comprises: receiving terminal judges earlier whether the Ethernet message that receives carries serial data, if just be converted into the step of serial ports formatted data.
In the step (1) serial data being converted to the Ethernet message is: the data field that the serial data of one or more serial ports forms is filled into an Ethernet message; In the step (2) the Ethernet message being converted to serial data is: restore one or more serial ports formatted data from the data field of Ethernet message.
When the serial data of a plurality of serial ports forms of carrying in the Ethernet message, utilize the plurality of data of some fields of Ethernet heading or data field to carry the length N of described serial data or carry the number of the serial data of described serial ports form.Fill in the Ethernet heading of described Ethernet message in order to show the sign of this message carrying serial data.
Receiving terminal judges whether the Ethernet message that receives carries serial data and be specially: receiving terminal reads the data of Ethernet heading, if comprise the sign of carrying serial data in the Ethernet heading, and then described Ethernet message carrying serial data.
Receiving terminal is handled the Ethernet message that receives by poll or interrupt mode.
Carry out the control information method for communicating between a kind of switching equipment and the intelligent interface board, comprising: (1) is in the adaptation layer that is provided for respectively on switching equipment and the intelligent interface board changing between serial ports formatted data and the Ethernet message; (2) utilize adaptation layer to finish control information communication between switching equipment and the intelligent interface board: transmitting terminal utilizes the adaptation layer of local terminal that the control information on the universal serial bus is converted to the Ethernet message earlier, utilizes the Ethernet interface of local terminal to send again; Receiving terminal utilizes the Ethernet interface of local terminal to receive the Ethernet message earlier, utilizes the adaptation layer of local terminal that the Ethernet message that receives is converted to the serial ports formatted data again, to obtain control information.
Receiving terminal judges earlier whether the Ethernet message that receives carries serial data, if just be converted into the step of serial ports formatted data.
In the step (1) serial data being converted to the Ethernet message is: the data field that the serial data of one or more serial ports forms is filled into an Ethernet message; In the step (2) the Ethernet message being converted to serial data is: restore one or more serial ports formatted data from the data field of Ethernet message.
When the serial data of a plurality of serial ports forms of carrying in the Ethernet message, utilize the plurality of data of some fields of Ethernet heading or data field to carry the length N of described serial data or carry the number of the serial data of described serial ports form.
A kind of first parts of using analogue Ethernet interface analogue series, described first parts are basic components, comprise an Ethernet interface on the described basic components, it is characterized in that, described basic components are provided with an adaptation layer, be used for changing between serial ports formatted data and the Ethernet message: serial data is converted to the Ethernet message is: the serial data of one or more serial ports forms is filled into the data field of an Ethernet message, the Ethernet message is converted to serial data is: restore one or more serial ports formatted data from the data field of Ethernet message.Basic components also comprise an Ethernet interface, and described Ethernet interface is the not only multiplexing Ethernet interface of data information but also communicating control information.
A kind of second parts of using analogue Ethernet interface analogue series, it is characterized in that, described second parts are business components, comprise an Ethernet interface on the described business components, it is characterized in that, one adaptation layer is set on the described business components, be used for changing between serial ports formatted data and the Ethernet message: serial data is converted to the Ethernet message is: the serial data of one or more serial ports forms is filled into the data field of an Ethernet message, the Ethernet message is converted to serial data is: restore one or more serial ports formatted data from the data field of Ethernet message.Business components also comprises an Ethernet interface, and described Ethernet interface is the not only multiplexing Ethernet interface of data information but also communicating control information.
Described basic components are centralized switching equipment, and business components is an intelligent interface card.
Compared with prior art, the present invention can simulate serial line interface by Ethernet interface respectively by software on business components and basic components, promptly by serial ports formatted data on the software setting universal serial bus and the exchange between the Ethernet message, thereby make the communication of carrying out control information between two parts, and need not on basic components and business components, to set up new hardware in order to set up control communication, reduced cost thus, particularly can use existing basic components to come the new integrated equipment of framework, significantly reduced cost, can provide higher-quality service for the user with stylish integrated equipment, alleviate the cost of equipment control and maintenance simultaneously.
And, the present invention can also simulate serial line interface by Ethernet interface respectively on centralized switching equipment and intelligent interface board, make and to dock transmitting control information by Ethernet interface between centralized switching equipment and the intelligent interface board, and then can make on the integrated equipment that centralized switching equipment and intelligent interface board form except traditional function of exchange, can also finish other function, as filtration, flow control etc.
In addition, can both be used for docking of control information by an Ethernet interface separately between centralized switching equipment of the present invention and the intelligent interface board, be used for the butt joint of data message again, the cost of Jie Yueing not only, and can be on centralized switching equipment grafting more intelligent interface board.
Embodiment
Below in conjunction with accompanying drawing, specify the present invention.
Core of the present invention is, finish serial ports formatted data on the universal serial bus and the exchange between the Ethernet message on existing basic components and the business components respectively, realize coming the purpose of simulative serial port thus with network interface, and then the serial communication function of realization basic components and business components, thereby saved hardware cost.
See also Fig. 2, it is the hardware configuration schematic diagram of an integrated equipment.In this integrated equipment, comprise basic components and at least one business components.
One basic components, comprise an Ethernet interface on the described basic components, described basic components are provided with an adaptation layer, be used for changing between serial ports formatted data and the Ethernet message: serial data is converted to the Ethernet message is: the serial data of one or more serial ports forms is filled into the data field of an Ethernet message, the Ethernet message is converted to serial data is: restore one or more serial ports formatted data from the data field of Ethernet message.
One business components, comprise an Ethernet interface on the described business components, one adaptation layer is set on the described business components, be used for changing between serial ports formatted data and the Ethernet message: serial data is converted to the Ethernet message is: the serial data of one or more serial ports forms is filled into the data field of an Ethernet message, the Ethernet message is converted to serial data is: restore one or more serial ports formatted data from the data field of Ethernet message.
Second processor of the first processor of basic components and business components comes transmission information by Ethernet interface.One adaptation layer is set respectively on basic components of the present invention and the business components, is used for and changes between serial ports formatted data and the Ethernet message.
See also Fig. 3, it is the schematic diagram of the adaptation layer allocation position on basic components/business components of the present invention.Usually all be provided with serial line interface on the existing first processor and second processor, promptly have the serial ports formatted data by outside transmission of universal serial bus.Ethernet interface typically refers to the ethernet control chip that is provided with ethernet driver.Adaptation layer is provided with between serial line interface and the Ethernet interface, is used for changing between serial ports formatted data and the Ethernet message.And adaptation layer of the present invention normally realizes with software.
See also Fig. 4, the serial ports formatted data of transmitting on the existing universal serial bus be 1-bit start bit+8-bit serial data+1-bit check digit (can)+the 1-bit position of rest.In universal serial bus, 1-bit start bit and 1-bit position of rest be by hardware handles, thus in adaptation layer, handle be the 8-bit serial data.The data format of Ethernet message is Ethernet heading+data bit+padding data+check digit.
Serial data is converted to the Ethernet message is: the data field that the serial data of one or more serial ports forms is filled into an Ethernet message; The Ethernet message is converted to serial data is: restore one or more serial ports formatted data from the data field of Ethernet message.
When the serial data of a plurality of serial ports forms of carrying in the Ethernet message, can utilize the plurality of data position of some fields of Ethernet heading or data field to carry the length N of described serial data or carry the number of the serial data of described serial ports form.Such as, when the serial data of 3 serial ports forms is filled into the data field of an Ethernet message, " 3 " can be dosed on the plurality of data position of a certain field of Ethernet of both sides' agreement or data field.Also can be with 3*8=24, its length 24 is dosed on the plurality of data position of a certain field of Ethernet of both sides' agreement or data field.8 is the number of the serial data of a serial ports form.
In addition, fill in the Ethernet heading of described Ethernet message in order to show the sign of this message carrying serial data.
Conversion the present invention of Ethernet message and serial ports formatted data is just for two kinds of embodiment.The data bit of Ethernet message is 8 among first kind of embodiment, and the data bit of Ethernet message is more than or equal to 16 and is 8 multiple positions among second kind of embodiment.
In first kind of embodiment, (also see also Fig. 4), the adaptation layer of transmitting terminal is converted to the Ethernet message with serial data and is specially: 8 Bits Serial data of a serial ports form are filled into the data field of an Ethernet message, and the sign of this message carrying serial data are filled into the Ethernet heading of this Ethernet message.The adaptation layer of receiving terminal is converted to serial data with the Ethernet message: obtain one 8 Bits Serial data and form a string mouthful of formatted data from the data field of Ethernet message.
In second kind of embodiment (seeing also Fig. 5), the adaptation layer of transmitting terminal is converted to the Ethernet message with serial data: the data field that the serial data of a plurality of serial ports forms is filled into an Ethernet message, and carry the length of serial data with first 8 bit data of data field, the sign of this message carrying serial data is filled into the Ethernet heading of this Ethernet message.The adaptation layer of receiving terminal is converted to serial data with the Ethernet message: get the serial data length N that first 8 bit data obtains to carry from the data field of Ethernet message, then per 8 of the data of follow-up N length in the data field are formed a serial ports formatted data.Among second kind of embodiment, an Ethernet message can carry a plurality of 8bit data, and can use first 8bit to represent data carried by data length, and this scheme can improve efficiency of transmission (1500 〉=N 〉=1).
Certainly also be not limited to two kinds of above-mentioned embodiment, such as, when the adaptation layer of transmitting terminal is converted to Ethernet message spare with serial data, the serial data of a plurality of serial ports forms is filled in the data field, and in the Ethernet message, fills the length N of this Ethernet message carrying serial data on the predetermined location.This predefined position can be as first 8 bit data that is filled in the data field that illustrates in second kind of scheme, it also can be other position of data field, as last 8 bit data, certainly, also might not be 8, can determine to fill the shared byte of serial data length N according to the scope of N.In addition, also need to prove, except the serial data length N is filled in the data field, also can be to be filled in other zone of Ethernet message, as padding data district (filled Data).
In addition, the sign of message carrying serial data is filled into outside the Ethernet heading of this Ethernet message, sign can also be filled in other zone of Ethernet message, as padding data district (filledData).
The Ethernet heading comprises dmac field, SMAC field and Proto field.Dmac field takies 6-Bytes, is used to show the target MAC (Media Access Control) address that receives the Ethernet message, is meant the MAC Address of the Ethernet interface of the basic components/business components that receives the Ethernet message among the present invention.The size of SMAC field is 6-Bytes, is used to show the source MAC that sends the Ethernet message, and the present invention is meant the MAC Address of the Ethernet interface of the basic components/business components that sends the Ethernet message.Proprietary protocol Proto fields account 2-Bytes.
Can send data message by other interface (as an other Ethernet interface) between basic components and the business components, also can not only send data message but also send control information by multiplexing Ethernet interface.When also having other interface in order to the transmission data message, the present invention can identify described Ethernet message by the source MAC of Ethernet message be bear control information.Certainly, also can identify described Ethernet message with the Proto field of ether network packet head is bear control information.
When Ethernet interface is multiplex interface, can show that the Ethernet message is bear control information or carry data information by a sign.The present invention can identify described Ethernet message with the Proto field of ether network packet head be bear control information or carry data information.Such as, the Proto field is " 0 ", shows that this Ethernet message is a bear control information, the Proto field is " 1 ", shows that this Ethernet message is a carry data information.
See also Fig. 6, it is the flow chart of the method in analogue Ethernet interface analogue series of the present invention.It is used for docking control information between second processor of the first processor of basic components and business components, may further comprise the steps:
S110: transmitting terminal is converted to the Ethernet message with the control information on the universal serial bus earlier, utilizes the Ethernet interface of local terminal to send again;
S120: receiving terminal utilizes the Ethernet interface of local terminal to receive the Ethernet message earlier, again the Ethernet message that receives is converted to the serial ports formatted data, to obtain control information.
Below specifically introduce each step.
One, step S110
When transmitting terminal need send serial data, earlier control information is filled on the universal serial bus, the adaptation layer of local terminal is converted to the Ethernet message with the control information on the universal serial bus.
Serial data is converted to the Ethernet message is: the data field that the serial data of one or more serial ports forms is filled into an Ethernet message; The Ethernet message is converted to serial data is: restore one or more serial ports formatted data from the data field of Ethernet message.
When the serial data of a plurality of serial ports forms of carrying in the Ethernet message, can utilize the plurality of data position of some fields of Ethernet heading or data field to carry the length N of described serial data or carry the number of the serial data of described serial ports form.Such as, when the serial data of 3 serial ports forms is filled into the data field of an Ethernet message, " 3 " can be dosed on the plurality of data position of a certain field of Ethernet of both sides' agreement or data field.Also can be with 3*8=24, its length 24 is dosed on the plurality of data position of a certain field of Ethernet of both sides' agreement or data field.8 is the number of the serial data of a serial ports form.
In addition, fill in the Ethernet heading of described Ethernet message in order to show the sign of this message carrying serial data.
The serial data conversion can be for the Ethernet message: 8 Bits Serial data of a serial ports form are filled into the data field of an Ethernet message, and the sign of this message carrying serial data are filled into the Ethernet heading of this Ethernet message.
The serial data conversion also can be for the Ethernet message: the data field that the serial data of a plurality of serial ports forms is filled into an Ethernet message, and carry the length of serial data with first 8 bit data of data field, the sign of this message carrying serial data is filled into the Ethernet heading of this Ethernet message.
When also having other interface in order to the transmission data message, it is that bear control information is worked as Ethernet interface when being multiplex interface that the present invention can identify described Ethernet message by the source MAC of Ethernet message, can show that the Ethernet message is bear control information or carry data information by a sign.The present invention can identify described Ethernet message with the Proto field of ether network packet head be bear control information or carry data information.
Two, step S120
After the Ethernet interface of receiving terminal receives data, earlier judge whether described Ethernet message carries serial data information, if, carrying serial data data message, then data are sent to adaptation layer, handle otherwise this Ethernet message directly can be handed over to existing upper strata (as protocol stack).
Receiving terminal judges whether the Ethernet message that receives carries serial data and be specially: receiving terminal reads the data of Ethernet heading, if comprise the sign of carrying serial data in the Ethernet heading, and then described Ethernet message carrying serial data.Certainly, on other field except that ether network packet head a sign is set, is used for sign carrying serial data if transmitting terminal and receiving terminal can adopt in the Ethernet message.
The adaptation layer of receiving terminal is converted to serial data with the Ethernet message.With the Ethernet message be converted to serial data also can for: the Ethernet message is converted to serial data is: get the serial data length N that first 8 bit data obtains to carry from the data field of Ethernet message, then per 8 of the data of follow-up N length in the data field are formed serial ports formatted datas.The adaptation layer of receiving terminal adopts the mode corresponding with the adaptation layer of transmitting terminal that the Ethernet message is converted to serial data.
Receiving terminal is handled the Ethernet message that receives by poll or interrupt mode.If employing polling mode, then the adaptation layer of receiving terminal is filled in the serial ports formatted data that obtains in one buffer memory, as, the serial ports formatted data that obtains is put into untreated serial data formation, this buffer memory is regularly checked in upper strata (upper strata mainly is meant the application program of handling serial data), checks that promptly the serial data formation handles the serial ports formatted data.If the employing interrupt mode, then the every processing one Ethernet message of the adaptation layer of receiving terminal sends an interrupt requests to the upper strata, and the serial ports formatted data that obtains is sent to the upper strata goes to handle.
Pass through above-mentioned steps, can realize utilizing the existing Ethernet interface to simulate serial line interface, thereby make that the butt joint control information becomes possibility between basic components and the business components, the most important thing is, the present invention need not increase extra hardware, on existing basic components, can realize, significantly reduce cost.
Below to be plugged in centralized switching equipment with intelligent interface card be that example illustrates the present invention.
See also Fig. 7, it is for carrying out the flow chart of control information method for communicating between switching equipment of the present invention and the intelligent interface board.It may further comprise the steps:
S210: in the adaptation layer that is provided for respectively on switching equipment and the intelligent interface board changing between serial ports formatted data and the Ethernet message.
S220: utilize adaptation layer to finish control information communication between switching equipment and the intelligent interface board:
Transmitting terminal utilizes the adaptation layer of local terminal that the control information on the universal serial bus is converted to the Ethernet message earlier, utilizes the Ethernet interface of local terminal to send again (S310);
Receiving terminal utilizes the Ethernet interface of local terminal to receive the Ethernet message earlier, utilizes the adaptation layer of local terminal that the Ethernet message that receives is converted to the serial ports formatted data again, obtains control information (S320).
Receiving terminal judges earlier whether the Ethernet message that receives carries serial data, if just be converted into the step of serial ports formatted data.
Serial data is converted to the Ethernet message is: 8 Bits Serial data of a serial ports form are filled into the data field of an Ethernet message, and the sign of this message carrying serial data are filled into the Ethernet heading of this Ethernet message; The Ethernet message is converted to serial data is: obtain one 8 Bits Serial data and form a string mouthful of formatted data from the data field of Ethernet message.
Serial data is converted to the Ethernet message is: the data field that the serial data of a plurality of serial ports forms is filled into an Ethernet message, and carry the length of serial data with first 8 bit data of data field, the sign of this message carrying serial data is filled into the Ethernet heading of this Ethernet message; The Ethernet message is converted to serial data is: get the serial data length N that first 8 bit data obtains to carry from the data field of Ethernet message, then per 8 of the data of follow-up N length in the data field are formed a serial ports formatted data.
Can send data message by other interface (as an other Ethernet interface) between basic components and the business components, also can not only send data message but also send control information by multiplexing Ethernet interface.When also having other interface in order to the transmission data message, the present invention can identify described Ethernet message by the source MAC of Ethernet message be bear control information.Certainly, also can identify described Ethernet message with the Proto field of ether network packet head is bear control information.When Ethernet interface is multiplex interface, can show that the Ethernet message is bear control information or carry data information by a sign.The present invention can identify described Ethernet message with the Proto field of ether network packet head be bear control information or carry data information.Such as, the Proto field is " 0 ", shows that this Ethernet message is a bear control information, the Proto field is " 1 ", shows that this Ethernet message is a carry data information.
By above-mentioned steps, can so that switching equipment not only can realize the exchange and routing function outside, can also realize other function, be intelligence such as intelligent interface board with filtering function, switching equipment then of the present invention also has filtering function.
More than disclosed only be several specific embodiment of the present invention, but the present invention is not limited thereto, any those skilled in the art can think variation, all should drop in protection scope of the present invention.