CN108989313A - Processing method, device and the computer readable storage medium of message - Google Patents

Processing method, device and the computer readable storage medium of message Download PDF

Info

Publication number
CN108989313A
CN108989313A CN201810800663.XA CN201810800663A CN108989313A CN 108989313 A CN108989313 A CN 108989313A CN 201810800663 A CN201810800663 A CN 201810800663A CN 108989313 A CN108989313 A CN 108989313A
Authority
CN
China
Prior art keywords
processing
message
lookup
field
search rule
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810800663.XA
Other languages
Chinese (zh)
Other versions
CN108989313B (en
Inventor
洪建明
刘昱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tai Xintong Information Technology Co Ltd Of Shenzhen
Original Assignee
Tai Xintong Information Technology Co Ltd Of Shenzhen
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 Tai Xintong Information Technology Co Ltd Of Shenzhen filed Critical Tai Xintong Information Technology Co Ltd Of Shenzhen
Priority to CN201810800663.XA priority Critical patent/CN108989313B/en
Publication of CN108989313A publication Critical patent/CN108989313A/en
Application granted granted Critical
Publication of CN108989313B publication Critical patent/CN108989313B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of processing method of message, the processing method of the message parses the processing field of the message the following steps are included: when controller receives the message of interchanger transmission;Determine the field type of the processing field;The processing field is configured to the corresponding search rule of field type described in the interchanger, wherein the search rule includes two layers of lookup, three layers of lookup and access control list finding.The invention also discloses a kind of processing unit of message and computer readable storage mediums.The flow table quantity that interchanger can be supported is extended hundreds times in the present invention, the number of users that interchanger is applicable in is increased significantly, so that supporting the use scope of the interchanger of openflow more extensive using traditional die.

Description

Processing method, device and the computer readable storage medium of message
Technical field
The present invention relates to technical field of network communication more particularly to the processing method of message, device and computer-readable deposit Storage media.
Background technique
In the processing and forwarding of message, conventional switch chip is mainly by input port, flow point class, searching module, report Several big nucleus module compositions such as literary processing, output port.Searching module is the most crucial part of chip, is divided into two layers of lookup, three The common types such as layer lookup, acl lookup (access control list finding) are searched.Wherein, acl lookup uses TCAM scheme, can be with Realize that any bit of matched and searched and the locating function in Openflow (open flows) agreement are very much like.
Therefore, major conventional switch producer all uses traditional die to be proposed oneself and supports openflow in the prior art SDN switch.Its realization principle all replaces the flow table of openflow to want using the acl lookup of traditional die without exception It asks.
Structure is complicated, at high price by the TCAM used due to acl lookup, so the list item negligible amounts in acl lookup, often Only 2~the 8K seen, after existing traditional die supports openflow, the openflow flow table that can be supported only has thousands of Item.Conventionally, a user drops by a website, it is necessary to which more than ten even tens of streams, thousands of flow tables can only Support dozens of user.Therefore, the SDN switch of openflow, the list item provided are provided using traditional die in the prior art Less, to the user of interchanger is used, there are number limitations, are not used to the more office space of number, the scope of application compares It is small.
Summary of the invention
The main purpose of the present invention is to provide a kind of processing method of message, device and computer readable storage medium, Aim to solve the problem that the list item of offer is less, there are number limitations to the user of interchanger is used, and are not used to the more office of number Place, the smaller technical problem of the scope of application.
To achieve the above object, the present invention provides a kind of processing method of message, the processing method of the message include with Lower step:
When controller receives the message of interchanger transmission, the processing field of the message is parsed;
Determine the field type of the processing field;
The processing field is configured to the corresponding search rule of field type described in the interchanger, wherein described Search rule includes two layers of lookup, three layers of lookup and access control list finding.
Preferably, described that the processing field is configured to the corresponding search rule of field type described in the interchanger The step of include:
When the processing field is multiple, the corresponding field type of each processing field is obtained;
The corresponding search rule of the processing field is obtained according to the field type;
Corresponding search rule is respectively configured in each processing field;
The processing field for configuring the good search rule is sent to the interchanger, for interchanger reception To after the processing field, the processing field is successively searched according to the lookup priority of the search rule, and according to lookup Message described in result treatment.
Preferably, after described the step of corresponding search rule is respectively configured in each processing field, further includes:
The search rule of the processing field configuration and the characteristic value of the processing field are obtained respectively;
Obtain processing operation of each characteristic value in the corresponding search rule;
According to the priority of the search rule, pretreatment operation is added in the processing operation, wherein described default Processing operation includes one added in loopback mark and removal loopback mark, and the interchanger is recognized with the loopback mark When the message of knowledge, the message is sent to Message processing entrance.
Preferably, the priority according to the search rule adds pretreatment operation in the processing operation Step includes:
Obtain the lookup priority of the search rule of the processing field configuration;
When the greatest priority in the search rule that the lookup priority is processing field configuration, at the place The processing operation of the addition loopback mark is added in reason operation;
When the minimum priority in the search rule that the lookup priority is processing field configuration, at the place The processing operation of the removal loopback mark is added in reason operation.
Preferably, two layers of lookup, three layers of lookup and the accesses control list described in the lookup priority are looked into The priority looked for successively reduces.
Preferably, the message is forwarded to the controller by the interchanger.
In addition, to achieve the above object, the present invention also provides a kind of processing units of message, which is characterized in that the report The processing unit of text includes: memory, processor and is stored in the report that can be run on the memory and on the processor The processing routine of text, the processing routine of the message realize the processing method of message as described above when being executed by the processor The step of.
In addition, to achieve the above object, the present invention also provides a kind of computer readable storage mediums, which is characterized in that institute The processing routine that message is stored on computer readable storage medium is stated, it is real when the processing routine of the message is executed by processor Now the step of processing method of message as described above.
Processing method, device and the computer readable storage medium for a kind of message that the embodiment of the present invention proposes, are exchanging When the controller of machine connection receives the message of interchanger transmission, message is parsed, and the processing field parsed is true Determine field type.Processing field is configured to the corresponding search rule of field type in interchanger, different words according to field type Segment type corresponds to different search rules, so that the searching module of each search rule in conventional switch is utilized Get up.Wherein search rule includes two layers of lookup, three layers of lookup and acl lookup etc..The list items of two layers of lookup have hundreds of K, and three layers The list item of lookup has tens of K, and the list item of acl lookup has several K.Therefore, the processing method of message can be by entry number in the present invention Huge two layers are measured to search and three layers of lookup use, compared with the prior art in meet the conventional switch of Openflow agreement In, the message received is not done and is classified, the message processing method of acl lookup is completely used, it can by interchanger in the present invention The flow table quantity of support extends hundreds times, and the applicable number of users of interchanger is increased significantly, so that using traditional die Support the use scope of the interchanger of openflow more extensive.
Detailed description of the invention
Fig. 1 is the terminal structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of the processing method first embodiment of message of the present invention;
Fig. 3 be message of the present invention processing method second embodiment in the processing field is configured in the interchanger The refinement flow diagram of the step of field type corresponding search rule;
Fig. 4 be message of the present invention processing method 3rd embodiment in the processing field is configured in the interchanger Another refinement flow diagram of the step of field type corresponding search rule.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The primary solutions of the embodiment of the present invention are:
When controller receives the message of interchanger transmission, the processing field of the message is parsed;
Determine the field type of the processing field;
The processing field is configured to the corresponding search rule of field type described in the interchanger, wherein described Search rule includes two layers of lookup, three layers of lookup and access control list finding.
Due to using traditional die to support the SDN switch of openflow in the prior art, the list item provided is less, to making With the user of interchanger, there are number limitations, are not used to the more office space of number, the scope of application is smaller.
The present invention provides a solution, when the controller of interchanger connection receives the message of interchanger transmission, Message is parsed, and the processing field parsed is determined into field type.Processing field is configured to according to field type The corresponding search rule of field type in interchanger, different field type correspond to different search rules, so that tradition is handed over The searching module of each search rule in changing planes is utilized.Wherein search rule includes two layers of lookup, three layers of lookup With acl lookup etc..The list item of two layers of lookup has hundreds of K, and the list item of three layers of lookup has tens of K, and the list item of acl lookup has several K.Cause This, the processing method of message can search huge two layers of list item quantity in the present invention and three layers of lookup use, relatively In the conventional switch for meeting Openflow agreement in the prior art, the message received is not done and is classified, is completely looked into using ACL The message processing method looked for, the present invention in the flow table quantity that interchanger can be supported is extended hundreds times, interchanger be applicable in Number of users is increased significantly, so that supporting the use scope of the interchanger of openflow more extensive using traditional die.
As shown in Figure 1, Fig. 1 is the terminal structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to.
The terminal of that embodiment of the invention can be server, is also possible to virtual machine etc. and sets with the terminal of controller action It is standby.
As shown in Figure 1, the terminal may include: processor 1001, such as CPU, and network interface 1004, memory 1003, Communication bus 1002.Wherein, communication bus 1002 is for realizing the connection communication between these components.Network interface 1004 is optional May include standard wireline interface and wireless interface (such as WI-FI interface).Memory 1003 can be high speed RAM memory, It is also possible to stable memory (non-volatile memory), such as magnetic disk storage.Memory 1003 optionally may be used also To be independently of the storage device of aforementioned processor 1001.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal of terminal structure shown in Fig. 1, can wrap It includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
As shown in Figure 1, as may include that operating system, network are logical in a kind of memory 1003 of computer storage medium Believe the processing routine of module and message.
In terminal shown in Fig. 1, network interface 1004 is mainly used for connecting interchanger, and it is logical to carry out data with inter-exchange Letter;And processor 1001 can be used for calling the processing routine of the message stored in memory 1003, and execute following operation:
When controller receives the message of interchanger transmission, the processing field of the message is parsed;
Determine the field type of the processing field;
The processing field is configured to the corresponding search rule of field type described in the interchanger, wherein described Search rule includes two layers of lookup, three layers of lookup and access control list finding.
Further, processor 1001 can call the processing routine of the message stored in memory 1005, also execute with Lower operation:
When the processing field is multiple, the corresponding field type of each processing field is obtained;
The corresponding search rule of the processing field is obtained according to the field type;
Corresponding search rule is respectively configured in each processing field;
The processing field for configuring the good search rule is sent to the interchanger, for interchanger reception To after the processing field, the processing field is successively searched according to the lookup priority of the search rule, and according to lookup Message described in result treatment.
Further, processor 1001 can call the processing routine of the message stored in memory 1005, also execute with Lower operation:
The search rule of the processing field configuration and the characteristic value of the processing field are obtained respectively;
Obtain processing operation of each characteristic value in the corresponding search rule;
According to the priority of the search rule, pretreatment operation is added in the processing operation, wherein described default Processing operation includes one added in loopback mark and removal loopback mark, and the interchanger is recognized with the loopback mark When the message of knowledge, the message is sent to Message processing entrance.
Further, processor 1001 can call the processing routine of the message stored in memory 1005, also execute with Lower operation:
Obtain the lookup priority of the search rule of the processing field configuration;
When the greatest priority in the search rule that the lookup priority is processing field configuration, at the place The processing operation of the addition loopback mark is added in reason operation;
When the minimum priority in the search rule that the lookup priority is processing field configuration, at the place The processing operation of the removal loopback mark is added in reason operation.
Further, processor 1001 can call the processing routine of the message stored in memory 1005, also execute with Lower operation:
Described in the lookup priority two layers search, it is described three layers search and the access control list finding it is preferential Grade successively reduces.
Further, processor 1001 can call the processing routine of the message stored in memory 1005, also execute with Lower operation:
The message is forwarded to the controller by the interchanger.
Reference Fig. 2, the processing method first embodiment of message of the present invention, the processing method of the message include:
Step S10 parses the processing field of the message when controller receives the message of interchanger transmission.
Step S20 determines the field type of the processing field.
Message processing method provided by the invention is applied to SDN (software defined network software defined Network) field is applied to the scene of SDN in particular by traditional network exchange chip.In the friendship using traditional network chip When changing planes to meet openflow (open flows) agreement, increase SDN controller, dedicated physics is used between controller and interchanger Channel connection.Wherein, interchanger can be physical switches or virtual switch, refer in particular to physical switches in the present invention.One Controller can connect multiple switch, be connected between multiple switch using physical channels such as cable or optical fiber.Work as interchanger When receiving message (data flow) of computer transmission, interchanger is according to the destination address in message information by message from particular end Mouth is sent.Wherein, destination address is other computers or other connecting with the interchanger that the interchanger connects Computer equipment under interchanger.
When controller receives the message of interchanger transmission, to obtain the processing mode of the message and the purpose of transmission Ground is handled and is forwarded to the message received, and then analytic message, obtains the processing field of message, and determines processing word The field type of section.Common field type has purpose MAC Address, purpose IP address, source IP address, source MAC etc..
In addition, the message that controller receives is that interchanger is forwarded to the controller, wherein controller configures interchanger Message forwarding, when the input port of interchanger receives message, forwarded the packet automatically to controller.
The processing field is configured to the corresponding search rule of field type described in the interchanger by step S30, In, the search rule includes two layers of lookup, three layers of lookup and access control list finding.
According to the type of above-mentioned processing field, the corresponding search rule of processing field of the message is obtained, and will be at this Reason field configuration is into interchanger in corresponding search rule.Search rule in conventional switch includes two layers of lookup, three layers Lookup and access control list finding (acl lookup) etc..Interchanger receives configured message, the lookup configured according to message Rule handles message and is forwarded.For example, then should when the processing field that packet parsing goes out is that purpose MAC Address is equal to 2 The field type of processing field is purpose MAC Address, and the corresponding search rule of target MAC (Media Access Control) address is two layers of lookup, therefore, by message Configuration is in two layers of lookup into interchanger.MAC Address is searched in searching at two layers and is equal to 2 matched processing operations, using this The processing operation processing message, obtains port numbers from the port information that message carries, and will handle from the port of the port numbers Message afterwards is sent.
It should be pointed out that the search rule in conventional switch is not limited in two layers of lookup, three layers of lookup and acl lookup, It is also possible to that there are other search rules, such as multiprotocol label switching (MPLS) rule.The present invention to the configuration of processing field according to According to for all search rules present in interchanger under actual conditions, and be confined to pointed out in the present embodiment two layers search, three Layer is searched and acl lookup.In other words, when, there are when a variety of search rules, the processing field that message is decomposited is matched in interchanger It sets to other search rules other than two layers of lookup, three layers of lookup and acl lookup and is also attributed to protection scope of the present invention.
Target MAC (Media Access Control) address is carried in the transmission process of data, in the message that generally produces or purpose IP address is come, parsing MAC Address or purpose IP address in message send data to the MAC Address or the corresponding terminal of purpose IP address.And MAC Address and purpose IP address are searched using the two layers of lookup and three layers of lookup of interchanger, without using powerful Acl lookup.
In addition, the list item of two layers of lookup has hundreds of K, the list item of three layers of lookup has tens of K, and the list item of acl lookup has several K. Therefore, the processing method of message can search huge two layers of list item quantity in the present invention and three layers of lookup use, phase To in the conventional switch for meeting Openflow agreement in the prior art, the message received is not done and is classified, completely uses ACL The message processing method of lookup, the present invention in the flow table quantity that interchanger can be supported is extended hundreds times, interchanger be applicable in Number of users increased significantly so that using traditional die support openflow interchanger use scope it is wider It is general.
In the present embodiment, when the controller of interchanger connection receives the message of interchanger transmission, message is carried out Parsing, and the processing field parsed is determined into field type.Processing field is configured to word in interchanger according to field type The corresponding search rule of segment type, different field type correspond to different search rules, so that each in conventional switch The searching module of a search rule is utilized.Wherein search rule includes two layers of lookup, three layers of lookup and acl lookup Deng.The list item of two layers of lookup has hundreds of K, and the list item of three layers of lookup has tens of K, and the list item of acl lookup has several K.Therefore, of the invention The processing method of middle message can by list item quantity it is huge two layers search and three layers of lookup use, compared with the prior art in In the conventional switch for meeting Openflow agreement, the message received is not done and is classified, at the message for completely using acl lookup Reason method extends the flow table quantity that interchanger can be supported hundreds times in the present invention, and the applicable number of users of interchanger obtains To substantial increase so that supporting the use scope of the interchanger of openflow more extensive using traditional die.
Further, referring to Fig. 3, the processing method second embodiment of message of the present invention is based on above-mentioned first embodiment, institute Stating step S30 includes:
Step S31 obtains the corresponding field type of each processing field when the processing field is multiple.
Step S32 obtains the corresponding search rule of the processing field according to the field type.
Corresponding search rule is respectively configured in each processing field by step S33.
In the transmission of data, it may appear that while the message for multiple addresses such as carry target MAC (Media Access Control) address, purpose IP address, At this point, the target terminal of data transmission is while meeting this multiple address.In such cases, it after the parsing of message, obtains a variety of The processing field of field type.For example, target MAC (Media Access Control) address is 2 in data message, and purpose IP address 3, port 6, then the number It is 2 matching treatments according to target MAC (Media Access Control) address in flow table item in message and interchanger, while is 3 matching treatments with purpose IP address Afterwards, it is sent from port 6.
In the present embodiment, for being in the processing for carrying the message of a variety of addresses, when parsing multiple processing fields, Identify the field type of each processing field.The corresponding search rule of processing field is determined according to field type, then will handle word Section configures corresponding search rule.For example, containing processing field 1 (target MAC (Media Access Control) address 2, field type in the message received For purpose MAC Address, search rule is two layers of lookup) and processing field 2 (purpose IP address 3, field type is for purpose IP Location, search rule are three layers of lookup), then processing field 1 is configured into two layers of search rule, processing field 2 configures three layers of lookup rule Then.
The processing field for configuring the good search rule is sent to the interchanger, for the friendship by step S34 It changes planes after receiving the processing field, successively searches the processing field according to the lookup priority of the search rule, and The message is handled according to lookup result.
Controller is the lookup priority of interchanger configuration search rule in advance, when interchanger is received configured with lookup rule After processing field then, lookup and Message processing are carried out to processing field according to priority is searched.Then, it will successively parse After all processing fields have configured corresponding search rule, all processing fields are sent to interchanger, so that interchanger It receives processing field and successively searches processing field according to the corresponding search rule of processing field, and handled according to lookup result Message.
By the way that processing field is decomposed into a plurality of types of processing fields, it is redistributed to a variety of search rules and carries out processing word The lookup of more complicated processing field is realized in the lookup of section and the processing of message using relatively simple search rule combination, It reduces and the list item of complicated search rule is occupied, also cannot achieve the place of that class message of lookup for the combination of simple search rule Reason, reuses the less complicated search rule of list item, and reasonable disposition search rule avoids the waste of the use space of interchanger, Improve the service quality of interchanger.
Wherein, when interchanger searches processing field according to the search rule of configuration, the feature of processing field is obtained Value searches in search rule and is worth matched lookup address with this feature, and then obtains the corresponding processing operation in lookup address, The message is handled according to the processing operation.In addition, if there is no the matched lookup ground of this feature value under the search rule of configuration When location, typically directly dropping packets, not further to be handled.
In addition, according to the rule that complexity is incremented by and list item quantity is successively decreased is searched, the lookup in interchanger is preferential The priority that grade is configured to two layers of lookup, three layers of lookup and access control list finding successively reduces.If having configuration in message It is preferential to search the processing field for being configured to two layers of lookup when the processing field searched for two layers and the processing field of three layers of lookup, Respective handling is carried out to message after matching and then carries out three layers of lookup, respective handling is carried out to message after matching, finally, will The message handled is sent by corresponding output port.
In the present embodiment, when parsing multiple processing fields, the field type of each processing field is identified.According to word Segment type determines the corresponding search rule of processing field, then processing field is configured corresponding search rule.Controller is in advance Interchanger configures the lookup priority of search rule, after interchanger receives the processing field configured with search rule, according to It searches priority and lookup and Message processing is carried out to processing field.Then, successively all processing fields parsed are being configured After corresponding search rule, all processing fields are sent to interchanger so that interchanger receive processing field according to The corresponding search rule of processing field successively searches processing field, and handles message according to lookup result.By the way that word will be handled Section is decomposed into a plurality of types of processing fields, is redistributed to a variety of search rules and carries out the lookup of processing field and the place of message Reason is realized the lookup of more complicated processing field using relatively simple search rule combination, reduced to complicated search rule List item occupy, reasonable disposition search rule avoids the waste of the use space of interchanger, improves the service quality of interchanger.
Further, referring to Fig. 4, the processing method 3rd embodiment of message of the present invention is real based on the above-mentioned first or second Example is applied, after the step S33, further includes:
Step S35 obtains the search rule of the processing field configuration and the characteristic value of the processing field respectively.
Step S36 obtains processing operation of each characteristic value in the corresponding search rule.
Step S37 adds pretreatment operation in the processing operation according to the priority of the search rule, wherein The default processing operation includes one added in loopback mark and removal loopback mark, and the interchanger is recognized with institute When stating the message of loopback mark, the message is sent to the Message processing entrance of the interchanger.
In the present embodiment, the loop fuction of controller configuration interchanger, after interchanger is configured with loop fuction, exchange When the message processing module (MPM) of machine detects the message of loopback mark, the message is back to the Message processing entrance of interchanger, The message is carried out to the matched and searched of search rule once again.For that can be better achieved to the different search rules of configuration Processing field successively carries out lookup and Message processing, when handling message according to the lookup result of a upper processing field, described Winding mark is added in message, so that the message is back to Message processing entrance, carries out the lookup of next processing field.Most Winding in the message is identified removal, the winding of end message after searching by the latter processing field, so that message is from defeated Exit port output.
Specific implementation is, after corresponding search rule is respectively configured in processing field, obtains each processing respectively The search rule of field and the characteristic value of processing field.The corresponding processing operation of this feature value is found in search rule, is pressed Default processing operation is added in processing operation according to the priority of the search rule.Default processing operation includes addition winding mark With removal winding mark.Wherein, winding mark can be addition winding in messages and add than the addition manner that top grade identifies, with And it is removed using corresponding removing method.
For example, containing processing field 1, (target MAC (Media Access Control) address 2, field type is for purpose MAC in the message received Location, search rule be two layers lookup), processing field 2 (purpose IP address 3, field type be purpose IP address, search rule Searched for three layers) and processing field 3 (source MAC 4, field type are source MAC, and search rule is acl lookup), it is defeated Exit port is 6.The then processing behaviour by target MAC (Media Access Control) address in two layers of lookup to increase " addition winding mark " in 2 processing operation Make, after the processing field 1 for having matched two layers of lookup, by message addition winding mark, so that message winding, carries out three Layer is searched.The processing operation for increasing " addition winding mark " in the processing operation that purpose IP address is 3, so that message is carrying out After three layers are searched corresponding operation processing, loopback carries out acl lookup, after being finally completed acl lookup, winding is identified and is removed, knot The winding of beam message, and message is exported from output port 6.
Wherein, the default processing operation of addition is addition winding mark or removing the judgment method of winding mark is root According to the priority of the search rule, when adding pretreatment operation in the processing operation, the processing field configuration is obtained Search rule lookup priority, when it is described lookup priority be the processing field configuration search rule in maximum it is excellent When first grade, illustrate that there is also processing fields after this processing field, then adds in the corresponding processing operation of the described processing field The default processing operation added is addition loopback mark, so that carrying out the lookup of next processing field after message winding;Work as institute When stating the minimum priority in the search rule that lookup priority is the processing field configuration, illustrate that this processing field is last One processing field required to look up, the then processing operation that addition removal loopback identifies in the processing operation of this feature value, knot The winding of beam message, so that message be exported from output port.It is easily understood that being intermediate processing for searching priority Field, when according to lookup result by Message processing, returning for message is can be realized in the addition without carrying out winding mark to message Ring.
In the present embodiment, after corresponding search rule is respectively configured in processing field, each processing word is obtained respectively The search rule of section and the characteristic value of processing field.The corresponding processing operation of this feature value is found in search rule, according to The priority of the search rule adds default processing operation in processing operation.Default processing operation include addition winding mark and Remove winding mark.So that winding mark is added in the message when handling message according to the lookup result of processing field, So that the message is back to Message processing entrance, the lookup of next processing field is carried out.It is searched in the last one processing field The winding in the message is identified into removal, the winding of end message later, so that message is exported from output port.Realize message The processing of middle processing field successively searched with message.
In addition, the embodiment of the present invention also proposes that a kind of processing unit of message, the processing unit of the message include: storage Device, processor and the processing routine for being stored in the message that can be run on the memory and on the processor, the message The processing routine the step of processing method of message described in as above each embodiment is realized when being executed by the processor.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium On be stored with the processing routine of message, realized when the processing routine of the message is executed by processor described in as above each embodiment Message processing method the step of.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone, Computer, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (8)

1. a kind of processing method of message, which is characterized in that the processing method of the message the following steps are included:
When controller receives the message of interchanger transmission, the processing field of the message is parsed;
Determine the field type of the processing field;
The processing field is configured to the corresponding search rule of field type described in the interchanger, wherein the lookup Rule includes two layers of lookup, three layers of lookup and access control list finding.
2. the processing method of message as described in claim 1, which is characterized in that it is described the processing field is configured to it is described The step of corresponding search rule of field type described in interchanger includes:
When the processing field is multiple, the corresponding field type of each processing field is obtained;
The corresponding search rule of the processing field is obtained according to the field type;
Corresponding search rule is respectively configured in each processing field;
The processing field for configuring the good search rule is sent to the interchanger, so that the interchanger receives institute After stating processing field, the processing field is successively searched according to the lookup priority of the search rule, and according to lookup result Handle the message.
3. the processing method of message as claimed in claim 2, which is characterized in that described to match each processing field respectively After the step of setting corresponding search rule, further includes:
The search rule of the processing field configuration and the characteristic value of the processing field are obtained respectively;
Obtain processing operation of each characteristic value in the corresponding search rule;
According to the priority of the search rule, pretreatment operation is added in the processing operation, wherein the default processing Operation includes one in addition loopback mark and removal loopback mark, and the interchanger is recognized with loopback mark When message, the message is sent to Message processing entrance.
4. the processing method of message as claimed in claim 3, which is characterized in that described according to the preferential of the search rule Grade, in the processing operation add pretreatment operation the step of include:
Obtain the lookup priority of the search rule of the processing field configuration;
When the greatest priority in the search rule that the lookup priority is processing field configuration, grasped in the processing The processing operation of the addition loopback mark is added in work;
When the minimum priority in the search rule that the lookup priority is processing field configuration, grasped in the processing The processing operation of the removal loopback mark is added in work.
5. the processing method of message as claimed in claim 2, which is characterized in that looked into for two layers described in the lookup priority Look for, described three layers search and the priority of the access control list finding successively reduces.
6. the processing method of message a method as claimed in any one of claims 1 to 5, which is characterized in that the message is turned by the interchanger It is sent to the controller.
7. a kind of processing unit of message, which is characterized in that the processing unit of the message includes: memory, processor and deposits The processing routine for the message that can be run on the memory and on the processor is stored up, the processing routine of the message is by institute State the step of realizing the processing method such as message described in any one of claims 1 to 6 when processor executes.
8. a kind of computer readable storage medium, which is characterized in that be stored with message on the computer readable storage medium Such as message described in any one of claims 1 to 6 is realized when the processing routine of processing routine, the message is executed by processor Processing method the step of.
CN201810800663.XA 2018-07-19 2018-07-19 Message processing method and device and computer readable storage medium Active CN108989313B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810800663.XA CN108989313B (en) 2018-07-19 2018-07-19 Message processing method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810800663.XA CN108989313B (en) 2018-07-19 2018-07-19 Message processing method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108989313A true CN108989313A (en) 2018-12-11
CN108989313B CN108989313B (en) 2021-07-27

Family

ID=64548980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810800663.XA Active CN108989313B (en) 2018-07-19 2018-07-19 Message processing method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108989313B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127691A (en) * 2006-08-17 2008-02-20 王玉鹏 A method for implementing stream-based policy routing on network processor
CN103428094A (en) * 2013-08-12 2013-12-04 杭州华三通信技术有限公司 Method and device for packet transmitting in Open Flow system
CN104426768A (en) * 2013-09-05 2015-03-18 华为技术有限公司 Data message forwarding method and device
CN104602266A (en) * 2015-01-27 2015-05-06 深圳市泰信通信息技术有限公司 Software-defined wireless network realization method
US9509600B1 (en) * 2013-08-06 2016-11-29 F5 Networks, Inc. Methods for providing per-connection routing in a virtual environment and devices thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127691A (en) * 2006-08-17 2008-02-20 王玉鹏 A method for implementing stream-based policy routing on network processor
US9509600B1 (en) * 2013-08-06 2016-11-29 F5 Networks, Inc. Methods for providing per-connection routing in a virtual environment and devices thereof
CN103428094A (en) * 2013-08-12 2013-12-04 杭州华三通信技术有限公司 Method and device for packet transmitting in Open Flow system
CN104426768A (en) * 2013-09-05 2015-03-18 华为技术有限公司 Data message forwarding method and device
CN104602266A (en) * 2015-01-27 2015-05-06 深圳市泰信通信息技术有限公司 Software-defined wireless network realization method

Also Published As

Publication number Publication date
CN108989313B (en) 2021-07-27

Similar Documents

Publication Publication Date Title
CN104823416B (en) The device and method for realizing the message sequence in the software defined network of OpenFlow
CN104580027B (en) A kind of OpenFlow message forwarding methods and equipment
US7606236B2 (en) Forwarding information base lookup method
US8139586B2 (en) Enhanced packet classification
CN104348716B (en) A kind of message processing method and equipment
EP3111603B1 (en) Method and network device for handling packets in a network by means of forwarding tables
JP2012507930A (en) Method and system for classifying data packets
CN105591914B (en) Openflow flow table lookup method and device
CN101510854B (en) Method, system and equipment for sharing business load
CN109639451A (en) Port configuration method, device, storage medium and electronic device
CN104486229B (en) A kind of method and apparatus for realizing the forwarding of VPN message
US9135833B2 (en) Process for selecting compressed key bits for collision resolution in hash lookup table
US10033698B2 (en) Intra-term logical or operation in a network filter
CN107276916A (en) Interchanger flow table management method based on agreement unaware retransmission technique
CN102014065A (en) Method for analyzing packet headers, header analysis preprocessing device and network processor
CN114760108A (en) Message matching method and device
CN107342948A (en) A kind of data flow recognition process unit based on TCAM, system and method
CN108989313A (en) Processing method, device and the computer readable storage medium of message
US9590897B1 (en) Methods and systems for network devices and associated network transmissions
CN111950000A (en) Access access control method and device
KR20130093707A (en) Packet classification apparatus and method for classfying packet thereof
CN107800630A (en) Message processing method and device
CN111327543A (en) Message forwarding method and device, storage medium and electronic device
US9553829B2 (en) Apparatus and method for fast search table update in a network switch
CN108259504A (en) It is a kind of based on group realize accesses control list a method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant