CN104539543B - A kind of data communications method and device - Google Patents

A kind of data communications method and device Download PDF

Info

Publication number
CN104539543B
CN104539543B CN201410804283.5A CN201410804283A CN104539543B CN 104539543 B CN104539543 B CN 104539543B CN 201410804283 A CN201410804283 A CN 201410804283A CN 104539543 B CN104539543 B CN 104539543B
Authority
CN
China
Prior art keywords
network element
opposite end
local terminal
arp
end network
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
Application number
CN201410804283.5A
Other languages
Chinese (zh)
Other versions
CN104539543A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410804283.5A priority Critical patent/CN104539543B/en
Publication of CN104539543A publication Critical patent/CN104539543A/en
Application granted granted Critical
Publication of CN104539543B publication Critical patent/CN104539543B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention discloses a kind of data communications method and device, methods described includes:When ARP ageing time corresponding to the network element of opposite end then, local terminal network element broadcast arp probe messages in LAN, and when not obtaining the response that the opposite end network element feeds back for the ARP probe packet, the local terminal network element obtains the target identification of the opposite end network element;The local terminal network element obtains the reverse rate that the opposite end network element sends service message to the local terminal network element according to the target identification;The local terminal network element is based on the reverse rate, and the ARP corresponding to the opposite end network element is handled.Using the present invention, operation of the reverse rate realization of service message to ARP can be sent according to opposite end network element, so as to avoid ARP from missing aging.

Description

A kind of data communications method and device
Technical field
The present invention relates to network technique field, more particularly to a kind of data communications method and device.
Background technology
At present, gigabit Ethernet, 10GE, 100GE Ethernet have become mobile bearer network mainstream technology, in these networks Procotol (Internet Protocol, IP) packet transmission mobile Internet access data are all based in technology.In IP grouped datas In transmission, address resolution protocol (Address Resolution Protocol, ARP) is an important agreement, and it is three layers IP messages enter the bridge of two layers of Ethernet, each network element in LAN, including main frame, routing device and interchanger, Need to carry out ARP study, establish the IP address and media access control address (Media Access Control of network element Address, MAC) between corresponding relation, each network element by the ARP learnt store in the caches.Due to net Network is in constantly change, and some network elements may not use or exit for a long time LAN, but cache is limited, Therefore network element needs to start timing aging function, some is not used or exited the ARP table entry deletion of the network element of LAN, So as to save cache.
Specific timing aging function is that, when ageing time arrives, local terminal network element initiates ARP detections, waits opposite end network element Response, if continuously initiating three ARP probe packet, do not meet with a response, then delete the ARP of the opposite end network element.In reality In the application of border, it may not be timely responded to due to opposite end network element cpu busy or network link flash opposite end network element does not receive ARP Probe messages etc. reason causes local terminal network element not receive the response of opposite end network element, but actually opposite end network element is used In, in active period, the ARP table entry deletion of opposite end network element, such case are referred to as ARP table when opposite end network element is in active period Item aging by mistake, ARP, which misses aging, can cause service disconnection.
The content of the invention
The embodiment of the present invention provides a kind of data communications method and device, can send service message according to opposite end network element Reverse rate realizes the operation to ARP, so as to avoid ARP from missing aging.
First aspect of the embodiment of the present invention provides a kind of data communications method, it may include:
When ARP ageing time corresponding to the network element of opposite end then, local terminal network element in LAN broadcast arp detection report Text, and do not obtain the opposite end network element for ARP probe packet feedback response when, it is described right that the local terminal network element obtains Hold the target identification of network element;
The local terminal network element obtains the opposite end network element and sends business report to the local terminal network element according to the target identification The reverse rate of text;
The local terminal network element is based on the reverse rate, and the ARP corresponding to the opposite end network element is handled.
Based in a first aspect, in the first feasible embodiment of first aspect, the local terminal network element is based on described Reverse rate, the ARP corresponding to the opposite end network element is handled, including:
If the reverse rate is not zero, the local terminal network element retains the ARP corresponding to the opposite end network element;
If the reverse rate is zero, the local terminal network element deletes the ARP corresponding to the opposite end network element.
The first feasible embodiment based on first aspect, in second of feasible embodiment of first aspect, The target identification includes the source MAC of the service message that the opposite end network element sends to the local terminal network element and described Local terminal network element receives the input port for the service message that the opposite end network element is sent.
In second based on first aspect feasible embodiment, in the third feasible embodiment of first aspect In, the local terminal network element obtains the opposite end network element and sent to the local terminal network element according to the target identification of the opposite end network element The reverse rate of service message, including:
The local terminal network element is according to the target identification of the opposite end network element, according to predetermined period to source MAC table At least two object statistics data of middle collection, opposite end network element is sent to the local terminal network element described in the object statistics data characterization Service message quantity;
The local terminal network element calculates the opposite end network element to described according to the object statistics data and the predetermined period Local terminal network element sends the reverse rate of the service message.
The third feasible embodiment based on first aspect, in the 4th kind of feasible embodiment of first aspect In, before the local terminal network element obtains the target identification of the opposite end network element, in addition to:
The local terminal network element generates ARP corresponding to the opposite end network element;
Local terminal network element ARP according to corresponding to the opposite end network element, generate the target identification with it is described Corresponding relation between object statistics data;
Corresponding relation between the target identification and the object statistics data is stored to the source MAC table In;
When the local terminal network element receives the service message that the opposite end network element is sent, described in the local terminal network element renewal The object statistics data in source MAC table.
Based on the 4th kind of feasible embodiment of first aspect, in the 5th kind of feasible embodiment of first aspect, The corresponding relation between multiple marks and multiple statistics is stored in the source MAC table;
It is described when the service message that the opposite end network element is sent is received when the local terminal network element, the local terminal network element renewal The object statistics data in the source MAC table, including:
When the local terminal network element receives the service message that the opposite end network element is sent, the local terminal network element is from reception The target identification of the opposite end network element is obtained in the service message;
The local terminal network element searches the object statistics data according to the target identification in the source MAC table, And update the object statistics data.
Second aspect of the present invention provides a kind of data communication equipment, and the data communication equipment includes:
First acquisition module, for when ARP ageing time corresponding to the network element of opposite end then, local terminal network element is in LAN Interior broadcast arp probe messages, and do not obtain the opposite end network element for the ARP probe packet feedback response when, obtain institute State the target identification of opposite end network element;
Second acquisition module, for according to the target identification, obtaining the opposite end network element and being sent to the local terminal network element The reverse rate of service message;
Processing module, for based on the reverse rate, to corresponding to the opposite end network element at the ARP Reason.
Based on second aspect, in the first feasible embodiment of second aspect, the processing module is specifically used for If the reverse rate is not zero, retain the ARP corresponding to the opposite end network element;If the reverse rate is zero, Then delete the ARP corresponding to the opposite end network element.
The first feasible embodiment based on second aspect, in second of feasible embodiment of second aspect, The target identification includes the source MAC of the service message that the opposite end network element sends to the local terminal network element and described Local terminal network element receives the input port for the service message that the opposite end network element is sent.
Based on second of feasible embodiment of second aspect, in the third feasible embodiment of second aspect, Second acquisition module includes:
Collecting unit, for the target identification according to the opposite end network element, according to predetermined period to source MAC table At least two object statistics data of middle collection, opposite end network element is sent to the local terminal network element described in the object statistics data characterization Service message quantity;
Computing unit, for according to the object statistics data and the predetermined period, calculating the opposite end network element to institute State the reverse rate that local terminal network element sends the service message.
The third feasible embodiment based on second aspect, in the 4th kind of feasible embodiment of second aspect, Described device also includes:
First generation module, for generating ARP corresponding to the opposite end network element;
Second generation module, for the ARP according to corresponding to the opposite end network element, generate the target identification with Corresponding relation between the object statistics data;
Memory module, for the corresponding relation between target identification and the object statistics data to be stored to the source In mac address table;
Update module, for when the local terminal network element receives the service message that the opposite end network element is sent, updating institute State the object statistics data in source MAC table.
Based on the 4th kind of feasible embodiment of second aspect, in the 5th kind of feasible embodiment of second aspect, institute State and multiple corresponding relations identified between multiple statistics are stored in source MAC table;The update module includes:
Acquiring unit, when receiving the service message that the opposite end network element is sent for the local terminal network element, from reception The target identification of the opposite end network element is obtained in the service message;
Updating block is searched, for according to the target identification, the object statistics to be searched in the source MAC table Data, and update the object statistics data.
In the embodiment of the present invention, when ARP ageing time arrives corresponding to the network element of opposite end, local terminal network element is wide in LAN When broadcasting ARP probe packet, and not obtaining the response that opposite end network element feeds back for the ARP probe packet, in order to further determine that Whether by ARP table entry deletion corresponding to the network element of opposite end, local terminal network element obtains the target identification of opposite end network element, according to target identification, Obtain the reverse rate that opposite end network element sends service message to local terminal network element, local terminal network element again based on acquired reverse rate, ARP corresponding to the opposite end network element is handled.In the embodiment of the present invention, opposite end network element is not obtained in local terminal network element During feedback response, it is not directly by ARP table entry deletion corresponding to the network element of opposite end, but obtains opposite end network element and sent out to local terminal network element The reverse rate of service message is sent, then ARP is handled based on reverse rate, prevents from being in active period in opposite end network element And due to when the reason such as busy does not have timely feedback response, missing ARP table entry deletion corresponding to the network element of opposite end, so as to effectively avoid ARP misses aging.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, make required in being described below to embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, for ability For the those of ordinary skill of domain, on the premise of not paying creative work, it can also be obtained according to these accompanying drawings other attached Figure.
Fig. 1 is a kind of schematic flow sheet of data communications method provided in an embodiment of the present invention;
Fig. 2 is a kind of application scenario diagram provided in an embodiment of the present invention;
Fig. 3 is a kind of network element detailed maps provided in an embodiment of the present invention;
Fig. 4 is the schematic flow sheet of another data communications method provided in an embodiment of the present invention;
Fig. 5 is a kind of detailed annotation figure of local terminal network element data communication process provided in an embodiment of the present invention;
Fig. 6 is the schematic flow sheet of another data communications method provided in an embodiment of the present invention;
Fig. 7 is a kind of local terminal network element provided in an embodiment of the present invention and opposite end network element interaction figure;
Fig. 8 is a kind of structural representation of data communication equipment provided in an embodiment of the present invention;
Fig. 9 is a kind of structural representation of second acquisition module provided in an embodiment of the present invention;
Figure 10 is the structural representation of another data communication equipment provided in an embodiment of the present invention;
Figure 11 is a kind of structural representation of update module provided in an embodiment of the present invention;
Figure 12 is the structural representation of another data communication equipment provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, rather than whole embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made Example, belongs to the scope of protection of the invention.
Data communications method in the embodiment of the present invention can apply in IP packet transmissions, with network technology Development, transmission mobile Internet access data are grouped based on IP and have become main trend, according to soliciting the book that revises one's view (Request For Comments, RFC) standard agreement, after routing device study to ARP, start timing aging function, when the ARP Ageing time then, as shown in Fig. 2 routing device PTN1 initiates ARP probe packet (ARP request), waits opposite end network element For the response (ARP reply) of ARP probe packet feedback, if continuously three ARP probe packet of hair all do not obtain opposite end During the response of network element, then ARP is deleted.The storage for the cache for storing all ARPs can be saved by deleting ARP Space.
But can have the problem of some mistake agings during above-mentioned processing ARP, for example, network link dodges It is disconnected, success is not sent due to network link flash in three ARP probe packet transmitted by routing device PTN1, caused pair End network element PTN2 does not receive ARP probe packet, therefore opposite end network element PTN2 can not also feed back the sound for the ARP probe packet ARP reply, routing device PTN1 is answered can not also to receive opposite end network element PTN2 response ARP reply, or, due to opposite end Network element PTN2 cpu busy, without feedback in time for response the ARP reply, routing device PTN1 of the ARP probe packet Response the ARP reply, routing device PTN1 that opposite end network element PTN2 feedbacks can not be received are not received by opposite end network element PTN2 The response reason of feedback can also be other reasons, be not limited thereto.Although routing device PTN1 in above-mentioned several situations The response ARP reply of opposite end network element PTN2 feedbacks are not received, but opposite end network element PTN2 is still in use, in work The jump phase, it is ARP occurred to miss problem of aging in this case by ARP table entry deletion corresponding to the network element PTN2 of opposite end.This meeting Follow-up business is caused to be interrupted, the process of retriggered ARP study.
Data communications method provided in the embodiment of the present invention is to miss problem of aging for the ARP to propose solution party Case, when routing device PTN1 does not receive the response ARP reply that opposite end network element PTN2 feeds back for ARP probe packet, survey The reverse rate that opposite end network element PTN2 sends service message to local terminal routing device PTN1 is measured, service message is transmission network number According to packaged message, when reverse rate is not zero, then show that opposite end network element is in active period, it is not necessary to by opposite end network element PTN2 Corresponding ARP table entry deletion.Specific data communications method refer to the description of subsequent embodiment.
Local terminal network element:The network equipment that any one in network stores ARP is properly termed as local terminal network element, local terminal Network element and opposite end network element are a relative concepts, when a network equipment sends ARP probe packet progress ARP in network During burin-in process, then the network equipment can be referred to as to local terminal network element, routing device as escribed above.
Opposite end network element:Any one in network and local terminal network element exist tri-level logic be connected (can be physics it is direct-connected or Be connected by interchanger) the network equipment be properly termed as opposite end network element, local terminal network element and opposite end network element are one relative Concept, when local terminal network element needs to carry out burin-in process for some ARP, then network element corresponding to the ARP is Opposite end network element.
Below in conjunction with accompanying drawing 1- accompanying drawings 7, data communications method provided in an embodiment of the present invention is introduced and illustrated.
Fig. 1 is refer to, is a kind of schematic flow sheet of data communications method provided in an embodiment of the present invention;As shown in figure 1, The data communications method includes:
S100, when ARP ageing time corresponding to the network element of opposite end then, local terminal network element in LAN broadcast arp visit When observing and predicting text, and not obtaining the response that the opposite end network element feeds back for the ARP probe packet, the local terminal network element obtains institute State the target identification of opposite end network element;
In one embodiment, transmitting network data is grouped based on IP, i.e., network data is packaged into IP packets and entered Row transmission, IP packets are really that the MAC Address based on the network equipment is transmitted, and IP packets include source IP address and mesh IP address, IP packets need to transmit by multiple network elements in transmitting procedure, such as multiple routing devices or interchanger Etc..In transmitting procedure, source IP address and purpose IP address based on IP packets, routing device are routed, and The IP address of next-hop routing device is determined, and IP packets are transferred to next routing device, in transmission, is actually MAC Address based on next-hop routing device is transmitted.Therefore routing device needs to search next-hop road in the caches ARP is to obtain MAC Address corresponding to the IP address of next-hop routing device as corresponding to equipment.Above-mentioned routing device is It is local terminal network element, next-hop routing device is opposite end network element.
Learnt ARP is stored in each network element cache in network, it is convenient to be passed in IP packets Searched during defeated.Because cache memory space is limited, therefore ARP aging detection can be carried out at regular intervals, deletion does not have The ARP used.Every time can be ARP ageing time, the ARP of each network element is stored in The ARP of multiple network elements in network is stored in ARP table, in ARP table, when network element detect it is a certain in stored ARP table Then, the network element corresponding to the ARP is opposite end network element to individual ARP ageing time, and local terminal network element is i.e. in a local network Broadcast arp probe messages, when opposite end network element receives the ARP probe packet corresponding to the ARP, i.e., it can feed back for being somebody's turn to do The response of ARP probe packet.
Specifically, as shown in figure 3, the control plane storage ARP table of local terminal network element, and controls initiation ARP probe packet (ARP request), forwarding engine forward ARP according to the ARP request that control plane is initiated to opposite end network element Request, the Forwarding plane of opposite end network element receives ARP request, and is reported to control plane and analyzed, and control is flat Face generates response ARP reply according to ARP request, and is dispatched to Forwarding plane and is forwarded to local terminal network element.
If local terminal network element receives the response ARP reply of opposite end network element feedback, retain the ARP corresponding to the network element of opposite end List item.As illustrated, in practical application, may cause not feed back ARP to local terminal network element due to opposite end network element cpu busy Reply, then local terminal network element do not receive the response ARP reply that opposite end network element is directed to ARP request feedbacks, local terminal network element then obtains Take the target identification of opposite end network element, target identification can be opposite end network element to local terminal network element send service message when source MAC Location and local terminal network element receive the input port for the service message that opposite end network element is sent, and the specific existence form of target identification does not limit It is fixed.
S101, the local terminal network element obtain the opposite end network element and sent to the local terminal network element according to the target identification The reverse rate of service message;
In one embodiment, local terminal network element obtains opposite end network element and sent out to local terminal network element according to acquired target identification Send the reverse rate of service message, service message be opposite end network element to local terminal network element send Internet data when packaged report Text.Specific acquisition modes can be the reverse rate that real-time measurement opposite end network element sends service message to local terminal network element, also may be used Be within a period of time count opposite end network element to local terminal network element send service message average reverse rate or accumulation The quantity that opposite end network element sends service message to local terminal network element is counted, counted quantity is gathered according still further to predetermined period, according to The quantity of predetermined period and statistics calculates the reverse rate that opposite end network element sends service message to local terminal network element.
S102, the local terminal network element are based on the reverse rate, and the ARP corresponding to the opposite end network element is carried out Processing.
In one embodiment, local terminal network element based on acquired reverse rate to ARP table corresponding to the opposite end network element Item is handled.Optionally, when acquired reverse rate is not zero, then illustrate that opposite end network element has carried out data to local terminal network element Communication, opposite end network element are in active period, do not receive the response of opposite end network element feedback, it may be possible to due to network link flash, opposite end Network element does not receive ARP probe packet, therefore does not have feedback response, it is also possible to the cpu busy of opposite end network element, is not directed in time ARP probe packet responds, therefore local terminal network element needs to retain ARP corresponding to the network element of opposite end, and resets aging timing Device.
Another aspect local terminal network element does not receive the response that opposite end network element is directed to ARP probe packet feedback, and acquired pair The reverse rate for holding network element to send service message to local terminal network element is zero, then can delete ARP corresponding to the network element of opposite end, with Save cache memory space.
In the embodiment of the present invention, when ARP ageing time arrives corresponding to the network element of opposite end, local terminal network element is wide in LAN When broadcasting ARP probe packet, and not obtaining the response that opposite end network element feeds back for the ARP probe packet, in order to further determine that Whether by ARP table entry deletion corresponding to the network element of opposite end, local terminal network element obtains the target identification of opposite end network element, according to target identification, Obtain the reverse rate that opposite end network element sends service message to local terminal network element, local terminal network element again based on acquired reverse rate, ARP corresponding to the opposite end network element is handled.In the embodiment of the present invention, opposite end network element is not obtained in local terminal network element During feedback response, it is not directly by ARP table entry deletion corresponding to the network element of opposite end, but obtains opposite end network element and sent out to local terminal network element The reverse rate of service message is sent, then ARP is handled based on reverse rate, prevents from being in active period in opposite end network element And due to when the reason such as busy does not have timely feedback response, missing ARP table entry deletion corresponding to the network element of opposite end, so as to effectively avoid ARP misses aging.
Fig. 4 is refer to, is the schematic flow sheet of another data communications method provided in an embodiment of the present invention;Such as Fig. 4 institutes Show, a kind of data communications method described in the present embodiment includes step:
S200, when ARP ageing time corresponding to the network element of opposite end then, local terminal network element in LAN broadcast arp visit When observing and predicting text, and not obtaining the response that the opposite end network element feeds back for the ARP probe packet, the local terminal network element obtains institute State the target identification of opposite end network element;
Step S200 of the embodiment of the present invention, the embodiment step S100 shown in Fig. 1 is refer to, herein without repeating.
Further, the target identification includes the service message that the opposite end network element is sent to the local terminal network element Source MAC and the local terminal network element receive the input port of the service message that the opposite end network element is sent.
S201, the local terminal network element is according to the target identification of the opposite end network element, according to predetermined period to source MAC At least two object statistics data are gathered in the table of location, opposite end network element described in the object statistics data characterization is to the local terminal network element The service message quantity of transmission;
As an alternative embodiment, local terminal network element obtains opposite end network element sends the anti-of service message to local terminal network element It can be according to the target identification of opposite end network element to the acquisition modes of speed, be gathered according to predetermined period into source MAC table At least two object statistics data.Target identification include opposite end network element to local terminal network element send service message source MAC and Local terminal network element receives the input port that opposite end network element sends service message.
Optionally, as shown in figure 5, local terminal network element control plane includes ARP protocol component, and to all behaviour of local terminal network element It is controlled, control plane Schistosomiasis control ARP, and ARP is stored into ARP table, stores and learned in ARP table The ARP table learnt is issued to by the corresponding relation between the IP address of the network element of habit, MAC Address and port, control plane Engine is forwarded, while also issues Zhang Yuan's mac address table (being S-MAC tables) to engine is forwarded, is stored in S-MAC tables each Corresponding relation between the mark and statistics of the network element learnt.
ARP table search key is input port and IP address corresponding to the network element of opposite end, and the data searched are opposite end nets The MAC Address of member, the search keies of S-MAC tables are input port and source MAC corresponding to the network element of opposite end, the data of lookup It is object statistics data corresponding to the network element of opposite end, the object statistics data are that opposite end network element sends service message to local terminal network element Quantity.
When opposite end network element sends reverse traffic message to local terminal network element, the reverse traffic message passes through the three of local terminal network element Layer IP forwardings, when three layers of IP forwards, local terminal network element is according to the input port for receiving the service message and the source MAC of opposite end network element Address search S-MAC tables, when S-MAC tables store the input port and the source MAC, then by corresponding object statistics data It is updated.
Statistics corresponding to some network element is used for the number for characterizing the service message of the local terminal network element received from the network element Amount, the number of the service message of the network element can be specifically received from, correspondingly, often receive the business report that the network element is sent Text, statistics corresponding to the network element is added 1, specifically can also be the data volume of the service message received from the network element, accordingly Ground, the service message that the network element is sent often is received, is adding received business report corresponding to the network element in statistics The data volume of text, for example, current statistics is 910K, the size of the service message is 5K, then the statistics after updating For 915K.
It should be noted that if statistics is the number of service message, it can be counted by counter, one The statistics of one network element of counters count.
S202, the local terminal network element calculate the opposite end network element according to the object statistics data and the predetermined period The reverse rate of the service message is sent to the local terminal network element.
As an alternative embodiment, because object statistics data can have a variety of representations, correspondingly, reversely Speed can also have a variety of representations, such as when object statistics data represent industry of the local terminal network element received from the opposite end network element The number of business message, then reverse rate can be service message of the local terminal network element received from the opposite end network element in the unit interval Number, such as 20/s, 0/s;When object statistics data represent service message of the local terminal network element received from the opposite end network element Data volume, then reverse rate can be the data of service message of the local terminal network element received from the opposite end network element in the unit interval Amount, such as 100K/s, 0k/s.Here using the unit interval as 1S, object statistics data are local terminal network element received from the opposite end network element Service message number exemplified by illustrate, predetermined period 1S, first time object statistics data are 30, second target system Count as 50, then reverse rate is (50-30)/1=20, is 20 messages/S.
Optionally, as shown in figure 5, gathering the source of opposite end network element in S-MAC tables of the control plane timing into forwarding engine Object statistics data corresponding to the input port for the service message that MAC Address and reception opposite end network element are sent, and according to default week Phase and object statistics data, calculate the reverse rate that opposite end network element sends service message to local terminal network element.
S203, if the reverse rate is not zero, the local terminal network element retains the ARP corresponding to the opposite end network element List item;
As an alternative embodiment, if the reverse rate that opposite end network element sends service message to local terminal network element is not Zero, then show that opposite end network element has carried out data communication to local terminal network element, opposite end network element is in active period, it is anti-not receive opposite end network element The response of feedback, it may be possible to due to network link flash, opposite end network element does not receive ARP probe packet, therefore does not have feedback response, It is probably the cpu busy of opposite end network element, is not responded in time for ARP probe packet, therefore local terminal network element needs to retain ARP corresponding to the network element of opposite end, and reset ageing timer.
S204, if the reverse rate is zero, the local terminal network element deletes the ARP table corresponding to the opposite end network element .
As an alternative embodiment, local terminal network element does not receive the sound that opposite end network element is directed to ARP probe packet feedback Should, and the reverse rate that acquired opposite end network element sends service message to local terminal network element is zero, then can delete opposite end network element Corresponding ARP, to save cache memory space.
In the embodiment of the present invention, when ARP ageing time arrives corresponding to the network element of opposite end, local terminal network element is wide in LAN When broadcasting ARP probe packet, and not obtaining the response that opposite end network element feeds back for the ARP probe packet, in order to further determine that Whether by ARP table entry deletion corresponding to the network element of opposite end, local terminal network element obtains the target identification of opposite end network element, according to target identification, Obtain the reverse rate that opposite end network element sends service message to local terminal network element, local terminal network element again based on acquired reverse rate, ARP corresponding to the opposite end network element is handled.In the embodiment of the present invention, opposite end network element is not obtained in local terminal network element During feedback response, it is not directly by ARP table entry deletion corresponding to the network element of opposite end, but obtains opposite end network element and sent out to local terminal network element The reverse rate of service message is sent, then ARP is handled based on reverse rate, prevents from being in active period in opposite end network element And due to when the reason such as busy does not have timely feedback response, missing ARP table entry deletion corresponding to the network element of opposite end, so as to effectively avoid ARP misses aging.
Fig. 6 is refer to, is the schematic flow sheet of another data communications method provided in an embodiment of the present invention;Such as Fig. 6 institutes Show, a kind of data communications method described in the present embodiment includes step:
S300, the local terminal network element generate ARP corresponding to the opposite end network element;
As an alternative embodiment, local terminal network element needs to learn each network element pair in data communication process is carried out The ARP answered, and the ARP learnt is stored in ARP table, ARP table is stored in the cache of network element, is learned The ARP of habit includes ARP corresponding to the network element of opposite end.Specific learning process refer to existing ARP learning processes.
S301, local terminal network element ARP according to corresponding to the opposite end network element, generate the target identification with Corresponding relation between the object statistics data;
As an alternative embodiment, when learning ARP corresponding to the network element of opposite end simultaneously, according to what is learnt Corresponding relation between the target identification and object statistics data of ARP generation opposite end network element, it is the source MAC of opposite end network element Corresponding relation between address, input port and object statistics data.
S302, the corresponding relation between the target identification and the object statistics data is stored to the source MAC In the table of location;
As an alternative embodiment, the corresponding relation between target identification and object statistics data is stored to source In mac address table, be the opposite end network element that will be generated source MAC, input port and object statistics data between Corresponding relation is stored into source MAC table, specific as shown in figure 5, control plane is by source MAC, input port and mesh Corresponding relation between mark statistics is stored into the S-MAC tables of forwarding engine.
S303, when the local terminal network element receives the service message that the opposite end network element is sent, the local terminal network element is more The object statistics data in the new source MAC table.
It is to work as local terminal as an alternative embodiment, when opposite end network element sends service message to local terminal network element When network element receives the service message that opposite end network element is sent, local terminal network element is according to the source MAC of opposite end network element and receives business The input port of message, object statistics data are updated.
Further, the corresponding relation between multiple marks and multiple statistics is stored in the source MAC table, i.e., It is the corresponding relation between multiple MAC Address, multiple ports and multiple statistics;Local terminal network element updates source MAC table In the methods of object statistics data may comprise steps of S30-S31;
S30, when the local terminal network element receives the service message that the opposite end network element is sent, the local terminal network element is from connecing The target identification of the opposite end network element is obtained in the service message received;
As an alternative embodiment, when opposite end network element sends service message to local terminal network element, local terminal network element obtains Take the target identification of opposite end network element, be opposite end network element source MAC and receive service message input port, specifically Acquisition modes can be extracted from the service message received.
S31, the local terminal network element search the object statistics according to the target identification in the source MAC table Data, and update the object statistics data.
As an alternative embodiment, pair between multiple marks and multiple statistics is stored in S-MAC tables It should be related to, the corresponding statistics of a mark.Local terminal network element is according to source MAC and input according to target identification Port, object statistics data are searched in S-MAC tables, and update the object statistics data.
S304, when ARP ageing time corresponding to the network element of opposite end then, local terminal network element in LAN broadcast arp visit When observing and predicting text, and not obtaining the response that the opposite end network element feeds back for the ARP probe packet, the local terminal network element obtains institute State the target identification of opposite end network element;The target identification includes the business that the opposite end network element is sent to the local terminal network element The source MAC of message and the local terminal network element receive the input port for the service message that the opposite end network element is sent.
Step S304 of the embodiment of the present invention, the embodiment step S100 shown in Fig. 1 is refer to, herein without repeating.
S305, the local terminal network element is according to the target identification of the opposite end network element, according to predetermined period to source MAC At least two object statistics data are gathered in the table of location, opposite end network element described in the object statistics data characterization is to the local terminal network element The service message quantity of transmission;
Step S305 of the embodiment of the present invention, the embodiment step S201 shown in Fig. 2 is refer to, herein without repeating.
S306, the local terminal network element calculate the opposite end network element according to the object statistics data and the predetermined period The reverse rate of the service message is sent to the local terminal network element.
Step S306 of the embodiment of the present invention, the embodiment step S202 shown in Fig. 2 is refer to, herein without repeating.
S307, the local terminal network element are based on the reverse rate, and the ARP corresponding to the opposite end network element is carried out Processing.
Step S307 of the embodiment of the present invention, the embodiment step S102 shown in Fig. 1 is refer to, herein without repeating.
In the embodiment of the present invention, when ARP ageing time arrives corresponding to the network element of opposite end, local terminal network element is wide in LAN When broadcasting ARP probe packet, and not obtaining the response that opposite end network element feeds back for the ARP probe packet, in order to further determine that Whether by ARP table entry deletion corresponding to the network element of opposite end, local terminal network element obtains the target identification of opposite end network element, according to target identification, Obtain the reverse rate that opposite end network element sends service message to local terminal network element, local terminal network element again based on acquired reverse rate, ARP corresponding to the opposite end network element is handled.In the embodiment of the present invention, opposite end network element is not obtained in local terminal network element During feedback response, it is not directly by ARP table entry deletion corresponding to the network element of opposite end, but obtains opposite end network element and sent out to local terminal network element The reverse rate of service message is sent, then ARP is handled based on reverse rate, prevents from being in active period in opposite end network element And due to when the reason such as busy does not have timely feedback response, missing ARP table entry deletion corresponding to the network element of opposite end, so as to effectively avoid ARP misses aging.
Fig. 7 is refer to, the interaction figure between a kind of local terminal network element provided in an embodiment of the present invention and opposite end network element;As schemed Show, follow-up IP messages are service message;When local terminal network element forwarding engine receives the IP messages that other network elements are sent, according to ARP table forwards the IP messages to opposite end network element, and the IP messages forwarded to opposite end network element are positive message.
When opposite end network element is to local terminal network element transmission reverse IP messages, local terminal network element is according to the input for receiving reverse IP messages The MAC Address of mouth and opposite end network element searches S-MAC tables, and updates the object statistics data in S-MAC tables.
Local terminal network element control plane start timing aging function, when ARP ageing time corresponding to the network element of opposite end then, ARP request are sent, opposite end network element Forwarding plane receives the ARP request and reports to control plane and analyzed, and controls Plane processed is issued to Forwarding plane for ARP request generation ARP reply, and Forwarding plane is sent to local terminal network element The ARP reply received are reported to control plane and analyzed by the ARP reply generated, local terminal network element forwarding engine, And retain ARP corresponding to the network element of opposite end.
If local terminal network element does not receive the ARP reply that opposite end network element returns, local terminal network element control plane is according to default Cycle gathers object statistics data to the S-MAC tables of forwarding engine, and according to predetermined period and the object statistics data gathered Calculate the reverse rate that opposite end network element sends reverse IP messages to local terminal network element.The control plane of local terminal network element is according to reverse rate ARP corresponding to the opposite end network element is handled.If reverse rate is not zero, retain ARP corresponding to the network element of opposite end List item.
In the embodiment of the present invention, when ARP ageing time arrives corresponding to the network element of opposite end, local terminal network element is wide in LAN When broadcasting ARP probe packet, and not obtaining the response that opposite end network element feeds back for the ARP probe packet, in order to further determine that Whether by ARP table entry deletion corresponding to the network element of opposite end, local terminal network element obtains the target identification of opposite end network element, according to target identification, Obtain the reverse rate that opposite end network element sends service message to local terminal network element, local terminal network element again based on acquired reverse rate, ARP corresponding to the opposite end network element is handled.In the embodiment of the present invention, opposite end network element is not obtained in local terminal network element During feedback response, it is not directly by ARP table entry deletion corresponding to the network element of opposite end, but obtains opposite end network element and sent out to local terminal network element The reverse rate of service message is sent, then ARP is handled based on reverse rate, prevents from being in active period in opposite end network element And due to when the reason such as busy does not have timely feedback response, missing ARP table entry deletion corresponding to the network element of opposite end, so as to effectively avoid ARP misses aging.
8- accompanying drawings 12 below in conjunction with the accompanying drawings, illustrate the specific implementation of data communication equipment provided in an embodiment of the present invention.
Fig. 8 is refer to, is a kind of structural representation of data communication equipment provided in an embodiment of the present invention, as shown in figure 8, A kind of data communication equipment described in the present embodiment includes:First acquisition module 100, the second acquisition module 101 and processing module 102。
First acquisition module 100, for when ARP ageing time corresponding to the network element of opposite end then, local terminal network element is in office Domain net in broadcast arp probe messages, and do not obtain the opposite end network element for the ARP probe packet feedback response when, obtain Take the target identification of the opposite end network element;
Optionally, the target identification includes the service message that the opposite end network element is sent to the local terminal network element Source MAC and the local terminal network element receive the input port for the service message that the opposite end network element is sent.
In one embodiment, transmitting network data is grouped based on IP, i.e., network data is packaged into IP packets and entered Row transmission, IP packets are really that the MAC Address based on the network equipment is transmitted, and IP packets include source IP address and mesh IP address, IP packets need to transmit by multiple network elements in transmitting procedure, such as multiple routing devices or interchanger Etc..In transmitting procedure, source IP address and purpose IP address based on IP packets, routing device are routed, and The IP address of next-hop routing device is determined, and IP packets are transferred to next routing device, in transmission, is actually MAC Address based on next-hop routing device is transmitted.Therefore routing device needs to search next-hop road in the caches ARP is to obtain MAC Address corresponding to the IP address of next-hop routing device as corresponding to equipment.Above-mentioned routing device is It is local terminal network element, next-hop routing device is opposite end network element.
Learnt ARP is stored in each network element cache in network, it is convenient to be passed in IP packets Searched during defeated.Because cache memory space is limited, therefore ARP aging detection can be carried out at regular intervals, deletion does not have The ARP used.Every time can be ARP ageing time, the ARP of each network element is stored in The ARP of multiple network elements in network is stored in ARP table, in ARP table, when network element detect it is a certain in stored ARP table Then, the network element corresponding to the ARP is opposite end network element to individual ARP ageing time, and local terminal network element is i.e. in a local network Broadcast arp probe messages, when opposite end network element receives the ARP probe packet corresponding to the ARP, i.e., it can feed back for being somebody's turn to do The response of ARP probe packet.
Specifically, as shown in figure 3, the control plane storage ARP table of local terminal network element, and controls initiation ARP probe packet (ARP request), forwarding engine forward ARP request according to the ARP request that control plane is initiated to opposite end network element, The Forwarding plane of opposite end network element receives ARP request, and is reported to control plane and analyzed, control plane according to ARP request generation response ARP reply, and be dispatched to Forwarding plane and be forwarded to local terminal network element.
If local terminal network element receives the response ARP reply of opposite end network element feedback, retain the ARP corresponding to the network element of opposite end List item.As illustrated, in practical application, may cause not feed back ARP to local terminal network element due to opposite end network element cpu busy Reply, then local terminal network element do not receive opposite end network element be directed to ARP request feedback response ARP reply, local terminal network element first Acquisition module 100 then obtains the target identification of opposite end network element, and target identification can be that opposite end network element sends business to local terminal network element Source MAC and local terminal network element during message receive the input port for the service message that opposite end network element is sent, the tool of target identification Body existence form is not construed as limiting.
Second acquisition module 101, for according to the target identification, obtaining the opposite end network element and being sent out to the local terminal network element Send the reverse rate of service message;
In one embodiment, the second acquisition module of local terminal network element 101 obtains opposite end net according to acquired target identification Member sends the reverse rate of service message to local terminal network element, and service message is that opposite end network element sends Internet data to local terminal network element When packaged message.Second acquisition module, 101 specific acquisition modes can be the real-time opposite end network element that measures to local terminal network element Send the reverse rate of service message or opposite end network element is counted within a period of time and send service message to local terminal network element Average reverse rate or cumulative statistics opposite end network element to local terminal network element send service message quantity, according still further to pre- If the cycle gathers counted quantity, opposite end network element is calculated according to the quantity of predetermined period and statistics and sends industry to local terminal network element The reverse rate of business message.
Processing module 102, for based on the reverse rate, being carried out to the ARP corresponding to the opposite end network element Processing.
In one embodiment, local terminal network element processing module 102 based on acquired reverse rate to the opposite end network element Corresponding ARP is handled.Optionally, when acquired reverse rate is not zero, then illustrate opposite end network element to local terminal net Member has carried out data communication, and opposite end network element is in active period, does not receive the response of opposite end network element feedback, it may be possible to due to lattice chain Road flash, opposite end network element does not receive ARP probe packet, therefore does not have feedback response, it is also possible to the cpu busy of opposite end network element, Do not responded in time for ARP probe packet, therefore the local terminal network element of processing module 102 needs to retain corresponding to the network element of opposite end ARP, and reset ageing timer.
Another aspect local terminal network element does not receive the response that opposite end network element is directed to ARP probe packet feedback, and acquired pair The reverse rate for holding network element to send service message to local terminal network element is zero, then can delete ARP corresponding to the network element of opposite end, with Save cache memory space.
In the embodiment of the present invention, when ARP ageing time arrives corresponding to the network element of opposite end, local terminal network element is wide in LAN When broadcasting ARP probe packet, and not obtaining the response that opposite end network element feeds back for the ARP probe packet, in order to further determine that Whether by ARP table entry deletion corresponding to the network element of opposite end, local terminal network element obtains the target identification of opposite end network element, according to target identification, Obtain the reverse rate that opposite end network element sends service message to local terminal network element, local terminal network element again based on acquired reverse rate, ARP corresponding to the opposite end network element is handled.In the embodiment of the present invention, opposite end network element is not obtained in local terminal network element During feedback response, it is not directly by ARP table entry deletion corresponding to the network element of opposite end, but obtains opposite end network element and sent out to local terminal network element The reverse rate of service message is sent, then ARP is handled based on reverse rate, prevents from being in active period in opposite end network element And due to when the reason such as busy does not have timely feedback response, missing ARP table entry deletion corresponding to the network element of opposite end, so as to effectively avoid ARP misses aging.
Fig. 9 is refer to, is a kind of structural representation of second acquisition module provided in an embodiment of the present invention, as shown in figure 9, The second acquisition module 101 in the present embodiment includes collecting unit 1010 and computing unit 1011, below to the second acquisition module 101 are described in detail:
Collecting unit 1010, for the target identification according to the opposite end network element, according to predetermined period to source MAC At least two object statistics data are gathered in the table of location, opposite end network element described in the object statistics data characterization is to the local terminal network element The service message quantity of transmission;
As an alternative embodiment, local terminal network element obtains opposite end network element sends the anti-of service message to local terminal network element Can be target identification of the collecting unit 1010 according to opposite end network element to the acquisition modes of speed, according to predetermined period to source MAC At least two object statistics data are gathered in address table.Target identification includes opposite end network element and sends service message to local terminal network element Source MAC and local terminal network element receive the input port that opposite end network element sends service message.
Optionally, as shown in figure 5, local terminal network element control plane includes ARP protocol component, and to all behaviour of local terminal network element It is controlled, control plane Schistosomiasis control ARP, and ARP is stored into ARP table, stores and learned in ARP table The ARP table learnt is issued to by the corresponding relation between the IP address of the network element of habit, MAC Address and port, control plane Engine is forwarded, while also issues Zhang Yuan's mac address table (being S-MAC tables) to engine is forwarded, is stored in S-MAC tables each Corresponding relation between the mark and statistics of the network element learnt.
ARP table search key is input port and IP address corresponding to the network element of opposite end, and the data searched are opposite end nets The MAC Address of member, the search keies of S-MAC tables are input port and source MAC corresponding to the network element of opposite end, the data of lookup It is object statistics data corresponding to the network element of opposite end, the object statistics data are that opposite end network element sends service message to local terminal network element Quantity.
When opposite end network element sends reverse traffic message to local terminal network element, reverse traffic message the entering by local terminal network element Enter three layers of IP forwarding, when three layers of IP forwards, local terminal network element is according to the input port and opposite end network element for receiving the service message Source MAC searches S-MAC tables, when S-MAC tables store the input port and the source MAC, then corresponding target is united Count and be updated.
Statistics corresponding to some network element is used for the number for characterizing the service message of the local terminal network element received from the network element Amount, the number of the service message of the network element can be specifically received from, correspondingly, often receive the business report that the network element is sent Text, statistics corresponding to the network element is added 1, specifically can also be the data volume of the service message received from the network element, accordingly Ground, the service message that the network element is sent often is received, is adding received business report corresponding to the network element in statistics The data volume of text, for example, current statistics is 910K, the size of the service message is 5K, then the statistics after updating For 915K.
It should be noted that if statistics is the number of service message, it can be counted by counter, one The statistics of one network element of counters count.
Computing unit 1011, for according to the object statistics data and the predetermined period, calculating the opposite end network element The reverse rate of the service message is sent to the local terminal network element.
As an alternative embodiment, because object statistics data can have a variety of representations, correspondingly, reversely Speed can also have a variety of representations, such as when object statistics data represent industry of the local terminal network element received from the opposite end network element The number of business message, then reverse rate can be service message of the local terminal network element received from the opposite end network element in the unit interval Number, such as 20/s;When object statistics data represent service message of the local terminal network element received from the opposite end network element data volume, Then reverse rate can be the data volume of service message of the local terminal network element received from the opposite end network element in the unit interval, such as 100K/s.Here using the unit interval as 1S, object statistics data are service message of the local terminal network element received from the opposite end network element Number exemplified by illustrate, predetermined period 1S, first time object statistics data are 30, and second of object statistics data be 50, then reverse rate is that (50-30)/1=20 is 20 messages/S.
Optionally, as shown in figure 5, gathering the source of opposite end network element in S-MAC tables of the control plane timing into forwarding engine Object statistics data corresponding to the input port for the service message that MAC Address and reception opposite end network element are sent, and according to default week Phase and object statistics data, calculate the reverse rate that opposite end network element sends service message to local terminal network element.
In the embodiment of the present invention, when ARP ageing time arrives corresponding to the network element of opposite end, local terminal network element is wide in LAN When broadcasting ARP probe packet, and not obtaining the response that opposite end network element feeds back for the ARP probe packet, in order to further determine that Whether by ARP table entry deletion corresponding to the network element of opposite end, local terminal network element obtains the target identification of opposite end network element, according to target identification, Obtain the reverse rate that opposite end network element sends service message to local terminal network element, local terminal network element again based on acquired reverse rate, ARP corresponding to the opposite end network element is handled.In the embodiment of the present invention, opposite end network element is not obtained in local terminal network element During feedback response, it is not directly by ARP table entry deletion corresponding to the network element of opposite end, but obtains opposite end network element and sent out to local terminal network element The reverse rate of service message is sent, then ARP is handled based on reverse rate, prevents from being in active period in opposite end network element And due to when the reason such as busy does not have timely feedback response, missing ARP table entry deletion corresponding to the network element of opposite end, so as to effectively avoid ARP misses aging.
Figure 10 is refer to, for the structural representation of another data communication equipment provided in an embodiment of the present invention, such as Figure 10 Shown, the data communication equipment of the present embodiment includes the first acquisition module 100, the second acquisition module 101, processing module 102, the One generation module 103, the second generation module 104, memory module 105 and update module 106, wherein, the first acquisition module 100th, the second acquisition module 101, processing module 102 refer to Fig. 9 description, will not be repeated here.
First generation module 103, for generating ARP corresponding to the opposite end network element;
As an alternative embodiment, the first generation module of local terminal network element 103 needs in data communication process is carried out Learn ARP corresponding to each network element, and the ARP learnt is stored in ARP table, ARP table is stored in network element Cache in, the ARP learnt includes ARP corresponding to the network element of opposite end.Specific learning process refer to existing Some ARP learning processes.
Second generation module 104, for the ARP according to corresponding to the opposite end network element, generate the target mark Know the corresponding relation between the object statistics data;
As an alternative embodiment, work as ARP corresponding to study opposite end network element simultaneously, the second generation module 104 generate the corresponding relation between the target identification of opposite end network element and object statistics data according to the ARP learnt, are Corresponding relation between the source MAC of opposite end network element, input port and object statistics data.
Memory module 105, for by the corresponding relation between the target identification and the object statistics data store to In the source MAC table;
As an alternative embodiment, memory module 105 will be corresponding between target identification and object statistics data Relation is stored into source MAC table, is source MAC, input port and the target system for the opposite end network element that will be generated Corresponding relation between counting is stored into source MAC table, it is specific as shown in figure 5, control plane by source MAC, Corresponding relation between input port and object statistics data is stored into the S-MAC tables of forwarding engine.
Update module 106, for when the local terminal network element receives the service message that the opposite end network element is sent, updating The object statistics data in the source MAC table.
It is to work as local terminal as an alternative embodiment, when opposite end network element sends service message to local terminal network element When network element receives the service message that opposite end network element is sent, local terminal network element update module 106 is according to the source MAC of opposite end network element Object statistics data are updated by the input port with service message is received.
In the embodiment of the present invention, when ARP ageing time arrives corresponding to the network element of opposite end, local terminal network element is wide in LAN When broadcasting ARP probe packet, and not obtaining the response that opposite end network element feeds back for the ARP probe packet, in order to further determine that Whether by ARP table entry deletion corresponding to the network element of opposite end, local terminal network element obtains the target identification of opposite end network element, according to target identification, Obtain the reverse rate that opposite end network element sends service message to local terminal network element, local terminal network element again based on acquired reverse rate, ARP corresponding to the opposite end network element is handled.In the embodiment of the present invention, opposite end network element is not obtained in local terminal network element During feedback response, it is not directly by ARP table entry deletion corresponding to the network element of opposite end, but obtains opposite end network element and sent out to local terminal network element The reverse rate of service message is sent, then ARP is handled based on reverse rate, prevents from being in active period in opposite end network element And due to when the reason such as busy does not have timely feedback response, missing ARP table entry deletion corresponding to the network element of opposite end, so as to effectively avoid ARP misses aging.
Figure 11 is refer to, is a kind of structural representation of update module provided in an embodiment of the present invention, as illustrated, this reality Applying the update module 106 of example includes acquiring unit 1060 and searches updating block 1061;
Acquiring unit 1060, for when the local terminal network element receives the service message that the opposite end network element is sent, from The target identification of the opposite end network element is obtained in the service message received;
As an alternative embodiment, when opposite end network element sends service message to local terminal network element, local terminal network element obtains Take unit 1060 to obtain the target identification of opposite end network element, be the source MAC of opposite end network element and receive service message Input port, specific acquisition modes can be extracted from from the service message received.
Updating block 1061 is searched, for according to the target identification, the target to be searched in the source MAC table Statistics, and update the object statistics data.
As an alternative embodiment, pair between multiple marks and multiple statistics is stored in S-MAC tables It should be related to, the corresponding statistics of a mark.Local terminal network element searches updating block 1061 according to target identification, is basis Source MAC and input port, object statistics data are searched in S-MAC tables, and update the object statistics data.
In the embodiment of the present invention, when ARP ageing time arrives corresponding to the network element of opposite end, local terminal network element is wide in LAN When broadcasting ARP probe packet, and not obtaining the response that opposite end network element feeds back for the ARP probe packet, in order to further determine that Whether by ARP table entry deletion corresponding to the network element of opposite end, local terminal network element obtains the target identification of opposite end network element, according to target identification, Obtain the reverse rate that opposite end network element sends service message to local terminal network element, local terminal network element again based on acquired reverse rate, ARP corresponding to the opposite end network element is handled.In the embodiment of the present invention, opposite end network element is not obtained in local terminal network element During feedback response, it is not directly by ARP table entry deletion corresponding to the network element of opposite end, but obtains opposite end network element and sent out to local terminal network element The reverse rate of service message is sent, then ARP is handled based on reverse rate, prevents from being in active period in opposite end network element And due to when the reason such as busy does not have timely feedback response, missing ARP table entry deletion corresponding to the network element of opposite end, so as to effectively avoid ARP misses aging.
Figure 12 is refer to, is the structural representation of another data communication equipment provided in an embodiment of the present invention.Figure 12's Data communication equipment can be used for realizing each step and method in above method embodiment.In Figure 12 embodiment, data communication dress Put including processor 200, transceiver 201, memory 202 and bus 203.Memory 202 is used for store instruction, processor 200 are used to perform the instruction in memory 202, to complete follow-up Data communication operation.Memory 202 can include read-only storage Device and random access memory, each component of data communication equipment is coupled by bus system 203, wherein total linear system System 203 is in addition to including data/address bus, in addition to power bus, controlling bus and status signal bus in addition.But for clear theory For the sake of bright, various buses are all designated as bus system 203 in figure.Data communication equipment can apply to local terminal network element.Below Each component is described in detail:
The transceiver, for when ARP ageing time corresponding to the network element of opposite end then, the broadcast arp in LAN Probe messages;
The processor, for being arrived when ARP ageing time corresponding to the network element of opposite end, transceiver is broadcasted in LAN ARP probe packet, and do not obtain the opposite end network element for the ARP probe packet feedback response when, obtain the opposite end The target identification of network element;
The processor is additionally operable to according to the target identification, is obtained the opposite end network element and is sent industry to the local terminal network element The reverse rate of business message;
The processor is additionally operable to be based on the reverse rate, and the ARP corresponding to the opposite end network element is carried out Processing.
Optionally, transmitting network data is grouped based on IP, i.e., network data is packaged into IP packets and be transmitted, IP Packet is really that the MAC Address based on the network equipment is transmitted, and IP packets include source IP address and purpose IP address, IP packets need to transmit by multiple network elements in transmitting procedure, such as multiple routing devices or interchanger etc..Passing During defeated, source IP address and purpose IP address based on IP packets, routing device is routed, and determines next-hop The IP address of routing device, and IP packets are transferred to next routing device, in transmission, it is actually based on next-hop The MAC Address of routing device is transmitted.Therefore routing device needs to search next-hop routing device in the caches correspondingly ARP to obtain MAC Address corresponding to the IP address of next-hop routing device.Above-mentioned routing device is local terminal net Member, next-hop routing device are opposite end network element.
Learnt ARP is stored in each network element cache in network, it is convenient to be passed in IP packets Searched during defeated.Because cache memory space is limited, therefore ARP aging detection can be carried out at regular intervals, deletion does not have The ARP used.Every time can be ARP ageing time, the ARP of each network element is stored in The ARP of multiple network elements in network is stored in ARP table, in ARP table, when network element detect it is a certain in stored ARP table Then, the network element corresponding to the ARP is opposite end network element to individual ARP ageing time, and local terminal network element is i.e. in a local network Broadcast arp probe messages, when opposite end network element receives the ARP probe packet corresponding to the ARP, i.e., it can feed back for being somebody's turn to do The response of ARP probe packet.
Specifically, as shown in figure 3, the control plane storage ARP table of local terminal network element, and controls initiation ARP probe packet (ARP request), forwarding engine forward ARP request according to the ARP request that control plane is initiated to opposite end network element, The Forwarding plane of opposite end network element receives ARP request, and is reported to control plane and analyzed, control plane according to ARP request generation response ARP reply, and be dispatched to Forwarding plane and be forwarded to local terminal network element.
If local terminal network element receives the response ARP reply of opposite end network element feedback, retain the ARP corresponding to the network element of opposite end List item.As illustrated, in practical application, may cause not feed back ARP to local terminal network element due to opposite end network element cpu busy Reply, then local terminal network element do not receive the response ARP reply that opposite end network element is directed to ARP request feedbacks, local terminal network element then obtains Take the target identification of opposite end network element, target identification can be opposite end network element to local terminal network element send service message when source MAC Location and local terminal network element receive the input port for the service message that opposite end network element is sent, and the specific existence form of target identification does not limit It is fixed.
Optionally, local terminal network element obtains opposite end network element and sends business report to local terminal network element according to acquired target identification The reverse rate of text, service message be opposite end network element to local terminal network element send Internet data when packaged message.Specifically Acquisition modes can be that real-time measurement opposite end network element sends the reverse rate of service message or at one section to local terminal network element Statistics opposite end network element sends average reverse rate or cumulative statistics the opposite end net of service message to local terminal network element in time Member sends the quantity of service message to local terminal network element, and counted quantity is gathered according still further to predetermined period, according to predetermined period with The quantity of statistics calculates the reverse rate that opposite end network element sends service message to local terminal network element.
Optionally, local terminal network element based on acquired reverse rate to corresponding to the opposite end network element at ARP Reason.Optionally, when acquired reverse rate is not zero, then illustrate that opposite end network element has carried out data communication to local terminal network element, it is right End network element is in active period, does not receive the response of opposite end network element feedback, it may be possible to which, due to network link flash, opposite end network element is not received To ARP probe packet, therefore there is no feedback response, it is also possible to the cpu busy of opposite end network element, do not detected in time for ARP Message responds, therefore local terminal network element needs to retain ARP corresponding to the network element of opposite end, and resets ageing timer.
Another aspect local terminal network element does not receive the response that opposite end network element is directed to ARP probe packet feedback, and acquired pair The reverse rate for holding network element to send service message to local terminal network element is zero, then can delete ARP corresponding to the network element of opposite end, with Save cache memory space.
It is not zero if the processor is additionally operable to the reverse rate, retains the ARP corresponding to the opposite end network element List item;
If it is zero that the processor, which is additionally operable to the reverse rate, the ARP table corresponding to the opposite end network element is deleted .
Optionally, if the reverse rate that opposite end network element sends service message to local terminal network element is not zero, opposite end net is shown Member has carried out data communication to local terminal network element, and opposite end network element is in active period, does not receive the response of opposite end network element feedback, it may be possible to Due to network link flash, opposite end network element does not receive ARP probe packet, therefore does not have feedback response, it is also possible to opposite end network element Cpu busy, do not responded in time for ARP probe packet, thus local terminal network element need retain opposite end network element corresponding to ARP, and reset ageing timer.
Optionally, local terminal network element does not receive the response that opposite end network element is directed to ARP probe packet feedback, and acquired opposite end The reverse rate that network element sends service message to local terminal network element is zero, then can delete ARP corresponding to the network element of opposite end, with section Save cache memory space.
Optionally, the target identification includes the service message that the opposite end network element is sent to the local terminal network element Source MAC and the local terminal network element receive the input port for the service message that the opposite end network element is sent.
The processor is additionally operable to the target identification according to the opposite end network element, according to predetermined period to source MAC At least two object statistics data are gathered in the table of location, opposite end network element described in the object statistics data characterization is to the local terminal network element The service message quantity of transmission;
The processor is additionally operable to according to the object statistics data and the predetermined period, calculate the opposite end network element to The local terminal network element sends the reverse rate of the service message.
Optionally, local terminal network element obtains the acquisition modes that opposite end network element sends the reverse rate of service message to local terminal network element It can be according to the target identification of opposite end network element, at least two object statistics are gathered into source MAC table according to predetermined period Data.Target identification includes source MAC and the local terminal network element reception opposite end that opposite end network element sends service message to local terminal network element Network element sends the input port of service message.
Optionally, as shown in figure 5, local terminal network element control plane includes ARP protocol component, and to all behaviour of local terminal network element It is controlled, control plane Schistosomiasis control ARP, and ARP is stored into ARP table, stores and learned in ARP table The ARP table learnt is issued to by the corresponding relation between the IP address of the network element of habit, MAC Address and port, control plane Engine is forwarded, while also issues Zhang Yuan's mac address table (being S-MAC tables) to engine is forwarded, is stored in S-MAC tables each Corresponding relation between the mark and statistics of the network element learnt.
ARP table search key is input port and IP address corresponding to the network element of opposite end, and the data searched are opposite end nets The MAC Address of member, the search keies of S-MAC tables are input port and source MAC corresponding to the network element of opposite end, the data of lookup It is object statistics data corresponding to the network element of opposite end, the object statistics data are that opposite end network element sends service message to local terminal network element Quantity.
When opposite end network element sends reverse traffic message to local terminal network element, the reverse traffic message passes through the three of local terminal network element Layer IP forwardings, when three layers of IP forwards, local terminal network element is according to the input port for receiving the service message and the source MAC of opposite end network element Address search S-MAC tables, when S-MAC tables store the input port and the source MAC, then by corresponding object statistics data It is updated.
Statistics corresponding to some network element is used for the number for characterizing the service message of the local terminal network element received from the network element Amount, the number of the service message of the network element can be specifically received from, correspondingly, often receive the business report that the network element is sent Text, statistics corresponding to the network element is added 1, specifically can also be the data volume of the service message received from the network element, accordingly Ground, the service message that the network element is sent often is received, is adding received business report corresponding to the network element in statistics The data volume of text, for example, current statistics is 910K, the size of the service message is 5K, then the statistics after updating For 915K.
It should be noted that if statistics is the number of service message, it can be counted by counter, one The statistics of one network element of counters count.
Optionally, because object statistics data can have a variety of representations, correspondingly, reverse rate can also have a variety of Representation, such as the number when object statistics data expression service message of the local terminal network element received from the opposite end network element, then Reverse rate can be the number of service message of the local terminal network element received from the opposite end network element in the unit interval, such as 20/s; When object statistics data represent the data volume of service message of the local terminal network element received from the opposite end network element, then reverse rate can be with It is the data volume of service message of the local terminal network element received from the opposite end network element in the unit interval, such as 100K/s.Here with unit Time is 1S, and object statistics data is are said exemplified by the number of service message of the local terminal network element received from the opposite end network element Bright, predetermined period 1S, first time object statistics data are 30, and second of object statistics data is 50, then reverse rate is (50-30)/1=20, it is 20 messages/S.Optionally, as shown in figure 5, S-MAC table of the control plane timing into forwarding engine Object statistics corresponding to the source MAC of middle collection opposite end network element and the input port for the service message for receiving the transmission of opposite end network element Data, and according to predetermined period and object statistics data, calculate the reverse speed that opposite end network element sends service message to local terminal network element Rate.
The processor is additionally operable to generate ARP corresponding to the opposite end network element;
The processor is additionally operable to the ARP according to corresponding to the opposite end network element, generate the target identification with Corresponding relation between the object statistics data;
The processor be additionally operable to by the corresponding relation between the target identification and the object statistics data store to In the source MAC table;
The processor is additionally operable to, when the opposite end network element sends service message to the local terminal network element, update the source The object statistics data in mac address table.
Optionally, local terminal network element needs to learn ARP corresponding to each network element in data communication process is carried out, and will The ARP learnt is stored in ARP table, and ARP table is stored in the cache of network element, and the ARP learnt includes ARP corresponding to the network element of opposite end.Specific learning process refer to existing ARP learning processes.
Optionally, when learning ARP corresponding to the network element of opposite end simultaneously, opposite end net is generated according to the ARP learnt Corresponding relation between the target identification and object statistics data of member, it is the source MAC, input port and mesh of opposite end network element Mark the corresponding relation between statistics.
Optionally, the corresponding relation between target identification and object statistics data is stored into source MAC table, is Corresponding relation between the source MAC, input port and object statistics data of the opposite end network element generated is stored to source It is specific as shown in figure 5, control plane is by between source MAC, input port and object statistics data in mac address table Corresponding relation is stored into the S-MAC tables of forwarding engine.
Optionally, it is when local terminal network element receives opposite end net when opposite end network element sends service message to local terminal network element During the service message that member is sent, local terminal network element is right according to the source MAC of opposite end network element and the input port of reception service message Object statistics data are updated.
Optionally, the corresponding relation between multiple marks and multiple statistics is stored in the source MAC table;
The transceiver is additionally operable to when the local terminal network element receives the service message that the opposite end network element is sent, from connecing The target identification of the opposite end network element is obtained in the service message received;
The processor is additionally operable to according to the target identification, and the object statistics are searched in the source MAC table Data, and update the object statistics data.
Optionally, when opposite end network element sends service message to local terminal network element, local terminal network element obtains the target of opposite end network element Mark, be opposite end network element source MAC and receive service message input port, specific acquisition modes can be from Extracted in the service message of reception.
Optionally, the corresponding relation between multiple marks and multiple statistics, a mark pair are stored in S-MAC tables Answer a statistics.Local terminal network element searches object statistics data, and update the target according to target identification in S-MAC tables Statistics.
In the embodiment of the present invention, when ARP ageing time arrives corresponding to the network element of opposite end, local terminal network element is wide in LAN When broadcasting ARP probe packet, and not obtaining the response that opposite end network element feeds back for the ARP probe packet, in order to further determine that Whether by ARP table entry deletion corresponding to the network element of opposite end, local terminal network element obtains the target identification of opposite end network element, according to target identification, Obtain the reverse rate that opposite end network element sends service message to local terminal network element, local terminal network element again based on acquired reverse rate, ARP corresponding to the opposite end network element is handled.In the embodiment of the present invention, opposite end network element is not obtained in local terminal network element During feedback response, it is not directly by ARP table entry deletion corresponding to the network element of opposite end, but obtains opposite end network element and sent out to local terminal network element The reverse rate of service message is sent, then ARP is handled based on reverse rate, prevents from being in active period in opposite end network element And due to when the reason such as busy does not have timely feedback response, missing ARP table entry deletion corresponding to the network element of opposite end, so as to effectively avoid ARP misses aging.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with The hardware of correlation is instructed to complete by computer program, described program can be stored in a computer read/write memory medium In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
Step in present invention method can be sequentially adjusted, merged and deleted according to actual needs.
Module or unit in terminal of the embodiment of the present invention can be combined, divided and deleted according to actual needs.
The parts such as the microcontroller of the embodiment of the present invention, can with universal integrated circuit (such as central processor CPU), or with Application specific integrated circuit (ASIC) is realized.
Above disclosure is only preferred embodiment of present invention, can not limit the right model of the present invention with this certainly Enclose, therefore the equivalent variations made according to the claims in the present invention, still belong to the scope that the present invention is covered.

Claims (12)

1. a kind of data communications method, it is characterised in that methods described includes:
When ARP ageing time arrives corresponding to the network element of opposite end, local terminal network element broadcast arp probe messages in LAN, and not When obtaining the response that the opposite end network element feeds back for the ARP probe packet, the local terminal network element obtains the opposite end network element Target identification;
The local terminal network element obtains the opposite end network element and sends service message to the local terminal network element according to the target identification Reverse rate;
The local terminal network element is based on the reverse rate, and the ARP corresponding to the opposite end network element is handled.
2. the method as described in claim 1, it is characterised in that the local terminal network element is based on the reverse rate, to described right The ARP corresponding to the network element of end is handled, including:
If the reverse rate is not zero, the local terminal network element retains the ARP corresponding to the opposite end network element;
If the reverse rate is zero, the local terminal network element deletes the ARP corresponding to the opposite end network element.
3. method as claimed in claim 2, it is characterised in that the target identification includes the opposite end network element to the local terminal The source MAC and the local terminal network element for the service message that network element is sent receive the business that the opposite end network element is sent The input port of message.
4. method as claimed in claim 3, it is characterised in that the local terminal network element is according to the target mark of the opposite end network element Know, obtain the reverse rate that the opposite end network element sends service message to the local terminal network element, including:
The local terminal network element is adopted according to the target identification of the opposite end network element according to predetermined period into source MAC table Collect object statistics data, the service message number that opposite end network element described in the object statistics data characterization is sent to the local terminal network element The accumulated value of amount;
The local terminal network element calculates the opposite end network element to the local terminal according to the object statistics data and the predetermined period Network element sends the reverse rate of the service message.
5. method as claimed in claim 4, it is characterised in that the local terminal network element obtains the target identification of the opposite end network element Before, in addition to:
The local terminal network element generates ARP corresponding to the opposite end network element;
Local terminal network element ARP according to corresponding to the opposite end network element, generates the target identification and the target Corresponding relation between statistics;
The local terminal network element stores the corresponding relation between the target identification and the object statistics data to the source MAC In address table;
When the local terminal network element receives the service message that the opposite end network element is sent, the local terminal network element updates the source The object statistics data in mac address table.
6. method as claimed in claim 5, it is characterised in that multiple marks and multiple systems are stored in the source MAC table Corresponding relation between counting, the multiple mark include the target identification, and the multiple statistics includes institute Object statistics data are stated, the target identification is corresponding with the object statistics data;
It is described when the service message that the opposite end network element is sent is received when the local terminal network element, described in the local terminal network element renewal The object statistics data in source MAC table, including:
When the local terminal network element receives the service message that the opposite end network element is sent, the local terminal network element is from described in reception The target identification of the opposite end network element is obtained in service message;
The local terminal network element searches the object statistics data according to the target identification in the source MAC table, and more The new object statistics data.
7. a kind of data communication equipment, applied to local terminal network element, it is characterised in that the data communication equipment includes:
First acquisition module, for when ARP ageing time corresponding to the network element of opposite end then, local terminal network element is wide in LAN When broadcasting ARP probe packet, and not obtaining the response that the opposite end network element feeds back for the ARP probe packet, it is described right to obtain Hold the target identification of network element;
Second acquisition module, for according to the target identification, obtaining the opposite end network element and sending business to the local terminal network element The reverse rate of message;
Processing module, for based on the reverse rate, handling the ARP corresponding to the opposite end network element.
8. device as claimed in claim 7, it is characterised in that if the processing module is not specifically for the reverse rate Zero, then retain the ARP corresponding to the opposite end network element;If the reverse rate is zero, the opposite end network element is deleted The corresponding ARP.
9. device as claimed in claim 8, it is characterised in that the target identification includes the opposite end network element to the local terminal The source MAC and the local terminal network element for the service message that network element is sent receive the business that the opposite end network element is sent The input port of message.
10. device as claimed in claim 9, it is characterised in that second acquisition module includes:
Collecting unit, for the target identification according to the opposite end network element, adopted according to predetermined period into source MAC table Collect object statistics data, the service message number that opposite end network element described in the object statistics data characterization is sent to the local terminal network element The accumulated value of amount;
Computing unit, for according to the object statistics data and the predetermined period, calculating the opposite end network element to described Network element is held to send the reverse rate of the service message.
11. device as claimed in claim 10, it is characterised in that described device also includes:
First generation module, for generating ARP corresponding to the opposite end network element;
Second generation module, for the ARP according to corresponding to the opposite end network element, generate the target identification with it is described Corresponding relation between object statistics data;
Memory module, for the corresponding relation between the target identification and the object statistics data to be stored to the source In mac address table;
Update module, for when the local terminal network element receives the service message that the opposite end network element is sent, updating the source The object statistics data in mac address table.
12. device as claimed in claim 11, it is characterised in that stored in the source MAC table it is multiple mark with it is multiple Corresponding relation between statistics, the multiple mark include the target identification, and the multiple statistics includes The object statistics data, the target identification are corresponding with the object statistics data;The update module includes:
Acquiring unit, for when the local terminal network element receives the service message that the opposite end network element is sent, from the institute of reception State the target identification that the opposite end network element is obtained in service message;
Updating block is searched, for according to the target identification, the object statistics number to be searched in the source MAC table According to, and update the object statistics data.
CN201410804283.5A 2014-12-22 2014-12-22 A kind of data communications method and device Active CN104539543B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410804283.5A CN104539543B (en) 2014-12-22 2014-12-22 A kind of data communications method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410804283.5A CN104539543B (en) 2014-12-22 2014-12-22 A kind of data communications method and device

Publications (2)

Publication Number Publication Date
CN104539543A CN104539543A (en) 2015-04-22
CN104539543B true CN104539543B (en) 2018-01-05

Family

ID=52855012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410804283.5A Active CN104539543B (en) 2014-12-22 2014-12-22 A kind of data communications method and device

Country Status (1)

Country Link
CN (1) CN104539543B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100550012B1 (en) * 2003-11-28 2006-02-08 한국전자통신연구원 The method of managing ARP table for fast packet forwarding and managing unit there of.
CN1783874A (en) * 2004-12-01 2006-06-07 华为技术有限公司 Ageing method for address analytic protocol cache table item in network device
CN102983984A (en) * 2011-09-05 2013-03-20 盛科网络(苏州)有限公司 Method and system for solution of aging of multicast entries
CN103974380A (en) * 2013-01-24 2014-08-06 杭州华三通信技术有限公司 Terminal access position keep-alive method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100550012B1 (en) * 2003-11-28 2006-02-08 한국전자통신연구원 The method of managing ARP table for fast packet forwarding and managing unit there of.
CN1783874A (en) * 2004-12-01 2006-06-07 华为技术有限公司 Ageing method for address analytic protocol cache table item in network device
CN102983984A (en) * 2011-09-05 2013-03-20 盛科网络(苏州)有限公司 Method and system for solution of aging of multicast entries
CN103974380A (en) * 2013-01-24 2014-08-06 杭州华三通信技术有限公司 Terminal access position keep-alive method and device

Also Published As

Publication number Publication date
CN104539543A (en) 2015-04-22

Similar Documents

Publication Publication Date Title
CN105049299B (en) Detection method and device, the network architecture of time delay status information
CN103414650B (en) A kind of avoid congested method for routing and device
CN106487558B (en) A kind of method and apparatus for realizing the scalable appearance of access device
CN103905251B (en) Network topology obtaining method and device
EP3567813A1 (en) Method, apparatus and system for determining content acquisition path and processing request
CN106130796A (en) SDN topology traffic visualization monitoring method and control terminal
CN107947994B (en) Network topology self-discovery method and device, network equipment and computer storage medium
CN103746874B (en) Method and equipment for IP (Internet protocol) FPM (flow performance monitor)
CN104601467A (en) Method and device for sending messages
CN105099721B (en) Safeguard the method and apparatus of multicast member
CN102281204B (en) Method and routing equipment for implementing rendezvous point (RP) load sharing of multicast group and routing equipment
CN104486167A (en) Concurrence network performance and network trending direction testing method based on MESH network
CN107294743B (en) Network path detection method, controller and network equipment
CN103188153B (en) BFD file transmitting method and equipment on a kind of broadcasting network link
CN107566280A (en) Verify the method and router device in multicast packet path
Thanigaivel et al. TRUNCMAN: Trust based routing mechanism using non-cooperative movement in mobile ad-hoc network
CN108924825A (en) A kind of high energy efficiency trust management and credible routing method towards SDWSNs
CN107465621A (en) A kind of router finds method, SDN controllers, router and network system
WO2016101600A1 (en) Line card determination, determination processing method and device, and line card determination system
JP5935897B2 (en) COMMUNICATION NODE, COMMUNICATION SYSTEM, CONTROL DEVICE, PACKET TRANSFER METHOD, AND PROGRAM
CN104243319B (en) The method and device that a kind of neighbours have found
CN110855566B (en) Method and device for dragging upstream flow
CN104539543B (en) A kind of data communications method and device
CN106452963A (en) Network path sensing method and system
CN106161124A (en) The test processing method of message and device

Legal Events

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