CN107666445B - Distributed system MAC address processing method and device - Google Patents

Distributed system MAC address processing method and device Download PDF

Info

Publication number
CN107666445B
CN107666445B CN201610619156.7A CN201610619156A CN107666445B CN 107666445 B CN107666445 B CN 107666445B CN 201610619156 A CN201610619156 A CN 201610619156A CN 107666445 B CN107666445 B CN 107666445B
Authority
CN
China
Prior art keywords
mac address
subsystem
entry
identification bit
mac
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
CN201610619156.7A
Other languages
Chinese (zh)
Other versions
CN107666445A (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
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201610619156.7A priority Critical patent/CN107666445B/en
Publication of CN107666445A publication Critical patent/CN107666445A/en
Application granted granted Critical
Publication of CN107666445B publication Critical patent/CN107666445B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/08Learning-based routing, e.g. using neural networks or artificial intelligence

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a method and a device for processing an MAC address of a distributed system, wherein the method comprises the following steps: under the condition that an MAC address in a second subsystem is aged, a first subsystem receives a notification message of the aging of the MAC address sent by the second subsystem, wherein the first subsystem and the second subsystem are positioned in the same distributed system; the first subsystem acquires an MAC address entry of the MAC address according to the notification message; and the first subsystem sends the MAC address entry to the second subsystem, so that the second subsystem learns the MAC address according to the MAC address entry. The invention solves the problem of message flooding caused by advanced aging of subsystem MAC addresses in the prior art, ensures the link aggregation field, and can recover the subsystem MAC addresses in time after advanced aging.

Description

Distributed system MAC address processing method and device
Technical Field
The present invention relates to a method for maintaining a Media Access Control (MAC) address in a distributed system, and in particular, to a method and an apparatus for processing a MAC address in a distributed system, which are applied to the field of link aggregation.
Background
The MAC address aging means that if a system does not receive a message using a certain MAC address as a source MAC within a period of time, the system deletes information of an MAC address table entry from an MAC address hardware table of a switch chip, and learns information of the MAC address including an MAC address, a port, and VLAN id information to which the port belongs again when a next message comes.
Link aggregation (link aggregation) follows the IEEE 802.3AD link aggregation protocol. Fig. 1 is a schematic diagram of a distributed link aggregation system according to the related art, and as shown in fig. 1, several physical ports may be bound together by a link aggregation mechanism to form a logical port, so as to achieve the purpose of increasing bandwidth and achieve load sharing of traffic.
For the distributed aggregation link system, once a port of the system is aged due to no new data stream being maintained for a period of time, but the system subsequently needs to forward a packet using the MAC address as a destination address, packet forwarding of the corresponding MAC address is changed from known unicast to unknown packet flooding, thereby causing waste of channel resources.
In a distributed system, once some subsystems suffer from MAC address early aging to cause message flooding, the common practice in the prior art is as follows:
firstly, the subsystem MAC address is released to age, and the subsystem MAC address is learned again when waiting for the next data flow, and the method does not essentially solve the problem of message flooding caused by early aging of the MAC address;
secondly, other subsystems are informed to age in a centralized mode, and the subsystems can learn together when waiting for the next data flow, so that the method can cause the aging of some subsystems which are not aged, and the waste of resources is caused;
thirdly, the MAC address entry information is directly written into the hardware table of the switching chip of some subsystems through a configuration command, and although the method has a good implementation effect, the method can only be applied to a physical port and cannot be applied to an aggregation port.
Aiming at the problem of message flooding caused by advanced aging of an MAC address when a message is forwarded in a distributed aggregation link system in the prior art, no solution is provided in the prior art.
Disclosure of Invention
The invention provides a distributed system MAC address processing method and device applied to the field of link aggregation, and aims to solve the problem of message flooding caused by advanced aging of subsystem MAC addresses in the prior art.
In order to solve the above problems, the technical solution of the present invention is implemented as follows:
a distributed system MAC address processing method is characterized by comprising the following steps:
under the condition that an MAC address in a second subsystem is aged, a first subsystem receives a notification message of the aging of the MAC address sent by the second subsystem, wherein the first subsystem and the second subsystem are positioned in the same distributed system;
the first subsystem acquires an MAC address entry of the MAC address according to the notification message;
and the first subsystem sends the MAC address entry to the second subsystem, so that the second subsystem learns the MAC address according to the MAC address entry.
Further, the acquiring, by the first subsystem, the MAC address entry of the MAC address according to the notification packet includes:
the first subsystem inquires a hit identification bit of the MAC address from an MAC address hardware table of a switching chip;
and when the hit identification bit is 1, the first subsystem acquires the MAC address entry, wherein the MAC address entry comprises MAC address information, port information and information of VLAN id where the port is located.
Preferably, the querying, by the first subsystem, the hit flag of the MAC address from the MAC address hardware table of the switch chip includes:
the first subsystem inquires an MAC address software table, and the MAC address software table and the MAC address hardware table are located in the first subsystem;
when the MAC address entry is maintained in the MAC address software table, the first subsystem repeatedly queries the hit flag from the MAC address hardware table within a preset time.
Preferably, after the first subsystem queries the MAC address software table, when a query identification bit corresponding to the MAC address is also maintained in the MAC address software table, the method further includes:
the first subsystem judges whether to inquire the hit identification bit from the MAC address hardware table or not according to the inquiry identification bit, wherein the inquiry identification bit is set to be 1 when the first subsystem receives the notification message, is kept to be 1 when the hit identification bit is 0, and is reset to be 0 when the hit identification bit is 1;
when the query identification bit is 1, the first subsystem queries the hit identification bit periodically within a preset time; and when the query identification bit is 0, the first subsystem terminates querying the hit identification bit.
Preferably, after the first subsystem acquires the MAC address entry of the MAC address according to the notification packet, the method further includes:
the first subsystem transmits the MAC address entry to subsystems in the distributed system other than the first subsystem and the second subsystem.
Preferably, before the first subsystem acquires the MAC address entry of the MAC address according to the notification packet, the method further includes:
the first subsystem receives a learning notification message which is sent by a third subsystem and used for learning the MAC address according to the learning notification message, wherein the third subsystem is located in the distributed system;
and the first subsystem terminates the acquisition of the MAC address entry according to the learning notification message.
The invention also provides a distributed system MAC address processing device, which is applied to the subsystem and is characterized by comprising the following steps:
the system comprises a receiving module, a judging module and a sending module, wherein the receiving module is used for receiving a notification message of MAC address aging sent by a second subsystem under the condition that the MAC address in the second subsystem is aged, and the subsystem and the second subsystem are positioned in the same distributed system;
the acquisition module is used for acquiring the MAC address entry of the MAC address according to the notification message;
and the sending module is used for sending the MAC address entry to the second subsystem so that the second subsystem can learn the MAC address according to the MAC address entry.
Further, the obtaining module includes:
the query submodule is used for querying a hit identification bit of the MAC address from an MAC address hardware table of the exchange chip;
and the obtaining submodule is used for obtaining the MAC address entry when the hit identification bit is 1, wherein the MAC address entry comprises MAC address information, port information and information of VLAN id where the port is located.
Preferably, the query submodule includes:
the first query unit is used for querying an MAC address software table, and the MAC address software table and the MAC address hardware table are positioned in the subsystem;
a second query unit, configured to repeatedly query the hit flag from the MAC address hardware table within a preset time when the MAC address entry is maintained in the MAC address software table.
The invention also provides a distributed system MAC address processing method, which is characterized by comprising the following steps:
the second subsystem sends a notification message of MAC address aging to subsystems except the second subsystem in a distributed system in which the second subsystem is positioned;
the second subsystem receives MAC address entries of the MAC addresses sent by one or more subsystems in the distributed system;
and the second subsystem learns the MAC address according to the MAC address entry.
When the MAC address of the subsystem is aged, the invention sends the MAC aging notice to all other subsystems in the distributed system, other subsystems inquire the MAC address item in the exchange chip after receiving the notice, and after inquiring that the MAC address item exists, the MAC address item is returned to the subsystem which is aged. The invention solves the problem of message flooding caused by advanced aging of the subsystem MAC address in the prior art, ensures the aggregation port field, and can recover the subsystem MAC address in time after advanced aging.
Drawings
FIG. 1 is a schematic diagram of a distributed link aggregation system;
FIG. 2 is a first flowchart of a method for processing a MAC address of a distributed system according to an embodiment of the present invention;
fig. 3 is a block diagram of a first apparatus for processing MAC addresses of a distributed system applied to subsystems according to an embodiment of the present invention;
fig. 4 is a block diagram of a second apparatus for processing MAC addresses of a distributed system applied to subsystems according to an embodiment of the present invention;
fig. 5 is a block diagram of a distributed system MAC address processing apparatus applied in a subsystem according to an embodiment of the present invention;
FIG. 6 is a flowchart of a method for processing a MAC address of a distributed system according to an embodiment of the present invention;
fig. 7 is a flowchart of a method for reporting a MAC address notification by a subsystem switch chip according to an embodiment of the present invention;
fig. 8 is a flowchart of a method for a subsystem to receive MAC address learning/aging notifications sent by other subsystems according to an embodiment of the present invention;
fig. 9 is a flowchart of a method for acquiring MAC address entries by a subsystem according to an embodiment of the present invention.
DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
The embodiment of the invention provides a distributed system MAC address processing method, when the MAC address of a subsystem is aged, the MAC aging notification is sent to all other subsystems in the distributed system, the other subsystems inquire the MAC address item in a switching chip after receiving the notification, and after the MAC address item is inquired, the MAC address item is returned to the subsystem which is aged. Fig. 2 is a flowchart of a first method for processing a MAC address of a distributed system according to an embodiment of the present invention, and as shown in fig. 2, the method, starting from a side of a subsystem receiving an aging notification, includes the following processing steps:
step S202, under the condition that the MAC address in the second subsystem is aged, the first subsystem receives a notification message of the aging of the MAC address sent by the second subsystem, wherein the first subsystem and the second subsystem are positioned in the same distributed system;
step S204, the first subsystem acquires the MAC address entry of the MAC address according to the notification message;
there are multiple subsystems in the distributed system, and for any subsystem m, when receiving the MAC address aging notification sent by other subsystems, the subsystem m needs to query the switch chip to help other subsystems recover the entry.
Step S206, the first subsystem sends the MAC address entry to the second subsystem, so that the second subsystem learns the MAC address according to the MAC address entry.
Further, the acquiring, by the first subsystem, the MAC address entry according to the notification packet includes:
the first subsystem inquires a Hit identification bit (Hit Flag) of the MAC address from a MAC address hardware table of a switching chip;
and when the hit identification bit is 1, the first subsystem acquires the MAC address entry, wherein the MAC address entry comprises MAC address information, port information and information of a VLAN where the port is located.
Preferably, the querying, by the first subsystem, the hit flag of the MAC address from the MAC address hardware table of the switch chip includes:
the first subsystem inquires an MAC address software table, and the MAC address software table and the MAC address hardware table are positioned in the first subsystem;
when the MAC address entry is maintained in the MAC address software table, the first subsystem repeatedly queries the hit flag within a predetermined time.
The MAC address entries in the software table are consistent with the MAC address entries in the hardware table. When a subsystem receives a new message, the subsystem writes an MAC address item of the message into an exchange chip, then reports MAC learning, writes the information of the MAC address into an MAC software table, and sends an MAC address learning notice to all other subsystems; similarly, when the subsystem no longer receives the message, the switching chip of the subsystem ages the MAC address after a period of time, deletes the entry in the hardware table, reports MAC aging, deletes the information of the MAC address in the MAC software table as well, and sends an MAC address aging notification to all other subsystems. By setting the software table, the effect of conveniently and efficiently inquiring and acquiring the MAC address entry can be realized.
The first subsystem may periodically or non-periodically query the hit flag within a predetermined time, and obtain the MAC address entry from the software table when the hit flag is 1, or may also obtain the MAC address entry from the hardware table of the switch chip, thereby ensuring that the first subsystem can help the second subsystem recover the MAC address as long as the hit flag is 1 within the predetermined time.
Preferably, after the first subsystem queries the MAC address software table, when a query identification bit corresponding to the MAC address is also maintained in the MAC address software table, the method further includes:
the first subsystem judges whether to inquire the hit identification bit from the MAC address hardware table or not according to the inquiry identification bit, wherein the inquiry identification bit is set to be 1 when the first subsystem receives the notification message, is kept to be 1 when the hit identification bit is 0, and is reset to be 0 when the hit identification bit is 1;
when the query identification bit is 1, the first subsystem queries the hit identification bit periodically within a preset time; when the query flag is 0, the first subsystem terminates querying the hit flag.
By setting the query identification bit, the first subsystem can stop querying the hit identification bit once the hit identification bit is 1, so that the subsystem is prevented from continuing to query and acquire the MAC address entry after the MAC address entry is acquired, and resource waste is caused.
Preferably, after the first subsystem acquires the MAC address entry of the MAC address according to the notification packet, the method further includes:
the first subsystem transmits the MAC address entry to subsystems located in the distributed system other than the first subsystem and the second subsystem.
Preferably, before the first subsystem acquires the MAC address entry of the MAC address according to the notification packet, the method further includes:
the first subsystem receives a learning notification message for learning the MAC address, which is sent by a third subsystem, wherein the third subsystem is located in the distributed system, and the learning notification message is used for the second subsystem to learn the MAC address according to the learning notification message;
and the first subsystem terminates the acquisition of the MAC address item according to the learning notification message.
When any subsystem m receives the MAC address learning notification sent by other subsystems, the entry can be maintained by all subsystems. The subsystem m inquires an MAC address software table, if the MAC address does not exist in the software table, the MAC address entry is written into the exchange chip, an MAC address entry is newly added in the MAC address software table, and an inquiry identification bit is initialized to be 0; if the MAC address entry exists in the software table and the query identification bit is 1, the query flag bit is reset, and the exchange chip is not required to be queried, so that the effect of saving resources is achieved.
An embodiment of the present invention further provides a device for processing a MAC address of a distributed system applied to a subsystem, and fig. 3 is a block diagram of the device for processing a MAC address of a distributed system applied to a subsystem according to the embodiment of the present invention, as shown in fig. 3, the device includes:
a receiving module 32, configured to receive a notification message of MAC address aging sent by a second subsystem when the MAC address in the second subsystem is aged, where the subsystem and the second subsystem are located in the same distributed system;
an obtaining module 34, configured to obtain an MAC address entry of the MAC address according to the notification message;
a sending module 36, configured to send the MAC address entry to the second subsystem, so that the second subsystem learns the MAC address according to the MAC address entry.
Further, the sending module 36 is further configured to send the MAC address entry to subsystems located in the distributed system, except for the first subsystem and the second subsystem, after the MAC address entry of the MAC address is obtained according to the notification message.
Fig. 4 is a block diagram of a second apparatus for processing MAC addresses of a distributed system applied in a subsystem according to a preferred embodiment of the present invention, and as shown in fig. 4, the obtaining module 34 includes:
the query submodule 42 is configured to query a hit identification bit of the MAC address from a MAC address hardware table of the switch chip;
the obtaining sub-module 44 is configured to obtain the MAC address entry when the hit flag is 1, where the MAC address entry includes MAC address information, port information, and information of a VLAN id where the port is located.
Preferably, the query submodule 42 includes:
the first query unit is used for querying an MAC address software table, and the MAC address software table and the MAC address hardware table are positioned in the subsystem;
a second query unit, configured to repeatedly query the hit flag within a preset time when the MAC address entry is maintained in the MAC address software table.
Preferably, the first query unit includes:
a determining subunit, configured to determine, when a query identification bit corresponding to the MAC address is also maintained in the MAC address software table, whether to query the hit identification bit from the MAC address hardware table according to the query identification bit, where the query identification bit is set to 1 when the first subsystem receives the notification packet, the query identification bit is kept to 1 when the hit identification bit is 0, and the query identification bit is reset to 0 when the hit identification bit is 1;
the inquiring subunit is used for inquiring the hit identification bit periodically within the preset time when the inquiring identification bit is 1; when the query flag is 0, the query is terminated for the hit flag.
Fig. 5 is a block diagram of a third apparatus for processing MAC addresses of a distributed system applied to subsystems according to a preferred embodiment of the present invention, as shown in fig. 5, the apparatus further includes:
a second receiving module 52, configured to receive a learning notification message for learning the MAC address sent by a third subsystem before the first subsystem acquires the MAC address entry of the MAC address according to the notification message, where the third subsystem is located in the distributed system, and the learning notification message is used for the second subsystem to learn the MAC address according to the learning notification message;
and an obtaining termination module 54, configured to terminate obtaining the MAC address entry according to the learning notification packet.
Fig. 6 is a flowchart of a MAC address processing method of a distributed system according to an embodiment of the present invention, and as shown in fig. 6, the method starts from the side of the subsystem that sends the aging notification, and includes the following processing steps:
step S602, the second subsystem sends a notification message of MAC address aging to subsystems except the second subsystem in a distributed system where the second subsystem is located;
step S604, the second subsystem receives the MAC address entry of the MAC address sent by one or more subsystems in the distributed system;
in step S606, the second subsystem learns the MAC address according to the MAC address entry.
Example one
The embodiment of the invention also provides a distributed system MAC address processing method, which comprises the following steps:
assume that there are 3 subsystems in a distributed system. Port x of subsystem 1, port y of subsystem 2, port z of subsystem 3, join aggregation group sg 1. In a period of time, the port aggregation group selects a member port x to receive a message through a Hash algorithm or other modes, the message carries a source MAC1 and a destination MAC 2, and the member ports y and z do not receive the message.
After the member port x receives the message and writes the MAC address entry of the message in the MAC address hardware table of the switching chip, the switching chip of the subsystem 1 reports an MAC learning notification, the MAC software table adds new entries (MAC1, sg1, query identifier 0), and the subsystem 1 sends the MAC address learning notification to the subsystem 2 and the subsystem 3.
Fig. 7 is a flowchart of a method for reporting a MAC address notification by a subsystem switch chip, as shown in fig. 7, the method includes the steps of:
step S702, the subsystem exchange chip reports the notice of MAC address learning or aging;
step S704, the subsystem starts the exchange chip reporting processing module;
step S706, the report processing module of the exchange chip judges whether the notice is an aging notice;
if the determination result is yes, the process proceeds to step S708;
step S708, the report processing module of the switching chip deletes the MAC address table item from the MAC address software table;
step S710, the switching chip reports the processing module and sends the MAC address aging notice to all other subsystems in the distributed system;
if the determination result is negative, the process proceeds to step S712;
step S712, the switching chip reports to the processing module to add an MAC address table entry in the software table, and initializes the query identifier bit of the MAC address to 0;
step S714, the switching chip reports the MAC address learning notification sent by the processing module to all other subsystems in the distributed system.
The subsystem 2 and the subsystem 3 receive the MAC address learning notice sent by the subsystem 1, inquire respective MAC software tables, find that the MAC address does not exist in the software tables, then write the MAC address entry into the exchange chip MAC address hardware table, and add new entries (MAC1, sg1, inquiry mark 0) in the MAC address software table.
Fig. 8 is a flowchart of a method for a subsystem to receive MAC address learning/aging notifications sent by other subsystems, and as shown in fig. 8, the method includes the steps of:
step S802, the subsystem receives MAC address learning or aging notifications sent by other subsystems;
step S804, judge whether the MAC address notice is an aging notice;
if the determination result is that the aging notification is not the learning notification, the flow proceeds to step S806;
step S806, judging whether the MAC address software table has the MAC address table item;
if the determination result is that the MAC address table entry does not exist, step S808 is performed;
step S808, writing the MAC address entry of the MAC address into a hardware table of a switching chip;
step S810, the subsystem starts a switching chip reporting processing module;
step S812, the exchange chip reports the MAC address table item newly added in the software table by the processing module;
step S814, initializing the query identification bit of the MAC address to 0;
when the judgment result is that the MAC address table entry exists, step S816 is performed;
step S816, resetting the inquiry identification bit of the MAC address to be 0;
if the determination result is the aging notification, the process proceeds to step S818;
step S818, judging whether the MAC address software table has the MAC address table item;
when the judgment result is that the MAC address table entry exists, the process proceeds to step S820;
step S820, set the query identification bit of the MAC address to 1.
After the subsystem 2 and the subsystem 3 learn the MAC address entry for a while, the member ports y and z do not receive the message, and after the aging time, the subsystem 2 and the subsystem 3 may experience MAC aging.
Assuming that the subsystem 2 switch chip reports MAC aging first, the subsystem 2 deletes the MAC address entry from the MAC software table, and sends an MAC address aging notification to the subsystem 1 and the subsystem 3.
And the subsystem 1 and the subsystem 3 receive the MAC aging notice, respectively inquire the MAC address from the MAC address software table, and then modify the inquiry identification bit to be 1. Therefore, the MAC entries of subsystem 1 and subsystem 3 are updated to (MAC1, sg1, query id 1).
Assume that the subsystem 3 first goes to the scan cycle and reads each MAC address table entry in turn. And for the MAC table entry (MAC1, sg1 and inquiry mark 1) with the inquiry mark bit of 1, inquiring a HIT mark bit HIT flag of the MAC address in the exchange chip. Since the member port z does not receive the message, the HIT flag is 0, which cannot help other subsystems to recover the entry, and therefore, the processing is not performed.
Fig. 9 is a flowchart of a method for acquiring a MAC address entry by a subsystem, as shown in fig. 9, the method includes the steps of:
step S902, when reaching the scanning cycle, the subsystem starts the MAC address scanning module;
step S904, judging whether the inquiry identification bit of the current MAC address is 0;
step S906, judging whether the hit identification bit of the current MAC address is 0 or not when the judgment result is negative;
step 908, when the determination result is negative, acquiring the MAC address entry of the MAC address;
step S910, sending MAC address learning notice to all other subsystems;
step S912, resetting the inquiry identification bit of the MAC address to be 0;
step S914, judge whether need to read the information of the next MAC address table entry;
if the determination result is yes, the process proceeds to step S904.
And the subsystem 3 switching chip also reports MAC aging, deletes the MAC address table entry from the MAC software table and sends an MAC address aging notice to the subsystem 1 and the subsystem 2.
Subsystem 1 and subsystem 2 receive MAC aging notifications. This is not done because subsystem 2 has aged the MAC and is not able to help recover the entry. The subsystem 1 inquires that the MAC table item exists in the software table, and sets the inquiry identification bit to be 1.
The subsystem 1 reads each MAC address table entry in turn by the scanning cycle. And inquiring the HIT flag of the MAC address in the exchange chip for the MAC table entry (MAC1, sg1 and inquiry identifier 1) with the inquiry identifier bit of 1. Because the member port x always receives the message, if the HIT flag is 1, the MAC address learning notification is sent to the subsystem 2 and the subsystem 3, and the query flag is reset to 0.
And the subsystem 2 and the subsystem 3 learn the MAC address according to the MAC address learning notice.
Example two
The embodiment of the invention also provides a distributed system MAC address processing method, which comprises the following steps:
assume that there are 3 subsystems in a distributed system. Port x of subsystem 1, port y of subsystem 2, port z of subsystem 3, join aggregation group sg 1. In a period of time, the port aggregation group selects a member port x to receive a message through a Hash algorithm or other modes, the message carries a source MAC1 and a destination MAC 2, and the member ports y and z do not receive the message. After the period of time, the member port x does not receive any more message, and the member ports y and z do not receive the message.
When the member port x receives the message, the switching chip of the subsystem 1 reports MAC learning, the MAC software table adds new table items (MAC1, sg1 and query identifier 0), and the subsystem 1 sends an MAC address learning notice to the subsystem 2 and the subsystem 3.
Subsystem 2 and subsystem 3 receive the MAC learning notice, inquire respective MAC software table, find out there is not the MAC address in the software table, then write the MAC address entry into exchanging chip MAC hardware table, and newly add the table entry in the MAC software table (MAC1, sg1, inquire about the label 0).
Within a period of time, the member ports y and z do not receive the message, and after the aging time, the subsystem 2 and the subsystem 3 will generate MAC aging.
Assuming that the subsystem 2 switch chip reports MAC aging first, the subsystem 2 deletes the entry of the MAC address from the MAC software table, and sends an MAC address aging notification to the subsystem 1 and the subsystem 3.
And the subsystem 1 and the subsystem 3 receive the MAC aging notice, respectively inquire the MAC address table entry from the MAC software table, and modify the inquiry identification bit to be 1. Therefore, the MAC entries of subsystem 1 and subsystem 3 are updated to (MAC1, sg1, query id 1). Assume that the subsystem 3 first comes to the scan cycle. And reading each MAC address table entry in sequence. And for the MAC table entry (MAC1, sg1 and inquiry mark 1) with the inquiry mark bit of 1, inquiring a HIT mark bit HIT flag of the MAC address in the exchange chip. Since the member port z does not receive the message, the HIT flag is 0, which cannot help other subsystems to recover the entry, and therefore, the processing is not performed.
And the subsystem 3 switching chip also reports MAC aging, deletes the MAC from the MAC software table and sends an MAC address aging notice to the subsystem 1 and the subsystem 2.
Subsystem 1 and subsystem 2 receive MAC aging notifications. This is not done because subsystem 2 has aged the MAC and is not able to help recover the entry. The subsystem 1 inquires the MAC, and sets the inquiry identification bit to 1.
The subsystem 1 reads each MAC address table entry in turn by the scanning cycle. And inquiring the HIT flag of the MAC address in the exchange chip for the MAC table entry (MAC1, sg1 and inquiry identifier 1) of the inquiry identifier 1. Since the member port x no longer receives the message, the HIT flag is 0, which cannot help other subsystems to recover the entry, and therefore, the processing is not performed.
After a period of time, the subsystem 1 switch chip also reports MAC aging, and since the subsystems 2 and 3 have aged the MAC, they cannot help to recover the entry, and therefore do not process it. So far, subsystem 1, subsystem 2, and subsystem 3 all age the MAC.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that are within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A distributed system MAC address processing method is characterized by comprising the following steps:
under the condition that an MAC address in a second subsystem is aged, a first subsystem receives a notification message of the aging of the MAC address sent by the second subsystem, wherein the first subsystem and the second subsystem are positioned in the same distributed system;
the first subsystem acquires an MAC address entry of the MAC address according to the notification message;
and the first subsystem sends the MAC address entry to the second subsystem, so that the second subsystem learns the MAC address according to the MAC address entry.
2. The method of claim 1, wherein the first subsystem obtaining the MAC address entry for the MAC address according to the notification packet comprises:
the first subsystem inquires a hit identification bit of the MAC address from an MAC address hardware table of a switching chip;
and when the hit identification bit is 1, the first subsystem acquires the MAC address entry, wherein the MAC address entry comprises MAC address information, port information and information of VLAN id to which a port belongs.
3. The method of claim 2, wherein the first subsystem querying a MAC address hardware table of a switching chip for a hit identification bit of the MAC address comprises:
the first subsystem inquires an MAC address software table, and the MAC address software table and the MAC address hardware table are located in the first subsystem;
when the MAC address entry is maintained in the MAC address software table, the first subsystem repeatedly queries the hit flag from the MAC address hardware table within a preset time.
4. The method of claim 3, wherein after the first subsystem queries the MAC address software table, when a query identification bit corresponding to the MAC address is also maintained in the MAC address software table, the method further comprises:
the first subsystem judges whether to inquire the hit identification bit from the MAC address hardware table or not according to the inquiry identification bit, wherein the inquiry identification bit is set to be 1 when the first subsystem receives the notification message, is kept to be 1 when the hit identification bit is 0, and is reset to be 0 when the hit identification bit is 1;
when the query identification bit is 1, the first subsystem queries the hit identification bit periodically within a preset time; and when the query identification bit is 0, the first subsystem terminates querying the hit identification bit.
5. The method according to any of claims 1 to 4, wherein after the first subsystem acquires the MAC address entry of the MAC address according to the notification packet, the method further comprises:
the first subsystem transmits the MAC address entry to subsystems in the distributed system other than the first subsystem and the second subsystem.
6. The method of claim 5, wherein before the first subsystem obtains the MAC address entry for the MAC address according to the notification message, the method further comprises:
the first subsystem receives a learning notification message which is sent by a third subsystem and used for learning the MAC address according to the learning notification message, wherein the third subsystem is located in the distributed system;
and the first subsystem terminates the acquisition of the MAC address entry according to the learning notification message.
7. A distributed system MAC address processing device is applied to subsystems and is characterized by comprising:
the system comprises a receiving module, a judging module and a sending module, wherein the receiving module is used for receiving a notification message of MAC address aging sent by a second subsystem under the condition that the MAC address in the second subsystem is aged, and the subsystem and the second subsystem are positioned in the same distributed system;
the acquisition module is used for acquiring the MAC address entry of the MAC address according to the notification message;
and the sending module is used for sending the MAC address entry to the second subsystem so that the second subsystem can learn the MAC address according to the MAC address entry.
8. The apparatus of claim 7, wherein the acquisition module comprises:
the query submodule is used for querying a hit identification bit of the MAC address from an MAC address hardware table of the exchange chip;
and the obtaining submodule is used for obtaining the MAC address entry when the hit identification bit is 1, wherein the MAC address entry comprises MAC address information, port information and information of VLAN id to which the port belongs.
9. The apparatus of claim 8, wherein the query submodule comprises:
the first query unit is used for querying an MAC address software table, and the MAC address software table and the MAC address hardware table are positioned in the subsystem;
a second query unit, configured to repeatedly query the hit flag from the MAC address hardware table within a preset time when the MAC address entry is maintained in the MAC address software table.
10. A distributed system MAC address processing method is characterized by comprising the following steps:
under the condition that the MAC address in a second subsystem is aged, the second subsystem sends a notification message of the aging of the MAC address to subsystems except the second subsystem in a distributed system in which the second subsystem is positioned;
the second subsystem receives MAC address entries of the MAC addresses sent by one or more subsystems in the distributed system;
and the second subsystem learns the MAC address according to the MAC address entry.
CN201610619156.7A 2016-07-29 2016-07-29 Distributed system MAC address processing method and device Active CN107666445B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610619156.7A CN107666445B (en) 2016-07-29 2016-07-29 Distributed system MAC address processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610619156.7A CN107666445B (en) 2016-07-29 2016-07-29 Distributed system MAC address processing method and device

Publications (2)

Publication Number Publication Date
CN107666445A CN107666445A (en) 2018-02-06
CN107666445B true CN107666445B (en) 2021-09-07

Family

ID=61122399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610619156.7A Active CN107666445B (en) 2016-07-29 2016-07-29 Distributed system MAC address processing method and device

Country Status (1)

Country Link
CN (1) CN107666445B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413225B (en) * 2018-11-28 2021-11-02 新华三技术有限公司 MAC table item processing method and equipment
CN111935337B (en) * 2020-09-17 2021-01-08 南京中兴软件有限责任公司 MAC address keep-alive method, equipment and storage medium of aggregation link
CN116055455B (en) * 2023-02-14 2024-08-23 迈普通信技术股份有限公司 MAC address aging processing method and device, LPU card and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100440200B1 (en) * 2001-10-23 2004-07-14 엘지전자 주식회사 MAC Address Table Management Method In L2 Switch
CN101834781A (en) * 2010-03-16 2010-09-15 中兴通讯股份有限公司 Media access control address keep-alive device and method for convergence port
CN101969398A (en) * 2010-09-17 2011-02-09 中兴通讯股份有限公司 Aging method and system of MAC (Media Access Control) address
CN103731355A (en) * 2013-12-31 2014-04-16 迈普通信技术股份有限公司 Method and system for avoiding Hash collision during MAC address learning

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5381080B2 (en) * 2008-12-22 2014-01-08 富士通株式会社 Frame transfer apparatus and frame transfer method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100440200B1 (en) * 2001-10-23 2004-07-14 엘지전자 주식회사 MAC Address Table Management Method In L2 Switch
CN101834781A (en) * 2010-03-16 2010-09-15 中兴通讯股份有限公司 Media access control address keep-alive device and method for convergence port
CN101969398A (en) * 2010-09-17 2011-02-09 中兴通讯股份有限公司 Aging method and system of MAC (Media Access Control) address
CN103731355A (en) * 2013-12-31 2014-04-16 迈普通信技术股份有限公司 Method and system for avoiding Hash collision during MAC address learning

Also Published As

Publication number Publication date
CN107666445A (en) 2018-02-06

Similar Documents

Publication Publication Date Title
US11601296B2 (en) Bit indexed explicit replication for layer 2 networking
US8259718B2 (en) Network relay apparatus
CN110224935B (en) Method and device for processing multicast data message
CN107666445B (en) Distributed system MAC address processing method and device
US20150341189A1 (en) Base Station Deployment Configuration Method for Base Station, Base Station, and Server
US20150358233A1 (en) Item aggregation in shortest path bridging mac-in-mac mode (spbm) network
CN108390821B (en) Method and system for realizing dual activities of openflow switch
US10652145B2 (en) Managing data frames in switched networks
WO2014114196A1 (en) Keeping a terminal access location record alive
US20160112315A1 (en) Communication apparatus, communication method, and computer-readable recording medium
CN114885443B (en) Multi-mode network control system and method supporting mobile access of terminal
US10270607B2 (en) Method and system for roamed client device handling
US9712458B2 (en) Consolidation encodings representing designated receivers in a bit string
CN107566267A (en) A kind of message forwarding method and device based on aggregated links
WO2017157318A1 (en) Link discovery method and apparatus
CN114422437B (en) Heterogeneous message forwarding method and device
TWI250753B (en) Locate the incoming port of a MAC address in ethernet switch network
CN105474587B (en) A kind of method and device sending data packet
CN104040967B (en) The stream forwarding method and message forwarding equipment of a kind of message
CN101729351A (en) Method and system for finding topology information, query request device and awaiting query device
US20200106628A1 (en) Bit forwarding router identifier signaling using protocol independent multicast attribute
WO2018024189A1 (en) Loopback detection method and apparatus
CN106059810B (en) Message notification method and system
CN105530189B (en) Method for forwarding message in TRILL network and routing bridge
CN112543142B (en) Method and device for realizing RSTP ring network protocol based on FPGA

Legal Events

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