CN104579718B - A kind of device and method of optimization ARP aging mechanism - Google Patents
A kind of device and method of optimization ARP aging mechanism Download PDFInfo
- Publication number
- CN104579718B CN104579718B CN201310469518.5A CN201310469518A CN104579718B CN 104579718 B CN104579718 B CN 104579718B CN 201310469518 A CN201310469518 A CN 201310469518A CN 104579718 B CN104579718 B CN 104579718B
- Authority
- CN
- China
- Prior art keywords
- list item
- arp
- mac address
- duration
- digestion period
- 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.)
- Active
Links
Abstract
The present invention provides a kind of device and method of optimization ARP aging mechanism, and using on network devices, this method includes:To not have markd list item to be matched with mac address forwarding table in ARP table, the MAC Address of the list item has respective record in mac address forwarding table, then the list item is marked;The ageing time of the list item marked in ARP table is postponed into scheduled duration T1 again, when reaching ageing time, which is detected;When reaching scheduled ageing time, will not have markd list item to be handled according to existing aging rule in ARP table.Technical solution through the invention effectively optimizes existing ARP aging mechanism, improves the operational efficiency of CPU, reduces network load.
Description
Technical field
The present invention relates to network communication field more particularly to a kind of device and method of optimization ARP aging mechanism.
Background technology
During network communication, it often will appear travelling across VLAN(Virtual Local Area Network, virtual local area
Net)The case where E-Packeting, so-called travelling across VLAN forwarding are one kind of three layers of forwarding.Due to being used in two layer message forwarding
MAC Address, and IP address is used in three-tier message forwarding, so switching equipment is needed according to the ARP entry of caching come real
Existing secondary IP address has reached the purpose that travelling across VLAN E-Packets to the parsing of MAC Address.Wherein, ARP entry includes MAC
Location and its corresponding IP address.In order to ensure that the correctness of parsing, switching equipment need constantly to carry out the deletion of ARP entry more
Newly.
In the prior art, ARP entry can there are one ageing times, in ageing time, if receiving the response report of ARP
Text obtains transmission layer confirmation, will extend the ageing time of the list item, into next digestion period;If do not received really
Recognize, and do not applied, then delete the list item after a certain time, with releasing memory and optimizes search speed;If using
It crosses, but is not confirmed, then enter acquisition mode, if responded, enter next digestion period, if do not obtained really
Recognize, after a certain period of time, deletes the list item.
But many network equipments safeguard the realization method with list item application phase separation using list item at present, such as
Interchanger, it carries out message forwarding mainly by chip, and so, the chip inside interchanger can apply ARP entry, but
Safeguard that the work of ARP entry is completed by the CPU of chip exterior.For this kind of equipment, ARP entry in the prior art
Aging techniques can have hidden trouble:After ARP entry is handed down to chip by CPU, the corresponding message of the list item is all turned by chip
Hair, but CPU not will receive the corresponding message of the list item, and so, after ageing time, which will be deleted, chip meeting
A large amount of messages are sent in moment, and trigger ARP resolvings, cause cpu load overweight, serious CPU to be caused to paralyse, net
Network link down.
Invention content
In view of this, a kind of network administration apparatus of present invention offer and method, are applied on network management device, the device
Including match query unit, postpone probe unit and general processing unit, wherein
Match query unit will not have markd list item and mac address forwarding table when ARP entry reaches ageing time
It is matched, the MAC Address of the list item has respective record in mac address forwarding table, then the list item is marked;
Probe unit is postponed, the ageing time of the list item marked in ARP table is postponed into scheduled duration T1 again, when by predetermined
Duration T1 when reaching ageing time again, detects the list item;
General processing unit will not have markd list item to be handled according to existing aging rule in ARP table.
The present invention also provides a kind of methods of optimization ARP aging mechanism, are applied on the network equipment, this method includes:
Step A will not have markd list item and mac address forwarding table progress when ARP entry reaches ageing time
Match, if the MAC Address of the list item has respective record in mac address forwarding table, which is marked;
The ageing time of markd list item in ARP table is postponed scheduled duration T1, and passes through scheduled duration by step B again
T1 when reaching ageing time again, detects the list item;
Step C will not have markd list item to be handled according to predetermined aging rule in ARP table.
The present invention can optimize on the basis of existing ARP aging mechanism, since current many network equipments use
Be that list item is safeguarded and the realization method of list item application phase separation, such as interchanger, their internal chips can apply ARP table
, but safeguard that the work of ARP entry is completed by the CPU of chip exterior, such carry out ARP agings that can be rapidly and efficiently,
After ageing time, which will be deleted, and chip can send a large amount of messages in moment, and trigger ARP resolvings, cause
Cpu load is overweight, and the present invention avoids this hidden danger caused by prior art possibility.
Description of the drawings
Fig. 1 is the logical construction and its exemplary hardware ring for optimizing ARP aging mechanism devices in one embodiment of the present invention
The schematic diagram in border.
Fig. 2 is the general processing flowchart for optimizing ARP aging mechanism in one embodiment of the present invention.
Specific implementation mode
The present invention provide it is a kind of optimization ARP aging mechanism device and method adopted to solve in existing ARP aging mechanism
The hidden danger generated when safeguarding the realization method with list item application phase separation with list item.Referring to FIG. 1, in a kind of the excellent of software realization
It selects in mode, the present invention provides a kind of device of optimization ARP aging mechanism, is applied on the network equipment, device operation
Basic hardware environment includes CPU, memory, nonvolatile memory and various hardware, from logic level, the device packet
It includes:Match query unit postpones probe unit and general processing unit.It please refers to Fig.2.
Step 101, match query unit will not have markd list item and MAC Address when ARP entry reaches ageing time
Forwarding table is matched, and the MAC Address of the list item has respective record in mac address forwarding table, then the list item is marked;
Step 102, it postpones probe unit and the ageing time of the list item marked in ARP table is postponed into scheduled duration T1 again, when
By scheduled duration T1, when reaching ageing time again, which is detected;
Step 103, general processing unit is when reaching scheduled ageing time, will not have in ARP table markd list item by
It is handled according to existing aging rule.
The match query unit will not have markd list item to be forwarded with MAC Address when ARP entry reaches ageing time
Table is matched, and the MAC Address of the list item has respective record in mac address forwarding table, then illustrates the corresponding host of MAC Address
There is communication on two layers, that is to say, that the host is in normal communication state.It is handled for the ease of the judgement in later stage, by the table
Item is marked.Wherein, length when the interval time T1 would generally be than digestion period.
After having carried out match query, it will two results occur:One is the MAC Address of the list item in MAC Address
There is respective record in forwarding table, that is to say, that successful match;Another kind is the MAC Address of the list item in mac address forwarding table
There is no respective record, that is to say, that it fails to match.
In addition, if within a digestion period, some ARP entry is in a matching process, successful match, is marked
Note, then in matching process next time, which will not then be matched again.Until the list item enters next aging week
When the phase, after the label of the list item is cancelled, followed by matching process the list item can just be matched.
For the ARP entry of successful match, can will be postponed by postponing probe unit by one section when the entry aging of successful match
The duration T1 realizations of time, postponement are set, and T1 is less than duration digestion period.After duration T1, detection is postponed
Unit can send probe messages to the list item marked in ARP table, be detected.Labeled list item shows as previously described
Using the host of MAC Address in list item also in normal communication, only its message sent pertains only to two layers of forwarding, is not related to three layers
Forwarding, at this time by the ARP entry of the host in the way of the prior art direct aging fall be it is unreasonable, therefore, this
Invention carries out it particularly to postpone detection processing.
To ARP entry detected the specific steps are:MAC Address in the ARP entry that is detected is sent
One probe messages does not receive back message if in scheduled duration T2, then sends probe messages again, repeatedly,
When reaching scheduled detection end condition, back message is not received yet, then stops detecting, and deletes the list item;If received
Back message then preserves the list item, and ageing time is postponed a digestion period.
Described detection end condition can be the number pre-set, for example, sending primary detection report every 10 seconds
Text just stops detection after sending probe messages three times.In addition, the interval duration T2 for sending probe messages is usually less than aging week
Phase duration.
Due to the possible more than one of list item marked in ARP table, that is to say, that the MAC detected
Location has multiple, occurs the case where burst flow in order to prevent, when being detected to multiple ARP entry, postpones probe unit meeting
After having sent a probe messages, certain interval of time retransmits second.The interval time T3 of message is sent every time by moving back
Algorithm is kept away to be calculated, can effectively avoid generate moment largely detect flow.
Such as, it is now desired to 3 ARP entry are detected, postponing probe unit can be to the MAC Address of first list item
Probe messages are sent, interval sends probe messages after 2 seconds, to the MAC Address of second list item, and third is given in interval after 3 seconds
The MAC Address of a list item sends probe messages.Interval time is all calculated by back off algorithm.
It is temporary postponement duration T1 for the ageing time of the list item of successful match to postpone probe unit, rather than is pushed away
The duration of a slow digestion period.The purpose done so has mainly prevented attacker's malice from changing IP address repeatedly.If by
In there is attacker to carry out 3 modifications to the corresponding IP address of some MAC, to produce 3 list items as shown in Table 1.Into
During row ARP table and mac address forwarding table are matched, these three list items MAC Address successful match, that is to say, that this
Three list items can be all labeled, if these three list items are directly entered next digestion period, these three list items all can be by
It preserves.But ageing time only in the inventive solutions, is postponed into duration T1, and duration T1 is less than aging week
Phase duration can send probe messages after duration T1 to the MAC Address of these three list items.Due to the MAC of these three list items
Address is identical, and IP address is different, then host corresponding with MAC will receive 3 probe messages.If the host is at this time
IP address is IP3, then when it is the probe messages of IP1 and IP2 to receive purpose IP address, host will not be responded, and mesh is only received
IP address be IP3 probe messages, can just respond.And probe unit is postponed due to not receiving IP1 and IP2 corresponding table items
Back message will stop sending probe messages, the two list items deleted when reaching detection end condition.Due to having received
The back message of IP3 corresponding table items, the ageing time of the list item can postpone one digestion period duration, into next aging week
Phase.So, can effectively avoid leads to a large amount of useless or illegal ARP tables of plant maintenance since IP address is repeatedly changed
The problem of item.
Number | MAC Address | IP address |
1 | MAC | IP1 |
2 | MAC | IP2 |
3 | MAC | IP3 |
Table 1
For the list item that it fails to match, general processing unit can be regular that is, existing according to existing aging by the list item
The mode of technology is handled.Processing mode in the prior art is:Within digestion period, if receiving the back message of ARP
Or obtain transmission layer confirmation, then extend the ageing time of the list item, into next digestion period;If not receiving confirmation,
And do not applied, then delete the list item;If using, but be not confirmed, then the list item is detected, if obtaining
It responds, then extends the ageing time of the list item, into next digestion period, if not being confirmed, delete the list item.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
With within principle, any modification, equivalent substitution, improvement and etc. done should be included within the scope of protection of the invention god.
Claims (16)
1. a kind of device of optimization ARP aging mechanism, is applied on the network equipment, which includes:Match query unit is postponed
Probe unit and general processing unit, it is characterised in that:
Match query unit, for that when ARP entry reaches ageing time, will not have markd list item and mac address forwarding table
It is matched, if the MAC Address of the list item has respective record in mac address forwarding table, which is marked;
Probe unit is postponed, for the ageing time of markd list item in ARP table to be postponed scheduled duration T1 again, and by pre-
Periodically long T1 when reaching ageing time again, detects the list item;
General processing unit, for will not have markd list item to be handled according to predetermined aging rule in ARP table.
2. device as described in claim 1, which is characterized in that the match query unit is additionally operable to, and is marked at some
ARP entry enter next digestion period when, then by the list item mark cancel.
3. device as described in claim 1, which is characterized in that the scheduled duration T1 is less than duration digestion period.
4. device as described in claim 1, which is characterized in that the detailed process detected to ARP entry is:To the table
MAC Address in sends probe messages, if not receiving back message in scheduled duration T2, sends detection report again
Text then stops sending, and delete list item until reach scheduled detection end condition does not receive back message yet, if received
To back message, then continue to preserve the list item, into next digestion period.
5. device as claimed in claim 4, which is characterized in that the scheduled duration T2 is less than duration digestion period.
6. device as claimed in claim 4, which is characterized in that the detection end condition is scheduled number, is more than predetermined time
It is several, stop detecting.
7. device as claimed in claim 4, which is characterized in that the postponement probe unit be further used for it is multiple need into
When the MAC Address of row detection sends probe messages, interval duration T3 is needed between each probe messages, and T3 is calculated by back off algorithm
Out.
8. device as described in claim 1, which is characterized in that the predetermined aging rule is:Within digestion period, if received
The back message of ARP obtains transmission layer confirmation, then retains the list item, into next digestion period;If do not received
Confirm, and do not applied, then deletes the list item;If using, but be not confirmed, then the list item is detected,
If being responded, retain the list item, into next digestion period, if not being confirmed, deletes the list item.
9. a kind of method of optimization ARP aging mechanism, is applied on the network equipment, which is characterized in that this method includes:
Step A will not have markd list item to be matched with mac address forwarding table when ARP entry reaches ageing time, if
The MAC Address of the list item has respective record in mac address forwarding table, then the list item is marked;
The ageing time of markd list item in ARP table is postponed scheduled duration T1, and passes through scheduled duration T1 by step B again, then
It is secondary when reaching ageing time, which is detected;
Step C will not have markd list item to be handled according to predetermined aging rule in ARP table.
10. method as claimed in claim 9, which is characterized in that the step A further includes, in the ARP table that some is marked
When item enters next digestion period, then the list item is marked and cancelled.
11. method as claimed in claim 9, which is characterized in that the scheduled duration T1 is less than duration digestion period.
12. method as claimed in claim 9, which is characterized in that the detailed process detected to ARP entry is:To this
MAC Address in list item sends probe messages, if not receiving back message in scheduled duration T2, sends detection again
Message then stops sending, and delete list item, if connect until reach scheduled detection end condition does not receive back message yet
Back message is received, then continues to preserve the list item, into next digestion period.
13. method as claimed in claim 12, which is characterized in that the scheduled duration T2 is less than duration digestion period.
14. method as claimed in claim 12, which is characterized in that the detection end condition is scheduled number, is more than predetermined
Number then stops detecting.
15. method as claimed in claim 12, which is characterized in that the step B further comprises, is visited to multiple
When the MAC Address of survey sends probe messages, interval duration T3 is needed between each probe messages, and T3 is calculated by back off algorithm
Come.
16. method as claimed in claim 9, which is characterized in that the predetermined aging rule is:Within digestion period, if received
To ARP back message or obtain transmission layer confirmation, then the list item is retained, into next digestion period;If do not received
It to confirmation, and did not applied, then deletes the list item;If using, but be not confirmed, then the list item is visited
It surveys, if being responded, retains the list item, into next digestion period, if not being confirmed, delete the list item.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310469518.5A CN104579718B (en) | 2013-10-10 | 2013-10-10 | A kind of device and method of optimization ARP aging mechanism |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310469518.5A CN104579718B (en) | 2013-10-10 | 2013-10-10 | A kind of device and method of optimization ARP aging mechanism |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104579718A CN104579718A (en) | 2015-04-29 |
CN104579718B true CN104579718B (en) | 2018-07-24 |
Family
ID=53094996
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310469518.5A Active CN104579718B (en) | 2013-10-10 | 2013-10-10 | A kind of device and method of optimization ARP aging mechanism |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104579718B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106549866B (en) * | 2015-09-22 | 2020-04-28 | 华为技术有限公司 | Method, network device and system for processing message |
CN108347494B (en) * | 2017-01-25 | 2022-03-11 | 中兴通讯股份有限公司 | MAC address aging processing method, network processor chip and communication equipment |
CN109218456B (en) * | 2017-07-06 | 2021-09-07 | 北京华为数字技术有限公司 | Method and device for processing aging time of MAC address table |
CN107547286B (en) * | 2017-09-25 | 2020-10-09 | 新华三技术有限公司 | Method and device for generating Address Resolution Protocol (ARP) table |
CN107707690B (en) * | 2017-11-28 | 2021-07-16 | 锐捷网络股份有限公司 | Method, device and medium for preventing dynamic address from aging |
CN108566447A (en) * | 2018-04-12 | 2018-09-21 | 联想(北京)有限公司 | A kind of information processing method and system |
CN108616614B (en) * | 2018-04-28 | 2021-04-06 | 深圳市风云实业有限公司 | MAC address management method and device and electronic equipment |
CN109587288A (en) * | 2018-12-29 | 2019-04-05 | 成都西加云杉科技有限公司 | A kind of mailing address requesting method, terminal and Wireless Fidelity controller |
CN113114570B (en) * | 2020-01-13 | 2023-04-07 | 阿里巴巴集团控股有限公司 | Control method, device and system of flow table item |
CN111970388B (en) * | 2020-08-19 | 2022-11-11 | 苏州浪潮智能科技有限公司 | Method and device for dynamically adjusting ARP (Address resolution protocol) table entry aging time by switch |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1466320A (en) * | 2002-06-12 | 2004-01-07 | 华为技术有限公司 | Updating method for address analytic protocol table in network equipment |
CN1484405A (en) * | 2003-08-11 | 2004-03-24 | 北京港湾网络有限公司 | Method for speeding ARP table entry aging for switch board |
CN1783874A (en) * | 2004-12-01 | 2006-06-07 | 华为技术有限公司 | Ageing method for address analytic protocol cache table item in network device |
CN1968459A (en) * | 2006-06-29 | 2007-05-23 | 华为技术有限公司 | Method and system for recovering network connection quickly after cluster server switching |
-
2013
- 2013-10-10 CN CN201310469518.5A patent/CN104579718B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1466320A (en) * | 2002-06-12 | 2004-01-07 | 华为技术有限公司 | Updating method for address analytic protocol table in network equipment |
CN1484405A (en) * | 2003-08-11 | 2004-03-24 | 北京港湾网络有限公司 | Method for speeding ARP table entry aging for switch board |
CN1783874A (en) * | 2004-12-01 | 2006-06-07 | 华为技术有限公司 | Ageing method for address analytic protocol cache table item in network device |
CN1968459A (en) * | 2006-06-29 | 2007-05-23 | 华为技术有限公司 | Method and system for recovering network connection quickly after cluster server switching |
Also Published As
Publication number | Publication date |
---|---|
CN104579718A (en) | 2015-04-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104579718B (en) | A kind of device and method of optimization ARP aging mechanism | |
CN109586959B (en) | Fault detection method and device | |
CN101730063B (en) | Neighbor table entry resource recovery method, device and IPv6 (internet protocol version 6) node | |
CN108322338B (en) | Broadcast suppression method and VTEP device | |
CN102546311B (en) | Method for realizing loop detection on EOC (Ethernet Over Coax) device | |
CN106375105A (en) | Method of determining path fault, controller, switches and system | |
CN103916319A (en) | Link selection method and stacking device in LACP stacked networking | |
CN106789387A (en) | A kind of chain circuit detecting method and device for SDN | |
CN103684792B (en) | A kind of safety certifying method and OAM message transmitting/receiving means of OAM | |
CN105991795A (en) | ARP (address resolution protocol) table item updating method and device | |
CN100450025C (en) | Ethernet environment protection system and method | |
CN106559336A (en) | The path switching method and apparatus being applied in SDN | |
CN106161078A (en) | A kind of Ethernet ring protection switching reverse method and node | |
CN101674312A (en) | Method for preventing source address spoofing in network transmission and device thereof | |
CN105530188A (en) | Multicast forwarding method and device | |
CN102891787A (en) | Shared path-based looped network tunnel configuration method, and method and system for switching service | |
CN101729361B (en) | Method and device for processing message | |
CN106330962A (en) | Flow cleaning management method and device | |
CN109451087A (en) | MAC address entries ageing method and device | |
CN101119275B (en) | Method, equipment and system for service provider equipment to obtain information | |
CN102025641A (en) | Message filtering method and exchange equipment | |
CN104468280B (en) | The method that standby upper down status rapid detection is hung under realizing in intelligent gateway | |
CN106130790A (en) | A kind of fault handling method and device | |
CN105591920B (en) | RA message processing method and device based on IRDP | |
CN102315962B (en) | Method for detecting MTU (Maximum Transmission Unit) of Ethernet and maintenance end point |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: Binjiang District and Hangzhou city in Zhejiang Province Road 310051 No. 68 in the 6 storey building Applicant after: Hangzhou Dipu Polytron Technologies Inc Address before: Binjiang District and Hangzhou city in Zhejiang Province Road 310051 No. 68 in the 6 storey building Applicant before: Hangzhou Dipu Technology Co., Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |