WO2011069388A1 - 一种协议识别的方法、装置和系统 - Google Patents

一种协议识别的方法、装置和系统 Download PDF

Info

Publication number
WO2011069388A1
WO2011069388A1 PCT/CN2010/077569 CN2010077569W WO2011069388A1 WO 2011069388 A1 WO2011069388 A1 WO 2011069388A1 CN 2010077569 W CN2010077569 W CN 2010077569W WO 2011069388 A1 WO2011069388 A1 WO 2011069388A1
Authority
WO
WIPO (PCT)
Prior art keywords
identification
algorithm
tuple
protocol
message
Prior art date
Application number
PCT/CN2010/077569
Other languages
English (en)
French (fr)
Inventor
刘华
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to ES10835423T priority Critical patent/ES2700245T3/es
Priority to EP10835423.4A priority patent/EP2482517B1/en
Publication of WO2011069388A1 publication Critical patent/WO2011069388A1/zh
Priority to US13/466,245 priority patent/US8782068B2/en

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
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10TECHNICAL SUBJECTS COVERED BY FORMER USPC
    • Y10STECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10S707/00Data processing: database and file management or data structures
    • Y10S707/99931Database or file accessing
    • Y10S707/99933Query processing, i.e. searching

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, and a system for protocol identification.
  • the existing protocol type identification method is to poll all possible matching identification feature conditions or algorithms for identification.
  • the above polling method may be sequential polling by batch, and the specific implementation manner is generally as follows: According to the frequency of protocol usage on the network, the internal protocols of the system are divided into: high frequency protocol class, common protocol class, rare protocol Class; When the data stream arrives, all the rules or recognition algorithms of the high-frequency protocol class are used to try to identify the data stream. If it is not recognized, all the rules or recognition algorithms of the common protocol class are used to try and identify. If not, try using all the rules or recognition algorithms of the sparse protocol class.
  • the existing protocol type identification method may also be pattern matching. The mode matching method is to scan all protocols at one time to find a protocol that can match the message. Both of the above two need to scan all the protocols to be less efficient.
  • IP Internet Protocol, IP address and port pair
  • the association table stores the entry of the network address and port pair and the service type correspondence (service)
  • the type corresponds to the protocol used by it.
  • the service type can determine the protocol used by the packet. If the entry including the network address and port pair is found in the preset association table, the service of the message
  • the service type is the type of service indicated by the entry.
  • the inventors found that there are a large number of port multiplexing situations in the existing network, namely: a network address and port pair, which can be used for different types of services. There are a large number of misidentifications that use only network addresses and port pairs to determine the type of traffic for a data stream. Therefore, the method is not applicable to a scenario where the accuracy of message recognition is high.
  • Embodiments of the present invention provide a method, apparatus, and system for protocol identification to improve the accuracy of message recognition.
  • the following technical solutions are implemented:
  • the identification tuple includes at least a network address
  • the algorithm in the application list is used to identify the content of the packet, thereby obtaining the protocol type of the packet.
  • a device for protocol identification comprising:
  • An extracting unit configured to extract an identification tuple of the message; the identification tuple includes at least a network address; and the storage unit is configured to store the identification table;
  • An algorithm search unit searching for an algorithm application list corresponding to the identification tuple in the identification table, and a protocol identification unit, configured to use the algorithm in the application application list to identify the content of the packet, thereby acquiring the packet agreement type.
  • a protocol identification system comprising: a message receiving device and a device identified by any protocol provided by the embodiment of the present invention, wherein the device identified by the protocol is used for protocol identification of a message received by the message receiving device.
  • FIG. 1 is a schematic flow chart of a method according to an embodiment of the present invention.
  • FIG. 2 is a schematic flow chart of a method according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a method according to Embodiment 2 of the present invention.
  • FIG. 4 is a schematic structural view of a device according to a third embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a device according to Embodiment 3 of the present invention.
  • FIG. 6 is a schematic structural view of a device according to a third embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a system according to Embodiment 4 of the present invention. detailed description
  • an embodiment of the present invention provides a method for protocol identification, including: 101: extracting an identification tuple of a message; and the foregoing identification tuple includes at least a network address;
  • the above identified tuple may be an N-tuple such as: a tuple: a network address; or, a tuple: a network address and port; or, a triplet: a network address, a port, and a transport layer protocol.
  • N-tuple such as: a tuple: a network address; or, a tuple: a network address and port; or, a triplet: a network address, a port, and a transport layer protocol.
  • a specific number of tuples can be set according to the needs of the protocol identification.
  • the IP address of the source end is not limited, and the port also uses the port of the source end. If the IP address of the destination end is used, the port also uses the destination end. Port.
  • the searching for the algorithm application list corresponding to the identification tuple in the identification table includes: identifying the tuple as a key value, and searching for the corresponding tuple corresponding to the identification tuple from the identification table by using a hash search method.
  • the hash lookup method has the advantage of its quick lookup as a specific lookup method. It can be understood that the hash lookup method is not the only way to look up the table entry from the table.
  • the manner in which the hash is searched is not to be construed as limiting the embodiments of the present invention.
  • the above search may be performed by using an entry in the identification tuple matching identification table to find a list of algorithm applications corresponding to the identified tuple.
  • the algorithm can also be understood as a rule for identifying messages.
  • the identification table may be preset; in addition, the embodiment of the present invention will introduce a method of updating the identification table in a dynamic manner in the description of the subsequent embodiments
  • the algorithm in the application list is used to identify the content of the packet, so as to obtain the protocol type of the packet.
  • the above step 102 determines an algorithm for identification that is preferentially used by the message, and then uses the above algorithm to identify the message in step 103.
  • the embodiment uses the IP, Port, and transport layer protocol information of the message to select the algorithm for preferential use.
  • the probability of successful matching will be higher, avoiding the use of all algorithms to identify the stream by polling or pattern matching, thus achieving high-speed protocol identification.
  • the identification tuple containing at least the IP address extracted from the ⁇ is used to find the corresponding algorithm, and then the found algorithm is used to identify the content of the message, and the content identification can improve the recognition accuracy of the message and reduce the false recognition.
  • the method further includes: 201: if the algorithm application list search corresponding to the identification tuple is failed in the identification table, or the foregoing algorithm is used. If the algorithm in the application list fails to identify the content of the packet, the packet may be identified by polling or pattern matching. Of course, other ways to identify the present invention are not limited.
  • the method of the foregoing polling may be: a fixed sequence of batch-by-batch polling, or an arbitrary manner of pattern matching all the feature rules in an attempted manner to find a protocol used by the packet, which is compared in the embodiment of the present invention. Not limited.
  • the result of the above-mentioned search application list and the failure to identify the content of the message can be obtained in the result of the search and the identification, and the manner of the judgment is also possible, which is not limited by the embodiment of the present invention.
  • the embodiment of the present invention further provides a method for updating the identification table in a dynamic manner, which may be specifically after step 201:
  • the identification table can be automatically updated as the network environment changes, the identification table is obsolete and not suitable for the new network environment, and the trouble of manually configuring the identification table can be avoided.
  • the N-tuple information is taken as an example, and the identification table is searched by using a matching manner.
  • the method for determining whether the search and the identification succeeds is determined by the method of judging, and the method for identifying the protocol is illustrated. 3, including:
  • N-tuples can refer to a tuple (network address only), a dual group (including network address, port), and a triplet (including network address, port, and transport layer protocol (for example, Transmission Control Protocol).
  • TCP Transmission Control Protocol
  • UDP User Datagram Protocol
  • SCTP Stream Control Transmission Protocol
  • the host of the server In the live network, many data streams belong to client/server applications. Among them, as the host of the server, only a few types of protocol types are generally provided. Further, the server host provides a fixed service on a fixed port, that is, the same port generally provides only the same protocol type service within a certain period of time. . Considering port multiplexing, the same port of the host may provide services of other protocol types, and it is impossible to grasp whether the same port of the same host is changed to provide another service of another protocol type. Therefore, after identifying a specific port of a host to provide a certain type of service, the N-tuple information (combination of network address, port, and transport layer protocol) of the host is recorded, and the rule of the protocol type is identified.
  • the N-tuple information mentioned in the embodiment of the present invention may be an N-tuple composed of source-side information of one stream, or an N-tuple composed of destination-end information.
  • the source end information includes the source IP address and the source end port of the packet
  • the destination end information includes the text.
  • the entry of the N-tuple is searched in the identification table by using the foregoing N-tuple in a matching manner, and the identification table stores the entry of the N-tuple and the application list correspondence pair.
  • the source of the entry of the identification table may be: According to the result of the protocol identification, determining the host of the service providing
  • the N-tuple information is saved, because the port is multiplexed, and it is not possible to determine the time of the service type provided by the port, so it is associated with the application list of the identified rules/algorithms used.
  • the N-tuple information of the to-be-identified message is extracted, and then matched in the identification table.
  • the N-tuple information of one of the source of the to-be-matched message and the destination end can be matched.
  • the lookup identification table suggests using a hash lookup with an N-tuple as the key value.
  • the corresponding rule/algorithm application list can be used to identify the content of the message. Thereby obtaining the protocol type of the message.
  • step 306 Perform pattern matching of all feature rules/all identification algorithms to identify the message; the above step 306 may be to perform identification matching by using any existing methods, such as attempting polling or pattern matching, and identifying the message. Perform content identification.
  • the specific embodiment of the present invention is not limited.
  • the N-tuple of the host of the server and the used identification rule/algorithm correspondence pair are updated to the identification table.
  • the specific implementation manner of the update may be: determining, according to the identified rule/algorithm, the network address, the port, the transport layer protocol, and the like of the host as the server in the packet, and extracting the information to form an N-tuple.
  • the quick association table it is searched whether there is a corresponding N-tuple, and if so, the application of the identification rule/algorithm corresponding to the N-tuple is replaced with the application of the new rule/algorithm currently used, or the new rule/algorithm is added. Go to the list of existing apps. If the identification tuple uses a tuple with only the network address, it can be updated in an additional manner; if it is a binary or triple, it can be replaced. The way to update processing.
  • an embodiment of the present invention further provides a device for protocol identification, including:
  • the extracting unit 401 is configured to extract an identification tuple of the message; the foregoing identifying tuple includes at least a network address;
  • a storage unit 402 configured to store an identification table
  • the algorithm search unit 403 searches the identification table for the algorithm application list corresponding to the identification tuple; the protocol identification unit 404 is configured to use the algorithm in the application algorithm list to identify the content of the packet, thereby obtaining the protocol type of the packet. .
  • the extracting unit 401 is specifically configured to extract a network address of the packet; or, a network address and a port; or a network address, a port, and a transport layer protocol.
  • the foregoing apparatus further includes:
  • the searching unit 501 is configured to: if the algorithm application list search corresponding to the identification tuple in the identification table fails to be searched, or the content in the application application list fails to identify the content, the polling or pattern matching is used. The method identifies the above message.
  • the foregoing apparatus further includes:
  • the updating unit 601 is configured to update the algorithm of the message to the algorithm application list corresponding to the identification tuple in the identification table after the message is identified by using a polling or pattern matching manner.
  • the algorithm searching unit 403 is specifically configured to use the identification tuple as the key value, and use the hash search method to search the identification table for the algorithm application list corresponding to the identification tuple.
  • the advantage of adopting the dynamic addition method is that the identification table can be automatically updated with the change of the network environment, the identification table is obsolete and is not suitable for the new network environment, and the trouble of manually configuring the identification table can be avoided.
  • the embodiment of the present invention further provides a protocol identification system, including a message receiving device 701 and a device 702 identified by any protocol provided by the embodiment of the present invention.
  • the message received by the message receiving device 701 performs protocol identification.
  • the implementation of the protocol may refer to the method embodiment or the embodiment of the device identified by the protocol.
  • the embodiment uses the IP, Port, and transport layer protocol information of the packet to select the algorithm for preferentially using the identification.
  • the probability of successful matching will be higher, avoiding the use of all algorithms to identify the stream by polling or pattern matching, thus achieving high-speed protocol identification.
  • the identification tuple containing at least the IP address extracted from the message is used to find the corresponding algorithm, and then the found algorithm is used to identify the content of the message, and the content identification can improve the recognition accuracy of the message and reduce the misidentification.

Landscapes

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

Description

一种协议识别的方法、 装置和系统 本申请要求于 2009年 12月 10日 提交中 国专利局, 申请号为 200910225440.6, 发明名称为"一种协议识别的方法、 装置和系统"的中国专利 申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及通信技术领域, 特别涉及一种协议识别的方法、 装置和系统。
背景技术
如今网络上承载的应用越来越多,对带宽的要求也越来越高。运行商希望 保证其运营网络能够很好的承载各种关键业务(如: 网页 (WEB )浏览), 同 时限制一些非关键业务 (如: 互联网协议电话( Voice over Internet Protocol , VOIP )、 点对点 ( Peer to Peer, P2P ) )无节制的占用网络资源。 基于此, 运营 商需要对网络承载的报文(或称为数据流)在应用层使用的协议类型进行识别。
现有的协议类型识别的方式是轮询所有可能匹配的识别特征条件或算法 来进行识别。上述轮询的方式可以是采用顺序依次分批次轮询, 具体实现方式 一般为: 根据网络上协议使用的频繁度, 将系统内部的协议分成: 高频度协议 类, 普通协议类, 稀少协议类; 当数据流到来时, 先使用高频度协议类的所有 规则或识别算法尝试对这个数据流进行识别,如果识别不出来,再使用普通协 议类的所有规则或识别算法进行尝试, 再识别不出来,就使用稀少协议类的所 有规则或识别算法进行尝试。 现有的协议类型识别的方式还可以是模式匹配, 模式匹配的方式是一次扫描全部的协议,找出能够与报文匹配的的协议。 以上 两种都需要扫描全部的协议效率比较低。
为了提高协议识别效率出现了新的协议识别方法: 提取报文的网络协议
( Internet Protocol , IP )地址和端口对; 在预置的关联表中查找包括该网络 地址和端口对的表项,关联表存储有网络地址和端口对与以业务类型对应关系 的表项(业务类型与其使用的协议是对应的,确定业务类型就可以确定报文使 用的协议); 若在预置关联表中查找包括网络地址和端口对的表项, 报文的业 务类型即为该表项标示的业务类型。
发明人在实现本发明的过程中发现:由于在现网中存在大量的端口复用情 况, 即: 一个网络地址和端口对, 可以用于不同类型的业务。 仅使用网络地址 和端口对来确定数据流的业务类型,存在大量的误识别。 因而该方法不适用于 对报文识别精度要求较高的场景。
发明内容
本发明实施例提供一种协议识别的方法、装置和系统, 以提高报文识别的 精度。 下技术方案实现:
提取 ^艮文的识别元组;, 所述识别元组至少包含网络地址;
在识别表中查找所述识别元组对应的算法应用列表;
使用所述算法应用列表中的算法对报文进行内容识别,从而获取所述报文 的协议类型。
一种协议识别的装置, 包括:
提取单元, 用于提取报文的识别元组;, 所述识别元组至少包含网络地址; 存储单元, 用于存储识别表;
算法查找单元, 在识别表中查找所述识别元组对应的算法应用列表; 协议识别单元, 用于使用所述算法应用列表中的算法对报文进行内容识 另 , 从而获取所述报文的协议类型。
一种协议识别系统,包括报文接收装置和本发明实施例提供的任一协议识 别的装置,所述协议识别的装置用于对所述报文接收装置接收到的报文进行协 议识别。
上述技术方案具有如下有益效果: 采用从报文中提取的至少包含 IP地址 的识别元组来查找对应的算法, 然后使用查找到的算法对报文进行内容识别, 进行内容识别能够提高报文的识别精度、 减少误识别。 附图说明 为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所 需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明 的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提 下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例一方法流程示意图;
图 2为本发明实施例一方法流程示意图;
图 3为本发明实施例二方法流程示意图;
图 4为本发明实施例三装置结构示意图;
图 5为本发明实施例三装置结构示意图;
图 6为本发明实施例三装置结构示意图;
图 7为本发明实施例四系统结构示意图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
实施例一, 如图 1所示, 本发明实施例提供了一种协议识别的方法, 包括: 101 : 提取报文的识别元组; 上述识别元组至少包含网络地址;
上述识别元组可以是 N元组例如: 一元组: 网络地址; 或者, 二元组: 网 络地址和端口; 或者, 三元组: 网络地址、 端口 (port )、 以及传输层协议。 当 然元组具体有几元可以根据协议识别的需要进行设定, 本实施例对此不予限 采用源端的 IP地址那么 port也使用源端的 port, 如果采用目的端的 IP地址那么 port也使用目的端的 port。
102: 在识别表中查找上述识别元组对应的算法应用列表;
具体地, 上述在识别表中查找识别元组对应的算法应用列表包括: 以识别 元组作为键 ( key )值, 采用哈希 (hash ) 查找的方法从识别表中查找上述识 别元组对应的算法应用列表。 hash查找的方法作为一个具体的查找方式具有其 迅速查找的优势,可以理解的是 hash查找的方法并不是从表中查找表项的唯一 实现方式, 故 hash查找的方式作为一个举例不应理解为对本发明实施例的限 定。上述查找的方式可以是用识别元组匹配识别表中的表项来查找与识别元组 对应的算法应用列表。 另外算法也可以理解为识别报文的规则。 识别表可以是 预先设置;另外本发明实施例将在后续的实施例说明中介绍通过动态的方式对 识别表进行更新的方法。
103: 使用上述算法应用列表中的算法对报文进行内容识别, 从而获取上 述报文的协议类型。
上述步骤 102确定报文优先使用的用于识别的算法,然后在步骤 103使用上 述算法对报文进行识别。从本发明的实施例提供的以上技术方案可以看出, 由 于本发明实施例在获取数据流的报文后, 先使用报文的 IP、 Port, 传输层协议 等信息选取优先使用识别的算法。此次匹配成功的几率会较高,避免了使用所 有的算法采用轮询或模式匹配方式对该流进行识别,这样就实现了高速的协议 识别。 并且采用从 ^艮文中提取的至少包含 IP地址的识别元组来查找对应的算 法, 然后使用查找到的算法对报文进行内容识别, 进行内容识别能够提高报文 的识别精度、 减少误识别。
如图 2所示, 更进一步地, 在图 1对应的实现方式的基础之上, 还包括: 201 :若上述在识别表中查找上述识别元组对应的算法应用列表查找失败, 或者使用上述算法应用列表中的算法对报文进行内容识别失败,则可以采用轮 询或模式匹配的方式对上述报文进行识别。当然采用其他的方式来进行识别本 发明实施例不予限定。 上述轮询的方式可以是: 固定的顺序依次分批次轮询, 也可以理解为采用尝试的方式进行模式匹配所有的特征规则从而找出报文使 用的协议的任意方式, 本发明实施例对比不予限定。上述查找应用列表的结果 以及对报文内容识别的是否失败都可以在查找和识别的结果中得到,当然采用 判断的方式也是可行的, 本发明实施例对此不予限定。
更进一步地, 本发明实施例,还提供了通过动态的方式对识别表进行更新 的方法, 具体可以是在步骤 201之后:
203: 将上述报文的算法更新到: 上述识别表中上述识别元组对应的算法 应用列表。 可以理解的是, 如果识别表是预置的, 那么可以不用更新, 更新也 是可以的; 如果没有预置识别表, 这可以采用执行步骤 202和 203的方式将识别 元组对应的算法应用列表填入识别表。 上述更新可以理解为对原有数据的增 加, 也可以是创建新的表项来存储识别元组以及其对应的算法应用列表。 采用动态添加的实现方式其优点在于,能够自动的随着网络环境的变化更 新识别表,避免识别表陈旧而不适用于新的网络环境,也可以避免需要人工来 配置识别表的麻烦。 实施例二, 本实施例将以提取 N元组信息为例, 采用匹配的方式查找识别 表, 已经通过判断的方式来确定是否查找和识别成功为例,对协议识别的方法 进行说明, 如图 3所示, 包括:
301 : 提取报文的 N元组, N元组包括报文的网络地址、 端口、 传输层协议 等。
上述 N元组, 可以指一元组(只有网络地址)、 二元组(包括网络地址、 端口) 和三元组 (包括网络地址、 端口、 传输层协议(例如: 传输控制协议 ( Transmission Control Protocol , TCP ) /用户数据才艮文十办议 ( User Datagram Protocol , UDP ) /流控制传输协议 ( Stream Control Transmission Protocol , SCTP ) )。
在现网中, 很多数据流属于客户端 /服务器型的应用。 其中, 作为服务器 的主机, 一般只提供少数几种协议类型的服务; 更进一步, 服务器主机在固定 端口上提供固定的服务, 即在一定时间内, 同一个端口一般只提供同一种协议 类型的服务。考虑到端口复用, 则主机的同一个端口可能提供其他协议类型的 服务,并且无法把握同一台主机的同一端口是否改为提供另外的其他协议类型 的服务。 因而在识别出某台主机的特定端口提供某种协议类型的服务后,将该 主机的 N元组信息(网络地址、 端口、 传输层协议的组合)记录下来, 同时将 识别该协议类型的规则 /算法和该 N元组对应起来。 当后续流到来, 如果该后续 流的 N元组和先前保存的 N元组相同, 则先进行保存的 N元组对应的协议识别 规则 /算法进行识别。 在大多数的情况下, 使用对应的规则 /算法就能识别出该 流使用的协议类型, 不必要在进行其他规则 /算法的尝试, 所以采用这种识别 方式可以将同一个流的识别性能提高几倍, 同时也不存在误识别。 本发明实施 例所提到的 N元组信息可以是以一个流的源端信息组成的 N元组, 也可以是目 的端信息组成的 N元组。 由于报文中的 IP和 Port各有两个, 分别为源端和目的 端的, 所以源端信息包括 ^艮文的源端 IP、 源端 Port, 而目的端信息包括 文的 目的 IP、 目的 Port。 构建 N元组时, 需要源端或目的端的信息, 三元组时还需 要加上传输层协议。
302: 在使用上述 N元组采用匹配的方式在识别表中查找该 N元组的表项, 识别表存放有 N元组和应用列表对应关系对的表项。
识别表的表项的来源可以是: 根据协议识别结果, 确定提供服务的主机的
N元组信息, 将 N元组信息保存, 因为端口存在复用, 并且不能确定该端口提 供的服务类型什么时间变化, 所以将其和使用的识别的规则 /算法等应用列表 对应起来。 在使用时, 提取待识别报文的 N元组信息, 然后到识别表中进行匹 配。 匹配识别表的表项时, 只要待匹配报文源和目的端其中一个组成的 N元组 信息匹配即可。 查找识别表建议使用 hash查找, 以 N元组作为 key值。
303: 判断是否匹配成功; 若成功, 则进入 304, 若失败, 则进入 306;
304: 使用查找到得表项的算法 /规则应用列表进行内容识别, 从而获取上 述报文的协议类型。
因为识别表中的 N元组有对应的识别规则 /算法应用列表,因而在识别表匹 配到待识别报文的 N元组后,可以使用对应的规则 /算法应用列表对报文进行内 容识别, 从而获取该报文的协议类型。
305: 判断内容识别是否成功, 若成功, 流程就结束了, 若失败, 则进入
306;
306: 进行所有特征规则的模式匹配 /所有识别算法对报文进行识别; 上述步骤 306可以是采用现有的任何方法来进行识别匹配, 例如尝试轮询 或模式匹配所有识别算法,对待识别报文进行内容识别。 具体采用何种方式本 发明实施例不予限定。
307:识别成功后,如果确定报文采用的协议是客户端 /服务器类型的协议, 则将服务器端的主机的 N元组和使用的识别规则 /算法对应关系对更新到识别 表。 更新的具体实现方式可以是: 根据识别的规则 /算法确定报文中作为服务 器的主机的网络地址、 端口、传输层协议等信息, 将其提取出来, 组成 N元组。 然后在快速关联表中查找是否存在对应的 N元组, 如果存在, 将该 N元组对应 的识别规则 /算法的应用替换为现使用的新规则 /算法的应用,或将新规则 /算法 追加到已有的应用列表。如果识别元组采用的是只有网络地址的一元组, 可以 采用追加的方式进行更新处理; 而如果是使用二元组或三元组, 可以采用替换 的方式进行更新处理。
在实际的网络中, 使用客户端 /服务器型协议类型(主要是 P2P、 超文本传 输协议( Hypertext Transfer Protocol, HTTP )、 其它 WEB协议等) 的数据流占 整个网络流量的绝大部分。 而本发明实施的方案使用的对象可以是这类协议, 以数据流的识别成功为基础,提高后续流的识别性能, 进而提高识别装置整体 的性能: 经测试, 经过这样的处理, 针对客户端 /服务器型的协议识别, 后续 流的识别性能和首流相比, 有很大的提高, 使整个协议识别装置的性能提高 50%以上。 实施例三, 如图 4所示, 本发明实施例还提供了一种协议识别的装置, 包 括:
提取单元 401, 用于提取报文的识别元组; 上述识别元组至少包含网络地 址;
存储单元 402, 用于存储识别表;
算法查找单元 403, 在识别表中查找上述识别元组对应的算法应用列表; 协议识别单元 404, 用于使用上述算法应用列表中的算法对报文进行内容 识别, 从而获取上述报文的协议类型。
具体地, 提取单元 401, 具体用于提取报文的网络地址; 或者, 网络地址 和端口; 或者, 网络地址、 端口、 以及传输层协议。
如图 5所示, 上述装置, 还包括:
查找单元 501, 用于若上述在识别表中查找上述识别元组对应的算法应用 列表查找失败, 或者使用上述算法应用列表中的算法对报文进行内容识别失 败, 则采用轮询或模式匹配的方式对上述报文进行识别。
如图 6所示, 上述装置, 还包括:
更新单元 601, 用于在采用轮询或模式匹配的方式对上述报文进行识别之 后,将上述报文的算法更新到: 上述识别表中上述识别元组对应的算法应用列 表。
具体地, 上述算法查找单元 403, 具体用于以识别元组作为键值, 采用哈 希查找的方法从识别表中查找上述识别元组对应的算法应用列表。
从本发明的实施例提供的以上技术方案可以看出,由于本发明实施例在获 取数据流的报文后, 先使用报文的 IP、 Port, 传输层协议等信息选取优先使用 识别的算法。此次匹配成功的几率会较高,避免了使用所有的算法采用轮询或 模式匹配方式对该流进行识别, 这样就实现了高速的协议识别。 并且采用从报 文中提取的至少包含 IP地址的识别元组来查找对应的算法,然后使用查找到的 算法对报文进行内容识别, 进行内容识别能够提高报文的识别精度、减少误识 别。
采用动态添加的实现方式其优点在于,能够自动的随着网络环境的变化更 新识别表,避免识别表陈旧而不适用于新的网络环境,也可以避免需要人工来 配置识别表的麻烦。
如图 7所示, 本发明实施例还提供了一种协议识别系统, 包括报文接收装 置 701和本发明实施例提供的任一协议识别的装置 702, 上述协议识别的装置 702用于对上述报文接收装置 701接收到的报文进行协议识别。具体对报文进行 协议识别的实现可以参考方法实施例也可以参考协议识别的装置的实施例。
从本发明的实施例提供的以上技术方案可以看出,由于本发明实施例在获 取数据流的报文后, 先使用报文的 IP、 Port, 传输层协议等信息选取优先使用 识别的算法。此次匹配成功的几率会较高,避免了使用所有的算法采用轮询或 模式匹配方式对该流进行识别, 这样就实现了高速的协议识别。 并且采用从报 文中提取的至少包含 IP地址的识别元组来查找对应的算法,然后使用查找到的 算法对报文进行内容识别, 进行内容识别能够提高报文的识别精度、减少误识 别。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件完成,上述的程序可以存储于一种计算机可 读存储介质中, 上述提到的存储介质可以是只读存储器, 磁盘或光盘等。
以上对本发明实施例所提供的一种协议识别的方法、装置和系统进行了详 实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同时,对于本领 域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有 改变之处, 综上所述, 本说明书内容不应理解为对本发明的限制。

Claims

权 利 要 求
1、 一种协议识别的方法, 其特征在于, 包括:
提取 ^艮文的识别元组, 所述识别元组至少包含网络地址;
在识别表中查找所述识别元组对应的算法应用列表;
使用所述算法应用列表中的算法对报文进行内容识别,从而获取所述报文 的协议类型。
2、 根据权利要求 1所述方法, 其特征在于, 所述识别元组包括: 网络地址; 或者,
网络地址和端口; 或者,
网络地址、 端口、 以及传输层协议。
3、 根据权利要求 1或 2所述方法, 其特征在于, 若所述在识别表中查找所 述识别元组对应的算法应用列表查找失败,或者使用所述算法应用列表中的算 法对报文进行内容识别失败,则采用轮询或模式匹配的方式对所述报文进行识 别。
4、根据权利要求 3所述方法, 其特征在于, 采用轮询或模式匹配的方式对 所述报文进行识别之后还包括:
将所述报文的算法更新到所述识别表中所述识别元组对应的算法应用列 表。
5、根据权利要求 1所述方法。 其特征在于, 所述在识别表中查找识别元组 对应的算法应用列表包括: 以识别元组作为键值, 采用哈希查找的方法从识别 表中查找所述识别元组对应的算法应用列表。
6、 一种协议识别的装置, 其特征在于, 包括:
提取单元, 用于提取报文的识别元组, 所述识别元组至少包含网络地址; 存储单元, 用于存储识别表;
算法查找单元, 在识别表中查找所述识别元组对应的算法应用列表; 协议识别单元, 用于使用所述算法应用列表中的算法对报文进行内容识 另 , 从而获取所述报文的协议类型。
7、 根据权利要求 6所述装置, 其特征在于, 提取单元, 具体用于提取报文 的网络地址; 或者, 网络地址和端口; 或者, 网络地址、 端口、 以及传输层协 议。
8、 根据权利要求 6所述装置, 其特征在于, 还包括:
查找单元,用于若所述在识别表中查找所述识别元组对应的算法应用列表 查找失败, 或者使用所述算法应用列表中的算法对报文进行内容识别失败, 则 采用轮询或模式匹配的方式对所述报文进行识别。
9、 根据权利要求 8所述方法, 其特征在于, 还包括:
更新单元, 用于在采用轮询或模式匹配的方式对所述报文进行识别之后, 将所述报文的算法更新到所述识别表中所述识别元组对应的算法应用列表。
10、 根据权利要求 6所述装置。 其特征在于, 所述算法查找单元, 具体用 于以识别元组作为键值,采用哈希查找的方法从识别表中查找所述识别元组对 应的算法应用列表。
11、 一种协议识别系统, 其特征在于, 包括报文接收装置和如权利要求 6 - 10任一项所述的协议识别的装置, 所述协议识别的装置用于对所述报文接 收装置接收到的报文进行协议识别。
PCT/CN2010/077569 2009-12-10 2010-10-05 一种协议识别的方法、装置和系统 WO2011069388A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
ES10835423T ES2700245T3 (es) 2009-12-10 2010-10-05 Método, aparato y sistema para identificación de protocolo
EP10835423.4A EP2482517B1 (en) 2009-12-10 2010-10-05 Method, apparatus and system for protocol identification
US13/466,245 US8782068B2 (en) 2009-12-10 2012-05-08 Method, apparatus and system for protocol identification

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200910225440.6A CN102098272B (zh) 2009-12-10 2009-12-10 一种协议识别的方法、装置和系统
CN200910225440.6 2009-12-10

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/466,245 Continuation US8782068B2 (en) 2009-12-10 2012-05-08 Method, apparatus and system for protocol identification

Publications (1)

Publication Number Publication Date
WO2011069388A1 true WO2011069388A1 (zh) 2011-06-16

Family

ID=44131138

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/077569 WO2011069388A1 (zh) 2009-12-10 2010-10-05 一种协议识别的方法、装置和系统

Country Status (5)

Country Link
US (1) US8782068B2 (zh)
EP (1) EP2482517B1 (zh)
CN (1) CN102098272B (zh)
ES (1) ES2700245T3 (zh)
WO (1) WO2011069388A1 (zh)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291403A (zh) * 2011-08-10 2011-12-21 华为技术有限公司 实现pos端口的链路层协议自适应的方法和设备
CN102394893B (zh) * 2011-11-23 2014-11-26 Tcl王牌电器(惠州)有限公司 检验终端与服务端通讯协议的方法、服务器及系统
US8763095B2 (en) * 2012-04-12 2014-06-24 Sap Ag Authorization sharing
CN104718736B (zh) * 2012-08-31 2018-02-06 惠普发展公司,有限责任合伙企业 通信系统
US9462087B2 (en) * 2014-05-09 2016-10-04 Unisys Corporation Avoiding collisions in internet protocol (IP) packet identification numbers
CN105138523A (zh) * 2014-05-30 2015-12-09 富士通株式会社 在文本中确定语义关键词的方法和装置
US9755972B1 (en) * 2015-06-09 2017-09-05 Google Inc. Protocol-independent receive-side scaling
CN106921637B (zh) * 2015-12-28 2020-02-14 华为技术有限公司 网络流量中的应用信息的识别方法和装置
US10623308B2 (en) * 2017-02-17 2020-04-14 Dell Products L.P. Flow routing system
KR20190051564A (ko) * 2017-11-07 2019-05-15 에스케이하이닉스 주식회사 메모리 시스템 및 그것의 동작 방법
CN113660174B (zh) * 2020-05-12 2024-01-09 华为技术有限公司 一种业务类型确定方法及相关设备
CN113507465B (zh) * 2021-07-07 2022-09-09 赞同科技股份有限公司 socket与http共用端口及其报文处理方法与装置
CN113572761B (zh) * 2021-07-22 2023-06-30 四川英得赛克科技有限公司 一种设备识别方法、装置、电子设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1738290A (zh) * 2004-08-18 2006-02-22 华为技术有限公司 基于访问控制列表的网络访问控制方法
CN101287010A (zh) * 2008-06-12 2008-10-15 华为技术有限公司 识别和验证消息协议类型的方法和装置
CN101534248A (zh) * 2009-04-14 2009-09-16 华为技术有限公司 深度报文识别方法和系统及业务板

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100501080B1 (ko) * 2000-12-19 2005-07-18 노병희 인터넷상 트래픽의 상위 계층 프로토콜들을 구분하는 방법및 장치
US7240041B2 (en) * 2003-11-25 2007-07-03 Freescale Semiconductor, Inc. Network message processing using inverse pattern matching
CN1988543A (zh) 2006-12-07 2007-06-27 华为技术有限公司 报文类型识别方法及装置、报文首部压缩方法及系统
JP2008172457A (ja) * 2007-01-10 2008-07-24 Fujitsu Ltd 端末特定プログラム、端末特定装置およびメールシステム
EP2127347B1 (en) * 2007-02-12 2013-11-06 Telefonaktiebolaget LM Ericsson (publ) Method and system for a communication session initialization in a telecommunication network
US8982887B2 (en) * 2007-05-18 2015-03-17 International Business Machines Corporation System, method and program for making routing decisions
CN101184089A (zh) 2007-12-14 2008-05-21 浙江工业大学 一种基于端口与内容混杂检测的协议识别方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1738290A (zh) * 2004-08-18 2006-02-22 华为技术有限公司 基于访问控制列表的网络访问控制方法
CN101287010A (zh) * 2008-06-12 2008-10-15 华为技术有限公司 识别和验证消息协议类型的方法和装置
CN101534248A (zh) * 2009-04-14 2009-09-16 华为技术有限公司 深度报文识别方法和系统及业务板

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2482517A4 *

Also Published As

Publication number Publication date
US20120221590A1 (en) 2012-08-30
ES2700245T3 (es) 2019-02-14
EP2482517A1 (en) 2012-08-01
EP2482517A4 (en) 2012-09-26
US8782068B2 (en) 2014-07-15
EP2482517B1 (en) 2018-09-05
CN102098272A (zh) 2011-06-15
CN102098272B (zh) 2014-02-19

Similar Documents

Publication Publication Date Title
WO2011069388A1 (zh) 一种协议识别的方法、装置和系统
US20200228635A1 (en) Load Balancing and Session Persistence in Packet Networks
US7970402B2 (en) Method for performing handovers in a communication system
US8626903B2 (en) Method and device for identifying an SCTP packet
US8510415B2 (en) Data distribution method, data distribution system and relevant devices in edge network
US9712559B2 (en) Identifying frames
JP3717836B2 (ja) ダイナミック・ロード・バランサ
WO2017000878A1 (zh) 报文处理
US20170318059A1 (en) Single pass load balancing and session persistence in packet networks
US20190222656A1 (en) Communication Method and Apparatus
WO2015117337A1 (zh) 网络规则条目的设置方法及装置
EP2826213A1 (en) Method and system for fast and large-scale longest prefix matching
WO2011032321A1 (zh) 一种数据转发方法、数据处理方法、系统以及相关设备
CN108881034B (zh) 一种应用于bt系统的请求响应方法、设备及系统
WO2016070822A1 (zh) 媒体资源反馈方法及装置
WO2015131720A1 (zh) 报文处理方法及装置
WO2010139237A1 (zh) 一种深度报文检测方法和装置
EP3018871B1 (en) Content name compression method and apparatus
US10021192B2 (en) Communication control device and communication control method
JP2015501569A (ja) ゲートウェイ、並びにゲートウェイに対応する方法、コンピュータプログラム、及び記憶手段
US11381544B2 (en) Service type determining method and related device
WO2015184979A1 (zh) 处理报文、发送信息、接收信息的方法及装置
JP2016178530A (ja) 通信システム、通信端末、通信方法、プログラム
CN113992583B (zh) 一种表项维护方法及装置
WO2013091191A1 (zh) 数据分流方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10835423

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2010835423

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE