CN107819684A - synchronization processing method and device - Google Patents

synchronization processing method and device Download PDF

Info

Publication number
CN107819684A
CN107819684A CN201610818946.8A CN201610818946A CN107819684A CN 107819684 A CN107819684 A CN 107819684A CN 201610818946 A CN201610818946 A CN 201610818946A CN 107819684 A CN107819684 A CN 107819684A
Authority
CN
China
Prior art keywords
mac
mac address
line card
testing result
synchronous
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610818946.8A
Other languages
Chinese (zh)
Other versions
CN107819684B (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.)
ZTE Corp
Original Assignee
Nanjing ZTE New Software 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 Nanjing ZTE New Software Co Ltd filed Critical Nanjing ZTE New Software Co Ltd
Priority to CN201610818946.8A priority Critical patent/CN107819684B/en
Publication of CN107819684A publication Critical patent/CN107819684A/en
Application granted granted Critical
Publication of CN107819684B publication Critical patent/CN107819684B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5069Address allocation for group communication, multicast communication or broadcast communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Landscapes

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

Abstract

The invention provides a kind of synchronization processing method and device, this method includes:First Line card learns MAC address by network processing unit NP;First Line card sends MAC synchronous multicasting messages by NP to other line cards, wherein, MAC synchronous multicastings message includes MAC Address.By the invention it is possible to the synchronization process for solving line card in correlation technique is completed by software, it may be difficult in time the problem of the change of reflection mac address table.

Description

Synchronization processing method and device
Technical field
The present invention relates to the communications field, in particular to a kind of synchronization processing method and device.
Background technology
Distributed system is made up of active and standby two pieces of master controls, power board and polylith line card.Every piece of line card receives ethernet frame Afterwards, can be entered based on message to the source media access control of port information and ethernet frame (Media Access Control, abbreviation For MAC) address form an entry be added in mac address table, mark is self study entry, and here it is MAC Address self study. It is exactly MAC address aging to delete the MAC Address list item entry of no refreshing in configuration ageing time.Every piece of line card will be learnt by oneself Practise MAC entries and construct a message package and issue switching network, switching network allows other line cards again to all line card spaces multicast in network element Also study is synchronous here it is MAC Address to the MAC entries.Do not learn in other line cards current to the MAC bars, unicast message is at it The situation of flooding just occurs in his line card, takes system bandwidth significantly, influences the forwarding of normal data.Due to MAC Address be present Every piece of line card of aging needs traversal all entries of MAC table of voluntarily giving out a contract for a project with a fixed cycle, is just constructed together for self study entry Step message packet is sent to switching network broadcast, realizes all line card MAC entry consistencies of whole network element, here it is synchronous refresh.And Webmaster can be periodically reported for every piece of line card self study entry, so as to realize the one of every piece of line card MAC entry of webmaster and network element again Cause property.
But the synchronization process of line card is completed by software in correlation technique, over-burden by line card CPU.And software is determined When travel through whole MAC Address entries, it is necessary to compared with MAC Address cache table, can just determine the MAC Address bar newly acquired Mesh, this process is very time-consuming, is hurried if running into CPU, read the time of mac address table and can exceed dozens of minutes, and MAC in practice Location table changes quickly, accordingly, it is difficult to reflect the change of mac address table in time.Also, when MAC Address drift occurs, Ke Nengxu Dozens of minutes platform ability reporting MAC address excursion signal is wanted, is unfavorable for engineering maintenance.
The content of the invention
The embodiments of the invention provide a kind of synchronization processing method and device, at least to solve the same of line card in correlation technique Step processing is completed by software, it may be difficult in time the problem of the change of reflection mac address table.
According to one embodiment of present invention, there is provided a kind of synchronization processing method, including:First Line card by network at Manage device NP study MAC address;First Line card sends MAC synchronous multicasting reports by the NP to other line cards Text, wherein, the MAC synchronous multicastings message includes the MAC Address.
Alternatively, after First Line card sends MAC synchronous multicasting messages by the NP to other line cards, in addition to: Whether each MAC Address that the first line card is periodically detected in MAC set persistently receives message, wherein, the MAC collection shares In storage MAC Address;First line card refreshes each MAC Address that testing result is yes in the MAC set;First Line card removal Each MAC Address that testing result is no in the MAC set.
Alternatively, the first line card refreshes each MAC Address that testing result is yes in the MAC set and included:First Line Card judges whether the source identification for each MAC Address that the testing result is yes is predetermined mark, wherein, the predetermined mark For indicating that each MAC Address is the MAC Address that learns by NP;First Line is stuck in the situation that judged result is yes Under, MAC synchronous refresh messages are sent to other described line cards by the NP.
Alternatively, each MAC Address that testing result is no in MAC set described in First Line card removal includes:Judge institute Whether the source identification for stating each MAC Address that testing result is no is predetermined mark, wherein, predetermined identify is used to indicate Each MAC Address is the MAC Address learnt by NP;First Line card in the case where the judgment result is yes, passes through institute State NP and send MAC synchronization removal messages to other described line cards.
Alternatively, after First Line card learns MAC address by network processing unit NP, in addition to: First line card detects the MAC set, and whether available free position stores the MAC Address;First Line is stuck in what testing result was no In the case of, determine the predetermined priority of the MAC Address;First line card is according to the predetermined priority of the MAC Address, to described Priority is covered less than the MAC Address of predetermined priority in MAC set.
According to another embodiment of the invention, there is provided a kind of synchronization processing apparatus, including:Study module, for leading to Cross network processing unit NP study MAC address;Sending module, for being sent by the NP to other line cards MAC synchronous multicasting messages, wherein, the MAC synchronous multicastings message includes the MAC Address.
Alternatively, in addition to:First detection module, for whether periodically detecting each MAC Address in MAC set Message is persistently received, wherein, the MAC gathers for storing MAC Address;Refresh module, examined for refreshing in the MAC set Survey each MAC Address that result is yes;Removing module, for deleting testing result is no in MAC set each MAC Location.
Alternatively, the refresh module, it is additionally operable to judge the source identification for each MAC Address that the testing result is yes Whether it is predetermined mark, wherein, it is described predetermined to identify for indicating each MAC Address for by the NP MAC learnt Location;In the case where the judgment result is yes, MAC synchronous refresh messages are sent to other described line cards by the NP.
Alternatively, the removing module, it is additionally operable to judge the source identification for each MAC Address that the testing result is no Whether it is predetermined mark, wherein, it is described predetermined to identify for indicating each MAC Address for by the NP MAC learnt Location;First Line card sends MAC synchronization removal reports to other described line cards in the case where the judgment result is yes, by the NP Text.
Alternatively, in addition to:Second detection module, for detecting MAC set whether described in the storage of available free position MAC Address;Determining module, in the case of being no in testing result, determine the predetermined priority of the MAC Address;Covering Module, for the predetermined priority according to the MAC Address, priority is less than the MAC of predetermined priority in gathering the MAC Address is covered.
According to still another embodiment of the invention, a kind of storage medium is additionally provided.The storage medium is arranged to storage and used In the program code for performing following steps:First Line card learns MAC address by network processing unit NP;First Line card sends MAC synchronous multicasting messages by the NP to other line cards, wherein, the MAC synchronous multicastings message includes described MAC Address.
Alternatively, storage medium is also configured to the program code that storage is used to perform following steps:Pass through in First Line card After the NP sends MAC synchronous multicasting messages to other line cards, in addition to:First line card is periodically detected in MAC set Each MAC Address whether persistently receive message, wherein, the MAC gathers for storing MAC Address;First line card refreshes institute State each MAC Address that testing result is yes in MAC set;Testing result is no in MAC set described in First Line card removal Each MAC Address.
Alternatively, storage medium is also configured to the program code that storage is used to perform following steps:First line card refreshes institute Stating each MAC Address that testing result is yes in MAC set includes:First line card judges that it is each to be yes for the testing result Whether the source identification of MAC Address is predetermined mark, wherein, predetermined identify is used to indicate that each MAC Address is logical Cross the MAC Address that NP learns;First Line card is sent out to other described line cards in the case where the judgment result is yes, by the NP Send MAC synchronous refresh messages.
Alternatively, storage medium is also configured to the program code that storage is used to perform following steps:First Line card removal institute Stating each MAC Address that testing result is no in MAC set includes:Judge each MAC Address that the testing result is no Whether source identification is predetermined mark, wherein, predetermined identify is used to indicate that each MAC Address is to arrive by NP study MAC Address;First Line card sends MAC synchronizations to other described line cards in the case where the judgment result is yes, by the NP Delete message.
Alternatively, storage medium is also configured to the program code that storage is used to perform following steps:Pass through in First Line card After network processing unit NP study MAC address, in addition to:First line card detects whether the MAC set has Clear position stores the MAC Address;First Line is stuck in testing result in the case of no, to determine the predetermined of the MAC Address Priority;First line card is according to the predetermined priority of the MAC Address, and priority is preferential less than predetermined in gathering the MAC The MAC Address of level is covered.
By the present invention, First Line card learns MAC address by network processing unit NP;First Line cartoon Cross NP and send MAC synchronous multicasting messages to other line cards, wherein, MAC synchronous multicastings message includes MAC Address.Due to First Line Card learns new MAC Address by PN and institute in the i.e. achievable network element of message for carry the new MAC Address is sent by NP There is the MAC Address synchronization of line card, all MAC Address in MAC set without traveling through the first line card by CPU again, to determine The new MAC Address learnt, therefore, all line cards can timely obtain the MAC Address of the new study in network element, can solve Certainly the synchronization process of line card is completed by software in correlation technique, it may be difficult in time the problem of the change of reflection mac address table.
Brief description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, forms the part of the application, this hair Bright schematic description and description is used to explain the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is a kind of hardware block diagram of the line card of synchronization processing method of the embodiment of the present invention;
Fig. 2 is the flow chart of synchronization processing method according to embodiments of the present invention;
Fig. 3 is distributed system architecture figure according to embodiments of the present invention;
Fig. 4 is NP synchronizations according to embodiments of the present invention and synchronous refresh implementation process figure;
Fig. 5 is the structured flowchart of synchronization processing apparatus according to embodiments of the present invention;
Fig. 6 is the structured flowchart of synchronization processing apparatus according to embodiments of the present invention;
Fig. 7 is the structured flowchart of synchronization processing apparatus according to embodiments of the present invention.
Embodiment
Describe the present invention in detail below with reference to accompanying drawing and in conjunction with the embodiments.It should be noted that do not conflicting In the case of, the feature in embodiment and embodiment in the application can be mutually combined.
It should be noted that term " first " in description and claims of this specification and above-mentioned accompanying drawing, " Two " etc. be for distinguishing similar object, without for describing specific order or precedence.
Embodiment 1
The embodiment of the method that the embodiment of the present application 1 is provided can fill in line card, terminal or similar computing Put middle execution.Exemplified by operating on line card, Fig. 1 is a kind of hardware knot of the line card of synchronization processing method of the embodiment of the present invention Structure block diagram.As shown in figure 1, line card 10 can include one or more (one is only shown in figure) (processors 102 of processor 102 Micro-processor MCV or PLD FPGA etc. processing unit can be included but is not limited to), depositing for data storage Reservoir 104 and the transmitting device 106 for communication function.It will appreciated by the skilled person that the knot shown in Fig. 1 Structure is only to illustrate, and it does not cause to limit to the structure of above-mentioned electronic installation.For example, line card 10 may also include than shown in Fig. 1 More either less components have the configuration different from shown in Fig. 1.
Memory 104 can be used for the software program and module of storage application software, such as the synchronization in the embodiment of the present invention Programmed instruction/module corresponding to processing method, processor 102 by operation be stored in software program in memory 104 and Module, so as to perform various function application and data processing, that is, realize above-mentioned method.Memory 104 may include at a high speed with Machine memory, may also include nonvolatile memory, as one or more magnetic storage device, flash memory or other it is non-easily The property lost solid-state memory.In some instances, memory 104 can further comprise depositing relative to processor 102 is remotely located Reservoir, these remote memories can pass through network connection to line card 10.The example of above-mentioned network include but is not limited to internet, Intranet, LAN, mobile radio communication and combinations thereof.
Transmitting device 106 is used to data are received or sent via a network.Above-mentioned network instantiation may include The wireless network that the communication providerses of line card 10 provide.In an example, transmitting device 106 includes a network adapter (Network Interface Controller, NIC), its can be connected by base station with other network equipments so as to interconnection Net is communicated.In an example, transmitting device 106 can be radio frequency (Radio Frequency, RF) module, and it is used for Wirelessly communicated with internet.
A kind of synchronization processing method for running on above-mentioned line card is provided in the present embodiment, and Fig. 2 is according to of the invention real The flow chart of the synchronization processing method of example is applied, as shown in Fig. 2 the flow comprises the following steps:
Step S202, First Line card learn MAC address by network processing unit NP;
Step S204, First Line card send MAC synchronous multicasting messages by NP to other line cards, wherein, MAC synchronous multicastings Message includes MAC Address.
By above-mentioned steps, because First Line card learns new MAC Address by PN and sends that to carry this new by NP MAC Address message be can be achieved all line cards in network element MAC Address it is synchronous, travel through the first line card without passing through CPU again MAC set in all MAC Address, to determine the new MAC Address learnt, therefore, in network element all line cards can and When the acquisition new study MAC Address, the synchronization process that can solve line card in correlation technique completed by software, it may be difficult to In time the problem of the change of reflection mac address table, also, compared with prior art, avoiding CPU, over-burden, saves system Bandwidth, improve MAC synchronous refresh efficiency.
For example, after new MAC is arrived in up NP study, self study mark puts 1 while sends MAC synchronous multicastings message (ibid MAC synchronous multicasting messages are stated, action type is synchronous), all line cards in network element are transmitted to by switching network and carry out mac learning, with Realize MAC Address Fast synchronization.
Alternatively, after First Line card sends MAC synchronous multicasting messages by NP to other line cards, in addition to:First Whether each MAC Address that line card is periodically detected in MAC set persistently receives message, wherein, MAC gathers for storing MAC Address;First line card refreshes each MAC Address that testing result is yes in MAC set;In First Line card removal MAC set Each MAC Address that testing result is no.By above-mentioned steps, the MAC for periodically updating the first line card gathers, in case aging is all MAC Address entries absent corresponding to phase to rear business normal work, and can also quickly delete the non-normal work pair of business The MAC Address answered, MAC Address corresponding to the non-normal work of the business is being deleted when avoiding waiting for digestion period.
For example, above-mentioned NP periodically detect business corresponding to each MAC Address in MAC set whether normal operation Cycle duration can be set in the following way:Most long no more than digestion period is set the one of Timing Synchronization refresh cycle Half, for example digestion period is 60 seconds, then the synchronous refresh cycle be less than 30 seconds.And it is greater than simultaneously in NP traversal mac address tables All entries need time x.
Alternatively, the first line card refreshes each MAC Address that testing result is yes in MAC set and included:First line card is sentenced Whether the source identification for each MAC Address that disconnected testing result is yes is predetermined mark, wherein, predetermined mark is each for indicating MAC Address is the MAC Address learnt by NP;First Line card in the case where the judgment result is yes, by NP to switching network MAC synchronous refresh messages are sent, to notify MAC Address corresponding to the refreshing of other line cards.
Alternatively, above-mentioned predetermined mark can be self study mark.Pass through above-mentioned steps, it is ensured that only in MAC Address For self study obtain MAC Address when, just to switching network send MAC synchronous refresh messages, so as to notify other line cards refresh pair The MAC Address answered, interactive signaling can be reduced.
For example, MAC Address of the up line card to each self study, it is (same that timed periodic sends MAC synchronous multicastings message Above-mentioned MAC synchronous refresh message), the MAC table of the other all line cards of refreshing, in order to avoid entries absent after aging.
Alternatively, each MAC Address that testing result is no in First Line card removal MAC set includes:Judge detection knot Whether the source identification for each MAC Address that fruit is no is predetermined mark, wherein, predetermined mark is used to indicate each MAC Address For the MAC Address learnt by NP;First Line card sends MAC to switching network in the case where the judgment result is yes, by NP Synchronization removal message, to notify MAC Address corresponding to the deletion of other line cards.Pass through above-mentioned steps, it is ensured that only in MAC When location is the MAC Address that self study obtains, MAC synchronization removal messages just are sent to switching network, to notify other line cards to delete Corresponding MAC Address, interactive signaling can be reduced.
For example, after the MAC Address of self study is fallen by NP agings, it is (same with above-mentioned MAC also to send MAC synchronous multicastings message Step deletes message), all line cards in network element are transmitted to by switching network and carry out specific MAC burin-in process, to realize that MAC Address is fast Fast aging.In another example after synchronous MAC Address is fallen by NP agings, address is only deleted, does not send MAC synchronous multicasting messages.
Alternatively, the MAC Address of self study safeguards aging position information according to the SMAC of the service message received, synchronous MAC Address safeguards aging position information according to the MAC sync messages received.
Alternatively, after First Line card learns MAC address by network processing unit NP, in addition to: Whether available free position stores MAC Address for first line card detection MAC set;First Line is stuck in testing result as in the case of no, Determine the predetermined priority of MAC Address;First line card is according to the predetermined priority of MAC Address, and priority is less than in gathering MAC The MAC Address of predetermined priority is covered.Pass through above-mentioned steps, it is ensured that the new MAC Address learnt is stored in safely MAC gathers.
Alternatively periodic refreshing maintenance mechanism can be with:Up line card is produced using independent Packet Generator timings A kind of special message completes the transmission of the MAC synchronous multicastings message of each self study MAC entries (action type for synchronous). Packet Generator are set as that every n seconds are repeated once the operation for refreshing and safeguarding mac address table;In NP traversal mac address tables All entries, in mac address table effectively and sources of learning be self study entry, one by one send MAC synchronous multicasting messages. Because sources of learning also assists in NP agings for synchronous MAC Address, the cycle of MAC Address periodic refreshing is old no more than NP Change the half in cycle, while be also greater than the time that NP travels through whole MAC table entry needs.
NP implementations are given out a contract for a project by NP to realize the synchronization of the MAC Address of all line cards in network element in above-described embodiment. The dynamic MAC entries of platform caching are mainly used as webmaster and shown, it is not necessary to synchronous to all line cards.MAC address learning source has Two kinds:It is synchronous, self study.In view of the line card plate in practical application, the complex scenes such as plate, power down, reset are pulled out, the present invention increases It is subject to lower periodic refreshing maintenance mechanism:Self study MAC Address wants periodic refresh, i.e. timing sends MAC synchronization message messages, by Switching network is transmitted to all line cards in network element;Self study and synchronous MAC Address, NP can do burnin operation;Increase MAC Privilege level concept is practised, the MAC Address of self study and synchronous MAC Address judge whether to cover based on priority, and priority is high Can cover the low MAC entries of priority.
In order to facilitate above-described embodiment is understood, the following detailed description of implementation process.
Fig. 3 is distributed system architecture figure according to embodiments of the present invention, and Fig. 4 is that NP according to embodiments of the present invention is same Step and synchronous refresh implementation process figure, with reference to Fig. 3, as shown in figure 4, the synchronous flow includes (mac is with above-mentioned MAC):
1st, line card 1 inputs smac (the source mac of message input of a Business Stream, wherein two layers of head of message from external interface Address)=00:00:01:00:00:01, the port information of message input includes port (physical port number)=1, slot (places Equipment slot number)=5, vlanid (subport vlanid values)=10, line card 1 learns smac after receiving the message, in mac tables Increase an entry, above- mentioned information is added to entry corresponding field, sources of learning is self study.It is based on items for information structure simultaneously Make synchronizing information bag and be sent to switching network (with above-mentioned MAC synchronous multicastings message).
2nd, switching network space multicast in whole network element to mac synchronizing informations bag, such line card 1, line card 2 and line card 3 all can Receive the bag.Line card 1, which receives the bag and compares No. slot, learns it is the synchronizing information bag oneself sent, directly abandons the bag;Line Card 2 and line card 3 receive the bag and extract smac, port=1, slot=5, and vlanid=10 information is added an entry in mac tables, is learned Source is practised to be synchronous, such line card 3 of line card 2 also has smac=00 with as line card 1:00:01:00:00:01 entry, Add sync message discard processing after entry.
3rd, network element global configuration digestion period, digestion period one are arrived, and the entry not refreshed will be aging, that is, be deleted, If the Business Stream of line card 1 persistently sends out stream, study would not be repeated after the study of line card 1 to smac entries, also would not structure again Synchronizing information bag is made, ensures that the entry is not aging by refreshing aging table every time, so to ensure line card 2 and line card 3 The entry also not needed being aging the NP for the card 1 that goes offline timing send synchronous refresh packet.
4th, the setting rule of Timing Synchronization refresh cycle is needed herein, and the setting of Timing Synchronization refresh cycle is most long to surpass Cross the half of digestion period, for example digestion period is 60 seconds, then the synchronous refresh cycle be less than 30 seconds.And it is greater than simultaneously NP times Go through the time x that all entries in mac address table need, so the cycle of MAC Address periodic refreshing must be in the x seconds -- 30 seconds it Between.It is assumed hereinafter that the Timing Synchronization refresh cycle is 10s.
With reference to Fig. 3, as shown in figure 4, the synchronous refresh flow includes (mac is with above-mentioned MAC):
5th, line card 1 sends the synchronous refresh packet of tape serial number using 10s as the cycle, and it is mac entries to send bag number in 10s Number capacity, can have been sent, 10s is the synchronous refresh cycle with 3s.The Application Serial Number of line card 1 travels through all entries of list item, to each Effective entry judges sources of learning, and synchronizing information bag is constructed if for self study and is sent to (with above-mentioned MAC synchronous refresh message) Switching network, do not constructed if for synchronization.
6th, switching network space multicast in whole network element to mac synchronizing informations bag, same line card 1, line card 2 and line card 3 are all The bag can be received.Line card 1, which receives the bag and compares No. slot, learns it is the synchronizing information bag oneself sent, directly abandons the bag; Line card 2 and line card 3, which receive the bag and refresh aging table, ensures that entry is not aging, such line card 2 and line card 3 ensure that with Line card 1 possesses the same entry, if smac=00:00:01:00:00:01 Business Stream inputs just from line card 2 or line card 3 Without broadcast, directly sent out from the designated port of line card 1.
7th, the smac=00 of line card 1:00:01:00:00:After 01 Business Stream interrupts, the entry is inherently aging, and one After denier aging is fallen, line card 1 can also send MAC synchronous multicastings message and arrive switching network, switching network (with above-mentioned MAC synchronization removals message) Space is multicasted to all line cards in network element, and line card 2 and line card 3 in time can delete the mac entries after receiving the message, to realize MAC synchronizing address quick agings, mistake is avoided to send message.
It can be seen that provide a kind of method of fast and effective MAC Address synchronous refresh by NP by the present invention, it is only necessary to learning One marker bit is increased to the entry of this line card self study during habit, is that self study or synchronous entry, NP can for subsequently distinguishing To go to travel through all entries of MAC table by cycle time, synchronous refresh bag is constructed to self study entry, realizes that Fast synchronization refreshes. Therefore, MAC Address synchronous refresh efficiency can reduce unicast message Flooding Time between above-described embodiment improves line card, ensure industry Business is not interrupted continuously, effectively save system resource, synchronous refresh is realized by NP, can also be mitigated CPU burdens significantly.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation The method of example can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but a lot In the case of the former be more preferably embodiment.Based on such understanding, technical scheme is substantially in other words to existing The part that technology contributes can be embodied in the form of software product, and the computer software product is stored in a storage In medium (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal equipment (can be mobile phone, calculate Machine, server, or network equipment etc.) perform method described in each embodiment of the present invention.
Embodiment 2
A kind of synchronization processing apparatus is additionally provided in the present embodiment, and the device is used to realize above-described embodiment and preferred reality Mode is applied, had carried out repeating no more for explanation.As used below, term " module " can realize the soft of predetermined function The combination of part and/or hardware.Although device described by following examples is preferably realized with software, hardware, or The realization of the combination of software and hardware is also what may and be contemplated.
Fig. 5 is the structured flowchart of synchronization processing apparatus according to embodiments of the present invention, as shown in figure 5, the device includes:
Study module 52, for learning MAC address by network processing unit NP;
Sending module 54, above-mentioned study module 52 is connected to, for sending MAC synchronous multicasting reports to other line cards by NP Text, wherein, MAC synchronous multicastings message includes MAC Address.
Fig. 6 is the structured flowchart of synchronization processing apparatus according to embodiments of the present invention, is included as shown in fig. 6, the device removes Outside all modules shown in Fig. 5, in addition to:
Whether first detection module 62, each MAC Address for periodically detecting in MAC set persistently receive report Text, wherein, MAC gathers for storing MAC Address;
Refresh module 64, be connected to above-mentioned first detection module 62, for refresh MAC set in testing result be yes it is every Individual MAC Address;
Removing module 66, be connected to above-mentioned refresh module 64, for delete MAC set in testing result be no it is each MAC Address.
Alternatively, refresh module, whether the source identification for being additionally operable to judge each MAC Address that testing result is yes is pre- Calibration is known, wherein, predetermined mark is used to indicate that each MAC Address is the MAC Address learnt by NP;It is yes in judged result In the case of, MAC synchronous refresh messages are sent to switching network by NP, to notify MAC Address corresponding to the refreshing of other line cards.
Alternatively, removing module, whether the source identification for being additionally operable to judge each MAC Address that testing result is no is pre- Calibration is known, wherein, predetermined mark is used to indicate that each MAC Address is the MAC Address learnt by NP;First Line is stuck in judgement As a result it is in the case of being, MAC synchronization removal messages is sent to switching network by NP, to notify corresponding to the deletion of other line cards MAC Address.
Fig. 7 is the structured flowchart of synchronization processing apparatus according to embodiments of the present invention, is included as shown in fig. 7, the device removes Outside all modules shown in Fig. 5 and Fig. 6, in addition to:
Second detection module 72, for detecting MAC set, whether available free position stores MAC Address;
Determining module 74, above-mentioned second detection module 72 is connected to, in the case of being no in testing result, it is determined that The predetermined priority of MAC Address;
Overlay module 76, above-mentioned determining module 74 is connected to, for the predetermined priority according to MAC Address, MAC is gathered Middle priority is covered less than the MAC Address of predetermined priority.
It should be noted that above-mentioned modules can be realized by software or hardware, for the latter, Ke Yitong Cross in the following manner realization, but not limited to this:Above-mentioned module is respectively positioned in same processor;Or above-mentioned modules are with any The form of combination is located in different processors respectively.
Embodiment 3
Embodiments of the invention additionally provide a kind of storage medium.Alternatively, in the present embodiment, above-mentioned storage medium can The program code for performing following steps to be arranged to storage to be used for:
S1, First Line card learn MAC address by network processing unit NP;
S2, First Line card send MAC synchronous multicasting messages by NP to other line cards, wherein, MAC synchronous multicasting message bags Containing MAC Address.
Alternatively, storage medium is also configured to the program code that storage is used to perform following steps:In First Line cartoon Cross NP to other line cards send MAC synchronous multicasting messages after, in addition to:
Whether S1, each MAC Address that the first line card is periodically detected in MAC set persistently receive message, wherein, MAC gathers for storing MAC Address;
S2, First Line card refresh each MAC Address that testing result is yes during MAC gathers by the NP;
S3, First Line card delete each MAC Address that testing result is no during MAC gathers by the NP.
Alternatively, storage medium is also configured to the program code that storage is used to perform following steps:First line card refreshes Each MAC Address that testing result is yes in MAC set includes:
S1, the first line card judge whether the source identification for each MAC Address that testing result is yes is predetermined mark, its In, predetermined mark is used to indicate that each MAC Address is the MAC Address learnt by NP;
S2, First Line card send MAC synchronous refresh messages to switching network in the case where the judgment result is yes, by NP, To notify MAC Address corresponding to the refreshing of other line cards.
Alternatively, storage medium is also configured to the program code that storage is used to perform following steps:First Line card removal Each MAC Address that testing result is no in MAC set includes:
S1, whether the source identification for judging each MAC Address that testing result is no is predetermined mark, wherein, pre- calibration Know for indicating that each MAC Address is the MAC Address that learns by NP;
S2, First Line card send MAC synchronization removal messages to switching network in the case where the judgment result is yes, by NP, To notify MAC Address corresponding to the deletion of other line cards.
Alternatively, storage medium is also configured to the program code that storage is used to perform following steps:In First Line cartoon Cross after network processing unit NP study MAC address, in addition to:
Whether available free position stores MAC Address for S1, the first line card detection MAC set;
S2, First Line are stuck in testing result in the case of no, to determine the predetermined priority of MAC Address;
S3, the first line card is according to the predetermined priority of MAC Address, and priority is less than predetermined priority in gathering MAC MAC Address is covered.
Alternatively, in the present embodiment, above-mentioned storage medium can include but is not limited to:USB flash disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc. is various can be with the medium of store program codes.
Alternatively, in the present embodiment, processor performs according to the program code stored in storage medium:First line card MAC address is learnt by network processing unit NP;First Line card is synchronous more to other line cards transmission MAC by NP Text is reported, wherein, MAC synchronous multicastings message includes MAC Address.
Alternatively, in the present embodiment, processor performs according to the program code stored in storage medium:In First Line After card sends MAC synchronous multicasting messages by NP to other line cards, in addition to:First line card periodically detects MAC set In each MAC Address whether persistently receive message, wherein, MAC gathers for storing MAC Address;First line card refreshes MAC collection Each MAC Address that testing result is yes in conjunction;Each MAC Address that testing result is no in First Line card removal MAC set.
Alternatively, in the present embodiment, processor performs according to the program code stored in storage medium:First line card Refreshing each MAC Address that testing result is yes in MAC set includes:First line card judges each MAC that testing result is yes Whether the source identification of address is predetermined mark, wherein, predetermined mark is used to indicate that each MAC Address is arrived by NP study MAC Address;First Line card sends MAC synchronous refresh messages to switching network in the case where the judgment result is yes, by NP, so as to Notify MAC Address corresponding to the refreshing of other line cards.
Alternatively, in the present embodiment, processor performs according to the program code stored in storage medium:First line card Deleting each MAC Address that testing result is no in MAC set includes:Judge coming for each MAC Address that testing result is no Source identifies whether it is predetermined mark, wherein, predetermined mark is used to indicate that each MAC Address is the MAC Address learnt by NP; First Line card sends MAC synchronization removal messages to switching network in the case where the judgment result is yes, by NP, to notify other MAC Address corresponding to line card deletion.
Alternatively, in the present embodiment, processor performs according to the program code stored in storage medium:In First Line After card learns MAC address by network processing unit NP, in addition to:Whether the first line card detection MAC set Available free position stores MAC Address;First Line is stuck in testing result in the case of no, to determine the predetermined priority of MAC Address; First line card is according to the predetermined priority of MAC Address, and priority is carried out less than the MAC Address of predetermined priority in gathering MAC Covering.
Alternatively, the specific example in the present embodiment may be referred to described in above-described embodiment and optional embodiment Example, the present embodiment will not be repeated here.
Obviously, those skilled in the art should be understood that above-mentioned each module of the invention or each step can be with general Computing device realize that they can be concentrated on single computing device, or be distributed in multiple computing devices and formed Network on, alternatively, they can be realized with the program code that computing device can perform, it is thus possible to they are stored Performed in the storage device by computing device, and in some cases, can be with different from shown in order execution herein The step of going out or describing, they are either fabricated to each integrated circuit modules respectively or by multiple modules in them or Step is fabricated to single integrated circuit module to realize.So, the present invention is not restricted to any specific hardware and software combination.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should be included in the scope of the protection.

Claims (10)

  1. A kind of 1. synchronization processing method, it is characterised in that including:
    First Line card learns MAC address by network processing unit NP;
    First Line card sends MAC synchronous multicasting messages by the NP to other line cards, wherein, the MAC synchronous multicastings message Include the MAC Address.
  2. 2. according to the method for claim 1, it is characterised in that sent in First Line card by the NP to other line cards After MAC synchronous multicasting messages, in addition to:
    Whether each MAC Address that the first line card is periodically detected in MAC set persistently receives message, wherein, the MAC collection Share in storage MAC Address;
    First line card refreshes each MAC Address that testing result is yes in the MAC set;
    Each MAC Address that testing result is no in MAC set described in First Line card removal.
  3. 3. according to the method for claim 2, it is characterised in that the first line card refreshes testing result in the MAC set and is The each MAC Address for being includes:
    First line card judges whether the source identification for each MAC Address that the testing result is yes is predetermined mark, wherein, institute Predetermined mark is stated to be used to indicate that each MAC Address is the MAC Address learnt by NP;
    First Line card sends MAC synchronous refresh reports to other described line cards in the case where the judgment result is yes, by the NP Text.
  4. 4. according to the method for claim 2, it is characterised in that testing result is in MAC set described in First Line card removal No each MAC Address includes:
    Whether the source identification for judging each MAC Address that the testing result is no is predetermined mark, wherein, the pre- calibration Know for indicating that each MAC Address is the MAC Address that learns by NP;
    First Line card sends MAC synchronization removal reports to other described line cards in the case where the judgment result is yes, by the NP Text.
  5. 5. according to the method for claim 1, it is characterised in that media are learnt by network processing unit NP in First Line card and visited After asking control MAC Address, in addition to:
    First line card detects the MAC set, and whether available free position stores the MAC Address;
    First Line is stuck in testing result in the case of no, to determine the predetermined priority of the MAC Address;
    First line card is according to the predetermined priority of the MAC Address, and priority is less than predetermined priority in gathering the MAC MAC Address is covered.
  6. A kind of 6. synchronization processing apparatus, it is characterised in that including:
    Study module, for learning MAC address by network processing unit NP;
    Sending module, for sending MAC synchronous multicasting messages to other line cards by the NP, wherein, the MAC synchronous multicastings Message includes the MAC Address.
  7. 7. device according to claim 6, it is characterised in that also include:
    First detection module, for periodically detecting whether each MAC Address in MAC set persistently receives message, wherein, The MAC gathers for storing MAC Address;
    Refresh module, for refreshing each MAC Address that testing result is yes in the MAC set;
    Removing module, for deleting each MAC Address that testing result is no in the MAC set.
  8. 8. device according to claim 7, it is characterised in that the refresh module, be additionally operable to judge the testing result Whether the source identification for each MAC Address for being yes is predetermined mark, wherein, it is described it is predetermined identify it is described each for indicating MAC Address is the MAC Address learnt by NP;In the case where the judgment result is yes, by the NP to other described lines Card sends MAC synchronous refresh messages.
  9. 9. device according to claim 7, it is characterised in that the removing module, be additionally operable to judge the testing result Whether the source identification for each MAC Address for being no is predetermined mark, wherein, it is described it is predetermined identify it is described each for indicating MAC Address is the MAC Address learnt by NP;First Line card in the case where the judgment result is yes, by the NP to institute State other line cards and send MAC synchronization removal messages.
  10. 10. device according to claim 6, it is characterised in that also include:
    Second detection module, for detecting the MAC set, whether available free position stores the MAC Address;
    Determining module, in the case of being no in testing result, determine the predetermined priority of the MAC Address;
    Overlay module, for the predetermined priority according to the MAC Address, priority is excellent less than predetermined in gathering the MAC The MAC Address of first level is covered.
CN201610818946.8A 2016-09-12 2016-09-12 Synchronous processing method and device Active CN107819684B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610818946.8A CN107819684B (en) 2016-09-12 2016-09-12 Synchronous processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610818946.8A CN107819684B (en) 2016-09-12 2016-09-12 Synchronous processing method and device

Publications (2)

Publication Number Publication Date
CN107819684A true CN107819684A (en) 2018-03-20
CN107819684B CN107819684B (en) 2022-08-02

Family

ID=61601149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610818946.8A Active CN107819684B (en) 2016-09-12 2016-09-12 Synchronous processing method and device

Country Status (1)

Country Link
CN (1) CN107819684B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111935338A (en) * 2020-09-17 2020-11-13 南京中兴软件有限责任公司 Method and device for controlling source MAC learning item number
CN112887229A (en) * 2021-01-11 2021-06-01 杭州迪普科技股份有限公司 Session information synchronization method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080240106A1 (en) * 2007-03-30 2008-10-02 Ralph Schlenk Method and apparatus for MAC address learning
CN101488862A (en) * 2009-02-23 2009-07-22 中兴通讯股份有限公司 Distributed Ethernet switch and internal MAC address maintaining method thereof
CN101729410A (en) * 2009-11-10 2010-06-09 中兴通讯股份有限公司 Synchronization method and device of media access control (MAC) address table
CN101958938A (en) * 2010-06-01 2011-01-26 福建星网锐捷网络有限公司 Learning method and device of MAC address table based on network processor
CN102045200A (en) * 2010-12-24 2011-05-04 武汉烽火网络有限责任公司 Conditional synchronization method for MAC address table entry of distributed switch
CN103019858A (en) * 2012-12-03 2013-04-03 中兴通讯股份有限公司 Media access control ageing method and network processor
CN103209130A (en) * 2013-04-22 2013-07-17 杭州华三通信技术有限公司 Method for synchronizing media access control (MAC) address table entries and forwarding chips
CN103401782A (en) * 2013-07-24 2013-11-20 杭州华三通信技术有限公司 MAC (Media Access Control) address synchronizing method and equipment
CN105721315A (en) * 2016-04-06 2016-06-29 烽火通信科技股份有限公司 Control method for centralized mac address learning

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080240106A1 (en) * 2007-03-30 2008-10-02 Ralph Schlenk Method and apparatus for MAC address learning
CN101488862A (en) * 2009-02-23 2009-07-22 中兴通讯股份有限公司 Distributed Ethernet switch and internal MAC address maintaining method thereof
CN101729410A (en) * 2009-11-10 2010-06-09 中兴通讯股份有限公司 Synchronization method and device of media access control (MAC) address table
CN101958938A (en) * 2010-06-01 2011-01-26 福建星网锐捷网络有限公司 Learning method and device of MAC address table based on network processor
CN102045200A (en) * 2010-12-24 2011-05-04 武汉烽火网络有限责任公司 Conditional synchronization method for MAC address table entry of distributed switch
CN103019858A (en) * 2012-12-03 2013-04-03 中兴通讯股份有限公司 Media access control ageing method and network processor
CN103209130A (en) * 2013-04-22 2013-07-17 杭州华三通信技术有限公司 Method for synchronizing media access control (MAC) address table entries and forwarding chips
CN103401782A (en) * 2013-07-24 2013-11-20 杭州华三通信技术有限公司 MAC (Media Access Control) address synchronizing method and equipment
CN105721315A (en) * 2016-04-06 2016-06-29 烽火通信科技股份有限公司 Control method for centralized mac address learning

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
于翔等: "基于FPGA的MAC层地址表设计与仿真", 《计算机工程与设计》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111935338A (en) * 2020-09-17 2020-11-13 南京中兴软件有限责任公司 Method and device for controlling source MAC learning item number
CN112887229A (en) * 2021-01-11 2021-06-01 杭州迪普科技股份有限公司 Session information synchronization method and device

Also Published As

Publication number Publication date
CN107819684B (en) 2022-08-02

Similar Documents

Publication Publication Date Title
CN108306748B (en) Network fault positioning method and device and interaction device
CN101521603B (en) Method and system for quickly detecting connectivity of link
WO2016050158A1 (en) Learning a mac address in vxlan
CN104243630B (en) MAC address learning method and device in VXLAN networks
CN106130819B (en) The detection method and device of VTEP exception
CN101778113B (en) Method for detection of RP state in multicast network, device, RP device and multicast system
CN108011958B (en) Network device and MAC address table synchronization method
CN110493069A (en) Fault detection method, device, SDN controller and forwarding device
CN104980293A (en) Method and device for quickly transmitting and detecting OAM message
CN106330786A (en) MAC address synchronization method, apparatus and system
CN107819684A (en) synchronization processing method and device
CN106789387A (en) A kind of chain circuit detecting method and device for SDN
CN107995637A (en) Internet of things equipment method of network entry, system, internet of things equipment and storage medium
CN112910986B (en) Network video recorder channel management method and network video recorder
WO2016101600A1 (en) Line card determination, determination processing method and device, and line card determination system
CN101969395B (en) Method for configuring code, method and system for detecting path and network equipment
CN104184667B (en) Flux of multicast moving method and device in a kind of SPB network of M in M-modes
US10659251B2 (en) Ring protection network division
CN106130867A (en) Virtual machine communication method and device across data center
CN110572326A (en) Method, device, network equipment and system for establishing forwarding path
CN103441934B (en) A kind of learning method of stacking topology and device
CN105122776B (en) Address acquiring method and network virtualization edge device
CN108282406B (en) Data transmission method, stacking equipment and stacking system
CN108055151B (en) Port management method and device of network node, network node and storage medium
CN107566143B (en) Longitudinal stacking discovery method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right

Effective date of registration: 20180417

Address after: 518057 Nanshan District science and technology, Guangdong Province, South Road, No. 55, No.

Applicant after: ZTE Corp.

Address before: Yuhuatai District of Nanjing City, Jiangsu province 210012 Bauhinia Road No. 68

Applicant before: Nanjing Zhongxing New Software Co.,Ltd.

TA01 Transfer of patent application right
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant