[go: up one dir, main page]

CN103475585A - Method for refreshing fast forwarding table matching order at fixed time - Google Patents

Method for refreshing fast forwarding table matching order at fixed time Download PDF

Info

Publication number
CN103475585A
CN103475585A CN2013103712821A CN201310371282A CN103475585A CN 103475585 A CN103475585 A CN 103475585A CN 2013103712821 A CN2013103712821 A CN 2013103712821A CN 201310371282 A CN201310371282 A CN 201310371282A CN 103475585 A CN103475585 A CN 103475585A
Authority
CN
China
Prior art keywords
forwarding table
fast forwarding
fast
matching
matches
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.)
Pending
Application number
CN2013103712821A
Other languages
Chinese (zh)
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.)
TIANJIN CP-WORLD INFORMATION TECHNOLOGY Co Ltd
Original Assignee
TIANJIN CP-WORLD INFORMATION TECHNOLOGY Co Ltd
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 TIANJIN CP-WORLD INFORMATION TECHNOLOGY Co Ltd filed Critical TIANJIN CP-WORLD INFORMATION TECHNOLOGY Co Ltd
Priority to CN2013103712821A priority Critical patent/CN103475585A/en
Publication of CN103475585A publication Critical patent/CN103475585A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种定时刷新快转表匹配顺序的方法,其特征在于,包括以下步骤:S1:网络设备接收报文,并根据IP五元组查找快速转发表,若查找到相应表项,则将所述表项匹配次数加一,否则,所述快速转发表创建相应表项,并将匹配次数记录为一;S2:每隔一定时间重新扫描一遍快速转发表,按照匹配次数从大至小对表项进行排序。本发明利用网络设备统计快速连接表项的使用率,定时的更新表项的排列顺序,收到报文后优先匹配使用率高的表项,从而减少报文匹配时间,提高匹配效率,提高网络设备对报文的平均处理速度。The invention discloses a method for regularly refreshing the matching order of the fast forwarding table, which is characterized in that it comprises the following steps: S1: network equipment receives the message, and searches the fast forwarding table according to the IP quintuple, if the corresponding entry is found, Then add one to the number of matches of the entry, otherwise, the fast forwarding table creates a corresponding entry, and records the number of matches as one; S2: re-scan the fast forwarding table every certain time, according to the number of matches from large to Small sorts the table entries. The present invention uses network equipment to count the usage rate of fast connection items, regularly updates the arrangement order of the items, and matches the items with high usage rate first after receiving the message, thereby reducing the message matching time, improving the matching efficiency, and improving the network efficiency. Average packet processing speed of the device.

Description

一种定时刷新快转表匹配顺序的方法A method for regularly refreshing the matching sequence of the fast forward table

技术领域technical field

本发明涉及网络通信技术领域,特别涉及一种定时刷新快转表匹配顺序的方法。The invention relates to the technical field of network communication, in particular to a method for regularly refreshing the matching sequence of a quick-forward table.

背景技术Background technique

网络设备中,通常采用快速连接表对报文进行快速处理及转发,使老旧的逐包处理方式转变成了逐流处理方式,大大提高了报文处理及转发速度。而现有的网络设备是通过IP五元组来对报文进行组建快速转发表的,快速转发表由报文的原IP地址、目的IP地址、协议类型、原端口号和目的端口号组成等五个元素组成,以此判断五元组相同的报文作为相同的一组流进行相同动作的处理,相同动作包括了报文NAT转换规则、TMA规则、AAA行为规则、IPSEC加解密规则等。In network equipment, the fast connection table is usually used to quickly process and forward the message, so that the old packet-by-packet processing method is transformed into a flow-by-flow processing method, which greatly improves the message processing and forwarding speed. However, existing network devices use IP quintuples to construct a fast forwarding table for messages. The fast forwarding table is composed of the original IP address, destination IP address, protocol type, original port number and destination port number of the message, etc. Composed of five elements, it is judged that packets with the same quintuple are treated as the same group of flows for the same action. The same action includes packet NAT conversion rules, TMA rules, AAA behavior rules, IPSEC encryption and decryption rules, etc.

发明内容Contents of the invention

(一)要解决的技术问题(1) Technical problems to be solved

本发明要解决的是提高网络设备中报文处理速度的问题,尤其是对于高端网络设备,其中表项数量达到百万条数量级,报文匹配时间较长,用户体验感较低。The present invention aims to solve the problem of increasing the message processing speed in network equipment, especially for high-end network equipment, where the number of entries reaches the order of one million, the message matching time is long, and the user experience is low.

(二)技术方案(2) Technical solution

为解决上述技术问题,本发明提供了一种定时刷新快转表匹配顺序的方法,其特征在于,In order to solve the above-mentioned technical problems, the present invention provides a method for regularly refreshing the matching order of the quick-forward table, which is characterized in that,

包括以下步骤:Include the following steps:

S1:网络设备接收报文,并根据IP五元组查找快速转发表,若查找到相应表项,则将所述表项匹配次数加一,否则,所述快速转发表创建相应表项,并将匹配次数记录为一;S1: The network device receives the message, and searches the fast forwarding table according to the IP quintuple. If the corresponding entry is found, add one to the matching times of the table entry, otherwise, the fast forwarding table creates the corresponding entry, and Record the number of matches as one;

S2:每隔一定时间重新扫描一遍快速转发表,按照匹配次数从大至小对表项进行排序。S2: Re-scan the fast forwarding table at regular intervals, and sort the entries according to the number of matches from the largest to the smallest.

步骤S2中所述每隔一定时间为每隔30分钟。The regular time interval in step S2 is every 30 minutes.

(三)有益效果(3) Beneficial effects

本发明利用网络设备统计快速连接表项的使用率,定时的更新表项的排列顺序,收到报文后优先匹配使用率高的表项,从而减少报文匹配时间,提高匹配效率,提高网络设备对报文的平均处理速度。The present invention uses network equipment to count the usage rate of fast connection items, regularly updates the arrangement order of the items, and preferentially matches the items with high usage rate after receiving the message, thereby reducing the message matching time, improving the matching efficiency, and improving the network efficiency. Average packet processing speed of the device.

具体实施方式Detailed ways

下面对本发明的具体实施方式作进一步详细描述。以下实施例用于说明本发明,但不用来限制本发明的范围。Specific embodiments of the present invention will be further described in detail below. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

本实施方式的方法包括以下步骤:The method of the present embodiment comprises the following steps:

S1:网络设备接收报文,根据IP五元组查找快速转发表,若查找到相应表项,则将表项的匹配次数加一,否则,快速转发表创建相应表项,并将匹配次数记录为一;S1: The network device receives the packet, searches the fast forwarding table according to the IP quintuple, if the corresponding entry is found, then adds one to the matching times of the table entry, otherwise, creates the corresponding table entry in the fast forwarding table, and records the matching times for one;

S2:每隔一定时间重新扫描一遍快速转发表,按照匹配次数从大至小对表项进行排序,即将匹配次数最多的排在最前面,匹配次数第二多的排在第二位,依此类推。S2: Re-scan the fast forwarding table every certain period of time, and sort the entries according to the number of matches from large to small, that is, the one with the most matches is ranked first, and the one with the second most matches is ranked second, and so on analogy.

进一步地,步骤S2中,所述每隔一定时间是每隔30分钟,本发明对此不作限定,可以根据实际需要对时间间隔进行设置。Further, in step S2, the said interval is every 30 minutes, which is not limited in the present invention, and the time interval can be set according to actual needs.

进一步地,步骤S2中,每隔一定时间扫描一遍快速转发表可以替换为在固定时间刷新快速转发表,比如,选择在上网人数较少的时段对快速转发表进行刷新。Further, in step S2, scanning the fast forwarding table at regular intervals may be replaced by refreshing the fast forwarding table at a fixed time, for example, choosing to refresh the fast forwarding table during a period when there are fewer Internet users.

本发明通过动态统计报文的转发次数来对表项进行排序,,定时的更新表项的排列顺序,收到报文后优先匹配使用率高的表项,从而减少报文匹配时间,提高匹配效率,提高网络设备对报文的平均处理速度,还能根据用户需要来配置刷新表项的时间间隔,从而规避连接震荡的问题。避免了网络设备由于繁忙从而误判而造成的丢包问题。The present invention sorts the table items by dynamically counting the forwarding times of the message, regularly updates the arrangement order of the table items, and preferentially matches the table items with high utilization rate after receiving the message, thereby reducing the message matching time and improving the matching efficiency. Efficiency, improve the average packet processing speed of network devices, and configure the time interval for refreshing table entries according to user needs, so as to avoid the problem of connection oscillation. The problem of packet loss caused by misjudgment due to busy network equipment is avoided.

以上实施方式仅用于说明本发明,而并非对本发明的限制,有关技术领域的普通技术人员,在不脱离本发明的精神和范围的情况下,还可以做出各种变化和变型,因此所有等同的技术方案也属于本发明的范畴,本发明的专利保护范围应由权利要求限定。The above embodiments are only used to illustrate the present invention, but not to limit the present invention. Those of ordinary skill in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, all Equivalent technical solutions also belong to the category of the present invention, and the scope of patent protection of the present invention should be defined by the claims.

Claims (2)

1. the method for a periodic refreshing fast forwarding table matching order, is characterized in that,
Comprise the following steps:
S1: the network equipment receives message, and searches the fast-forwarding table according to the IP five-tuple, if find corresponding list item, described list item matching times is added to one, otherwise described fast-forwarding table creates corresponding list item, and matching times is recorded as to one;
S2: rescan at regular intervals the fast-forwarding table one time, to little, list item is sorted from large according to matching times.
2. a kind of method of periodic refreshing fast forwarding table matching order as claimed in claim 1, is characterized in that, described in step S2, is every 30 minutes at regular intervals.
CN2013103712821A 2013-08-23 2013-08-23 Method for refreshing fast forwarding table matching order at fixed time Pending CN103475585A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013103712821A CN103475585A (en) 2013-08-23 2013-08-23 Method for refreshing fast forwarding table matching order at fixed time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013103712821A CN103475585A (en) 2013-08-23 2013-08-23 Method for refreshing fast forwarding table matching order at fixed time

Publications (1)

Publication Number Publication Date
CN103475585A true CN103475585A (en) 2013-12-25

Family

ID=49800290

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013103712821A Pending CN103475585A (en) 2013-08-23 2013-08-23 Method for refreshing fast forwarding table matching order at fixed time

Country Status (1)

Country Link
CN (1) CN103475585A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104092612A (en) * 2014-06-05 2014-10-08 汉柏科技有限公司 Method and device for updating matching order of fast forwarding table
CN104574927A (en) * 2014-12-14 2015-04-29 杭州赫智电子科技有限公司 Infrared matching method and infrared matching system with feedback function
CN108616587A (en) * 2018-04-24 2018-10-02 新华三技术有限公司 A kind of list item synchronous method, device and the network equipment
CN111585774A (en) * 2020-03-24 2020-08-25 福建天泉教育科技有限公司 Session updating method and storage medium
CN113645188A (en) * 2021-07-07 2021-11-12 中国电子科技集团公司第三十研究所 A method for fast forwarding of data packets based on security association

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102664816A (en) * 2012-05-30 2012-09-12 迈普通信技术股份有限公司 Device and method for quickly searching MPLS (multi-protocol label switching) forwarding database
CN103067281A (en) * 2012-12-28 2013-04-24 深圳市磊科实业有限公司 Router fast forwarding method and system implementing the same

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102664816A (en) * 2012-05-30 2012-09-12 迈普通信技术股份有限公司 Device and method for quickly searching MPLS (multi-protocol label switching) forwarding database
CN103067281A (en) * 2012-12-28 2013-04-24 深圳市磊科实业有限公司 Router fast forwarding method and system implementing the same

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104092612A (en) * 2014-06-05 2014-10-08 汉柏科技有限公司 Method and device for updating matching order of fast forwarding table
CN104574927A (en) * 2014-12-14 2015-04-29 杭州赫智电子科技有限公司 Infrared matching method and infrared matching system with feedback function
CN108616587A (en) * 2018-04-24 2018-10-02 新华三技术有限公司 A kind of list item synchronous method, device and the network equipment
CN108616587B (en) * 2018-04-24 2022-01-25 新华三技术有限公司 Table item synchronization method and device and network equipment
CN111585774A (en) * 2020-03-24 2020-08-25 福建天泉教育科技有限公司 Session updating method and storage medium
CN113645188A (en) * 2021-07-07 2021-11-12 中国电子科技集团公司第三十研究所 A method for fast forwarding of data packets based on security association
CN113645188B (en) * 2021-07-07 2023-05-09 中国电子科技集团公司第三十研究所 A Fast Forwarding Method of Data Packet Based on Security Association

Similar Documents

Publication Publication Date Title
US9106443B2 (en) Forwarding table optimization with flow data
CN104702523B (en) Packet forwarding apparatus and method
CN103475585A (en) Method for refreshing fast forwarding table matching order at fixed time
CN102415062B (en) Hierarchical rate limiting of control packets
CN102217253B (en) Message forwarding method, equipment and network device
CN102487374B (en) Access control list realization method and apparatus thereof
US11863459B2 (en) Packet processing method and apparatus
CN104821890A (en) Realization method for OpenFlow multi-level flow tables based on ordinary switch chip
US20170041230A1 (en) Forwarding data packets
CN101242362B (en) Search key-value generating device and method
CN104518967A (en) Routing method, equipment and system
CN107196776A (en) A kind of method and apparatus of message forwarding
CN103888313B (en) Method for forecasting optimal timeout of flow table item
CN105721321A (en) Equal-cost multi-path outbound interface updating method and equal-cost multi-path outbound interface updating device
CN102546398B (en) Message matching method and device
WO2015123853A1 (en) Data flow processing method and apparatus
CN101848223A (en) Network processor-based method and device for realizing quick bidirectional forwarding detection of messages
CN103873712B (en) VoIP gateway detection method and multi-core processing equipment
CN105704052A (en) Quantized congestion notification message generation method and apparatus
CN101848143A (en) Method and device for processing QoS of flow of virtual private network
CN101247348B (en) Load sharing method and equipment
CN107645452A (en) A kind for the treatment of method and apparatus of unknown multicast packets
CN102761474A (en) Message filtering method and access equipment
CN110365667B (en) Attack message protection method and device and electronic equipment
CN107135166A (en) A kind of flow management system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
DD01 Delivery of document by public notice
DD01 Delivery of document by public notice

Addressee: Tianjin CP-World Information Technology Co.,Ltd. Person in charge of patents

Document name: Notice of commencement of preservation proceedings

DD01 Delivery of document by public notice
DD01 Delivery of document by public notice

Addressee: Tianjin CP-World Information Technology Co.,Ltd. Person in charge of patents

Document name: Notice of Termination of Program

Addressee: Tianjin CP-World Information Technology Co.,Ltd. Person in charge of patents

Document name: Regard as withdrawal notice

WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20131225