MAC (Media Access Control) address learning delay effective method and device, network element equipment and medium

By detecting and broadcasting packets of unknown MAC addresses in the communication network, the problem of delayed learning of MAC addresses between network elements is solved, ensuring that adjacent network elements can correctly learn MAC addresses, and improving network operation efficiency.

CN119697088AActive Publication Date: 2025-03-25FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411851590.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-03-25
Estimated Expiration
2044-12-16

AI Technical Summary

Technical Problem

In some communication networks with ring network topology, the delay in learning MAC address between network elements takes effect, resulting in inaccurate forwarding of packets, resulting in the inability to learn the other party's MAC address, which in turn affects the normal operation of the network.

Method used

By detecting whether the forwarding table entry corresponding to the destination MAC address of the message received by UNI exists. If it does not exist, the message will be broadcast, so that the adjacent network elements can learn the MAC address, and a forwarding table entry is added to the MAC address table to record the correspondence between the NNI and the MAC address.

Benefits of technology

Ensure that adjacent network elements can learn the MAC address of the network element, avoid the inaccurate packet forwarding caused by delayed MAC address learning, and improve the normal operation efficiency of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697088A_ABST
    Figure CN119697088A_ABST
Patent Text Reader

Abstract

The invention discloses an MAC (Media Access Control) address learning delay effective method and device, network element equipment and a medium. According to the method and the device, for a network element, the message of which the destination MAC address is the MACx is received through the UNI, if the message of which the destination MAC address is the MACx is not broadcasted before, the forwarding table item corresponding to the MACx does not exist in the first MAC address table, and the received message needs to be broadcasted, so that the adjacent network elements can learn the MAC address of the network element. In other words, for a network element, even if the network element learns the MACx, at least one time of broadcast forwarding needs to be carried out on the message of which the destination MAC address is the MACx, equivalently, the learned MAC address is delayed to take effect, and therefore it is ensured that all the adjacent network elements can learn the MAC address of the network element.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, device, network element equipment and storage medium for delaying the effectiveness of MAC address learning. Background Art

[0002] In some communication network configurations, such as Figure 1 As shown in the ring network topology diagram, the data network analyzer sends message 1 to network element 1 through UNI (User Network Interface) _1. Since network element 1 has not learned the MAC address of message 1, it sends message 1 through NNI (Network to Network Interface) _1. Interface, network node interface)_1-1 forwards message 1 to network element 3, and forwards message 1 to network element 2 through NNI_1-2; for network element 2, it receives a message with a source MAC address of MAC1 (the MAC address of network element 1) through NNI_2-2, and can learn that MAC1 corresponds to NNI_2-2; subsequently, if the data network analyzer sends message 2 with a destination MAC address of MAC1 to network element 2 through UNI_2, since network element 2 has learned that MAC1 corresponds to NNI_2-2, message 2 is forwarded through NNI_2-2, which will cause network element 3 to fail to receive messages from network element 2, and thus cause network element 3 to fail to learn the MAC address of network element 2; subsequently, if the data network analyzer sends message 3 with a destination MAC address of MAC2 (the MAC address of network element 2) to network element 3 through UNI_3, network element 3 can only forward message 3 in broadcast mode.

[0003] There are generally two existing solutions to the problems in the above business scenarios:

[0004] Solution 1: After the MAC table entry corresponding to NNI_2-2 of MAC1 learned by NE 2 ages, if the data network analyzer sends a message with the destination MAC address of MAC1 to NE 2 through UNI_2, NE 2 forwards the message in broadcast mode, so that NE 3 learns the MAC address of NE 2. However, it takes a long time to wait for the MAC table entry to age, and this solution is less efficient in solving the problem.

[0005] Solution 2: First, manually check to determine that the broadcast behavior of NE 3 is because MAC2 has not been learned, and then control NE 2 to broadcast messages so that NE 3 can learn the MAC address of NE 2. However, this method requires high professional skills of operation and maintenance personnel and is difficult to implement. Summary of the invention

[0006] In order to solve the above technical problems, the present application provides a MAC address learning delayed effectiveness method, device, network element equipment and computer-readable storage medium.

[0007] In a first aspect, an embodiment of the present application provides a method for delaying the effectiveness of MAC address learning, and the method for delaying the effectiveness of MAC address learning includes:

[0008] Detect whether a first forwarding table entry corresponding to a destination MAC address of a first message received by a UNI of the network element exists in the first MAC address table;

[0009] If the first forwarding entry does not exist in the first MAC address table, broadcast the first message to the adjacent network elements through all NNIs of the network element, and the first MAC address table is initially empty;

[0010] After the first message is broadcasted, if the first forwarding entry exists in the second MAC address table, the first forwarding entry is added to the first MAC address table, and any forwarding entry in the second MAC address table is used to represent the correspondence between the NNI and the MAC address.

[0011] In conjunction with the first aspect, in one implementation, the process of adding a forwarding entry in the second MAC address table specifically includes:

[0012] When any NNI of the network element receives the second message, the second message is parsed to obtain the source MAC address of the second message;

[0013] Detect whether there is a second forwarding entry in the second MAC address table that is used to characterize the correspondence between any one of the NNIs and the source MAC address;

[0014] If the second forwarding entry does not exist in the second MAC address table, then the second forwarding entry is added to the second MAC address table.

[0015] In combination with the first aspect, in an implementation manner, when any NNI of the network element receives the second message, after parsing the second message to obtain the source MAC address of the second message, the method further includes:

[0016] If a third forwarding entry for representing a correspondence between other NNIs and the source MAC address exists in the second MAC address table, the third forwarding entry is deleted, and the other NNIs are different from any of the NNIs.

[0017] In combination with the first aspect, in one implementation, after detecting whether the first forwarding table entry corresponding to the destination MAC address of the first message received by the UNI of the current network element exists in the first MAC address table, it also includes:

[0018] If the first forwarding table entry exists in the first MAC address table, detecting whether the NNI corresponding to the first forwarding table entry is an NNI that can be used by the service;

[0019] If the NNI corresponding to the first forwarding table entry is not an NNI that can be used by the service, the first message is broadcast to neighboring network elements through all NNIs of the current network element, and the first forwarding table entry is deleted.

[0020] In combination with the first aspect, in an implementation manner, after detecting whether the NNI corresponding to the first forwarding entry is an NNI that can be used by the service, the method further includes:

[0021] If the NNI corresponding to the first forwarding table entry is an NNI that can be used by the service, the first message is unicast based on the first forwarding table entry.

[0022] In combination with the first aspect, in one implementation, the MAC address learning delay effectiveness method further includes:

[0023] When there is an aged forwarding entry in the second MAC address table, the aged forwarding entry is deleted from the second MAC address table.

[0024] In combination with the first aspect, in one implementation, the MAC address learning delay effectiveness method further includes:

[0025] When there is an aged forwarding table entry in the second MAC address table, detecting whether there is the aged forwarding table entry in the first MAC address table;

[0026] If the aged forwarding table entry exists in the first MAC address table, retain the aged forwarding table entry in the first MAC address table and the second MAC address table;

[0027] If the aged forwarding entry does not exist in the first MAC address table, the aged forwarding entry is deleted from the second MAC address table.

[0028] In a second aspect, an embodiment of the present application provides a MAC address learning delay effectiveness device, wherein the MAC address learning delay effectiveness device comprises:

[0029] A detection module, used to detect whether a first forwarding table entry corresponding to a destination MAC address of a first message received by a UNI of the network element exists in a first MAC address table;

[0030] A broadcast module, configured to broadcast the first message to adjacent network elements through all NNIs of the network element if the first forwarding entry does not exist in the first MAC address table, and the first MAC address table is initially empty;

[0031] The MAC address learning module is used to add the first forwarding entry to the first MAC address table if the first forwarding entry exists in the second MAC address table after broadcasting the first message. Any forwarding entry in the second MAC address table is used to represent the correspondence between the NNI and the MAC address.

[0032] In a third aspect, an embodiment of the present application provides a network element device, comprising a processor, a memory, and a MAC address learning delayed effectiveness program stored in the memory and executable by the processor, wherein when the MAC address learning delayed effectiveness program is executed by the processor, the steps of the MAC address learning delayed effectiveness method described in the first aspect are implemented.

[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a MAC address learning delayed effectiveness program is stored. When the MAC address learning delayed effectiveness program is executed by a processor, the steps of the MAC address learning delayed effectiveness method described in the first aspect are implemented.

[0034] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:

[0035] In the embodiment of the present application, it is detected whether the first forwarding table entry corresponding to the destination MAC address of the first message received by the UNI of this network element exists in the first MAC address table; if the first forwarding table entry does not exist in the first MAC address table, the first message is broadcast to the adjacent network elements through all NNIs of this network element, and the first MAC address table is initially empty; after the broadcast of the first message is completed, if the first forwarding table entry exists in the second MAC address table, the first forwarding table entry is added to the first MAC address table, and any forwarding table entry in the second MAC address table is used to characterize the correspondence between NNI and MAC address. Through the embodiment of the present application, for a network element, it receives a message with a destination MAC address of MAC_x through UNI. If the message with a destination MAC address of MAC_x has not been broadcast before, then the forwarding table entry corresponding to MAC_x must not exist in the first MAC address table, and the received message needs to be broadcast, which ensures that its adjacent network elements can learn the MAC address of the network element. That is, for a network element, even if it has learned MAC_x, it must broadcast and forward the message with the destination MAC address of MAC_x at least once, which is equivalent to delaying the effectiveness of the learned MAC address, thereby ensuring that its adjacent network elements can learn the MAC address of the network element. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 This is a schematic diagram of the ring network topology;

[0037] Figure 2 This is a flow chart of an embodiment of a method for delaying the effectiveness of MAC address learning in the present application;

[0038] Figure 3 A flowchart of another embodiment of the method for delaying the effectiveness of MAC address learning of the present application;

[0039] Figure 4 This is a flow chart of adding a forwarding entry in the second MAC address table in an embodiment of the MAC address learning delay effectiveness method of the present application;

[0040] Figure 5 This is a functional module diagram of an embodiment of a MAC address learning delay validation device of the present application;

[0041] Figure 6 This is a schematic diagram of the hardware structure of the MAC address learning delayed effectiveness device involved in the embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0043] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0044] In a first aspect, an embodiment of the present application provides a method for delaying the effectiveness of MAC address learning.

[0045] In one embodiment, referring to Figure 2 , Figure 2 This is a flow chart of an embodiment of the MAC address learning delay validation method of the present application. Figure 2 As shown in the figure, the MAC address learning delay method includes:

[0046] Step S110, detecting whether a first forwarding table entry corresponding to a destination MAC address of a first message received by a UNI of the network element exists in a first MAC address table;

[0047] In this embodiment, the MAC address table is divided into a first MAC address table and a second MAC address table. The first MAC address table is used for table lookup forwarding, and the forwarding table items in the first MAC address table are updated and adjusted based on the forwarding table items in the second MAC address table. For details, please refer to the subsequent description of step S30.

[0048] Combination Figure 1 The ring network topology shown in the figure is Figure 1 Take network element 2 in the example as an example, and explain as follows:

[0049] The data network analyzer sends message 1 to network element 1 through UNI_1. Since network element 1 has not learned the MAC address of message 1, it forwards message 1 to network element 3 through NNI_1-1 and forwards message 1 to network element 2 through NNI_1-2. For network element 2, it receives a message with a source MAC address of MAC1 (the MAC address of network element 1) through NNI_2-2, and can learn that MAC1 corresponds to NNI_2-2 and record it in the second MAC address table. With this as a prerequisite, when the data network analyzer sends message 2 (i.e., the first message) with a destination MAC address of MAC1 to network element 2 through UNI_2, it detects whether the first forwarding table entry corresponding to MAC1 exists in the first MAC address table. That is, it detects whether there is a correspondence between MAC1 and NNI in the first MAC address table.

[0050] Step S120: if the first forwarding entry does not exist in the first MAC address table, broadcast the first message to the neighboring network elements through all NNIs of the network element, and the first MAC address table is initially empty;

[0051] Step S130: After broadcasting the first message, if the first forwarding entry exists in the second MAC address table, the first forwarding entry is added to the first MAC address table, and any forwarding entry in the second MAC address table is used to represent the correspondence between the NNI and the MAC address.

[0052] In this embodiment, referring to the above description, if the message with the destination MAC address of MAC1 has not been broadcasted before, the first forwarding table entry does not exist in the first MAC address table, and the first message is forwarded to the network element 1 through NNI_2-2, and the first message is forwarded to the network element 3 through NNI_2-1. In this way, the network element 1 can learn the corresponding relationship between MAC2 (the MAC address of the network element 2) and NNI_1-2; the network element 3 can learn the corresponding relationship between MAC2 (the MAC address of the network element 2) and NNI_3-2.

[0053] After the first message is broadcasted, if it is detected that the first forwarding entry exists in the second MAC address table (for example, MAC1 corresponds to NNI_2-2), the first forwarding entry is added to the first MAC address table.

[0054] Subsequently, if the UNI of network element 2 receives a message with a destination MAC address of MAC1 again, since there is a forwarding entry of NNI_2-2 corresponding to MAC1 in the first MAC address table, the currently received message is directly forwarded through NNI_2-2.

[0055] In the embodiment of the present application, it is detected whether the first forwarding table entry corresponding to the destination MAC address of the first message received by the UNI of this network element exists in the first MAC address table; if the first forwarding table entry does not exist in the first MAC address table, the first message is broadcast to the adjacent network elements through all NNIs of this network element, and the first MAC address table is initially empty; after the broadcast of the first message is completed, if the first forwarding table entry exists in the second MAC address table, the first forwarding table entry is added to the first MAC address table, and any forwarding table entry in the second MAC address table is used to characterize the correspondence between NNI and MAC address. Through the embodiment of the present application, for a network element, it receives a message with a destination MAC address of MAC_x through UNI. If the message with a destination MAC address of MAC_x has not been broadcast before, then the forwarding table entry corresponding to MAC_x must not exist in the first MAC address table, and the received message needs to be broadcast, which ensures that its adjacent network elements can learn the MAC address of the network element. That is, for a network element, even if it has learned MAC_x, it must broadcast and forward the message with the destination MAC address of MAC_x at least once, which is equivalent to delaying the effectiveness of the learned MAC address, thereby ensuring that its adjacent network elements can learn the MAC address of the network element.

[0056] Further, in one embodiment, referring to Figure 3 , Figure 3 This is a flow chart of another embodiment of the MAC address learning delay validation method of the present application. Figure 3 As shown, after step S110, the following further includes:

[0057] Step S140: If the first forwarding entry exists in the first MAC address table, detecting whether the NNI corresponding to the first forwarding entry is an NNI that can be used by the service;

[0058] In this embodiment, if there is a first forwarding entry in the first MAC address table, for example, the first forwarding entry is MAC1 corresponding to NNI_2-3, it is necessary to further detect whether NNI_2-3 is an NNI that can be used for the service.

[0059] Step S150: If the NNI corresponding to the first forwarding entry is not an NNI that can be used by the service, the first message is broadcast to neighboring network elements through all NNIs of the network element, and the first forwarding entry is deleted.

[0060] In this embodiment, the NNI that can be used for the service is determined by the service logic. For example, the NNI that can be used for the service is NNI_2-1 and NNI_2-2. At this time, it can be determined that the NNI corresponding to the first forwarding table entry is not the NNI that can be used for the service. Then, it is impossible to forward the message based on the current first forwarding table entry. In this case, the first message is broadcast to the adjacent network elements through all NNIs of this network element, and the forwarding table entry corresponding to NNI_2-3 of MAC1 in the first MAC address table is deleted.

[0061] It should be noted that after step S150, if the first forwarding entry exists in the second MAC address table, the first forwarding entry is added to the first MAC address table.

[0062] Furthermore, in one embodiment, after step S140, the method further includes:

[0063] If the NNI corresponding to the first forwarding table entry is an NNI that can be used by the service, the first message is unicast based on the first forwarding table entry.

[0064] In this embodiment, the destination MAC address of the first message takes MAC1 as an example. If the NNI corresponding to the first forwarding table entry is an NNI that can be used by the service, it means that the message with the destination MAC address of MAC1 has been broadcast before, and the first forwarding table entry is valid, then the first message is forwarded in unicast mode based on the first forwarding table entry.

[0065] Further, in one embodiment, referring to Figure 4 , Figure 4 This is a flow chart of adding a forwarding entry in the second MAC address table in an embodiment of the MAC address learning delay validation method of the present application. Figure 4 As shown, the process of adding a forwarding entry in the second MAC address table specifically includes:

[0066] Step S210: when any NNI of the network element receives a second message, the second message is parsed to obtain a source MAC address of the second message;

[0067] Step S220, detecting whether there is a second forwarding entry in the second MAC address table that is used to characterize the correspondence between any one of the NNIs and the source MAC address;

[0068] Step S230: If the second forwarding entry does not exist in the second MAC address table, then the second forwarding entry is added to the second MAC address table.

[0069] In this embodiment, taking the case where NNI_2-2 of network element 2 receives the second message sent by network element 1 as an example, the second message is parsed to obtain that the source MAC address of the second message is MAC1 (ie, the MAC address of network element 1).

[0070] If network element 2 currently receives a message sent by network element 1 for the first time, and the second forwarding entry representing that MAC1 corresponds to NNI_2-2 does not exist in the second MAC address table, a second forwarding entry is added to the second MAC address table.

[0071] Furthermore, in one embodiment, after step S210, the method further includes:

[0072] If a third forwarding entry for representing a correspondence between other NNIs and the source MAC address exists in the second MAC address table, the third forwarding entry is deleted, and the other NNIs are different from any of the NNIs.

[0073] In this embodiment, combined with the description in the previous embodiment, if there is a third forwarding table entry in the second MAC address table that is used to characterize the correspondence between other NNIs and source MAC addresses, for example, the third forwarding table entry is NNI_2-3 corresponding to MAC1, it means that the forwarding interface corresponding to MAC1 has changed, and the original forwarding table entry needs to be deleted, that is, the third forwarding table entry is deleted.

[0074] Likewise, if the third forwarding entry exists in the first MAC address table, it is deleted from the first MAC address table.

[0075] Furthermore, in one embodiment, the MAC address learning delay effectiveness method further includes:

[0076] When there is an aged forwarding entry in the second MAC address table, the aged forwarding entry is deleted from the second MAC address table.

[0077] In this embodiment, when the duration of existence of a forwarding entry in the second MAC address table reaches the aging duration, it is an aged forwarding entry and is directly deleted from the second MAC address table.

[0078] In addition, it is also detected whether the aged forwarding entry exists in the first MAC address table, and if so, it is deleted.

[0079] Furthermore, in one embodiment, the MAC address learning delay effectiveness method further includes:

[0080] When there is an aged forwarding table entry in the second MAC address table, detecting whether there is the aged forwarding table entry in the first MAC address table;

[0081] If the aged forwarding table entry exists in the first MAC address table, retain the aged forwarding table entry in the first MAC address table and the second MAC address table;

[0082] If the aged forwarding entry does not exist in the first MAC address table, the aged forwarding entry is deleted from the second MAC address table.

[0083] In this embodiment, when the length of time that a forwarding table entry exists in the second MAC address table reaches the aging length, it is an aged forwarding table entry. For example, the aged forwarding table entry is MAC1 corresponding to NNI_2-2. It is detected whether there is a forwarding table entry MAC1 corresponding to NNI_2-2 in the first MAC address table. If it exists, it means that the forwarding table entry MAC1 corresponding to NNI_2-2 has been hit, and it is retained; if it does not exist, it means that the forwarding table entry MAC1 corresponding to NNI_2-2 has not been hit, and it is deleted from the second MAC address table.

[0084] In a second aspect, an embodiment of the present application also provides a MAC address learning delayed effectiveness device.

[0085] In one embodiment, referring to Figure 5 , Figure 5 This is a functional module diagram of an embodiment of the MAC address learning delay validation device of the present application. Figure 5 As shown, the MAC address learning delay effectiveness device includes:

[0086] A detection module 10, configured to detect whether a first forwarding table entry corresponding to a destination MAC address of a first message received by a UNI of the network element exists in a first MAC address table;

[0087] A broadcast module 20, configured to broadcast the first message to adjacent network elements through all NNIs of the network element if the first forwarding entry does not exist in the first MAC address table, and the first MAC address table is initially empty;

[0088] The MAC address learning module 30 is used to add the first forwarding entry to the first MAC address table if the first forwarding entry exists in the second MAC address table after broadcasting the first message. Any forwarding entry in the second MAC address table is used to represent the correspondence between the NNI and the MAC address.

[0089] Furthermore, in one embodiment, the MAC address learning module 30 is further configured to:

[0090] When any NNI of the network element receives the second message, the second message is parsed to obtain the source MAC address of the second message;

[0091] Detect whether there is a second forwarding entry in the second MAC address table that is used to characterize the correspondence between any one of the NNIs and the source MAC address;

[0092] If the second forwarding entry does not exist in the second MAC address table, then the second forwarding entry is added to the second MAC address table.

[0093] Furthermore, in one embodiment, the MAC address learning delay effectiveness device further includes a deletion module, which is used to:

[0094] If a third forwarding entry for representing a correspondence between other NNIs and the source MAC address exists in the second MAC address table, the third forwarding entry is deleted, and the other NNIs are different from any of the NNIs.

[0095] Furthermore, in one embodiment, the detection module 10 is also used for:

[0096] If the first forwarding table entry exists in the first MAC address table, detecting whether the NNI corresponding to the first forwarding table entry is an NNI that can be used by the service;

[0097] The broadcast module 20 is further configured to broadcast the first message to adjacent network elements through all NNIs of the network element and delete the first forwarding entry if the NNI corresponding to the first forwarding entry is not an NNI available for the service.

[0098] Furthermore, in one embodiment, the MAC address learning delay effectiveness device further includes a unicast module, which is used to:

[0099] If the NNI corresponding to the first forwarding table entry is an NNI that can be used by the service, the first message is unicast based on the first forwarding table entry.

[0100] Furthermore, in one embodiment, the MAC address learning delay effectiveness device further includes a first aging processing module, which is used to:

[0101] When there is an aged forwarding entry in the second MAC address table, the aged forwarding entry is deleted from the second MAC address table.

[0102] Furthermore, in one embodiment, the MAC address learning delay effectiveness device further includes a second aging processing module, which is used to:

[0103] When there is an aged forwarding table entry in the second MAC address table, detecting whether there is the aged forwarding table entry in the first MAC address table;

[0104] If the aged forwarding table entry exists in the first MAC address table, retain the aged forwarding table entry in the first MAC address table and the second MAC address table;

[0105] If the aged forwarding entry does not exist in the first MAC address table, the aged forwarding entry is deleted from the second MAC address table.

[0106] Among them, the functional implementation of each module in the above-mentioned MAC address learning delayed effectiveness device corresponds to the various steps in the above-mentioned MAC address learning delayed effectiveness method embodiment, and its functions and implementation processes are no longer repeated here one by one.

[0107] In a third aspect, an embodiment of the present application provides a network element device.

[0108] Reference Figure 6 , Figure 6 The hardware structure diagram of the MAC address learning delay effectiveness device involved in the embodiment of the present application is shown in FIG. In the embodiment of the present application, the MAC address learning delay effectiveness device may include a processor, a memory, a communication interface, and a communication bus.

[0109] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.

[0110] The communication interface includes an input / output (I / O) interface, a physical interface, and a logical interface, which are used to interconnect the devices inside the MAC address learning delay effective device, and an interface used to interconnect the MAC address learning delay effective device with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, an optical fiber interface, an ATM interface, etc.; the user device can be a display screen (DI_splay), a keyboard (Keyboard), etc.

[0111] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0112] The processor may be a general-purpose processor, and the general-purpose processor may call the MAC address learning delay effectiveness program stored in the memory, and execute the MAC address learning delay effectiveness method provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). Among them, the method executed when the MAC address learning delay effectiveness program is called can refer to the various embodiments of the MAC address learning delay effectiveness method of the present application, which will not be repeated here.

[0113] Those skilled in the art will understand that Figure 6 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0114] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium.

[0115] The computer-readable storage medium of the present application stores a MAC address learning delayed effectiveness program, wherein when the MAC address learning delayed effectiveness program is executed by a processor, the steps of the MAC address learning delayed effectiveness method as described above are implemented.

[0116] Among them, the method implemented when the MAC address learning delayed effectiveness program is executed can refer to the various embodiments of the MAC address learning delayed effectiveness method of the present application, and will not be repeated here.

[0117] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0118] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.

[0119] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0120] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0121] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0122] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.

[0123] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for delaying the effectiveness of MAC address learning, characterized in that: The MAC address learning delay effectiveness method includes: Detect whether a first forwarding table entry corresponding to a destination MAC address of a first message received by a UNI of the network element exists in the first MAC address table; If the first forwarding entry does not exist in the first MAC address table, broadcast the first message to the adjacent network elements through all NNIs of the network element, and the first MAC address table is initially empty; After the first message is broadcasted, if the first forwarding entry exists in the second MAC address table, the first forwarding entry is added to the first MAC address table, and any forwarding entry in the second MAC address table is used to represent the correspondence between the NNI and the MAC address.

2. The MAC address learning delay validation method according to claim 1, characterized in that: The process of adding a forwarding entry to the second MAC address table specifically includes: When any NNI of the network element receives the second message, the second message is parsed to obtain the source MAC address of the second message; Detect whether there is a second forwarding entry in the second MAC address table that is used to characterize the correspondence between any one of the NNIs and the source MAC address; If the second forwarding entry does not exist in the second MAC address table, then the second forwarding entry is added to the second MAC address table.

3. The MAC address learning delay validation method as claimed in claim 2, characterized in that: When any NNI of the network element receives the second message, after parsing the second message to obtain the source MAC address of the second message, the method further includes: If a third forwarding entry for representing a correspondence between other NNIs and the source MAC address exists in the second MAC address table, the third forwarding entry is deleted, and the other NNIs are different from any of the NNIs.

4. The MAC address learning delay validation method according to claim 1, characterized in that: After the step of detecting whether the first forwarding table entry corresponding to the destination MAC address of the first message received by the UNI of the current network element exists in the first MAC address table, the step further includes: If the first forwarding table entry exists in the first MAC address table, detecting whether the NNI corresponding to the first forwarding table entry is an NNI that can be used by the service; If the NNI corresponding to the first forwarding table entry is not an NNI that can be used by the service, the first message is broadcast to neighboring network elements through all NNIs of the current network element, and the first forwarding table entry is deleted.

5. The MAC address learning delay validation method as claimed in claim 4, characterized in that: After detecting whether the NNI corresponding to the first forwarding entry is an NNI that can be used by the service, the method further includes: If the NNI corresponding to the first forwarding table entry is an NNI that can be used by the service, the first message is unicast based on the first forwarding table entry.

6. The method for delaying the effectiveness of MAC address learning according to any one of claims 1 to 5, characterized in that: The MAC address learning delay validation method further includes: When there is an aged forwarding entry in the second MAC address table, the aged forwarding entry is deleted from the second MAC address table.

7. The method for delaying the effectiveness of MAC address learning according to any one of claims 1 to 5, characterized in that: The MAC address learning delay validation method further includes: When there is an aged forwarding table entry in the second MAC address table, detecting whether there is the aged forwarding table entry in the first MAC address table; If the aged forwarding table entry exists in the first MAC address table, retain the aged forwarding table entry in the first MAC address table and the second MAC address table; If the aged forwarding entry does not exist in the first MAC address table, the aged forwarding entry is deleted from the second MAC address table.

8. A MAC address learning delayed effectiveness device, characterized in that: The MAC address learning delay effectiveness device comprises: A detection module, used to detect whether a first forwarding table entry corresponding to a destination MAC address of a first message received by a UNI of the network element exists in a first MAC address table; A broadcast module, configured to broadcast the first message to adjacent network elements through all NNIs of the network element if the first forwarding entry does not exist in the first MAC address table, and the first MAC address table is initially empty; The MAC address learning module is used to add the first forwarding entry to the first MAC address table if the first forwarding entry exists in the second MAC address table after broadcasting the first message. Any forwarding entry in the second MAC address table is used to represent the correspondence between the NNI and the MAC address.

9. A network element device, characterized in that: The network element device includes a processor, a memory, and a MAC address learning delayed effectiveness program stored in the memory and executable by the processor, wherein when the MAC address learning delayed effectiveness program is executed by the processor, the steps of the MAC address learning delayed effectiveness method as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a MAC address learning delayed validation program, wherein when the MAC address learning delayed validation program is executed by the processor, the steps of the MAC address learning delayed validation method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and device for studying media access control (MAC) table items

    CN101651627A

  • Control method of MAC address study and forwarding equipment

    CN103428091A

  • MAC address table updating method and device

    CN105991450A

  • Anti-attack MAC address learning method and device, and network equipment

    CN107547535A

  • Flooding suppression method, VXLAN bridge, gateway and system

    CN109257265A