CN105991783A - MAC (Media Access Control) address learning method, device and system - Google Patents

MAC (Media Access Control) address learning method, device and system Download PDF

Info

Publication number
CN105991783A
CN105991783A CN201510064579.2A CN201510064579A CN105991783A CN 105991783 A CN105991783 A CN 105991783A CN 201510064579 A CN201510064579 A CN 201510064579A CN 105991783 A CN105991783 A CN 105991783A
Authority
CN
China
Prior art keywords
mac address
data flow
data stream
entry
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510064579.2A
Other languages
Chinese (zh)
Inventor
林宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201510064579.2A priority Critical patent/CN105991783A/en
Priority to PCT/CN2016/072488 priority patent/WO2016124105A1/en
Publication of CN105991783A publication Critical patent/CN105991783A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks

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 discloses an MAC address learning method. A device receives a data stream; an MAC address of the data stream is learned when it is determined that the data stream is an unknown data stream and there is no MAC address item matching a source MAC address; and the data stream is flooded to other devices via high-speed service ports which are interconnected with the other devices, and the other devices learn the MAC address of the data stream which is received via the high-speed service ports. The invention also discloses a device and a system.

Description

Method, equipment and system for learning media access control address
Technical Field
The present invention relates to an address learning technique for distributed devices, and in particular, to a method, device, and system for MAC address learning.
Background
Generally, when the distributed device performs MAC address learning, the MAC address is automatically learned on the line card that receives the packet, and at this time, since no data stream is received on other line cards, the MAC address does not exist, and at this time, the line card that generally learns the MAC address reports the MAC address to the main control board, and the main control board learns that the MAC address has been learned on the line card through the CPU, and then notifies the MAC address to all other line cards.
Because no data stream exists on other line cards, in order to prevent the MAC address from being aged on other line cards, when the CPU notifies other line cards of performing the MAC address synchronization, the MAC address is written as a static MAC address.
However, in general, such processing will cause that the distributed device always needs to intervene when performing MAC address learning, so that the sending speed of the MAC address is far from the automatic learning speed.
In addition, because the CPU performs static write-in when performing MAC address synchronization in each line card, the MAC addresses on other passively synchronized line cards are static except that the line card with data stream input is a dynamically learned MAC address. This effect results in the MAC address migration becoming a static MAC address to dynamic MAC address migration if the data flow is changed to another line card. In a general chip, static MAC addresses are not allowed to be migrated to dynamic MAC addresses, so that CPU intervention is performed once at this time, the static MAC addresses are deleted and rewritten to the dynamic MAC addresses, which causes a large amount of packet loss in data streams during MAC address migration.
The steps of MAC address synchronization performed by currently popular distributed devices are shown in fig. 1:
step 101, a data stream is received on a line card a, and a chip of the line card automatically learns a source MAC address of the data stream.
And step 102, the line card A reports the MAC address learned by the chip to a main control board CPU.
Step 103, the main control board CPU writes the reported MAC address into the MAC address table of another line card, and in order to prevent the entry from being automatically aged in another line card without data stream, the main control board CPU sets a static mark on the entry of the MAC address in another line card.
The steps of MAC address migration performed by currently popular distributed devices are shown in fig. 2:
step 201, if the migrated MAC address and the original MAC address are in the same line card a, directly updating the entry of the MAC address on the line card a without intervention of the CPU.
Step 202, if the migrated MAC address and the original MAC address are not in the same line card a, since the entry of the MAC address of the other line card is a static entry and cannot be directly updated, the MAC address of the data stream is reported to the main control board CPU by the other line card B that receives the new data stream.
Step 203, the main control board CPU deletes the static entry of the MAC address of the line card B, writes the MAC address into a new entry, and sets a dynamic flag.
And step 204, the main control board CPU controls other line cards to update the entry of the MAC address, updates the entry of the MAC address to a new port, and sets a static mark.
Therefore, in the current technology, although the distributed device can complete the synchronization of the MAC address and the normal two-layer forwarding under the control of the CPU, the CPU needs to perform a large amount of intervention calculations in the MAC address learning and synchronization and MAC address migration processes, which results in a large amount of occupied resources of the CPU in the MAC address learning process.
Moreover, because the static MAC address cannot be automatically migrated and updated, the CPU interferes with the deletion of the static MAC address and the re-addition of the dynamic MAC address during the migration of the MAC address across the line cards, which may cause a short interruption of the data flow.
Disclosure of Invention
In order to solve the existing technical problems, the invention mainly provides a method, equipment and a system for learning an MAC address.
The technical scheme of the invention is realized as follows:
the invention provides a Media Access Control (MAC) address learning method, which comprises the following steps:
the method comprises the steps that the device receives data flow, when the data flow is determined to be unknown and no MAC address entry matched with a source MAC address exists, the MAC address of the data flow is learned, and the data flow is flooded to other devices through high-speed service ports interconnected with other devices.
In the above scheme, the method further comprises: and enabling the MAC address learning function of the high-speed service port, and configuring the MAC address learning function to belong to all Virtual Local Area Networks (VLANs).
In the foregoing solution, when it is determined that the data flow is an unknown data flow and there is no MAC address entry matching the source MAC address, learning the MAC address of the data flow includes:
searching a MAC address entry matched with a destination MAC address of the data flow in a MAC address table, determining the data flow as unknown data flow when the MAC address entry is not searched, continuously searching a MAC address entry matched with a source MAC address of the data flow, creating a new MAC address entry in the MAC address table when the MAC address entry is not searched, and adding the MAC address of the data flow to the new MAC address entry; the MAC address of the data flow includes: the source MAC address, the VLAN and the input port of the data flow.
In the above scheme, the method further comprises: when the device determines that the received data stream is the data stream migrated from the initial receiving device, the original MAC address corresponding to the data stream is updated to the current MAC address, and the data stream is flooded to other devices through high-speed service ports interconnected with other devices.
In the foregoing solution, the determining that the received data stream is a data stream migrated from an initial receiving device includes: searching an MAC address entry matched with a destination MAC address of a data stream in an MAC address table, when the MAC address entry is not searched, continuously searching an MAC address entry matched with a source MAC address of the data stream, when the MAC address entry is searched, judging whether an input port in the MAC address entry is a high-speed service port, if not, determining that the data stream is a locally migrated data stream, and if so, determining that the data stream is a migrated data stream from initial receiving equipment.
In the above scheme, the method further comprises: the device searches a MAC address entry matched with a destination MAC address of the data flow in the MAC address table, determines that the data flow is known when the MAC address entry is searched, and sends the data flow to other devices from an input port of the MAC address entry.
In the above scheme, the method further comprises: when the data flow is determined to be the data flow of local migration, modifying an input port of an MAC address entry matched with a source MAC address of the data flow in an MAC address table to be a port which currently receives the data flow, and not flooding the data flow at a high-speed service port.
In the above scheme, the method further comprises: the equipment monitors the aging time of each MAC address entry in the MAC address table, and the MAC address entry which is not matched with the destination MAC address of the data stream in the aging time is aged once.
The present invention provides an apparatus, comprising: the system comprises a data receiving module, a learning module and a flooding module; wherein,
the data receiving module is used for receiving data streams;
the learning module is used for learning the MAC address of the data flow when the data flow is determined to be unknown and no MAC address item matched with the source MAC address exists;
and the flooding module is used for flooding the data flow to other equipment through a high-speed service port interconnected with other equipment.
In the foregoing solution, the learning module is specifically configured to create a new MAC address entry in a MAC address table and add the MAC address of the data flow to the new MAC address entry when it is determined that the data flow is an unknown data flow and there is no MAC address entry matching with a source MAC address; the MAC address of the data flow includes: the source MAC address, the VLAN and the input port of the data flow.
In the above scheme, the apparatus further comprises:
a first updating module, configured to update an original MAC address corresponding to a received data stream to a current MAC address when it is determined that the received data stream is a data stream migrated from an initial receiving device, and notify a flooding module;
and a second updating module, configured to modify, when it is determined that the data flow is a locally migrated data flow, an input port of a MAC address entry in a MAC address table, which is matched with a source MAC address of the data flow, to be a port currently receiving the data flow, and not notify the flooding module.
In the above scheme, the apparatus further comprises: a data flow determining module, configured to search a MAC address entry matching a destination MAC address of the data flow in a MAC address table, determine that the data flow is an unknown data flow when the MAC address entry is not found, continue to search for a MAC address entry matching a source MAC address of the data flow, notify a learning module when the MAC address entry is not found, determine whether an input port in the MAC address entry is a high-speed service port when the MAC address entry matching the source MAC address of the data flow is found, determine that the data flow is a locally migrated data flow if the input port is not a high-speed service port, notify a second updating module, determine that the data flow is a data flow migrated from an initial receiving device if the input port is a high-speed service port, and notify the first updating module.
In the above scheme, the apparatus further comprises:
the forwarding module is used for sending the data stream to other equipment from the input port of the MAC address entry when the data stream is determined to be the known data stream;
the data flow determining module is further configured to search a MAC address entry matching a destination MAC address of the data flow in a MAC address table, determine that the data flow is a known data flow when the MAC address entry is searched, and notify the forwarding module.
In the above scheme, the apparatus further comprises: and the aging module is used for monitoring the aging time of each MAC address entry in the MAC address table and aging the MAC address entry which is not matched with the destination MAC address of the data stream once in the aging time.
The invention provides a MAC address learning system which comprises a plurality of devices.
In the above scheme, the devices are connected to each other by using high-speed service ports, so that the MAC address learning function of the high-speed service ports is enabled, and the devices are configured to belong to all VLANs.
The invention provides a method, equipment and a system for learning an MAC address, wherein the equipment receives a data stream, learns the MAC address of the data stream when determining that the data stream is unknown and does not have an MAC address item matched with a source MAC address, floods the data stream to other equipment through a high-speed service port interconnected with other equipment, and learns the MAC address of the data stream received from the high-speed service port by the other equipment; in this manner, the synchronization of MAC addresses on all devices can be accomplished without any CPU intervention.
Drawings
Fig. 1 is a schematic flowchart of a method for performing MAC address synchronization by a distributed device in the prior art;
fig. 2 is a schematic flowchart of a method for MAC address migration by a distributed device in the prior art;
fig. 3 is a schematic flowchart of a MAC address learning method according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an apparatus according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating a method for synchronizing MAC addresses between line cards A, B, C according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating a method for layer two forwarding and MAC address aging among the line cards A, B, C according to an embodiment of the present invention;
fig. 7 is a flowchart illustrating a method for MAC address migration between line cards A, B, C according to an embodiment of the present invention.
Detailed Description
In the embodiment of the invention, equipment receives a data stream, learns the MAC address of the data stream when determining that the data stream is unknown and has no MAC address entry matched with a source MAC address, floods the data stream to other equipment through a high-speed service port interconnected with other equipment, and learns the MAC address of the data stream received from the high-speed service port by the other equipment; when the received data stream is determined to be the data stream migrated from the initial receiving equipment, the original MAC address corresponding to the data stream is updated to the current MAC address, and the data stream is flooded to other equipment through a high-speed service port interconnected with other equipment, so that the initial receiving equipment updates the original MAC address corresponding to the data stream to the MAC address of the data stream received from the high-speed service port. Here, the device is generally a distributed device, and may be a distributed line card or the like.
The invention is further described in detail below with reference to the figures and the specific embodiments.
The embodiment of the invention realizes a MAC address learning method, as shown in figure 3, the method comprises the following steps:
step 301: a device receives a data stream;
before the step, the devices are connected with each other by using high-speed service ports, the MAC address learning function of the high-speed service ports is enabled, and the devices are configured to belong to all Virtual Local Area Networks (VLANs).
Step 302: the device learns the MAC address of the data stream when determining that the data stream is unknown and no MAC address entry matched with a source MAC address exists;
specifically, the device searches a MAC address entry matching a destination MAC address of the data flow in a MAC address table, determines that the data flow is an unknown data flow when not found, continues to search a MAC address entry matching a source MAC address of the data flow, creates a new MAC address entry in the MAC address table when not found, and adds the MAC address of the data flow to the new MAC address entry; the MAC address of the data flow includes: the source MAC address, the VLAN and the input port of the data flow.
Step 303: the device floods the data flow to other devices through high-speed service ports interconnected with other devices, and the other devices learn the MAC address of the data flow received from the high-speed service ports;
specifically, the device floods the data stream to other devices through a high-speed service port interconnected with the other devices, after the other devices receive the data stream from one high-speed service port of the other devices, a MAC address entry matching a destination MAC address of the data stream is searched in a MAC address table, when the MAC address entry is not searched, a MAC address entry matching a source MAC address of the data stream is continuously searched, when the MAC address entry is not searched, a new MAC address entry is created in the MAC address table, and a MAC address of the data stream is added to the new MAC address entry, where the MAC address of the data stream includes: the source MAC address of the data stream, the VLAN which the data stream belongs to, and an input port, wherein the input port is a high-speed service port of the input port for receiving the data stream; and then, the other equipment floods the data stream to the equipment connected with the other high-speed service port through another high-speed service port of the other equipment, and so on, so as to complete the synchronization of the MAC address of the data stream on all the equipment.
The method further comprises the following steps: when the device determines that the received data stream is the data stream migrated from the initial receiving device, the original MAC address corresponding to the data stream is updated to the current MAC address, and the data stream is flooded to other devices through high-speed service ports interconnected with other devices, so that the initial receiving device updates the original MAC address corresponding to the data stream to the MAC address of the data stream received from the high-speed service ports.
The updating the original MAC address corresponding to the data stream to the current MAC address includes: and modifying the input port of the MAC address entry matched with the source MAC address of the data flow in the MAC address table into the port currently receiving the data flow.
Specifically, the determining that the received data stream is the data stream migrated from the initial receiving device includes: searching an MAC address entry matched with a destination MAC address of a data stream in an MAC address table, when the MAC address entry is not searched, continuously searching an MAC address entry matched with a source MAC address of the data stream, when the MAC address entry is searched, judging whether an input port in the MAC address entry is a high-speed service port, if not, determining that the data stream is a locally migrated data stream, and if so, determining that the data stream is a data stream migrated from initial receiving equipment;
the method further comprises the following steps: the device searches an MAC address entry matched with a target MAC address of the data stream in an MAC address table, determines that the data stream is a known data stream when the MAC address entry is searched, and sends the data stream to other devices from an input port of the MAC address entry to finish normal two-layer forwarding;
here, when the device floods the data stream migrated from the initial receiving device to another device through a high-speed service port interconnected with another device, the other device may include an initial receiving device that is a device that initially receives the data stream, the initial receiving device may learn, according to the MAC address table, that an input port of the data stream has changed and receives the data stream from the high-speed service port, and modify, in the MAC address table, an input port of a MAC address entry that matches a source MAC address of the data stream as the high-speed service port that currently receives the data stream.
The method further comprises the following steps: when the data flow is determined to be the data flow of local migration, modifying an input port of an MAC address entry matched with a source MAC address of the data flow in an MAC address table to be a port which currently receives the data flow, and not flooding the data flow at a high-speed service port.
The method further comprises the following steps: the device monitors the aging time of each MAC address entry in the MAC address table, and deletes the MAC address entry which is not aged by the MAC address matched with the destination MAC address of the data stream once in the aging time, namely the device deletes the MAC address entry.
In order to implement the foregoing method, an embodiment of the present invention further provides a device, where the device and other devices are connected to each other by using a high-speed service port, enable an MAC address learning function of the high-speed service port, and are configured to belong to all VLANs; as shown in fig. 4, the apparatus includes: a data receiving module 41, a learning module 42, and a flooding module 43; wherein,
a data receiving module 41, which may be implemented by an input port of the device, for receiving a data stream;
a learning module 42, which may be implemented by a memory of the device, for learning a MAC address of the data flow when the data flow is determined to be an unknown data flow and there is no MAC address entry matching the source MAC address;
a flooding module 43, which may be implemented by a controller of the device, configured to flood the data stream to other devices through high-speed service ports interconnected with the other devices, and the other devices learn MAC addresses of the data stream received from the high-speed service ports;
specifically, when determining that the data flow is an unknown data flow and there is no MAC address entry matching the source MAC address, the learning module 42 creates a new MAC address entry in the MAC address table, and adds the MAC address of the data flow to the new MAC address entry; the MAC address of the data flow includes: the source MAC address, the VLAN and the input port of the data flow.
The flooding module 43 floods the data stream to other devices through high-speed service ports interconnected with other devices, after the other devices receive the data stream from one high-speed service port of the other devices, a MAC address entry matching with a destination MAC address of the data stream is searched in a MAC address table, when the MAC address entry is not searched, a MAC address entry matching with a source MAC address of the data stream is continuously searched, when the MAC address entry is not searched, a new MAC address entry is created in the MAC address table, and a MAC address of the data stream is added to the new MAC address entry, where the MAC address of the data stream includes: the source MAC address of the data stream, the VLAN which the data stream belongs to, and an input port, wherein the input port is a high-speed service port of the input port for receiving the data stream; and then, the other equipment floods the data stream to the equipment connected with the other high-speed service port through another high-speed service port of the other equipment, and so on, so as to complete the synchronization of the MAC address of the data stream on all the equipment.
The apparatus further comprises: a first updating module 44, configured to update an original MAC address corresponding to the received data flow to a current MAC address when it is determined that the received data flow is a data flow migrated from the initial receiving device, and notify the flooding module 43, so that the initial receiving device updates the original MAC address corresponding to the data flow to the MAC address of the data flow received from the high-speed service port.
Correspondingly, the device further comprises: a second updating module 45, configured to modify, when it is determined that the data flow is a locally migrated data flow, an input port of a MAC address entry in the MAC address table, which is matched with a source MAC address of the data flow, to be a port currently receiving the data flow, and not notify the flooding module.
The first updating module 44 is specifically configured to modify an input port of a MAC address entry in the MAC address table, which is matched with the source MAC address of the data flow, to be a port currently receiving the data flow, and notify the flooding module.
The apparatus further comprises: a data flow determining module 46, configured to search a MAC address entry matching a destination MAC address of the data flow in a MAC address table, determine that the data flow is an unknown data flow when the MAC address entry is not found, continue to search a MAC address entry matching a source MAC address of the data flow, notify the learning module 42 when the MAC address entry is not found, determine whether an input port in the MAC address entry is a high-speed service port when the MAC address entry matching the source MAC address of the data flow is found, determine that the data flow is a locally migrated data flow if the input port is not a high-speed service port, notify the second updating module 45, determine that the data flow is a data flow migrated from an initial receiving device if the input port is a high-speed service port, and notify the first updating module 44;
the apparatus further comprises: a forwarding module 47, configured to send the data stream from the input port of the MAC address entry to another device when it is determined that the data stream is a known data stream, so as to complete normal two-layer forwarding;
the data flow determining module 46 is further configured to search a MAC address entry matching the destination MAC address of the data flow in a MAC address table, determine that the data flow is a known data flow when the MAC address entry is searched, and notify the forwarding module 47.
Further, the apparatus further comprises: and the aging module 48 is configured to monitor an aging time of each MAC address entry in the MAC address table, and age, that is, delete, a MAC address entry that is not matched with a destination MAC address of the data stream once in the aging time.
Based on the distributed device, the invention also provides a MAC address learning system, which comprises a plurality of devices, wherein the devices are connected with each other by using high-speed service ports, the MAC address learning function of the high-speed service ports is enabled, and the devices are configured to belong to all VLANs.
The method of the present invention is described in detail below with specific scenarios.
The scenarios for examples 1, 2, 3 are: the distributed device has three line cards A, B, C, and a MAC address 00:11:22:33:44:55vlan100 is learned on port1 on line card a. A. The high-speed service ports interconnected between B, C are highigport a1 (between AB) of line card a, highigport B1 (between AB) of line card B, highigport B2 (between BC), and highigport C1 (between BC) of line card C, respectively.
Example 1: the MAC address of line card a is synchronized to line card B, C, as shown in fig. 5, including:
step 501, the line card a receives an unknown unicast data stream, the source MAC address of the data stream is 00:11:22:33:44:55, the vlan is vlan100, and the port receiving the data stream is port1, so the line card a learns the MAC address, and the MAC address entry is 00:11:22:33:44:55vlan100port 1.
Step 502, line card a floods the data flow into vlan100, where vlan100 includes highigport a1 port of line card a, and thus the data flow is sent to highigport a1 port.
In step 503, since line card a sends the data stream to the highigport a1 port, line card B receives the data stream on highigport B1.
Step 504, the line card B searches for the destination MAC address of the data flow, which is still unknown, so that the message is flooded in the vlan100, and the source MAC address of the data flow is written into the MAC address table of the line card B, where the MAC address entry is 00:11:22:33:44:55vlan100 highigport B1.
And step 505, the line card B floods the data stream in the vlan100, and because the highigport B2 is in the vlan100, the line card B floods the data packet to the highigport B2.
Step 506, the line card C searches for the destination MAC address of the data flow, which is still unknown, so that the data flow is flooded in the vlan100, and the source MAC address of the data flow is written into the MAC address table of the line card C, where the MAC address entry is 00:11:22:33:44:55vlan100 highigport C1.
Therefore, the MAC address synchronization process among the three line cards without the intervention of the CPU is completed.
Example 2: the port of a vlan100 of line card B receives the data stream that needs to be sent to the destination MAC address 00:11:22:33:44:55, as shown in fig. 6, which includes:
step 601, the line card B searches its MAC address table, and finds that the MAC address entry forwarding outlet information of 00:11:22:33:44:55 of the vlan100 is Higigport B1.
Step 602, the line card B forwards the data stream to the highigport B1.
Step 603, the line card a receives the data stream from the highigport a1, searches its own MAC address table, and finds that the MAC address entries are 00:11:22:33:44:55vlan100port 1.
Step 604, the line card a forwards the data stream to the port1, and completes the forwarding of the known MAC address.
Step 605, the line card C always does not receive the data stream with the destination MAC address of 00:11:22:33:44:55 in the aging time, and the MAC address entry of 00:11:22:33:44:55 on the line card C is automatically aged after the aging time is reached.
So far, normal layer two forwarding and MAC address entry aging without CPU intervention are completed.
Example 3: the line card B receives the same unknown unicast message with the source MAC address 00:11:22:33:44:55vlan100 from the port2, as shown in fig. 7, which includes:
step 701, the line card B searches its MAC address table, and finds that there is a forwarding entry of the same 00:11:22:33:44:55vlan100 highigport B1.
Step 702, the line card B updates its MAC address table to 00:11:22:33:44:55vlan100port 2.
In step 703, since the data stream is unknown unicast, line card B floods the packet into vlan100, that is, into highigport B1 and highigport B2.
Step 704, the line card a receives the data stream from the highigport a1, searches its MAC address table, and finds that the same entry 00:11:22:33:44:55vlan100port 1 exists.
Step 705, the line card a updates its MAC address table with an update entry of 00:11:22:33:44:55vlan100 highigport a 1.
Step 706, the line card C still receives the message from the highigport C1, and finds that the MAC address entry is the same entry after searching for the MAC address entry, so the MAC address entry of the line card C does not change.
To this end, the MAC address migration process is completed without CPU intervention
Compared with the common method for synchronizing the MAC addresses of the distributed equipment, the method for interconnecting by using the high-speed service ports and setting the ports to belong to all VLANs can ensure that the MAC address synchronization is completely changed into an automatic process, and the CPU is not needed to intervene in the process.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. that are within the spirit and principle of the present invention should be included in the present invention.

Claims (16)

1. A Media Access Control (MAC) address learning method, the method comprising:
the method comprises the steps that the device receives data flow, when the data flow is determined to be unknown and no MAC address entry matched with a source MAC address exists, the MAC address of the data flow is learned, and the data flow is flooded to other devices through high-speed service ports interconnected with other devices.
2. The MAC address learning method of claim 1, further comprising: and enabling the MAC address learning function of the high-speed service port, and configuring the MAC address learning function to belong to all Virtual Local Area Networks (VLANs).
3. The MAC address learning method according to claim 1, wherein learning the MAC address of the data flow when the data flow is determined to be an unknown data flow and there is no MAC address entry matching a source MAC address comprises:
searching a MAC address entry matched with a destination MAC address of the data flow in a MAC address table, determining the data flow as unknown data flow when the MAC address entry is not searched, continuously searching a MAC address entry matched with a source MAC address of the data flow, creating a new MAC address entry in the MAC address table when the MAC address entry is not searched, and adding the MAC address of the data flow to the new MAC address entry; the MAC address of the data flow includes: the source MAC address, the VLAN and the input port of the data flow.
4. The MAC address learning method of claim 1, further comprising: when the device determines that the received data stream is the data stream migrated from the initial receiving device, the original MAC address corresponding to the data stream is updated to the current MAC address, and the data stream is flooded to other devices through high-speed service ports interconnected with other devices.
5. The MAC address learning method of claim 4, wherein the determining that the received data stream is a data stream migrated from an initial receiving device comprises: searching an MAC address entry matched with a destination MAC address of a data stream in an MAC address table, when the MAC address entry is not searched, continuously searching an MAC address entry matched with a source MAC address of the data stream, when the MAC address entry is searched, judging whether an input port in the MAC address entry is a high-speed service port, if not, determining that the data stream is a locally migrated data stream, and if so, determining that the data stream is a migrated data stream from initial receiving equipment.
6. The MAC address learning method of claim 5, further comprising: the device searches a MAC address entry matched with a destination MAC address of the data flow in the MAC address table, determines that the data flow is known when the MAC address entry is searched, and sends the data flow to other devices from an input port of the MAC address entry.
7. The MAC address learning method of claim 5, further comprising: when the data flow is determined to be the data flow of local migration, modifying an input port of an MAC address entry matched with a source MAC address of the data flow in an MAC address table to be a port which currently receives the data flow, and not flooding the data flow at a high-speed service port.
8. The MAC address learning method of claim 1, further comprising: the equipment monitors the aging time of each MAC address entry in the MAC address table, and the MAC address entry which is not matched with the destination MAC address of the data stream in the aging time is aged once.
9. An apparatus, characterized in that the apparatus comprises: the system comprises a data receiving module, a learning module and a flooding module; wherein,
the data receiving module is used for receiving data streams;
the learning module is used for learning the MAC address of the data flow when the data flow is determined to be unknown and no MAC address item matched with the source MAC address exists;
and the flooding module is used for flooding the data flow to other equipment through a high-speed service port interconnected with other equipment.
10. The device according to claim 9, wherein the learning module is specifically configured to create a new MAC address entry in a MAC address table and add the MAC address of the data flow to the new MAC address entry when it is determined that the data flow is an unknown data flow and there is no MAC address entry matching the source MAC address; the MAC address of the data flow includes: the source MAC address, the VLAN and the input port of the data flow.
11. The apparatus of claim 9, further comprising:
a first updating module, configured to update an original MAC address corresponding to a received data stream to a current MAC address when it is determined that the received data stream is a data stream migrated from an initial receiving device, and notify a flooding module;
and a second updating module, configured to modify, when it is determined that the data flow is a locally migrated data flow, an input port of a MAC address entry in a MAC address table, which is matched with a source MAC address of the data flow, to be a port currently receiving the data flow, and not notify the flooding module.
12. The apparatus of claim 11, further comprising: a data flow determining module, configured to search a MAC address entry matching a destination MAC address of the data flow in a MAC address table, determine that the data flow is an unknown data flow when the MAC address entry is not found, continue to search for a MAC address entry matching a source MAC address of the data flow, notify a learning module when the MAC address entry is not found, determine whether an input port in the MAC address entry is a high-speed service port when the MAC address entry matching the source MAC address of the data flow is found, determine that the data flow is a locally migrated data flow if the input port is not a high-speed service port, notify a second updating module, determine that the data flow is a data flow migrated from an initial receiving device if the input port is a high-speed service port, and notify the first updating module.
13. The apparatus of claim 12, further comprising:
the forwarding module is used for sending the data stream to other equipment from the input port of the MAC address entry when the data stream is determined to be the known data stream;
the data flow determining module is further configured to search a MAC address entry matching a destination MAC address of the data flow in a MAC address table, determine that the data flow is a known data flow when the MAC address entry is searched, and notify the forwarding module.
14. The apparatus of claim 9, further comprising: and the aging module is used for monitoring the aging time of each MAC address entry in the MAC address table and aging the MAC address entry which is not matched with the destination MAC address of the data stream once in the aging time.
15. A MAC address learning system, characterized in that it comprises a plurality of devices according to any one of claims 9 to 14.
16. The MAC address learning system of claim 15, wherein the devices are all connected to each other using a high speed service port, enable a MAC address learning function of the high speed service port, and are configured to belong to all VLANs.
CN201510064579.2A 2015-02-06 2015-02-06 MAC (Media Access Control) address learning method, device and system Pending CN105991783A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510064579.2A CN105991783A (en) 2015-02-06 2015-02-06 MAC (Media Access Control) address learning method, device and system
PCT/CN2016/072488 WO2016124105A1 (en) 2015-02-06 2016-01-28 Media access control address learning method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510064579.2A CN105991783A (en) 2015-02-06 2015-02-06 MAC (Media Access Control) address learning method, device and system

Publications (1)

Publication Number Publication Date
CN105991783A true CN105991783A (en) 2016-10-05

Family

ID=56563452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510064579.2A Pending CN105991783A (en) 2015-02-06 2015-02-06 MAC (Media Access Control) address learning method, device and system

Country Status (2)

Country Link
CN (1) CN105991783A (en)
WO (1) WO2016124105A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108777723A (en) * 2018-06-11 2018-11-09 深圳市风云实业有限公司 ARL list management systems
CN109391548A (en) * 2018-11-06 2019-02-26 迈普通信技术股份有限公司 List item moving method, device and network communicating system
CN110830371A (en) * 2019-11-13 2020-02-21 迈普通信技术股份有限公司 Message redirection method and device, electronic equipment and readable storage medium
CN110838948A (en) * 2018-08-15 2020-02-25 迈普通信技术股份有限公司 Method and system for testing MAC address learning rate

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113709273B (en) * 2021-08-31 2023-10-24 迈普通信技术股份有限公司 Address migration method, communication equipment and dual-activity system
CN113872847B (en) * 2021-11-18 2023-05-30 浪潮思科网络科技有限公司 Message forwarding method, device and medium based on VXLAN network

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101094187A (en) * 2007-07-30 2007-12-26 杭州华三通信技术有限公司 Method, device, and operation board capable of learning address of medium access control
CN101488862A (en) * 2009-02-23 2009-07-22 中兴通讯股份有限公司 Distributed Ethernet switch and internal MAC address maintaining method thereof
CN101582834A (en) * 2008-05-16 2009-11-18 华为技术有限公司 Updating method, equipment and system of forwarding table during service transmission of Ethernet
US20110280248A1 (en) * 2010-05-17 2011-11-17 Fujitsu Network Communications, Inc. Hierarchical Isolated Learning and Flooding for Metro Ethernet Bridging Domains
CN103227757A (en) * 2012-08-31 2013-07-31 杭州华三通信技术有限公司 Message forwarding method and equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9270486B2 (en) * 2010-06-07 2016-02-23 Brocade Communications Systems, Inc. Name services for virtual cluster switching
CN103209130A (en) * 2013-04-22 2013-07-17 杭州华三通信技术有限公司 Method for synchronizing media access control (MAC) address table entries and forwarding chips

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101094187A (en) * 2007-07-30 2007-12-26 杭州华三通信技术有限公司 Method, device, and operation board capable of learning address of medium access control
CN101582834A (en) * 2008-05-16 2009-11-18 华为技术有限公司 Updating method, equipment and system of forwarding table during service transmission of Ethernet
CN101488862A (en) * 2009-02-23 2009-07-22 中兴通讯股份有限公司 Distributed Ethernet switch and internal MAC address maintaining method thereof
US20110280248A1 (en) * 2010-05-17 2011-11-17 Fujitsu Network Communications, Inc. Hierarchical Isolated Learning and Flooding for Metro Ethernet Bridging Domains
CN103227757A (en) * 2012-08-31 2013-07-31 杭州华三通信技术有限公司 Message forwarding method and equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108777723A (en) * 2018-06-11 2018-11-09 深圳市风云实业有限公司 ARL list management systems
CN110838948A (en) * 2018-08-15 2020-02-25 迈普通信技术股份有限公司 Method and system for testing MAC address learning rate
CN110838948B (en) * 2018-08-15 2022-02-22 迈普通信技术股份有限公司 Method and system for testing MAC address learning rate
CN109391548A (en) * 2018-11-06 2019-02-26 迈普通信技术股份有限公司 List item moving method, device and network communicating system
CN110830371A (en) * 2019-11-13 2020-02-21 迈普通信技术股份有限公司 Message redirection method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
WO2016124105A1 (en) 2016-08-11

Similar Documents

Publication Publication Date Title
CN105991783A (en) MAC (Media Access Control) address learning method, device and system
US10191758B2 (en) Directing data traffic between intra-server virtual machines
US10296374B2 (en) Migration of virtual machines
US9344286B2 (en) Multicast data forwarding method and device supporting virtual terminal
CN108173691B (en) Cross-device aggregation method and device
US8611361B2 (en) Switching hub, line card and frame relay method
WO2016050158A1 (en) Learning a mac address in vxlan
US10394784B2 (en) Technologies for management of lookup tables
US9001644B2 (en) Ethernet virtual private network system for providing fast protection for access rings
CN106385354B (en) Message forwarding method and device
CN103501250A (en) Data flow processing method and device in distribution type link aggregation network
WO2016155589A1 (en) Forwarding multicast packets
CN106878184A (en) A kind of data message transmission method and device
CN104378299A (en) Flow table entry processing method and device
CN107707690A (en) A kind of non-ageing method, apparatus of dynamic address and medium
CN111654437B (en) Message forwarding method and device based on data center
CN105591872B (en) A kind of method and apparatus for realizing multiple data centers interconnection
CN105634952A (en) Fast notification method and apparatus for LSP message
CN109412925A (en) Forwarding-table item update method and VTEP based on VTEP
CN103532851A (en) Method and device for processing data flow in distributed link aggregation network
US20140245302A1 (en) Synchronizing Multicast Groups
CN107493245B (en) Board card of switch and data stream forwarding method
CN107547348B (en) Method and device for preventing data stream interruption
CN110661710B (en) Message transmission method and device of virtualization system
WO2017117955A1 (en) Route synchronizing method, device and communication system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20161005

WD01 Invention patent application deemed withdrawn after publication