Media access control address management methods, device, medium and product
By extending and adjusting the aging time and status of media access control addresses, the problem of data packet loss caused by address anomalies in cross-device link aggregation groups was solved, achieving more stable data transmission.
Patent Information
- Application Number
- PCT/CN2025/078836
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-21
- Filing Date
- 2025-02-24
- Publication Date
- 2025-11-27
AI Technical Summary
In a cross-device link aggregation group, an abnormal media access control address leads to the formation of unknown unicast data, triggering the default rate limiting rule and causing data transmission instability.
Extend the aging time of media access control addresses and adjust their status to a dynamic and variable state. Synchronize and manage this through transmission devices in cross-device link aggregation groups to avoid packet loss caused by address drift.
It improves the stability of data transmission, reduces the probability of unknown unicast data being rate-limited and lost, and ensures the reliability of data transmission.
Smart Images

Figure CN2025078836_27112025_PF_FP_ABST
Abstract
Description
Method, device, medium and product for managing media access control address
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202410637557.X, filed May 21, 2024, with the Chinese Patent Office, the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] The present application relates to, but is not limited to, the field of communication technology. BACKGROUND
[0004] Multi-Chassis Link Aggregation Group (MC-LAG) is a mechanism for cross-device link aggregation. By aggregating two traffic transmission devices, load balancing and mutual backup can be achieved, thereby quickly adapting to link faults and automatic link protection switching. However, in the current situation of MC-LAG aggregating two traffic transmission devices for networking, if the Media Access Control Address (MAC address) of one traffic transmission device has a problem that causes it to be unable to transmit data according to the normal MAC address, when the traffic transmission device receives data corresponding to the MAC address, it cannot find the corresponding MAC address on the traffic transmission device, the data will form unknown unicast data, and the default rate limiting rule for unknown unicast data will be triggered, which can easily cause packet loss due to rate limiting, thereby causing poor data transmission stability between the traffic transmission device and the server side. SUMMARY
[0005] In a first aspect, an embodiment of the present application provides a method for managing a Media Access Control Address, applied to a first transmission device in a Multi-Chassis Link Aggregation Group, comprising: in response to a time interval between a target Media Access Control Address and its aging time being less than or equal to a preset time length, extending the aging time to a first storage time length, and sending first address state adjustment information to a second transmission device in the Multi-Chassis Link Aggregation Group; wherein the first address state adjustment information is used to instruct the second transmission device to adjust the address state of the target Media Access Control Address stored by the second transmission device to a dynamic variable state.
[0006] In a second aspect, an embodiment of the present application provides a media access control address management method, applied to a second transmission device in a cross-device link aggregation group, comprising: in response to first address state adjustment information sent by a first transmission device in the cross-device link aggregation group, adjusting an address state of a target media access control address stored by the second transmission device to a dynamic variable state; wherein the first address state adjustment information is sent by the first transmission device in a case where an aging time of the target media access control address is extended to a first storage time length, and the target media access control address is a media access control address in the first transmission device whose time interval from the aging time is less than or equal to a preset time length.
[0007] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, and the memory stores a computer program, and the computer program, when executed by the processor, implements the media access control address management method provided in the first aspect, or the media access control address management method provided in the second aspect.
[0008] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program, when executed by one or more processors, implements the media access control address management method provided in the first aspect, or the media access control address management method provided in the second aspect.
[0009] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising a computer program, and the computer program, when executed by a processor, implements the media access control address management method provided in the first aspect, or the media access control address management method provided in the second aspect. BRIEF DESCRIPTION OF DRAWINGS
[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. It should be understood that the drawings described below are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0011] FIG. 1 is a networking topology schematic diagram in the related art;
[0012] FIG. 2 is a flowchart of a media access control address management method provided by an embodiment of the present application;
[0013] FIG. 3 is a flowchart of address state adjustment included in a media access control address management method provided by an embodiment of the present application;
[0014] Figure 4 is a flow diagram of a method for managing MAC addresses in a second transmission device in MC-LAG according to an embodiment of the present application;
[0015] Figure 5 is a networking topology diagram related to a method for managing MAC addresses according to an embodiment of the present application;
[0016] Figure 6 is a functional module diagram of a system for managing MAC addresses in a first transmission device in MC-LAG according to an embodiment of the present application;
[0017] Figure 7 is a functional module diagram of a system for managing MAC addresses in a first transmission device in MC-LAG according to an embodiment of the present application;
[0018] Figure 8 is an internal structure diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0019] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application but not all of the embodiments. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations.
[0020] Therefore, the detailed description of the embodiments of the present application provided in the drawings below is not intended to limit the scope of the claimed present application, but only represents exemplary embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative labor fall within the scope of the present application.
[0021] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, thus, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0022] In various embodiments of the present application, the expression "or" or "at least one of A or / and B" includes any combination or all combinations of the listed terms. For example, the expression "A or B" or "at least one of A or / and B" can include A, can include B, or can include both A and B.
[0023] In the description of the present application, it should be noted that if the terms "upper", "lower", "inner", "outer" and the like indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship when the product is usually placed, and are only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.
[0024] In addition, if the terms "first", "second" and the like appear, they are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0025] It should be noted that the features in the embodiments of the present application can be combined with each other without conflict.
[0026] In order to better understand the scheme of the embodiments of the present application, first, the related art will be introduced.
[0027] MC-LAG is a mechanism for cross-device link aggregation, which can also be referred to as M-LAG, for unified description, the following embodiments are all illustrated by using MC-LAG.
[0028] Please refer to FIG. 1, which is a networking topology diagram in the related art, wherein, the MC-LAG is through link aggregation negotiation between the first transmission device 110 and the second transmission device 120, from the perspective of the accessed device, the first transmission device 110 and the second transmission device 120 at the opposite end are virtually formed into a transmission device, thereby improving the reliability of the networking topology from the link level to the device level.
[0029] Unicast is a point-to-point connection between a client and a server, wherein, point-to-point means that each client receives a remote stream from the server, and the server only sends a unicast stream when the client makes a request. Wherein, if the computer network 130 in FIG. 1 is regarded as a server, the target device 140 in FIG. 1 can be regarded as a client.
[0030] The unicast data referred to in the following embodiments of the present application can be understood as a unicast stream. In unicast transmission, an independent communication link is established between the sender (computer network 130) and the receiver (target device 140), and the unicast data is transmitted from the sender (computer network 130) to the receiver (target device 140) through the independent communication link, for unified description, the following embodiments of the present application are all illustrated by using unicast data, computer network 130 and target device 140. It can be understood that the computer network 130 is a device corresponding to the next hop of the MC-LAG, or is referred to as the upstream device of the MC-LAG, and the target device 140 is a device corresponding to the next hop of the MC-LAG, or is referred to as the downstream device of the MC-LAG.
[0031] The MAC address aging time is a parameter that affects the learning process of the switch. Each port in the switch has the function of automatically learning the address, and the source address (source MAC address, switch port number) of the frame sent and received through the port is stored in the address table. And in general, the aging time is set to 300 seconds by default. The MAC address will be deleted after reaching its aging time.
[0032] Flooding is a data flow transmission technology used by switches and bridges, which means sending the data received from a certain interface to all interfaces except that interface. The transmission device establishes the mapping of the source MAC address in the data frame of the received unicast data to the port of the flow transmission device, and writes it into the MAC address table. The transmission device compares the destination MAC address in the data frame with the established MAC address table to determine which port to forward. If the destination MAC address in the data frame reaches its aging time and is deleted from the MAC address table, when the transmission device receives known unicast data corresponding to the destination MAC address, the known unicast data becomes unknown unicast data, and the transmission device broadcasts the unknown unicast data to all downstream ports of the transmission device.
[0033] BUM (Broadcast, Unknown-unicast, Multicast) is a common type of traffic in networks, including broadcast data, unknown unicast data, and multicast data. In the configuration of related transmission devices such as switches, BUM data will be limited by default at a default rate. If the transmission speed of unknown unicast data exceeds the default rate, the switch may experience packet loss due to rate limiting. If rate limiting of BUM data is abandoned, other broadcast data, unknown unicast data, or multicast data may also be attacked, affecting normal data transmission.
[0034] Address drift is a network phenomenon that mainly involves changes in MAC addresses or IP addresses, which can cause network instability or configuration errors. This phenomenon can be caused by a variety of reasons, including but not limited to network device configuration errors, loop generation, network device failures, virtual machine migration, device hibernation and wake-up, etc. Taking virtual machine migration as an example, when a virtual machine is migrated from one physical host to another, the MAC address may change, forming address drift and affecting normal network communication. For example, device hibernation and wake-up, some devices may shut down the network interface in hibernation state, and reassign the MAC address after waking up, causing address drift.
[0035] As mentioned above, when any of the flow transmission devices in the MC-LAG receives the unicast data sent by the computer network 130, and the MAC address corresponding to the unicast data appears abnormal, such as being deleted, the MAC address corresponding to the unicast data cannot be queried in the MAC address table, and the unicast data becomes unknown unicast data. The transmission device with the abnormal MAC address will broadcast the unknown unicast data, and the unknown unicast data will be limited by default under the MC-LAG. When the unknown unicast data is broadcasted, the unknown unicast data is likely to be lost, and the data transmission between the transmission device and the target device 140 is unstable.
[0036] To at least solve the phenomenon that the unknown unicast data is lost by default, the embodiment of the present application provides a media access control address management method, a computer device, a computer readable storage medium and a computer program product. The media access control address management method will be introduced first.
[0037] Please refer to FIG. 2, which is a flowchart of a media access control address management method provided by the embodiment of the present application. The media access control address management method provided by the embodiment of the present application will be introduced first.
[0038] The media access control address management method provided by the embodiment of the present application can be applied to the first transmission device 110 in the MC-LAG, and the media access control address management method includes but is not limited to step 210.
[0039] In step 210, in response to the time interval between the target media access control address and its aging time being less than or equal to the preset time length, the aging time is extended to the first storage time length, and the first address state adjustment information is sent to the second transmission device 120 in the cross-device link aggregation group.
[0040] The first address state adjustment information is used to instruct the second transmission device 120 to adjust the address state of the target media access control address stored by the second transmission device 120 to a dynamic variable state.
[0041] The method for managing a media access control address provided by the embodiment of the application can, in response to a time interval from an aging time of a target MAC address being less than or equal to a preset time length, extend the aging time to a first storage time length, and send first address state adjustment information to a second transmission device in a cross-device link aggregation group to adjust a stored state of the target MAC address to a dynamic variable state. The first transmission device avoids immediate deletion of the target MAC address due to reaching the aging time, can still accurately query the MAC address corresponding to the received data after receiving the data, and will not cause the received data to become unknown unicast data and be rate-limited and dropped. Moreover, the address states of the target MAC addresses in the first transmission device and the second transmission device are both in the dynamic variable state, which is conducive to synchronous deletion of the target MAC addresses and avoids the situation of forming unknown unicast data and being rate-limited and dropped, thereby further improving the stability of data transmission between the traffic transmission device and the server side or the target device.
[0042] In step 210, the first transmission device 110 and the second transmission device 120 in the MC-LAG are connected through a Peerlink. The Peerlink can serve as a connection line for forming a data backup link between the first transmission device 110 and the second transmission device 120. The two ends of the connection line can be physical ports or logical ports. In the MC-LAG, the first transmission device 110 and the second transmission device 120 are in a neighbor relationship, and the information in the first transmission device 110 and the second transmission device 120 is synchronized with each other.
[0043] The target MAC address is a MAC address in the MAC address table of the first transmission device 110, which has a time interval from an aging time less than or equal to a preset time length. The time interval from the aging time of the MAC address less than or equal to the preset time length can indicate that the MAC address will reach its aging time. After the MAC address reaches its aging time, the MAC address will be deleted from the MAC address table.
[0044] The preset time length can be set according to actual needs. If the aging time of the target MAC address is taken as an example and is 300 seconds, the preset time length can be set to 100 seconds, 50 seconds, 10 seconds, 5 seconds, or 2 seconds. Then, when the target MAC address is 100 seconds, 50 seconds, 10 seconds, 5 seconds, or 2 seconds from its aging time, the first transmission device 110 will extend the aging time of the target MAC address and extend it to a first storage time length.
[0045] The first storage time length can be regarded as a new aging time obtained by extending the original aging time of the target MAC address. The first storage time length can be set according to actual needs, such as 100 seconds, 1000 seconds, etc., which is not limited here.
[0046] And, if the first transmission device 110 prolongs the aging time of the target MAC address, the target MAC address drifts, and in a short time, the target MAC address on the second transmission device 120 is still the static state MAC address synchronized from the first transmission device 110, and cannot quickly form a transmission link with the target device 140.
[0047] The first transmission device 110 also sends the first address state adjustment information to the second transmission device 120 in the case of prolonging the aging time of the target MAC address, so that the second transmission device 120 adjusts the address state of the target MAC address stored in the second transmission device 120 to a dynamic variable state in response to the first address state adjustment information.
[0048] When the target MAC address drifts from the first transmission device 110 to the second transmission device 120, the target MAC address in the dynamic variable state on the second transmission device 120 can be directly learned and updated, and then a transmission link is formed between the second transmission device 120 and the target device 140 based on the learned and updated target MAC address, so as to cope with the situation of packet loss caused by the drift of the target MAC address.
[0049] The embodiment prolongs the aging time of the target MAC address by the first transmission device 110, avoids the situation that the target MAC address is deleted immediately after reaching the aging time and cannot be queried to receive data corresponding to the target MAC address, so that the received data forms unknown unicast data and is limited to be lost. And, the address state of the target MAC address in the second transmission device 120 can be adjusted to a dynamic variable state, and then the situation of packet loss caused by the drift of the target MAC address can be avoided, and the stability of data transmission between the transmission device and the target device 140 such as a server is improved without changing the default speed limit of the BUM data.
[0050] In a possible implementation, please refer to FIG. 3, which is a flowchart of address state adjustment included in a media access control address management method provided by the embodiment of the application. After sending the first address state adjustment information to the second transmission device 120 in the cross-device link aggregation group, steps 310 to 320 are further included but not limited to.
[0051] In step 310, the second address state adjustment information sent by the second transmission device 120 is received, and the second address state adjustment information is sent by the target device 140 in a target situation. The target device 140 is a device corresponding to the next hop of the cross-device link aggregation group, and the target situation is that a transmission link is formed between the second transmission device 120 and the target device 140.
[0052] At step 320, the address state of the target media access control address is adjusted to a static state based on the second address state adjustment information.
[0053] In the above embodiment, the address state of the target MAC address in the second transmission device 120 has been adjusted to a dynamic variable state. The second transmission device 120 still needs to synchronize the MAC address information to the first transmission device 110. In this embodiment, the first transmission device 110 can be adjusted from the dynamic variable state to the static state based on the second state adjustment information sent by the second transmission device 120, so as to realize normal transmission of the received data.
[0054] It should be noted that the second transmission device 120 sends the second address state adjustment information to the first transmission device 110 only when the target device 140 is in a target situation. The target situation is that a transmission link is formed between the second transmission device 120 and the target device 140. The target situation can be that the second transmission device 120 receives data sent by the target device 140 within the aging time of the target MAC address of the second transmission device 120. The target device 140 can realize data transmission through the second transmission device 120 in the target situation, thereby reducing the probability of data packet loss.
[0055] In some embodiments, the first address state adjustment information and the second address state adjustment information in the above embodiment can be regarded as a state adjustment instruction. For example, the first transmission device 110 sends the first address state adjustment information to the second transmission device 120, and the first address state adjustment information can contain the state information of the target MAC address in the second transmission device 120 that needs to be adjusted.
[0056] In some embodiments, the first address state adjustment information and the second address state adjustment information in the above embodiment can be regarded as a state identifier. For example, the first transmission device 110 sends the first address state information to the second transmission device 120, and the first address state information records the address state of the target MAC address in the first transmission device 110, such as the dynamic variable state. After receiving the first address state information, the second transmission device 120 can determine how to adjust the address state of the target MAC address in the second transmission device 120 according to the first address state information.
[0057] In some embodiments, when the second transmission device 120 identifies that the first address state information used to represent the address state of the target MAC address is a dynamic variable state, the second transmission device 120 adjusts the address state of the target MAC address in the second transmission device 120 to a static state, i.e., to the opposite state of the dynamic variable state.
[0058] The first address state adjustment information and the second address state adjustment information in the above embodiments can include one or more of Arabic numerals, English letters, and punctuation characters, which will not be described one by one here.
[0059] The first transmission device 110 in the embodiment can adjust the address state of the target MAC address to the static state according to the second address state adjustment information issued by the second transmission device 120 after the transmission link is formed between the second transmission device 120 and the target device 140, so as to realize normal transmission of the received data.
[0060] In some embodiments, if the target MAC address of the target device 140 disappears and the target device 140 does not send packets to the first transmission device 110 and the second transmission device 120, the address state of the target MAC address in the first transmission device 110 and the second transmission device 120 is dynamically variable after the next aging time, and the target MAC address in the first transmission device 110 and the second transmission device 120 is deleted after the next aging time. The MAC addresses of the first transmission device 110, the second transmission device 120, and the target device 140 all disappear, and the unknown unicast data formed is limited in speed, which conforms to the normal state corresponding to the disappearance of the target MAC address of the target device 140.
[0061] In a possible implementation, a ratio between the extension duration and the aging time of the target MAC address is in a preset range, and the extension duration is a difference between the first storage duration and the time interval.
[0062] The first storage duration is greater than or equal to the second storage duration, and the second storage duration is a corresponding aging time after the second transmission device 120 adjusts the address state of the target MAC address stored by the second transmission device 120 to the dynamically variable state.
[0063] The preset range is greater than zero, and the delay duration of the first transmission device 110 can be greater than or less than the aging time of the target MAC address before the delay.
[0064] For example, if the extension duration set by the first transmission device 110 is too short, such as one fourth or one third of the ratio, the target MAC address will soon reach the first storage duration and be deleted, and in this case, the second transmission device 120 has not formed a transmission link with the target device 140, and the unknown unicast data will be lost and limited in speed again.
[0065] The embodiment combines the second storage duration corresponding to the dynamic variable state of the target MAC address in the second transmission device 120 to determine the extension duration of the target MAC address in the first transmission device 110, i.e., the first storage duration determined after the extension duration needs to be greater than or equal to the second storage duration. In this way, the situation that unknown unicast data in the first transmission device 110 is limited and lost again can be avoided before the second transmission device 120 forms a transmission link with the target device 140 in a short time.
[0066] In some embodiments, the extension duration in the above embodiment can be an aging time of the target MAC address.
[0067] In a possible implementation, after the aging time is extended to the first storage duration, the method further includes: in the case where the first storage duration is reached, adjusting the aging mark bit corresponding to the target MAC address in the target MAC address table from the first identifier to the second identifier; wherein the first identifier is used to indicate that the first transmission device 110 does not process the target MAC address in the case where the first transmission device 110 scans the target MAC address, and the second identifier is used to indicate that the target MAC address is deleted in the case where the first transmission device 110 scans the target MAC address, and the target MAC address is stored in the target MAC address table.
[0068] For example, the embodiment adjusts the first identifier to the second identifier only in the case where the first storage duration is reached. In this way, the aging mark bit corresponding to the aging time of the target MAC address is in the second identifier, and the first transmission device 110 deletes the target MAC address when scanning the target MAC address. The embodiment can extend the aging time of the target MAC address by controlling the aging mark bit corresponding to the aging time of the target MAC address, and improves the accuracy of extending the aging time.
[0069] Since the aging time of the target MAC address is extended to the first storage duration, the aging mark bit corresponding to the target MAC address is not adjusted in the case where the original aging time of the target MAC address is reached, but is updated and adjusted in the case where the first storage duration after the extension is reached.
[0070] In some embodiments, the first transmission device 110 includes a timer, and the MAC address in the target MAC address table can be scanned by the timer at a preset time interval.
[0071] The application further provides a management method of a media access control address, which can be applied to the second transmission device 120 in the MC-LAG. Referring to FIG. 4, which is a flowchart of a management method of a media access control address applied to the second transmission device 120 in the MC-LAG according to an embodiment of the application, the management method of the media access control address includes but is not limited to step 410.
[0072] In step 410, the address state of the target media access control address stored by the second transmission device 120 is adjusted to a dynamic variable state in response to the first address state adjustment information sent by the first transmission device 110 in the cross-device link aggregation group.
[0073] In the case that the first address state adjustment information is sent by the first transmission device 110 when the aging time of the target media access control address is extended to the first storage duration, the target media access control address is the media access control address in the first transmission device 110 whose time interval from the aging time is less than or equal to the preset duration.
[0074] The management method of the media access control address provided by the embodiment of the application can adjust the address state of the target media access control address stored by the second transmission device to a dynamic variable state in response to the first address state adjustment information sent by the first transmission device in the cross-device link aggregation group. When the target MAC address is drifted from the first transmission device to the second transmission device, the target MAC address in the dynamic variable state can be directly learned and updated, and then a transmission link is formed between the second transmission device and the target device based on the learned and updated target MAC address, so as to avoid the situation that the target MAC address drift causes packet loss.
[0075] The first address state adjustment information can refer to the introduction of the first address state adjustment information in the foregoing embodiments, which will not be described herein again.
[0076] In a possible implementation, after the address state of the target media access control address stored by the second transmission device 120 is adjusted to the dynamic variable state, the method further includes: in the case that the transmission data sent by the target device 140 is received within the target aging time of the second transmission device 120, a transmission link is established between the second transmission device 120 and the target device 140, wherein the target aging time is the aging time corresponding to the target media access control address of the second transmission device 120 after the address state of the target media access control address is updated to the dynamic variable address; and the second address state adjustment information is sent to the first transmission device 110, and the second address state adjustment information is used to instruct the first transmission device 110 to adjust the address state of the target media access control address to the static state.
[0077] The second transmission device 120 in the embodiment adjusts the address state of the target MAC address in the first transmission device 110 to the static state through the second address state adjustment information, and realizes normal transmission of the received data by forming a transmission link with the target device 140 within the target aging time.
[0078] The second address state adjustment information can refer to the introduction of the first address state adjustment information in the foregoing embodiments, and details are not described herein.
[0079] In a possible implementation, in a case where the transmission data sent by the target device 140 is received, the transmission link with the target device 140 is established, including: learning and updating the target media access control address of the second transmission device 120 in response to the transmission data, and establishing the transmission link with the target device 140 according to the target media access control address.
[0080] For example, the second transmission device 120 can learn and update the target MAC address in response to the transmission data sent by the target device 140, and then form a transmission link with the target device 140 based on the learned and updated MAC address, to realize normal and stable transmission of data.
[0081] Please refer to FIG. 5, which is a networking topology diagram involved in a media access control address management method provided by the embodiment of the application. In the diagram, B1 is a downlink port of the first transmission device 110, B2 is an uplink port of the first transmission device 110, A1 is a downlink port of the second transmission device 120, and A2 is an uplink port of the second transmission device 120. A1 and B1 form a downlink MC-LAG port. In a normal working condition, the first transmission device 110 and the second transmission device 120 realize normal transmission of data through the respective corresponding ports.
[0082] Corresponding to the method embodiments, the embodiment of the application further provides a media access control address management system. Please refer to FIG. 6, which is a functional module diagram of a media access control address management system applied to a first transmission device in MC-LAG. The media access control address management system 600 includes a response module 610 configured to, in response to a time interval between a target media access control address and its aging time being less than or equal to a preset time length, extend the aging time to a first storage time length, and send first address state adjustment information to a second transmission device in a cross-device link aggregation group.
[0083] The first address state adjustment information is used to instruct the second transmission device 120 to adjust the address state of the stored target media access control address to a dynamic variable state.
[0084] The media access control address management system 600 provided by the embodiments of the present application can realize the various processes of the method embodiments shown in FIG. 2, and achieve similar or the same technical effects. To avoid repetition, details are not described herein.
[0085] Corresponding to the method embodiments described above, the embodiments of the present application also provide a media access control address management system. Please refer to FIG. 7, which is a functional module diagram of a media access control address management system applied to a first transmission device in an MC-LAG. The media access control address management system 700 includes a response module 710, configured to adjust the address state of a target media access control address stored by a second transmission device 120 to a dynamic variable state in response to first address state adjustment information sent by the first transmission device 110 in the cross-device link aggregation group.
[0086] The first address state adjustment information is sent by the first transmission device 110 in a case where the aging time of the target media access control address is extended to a first storage duration, and the target media access control address is a media access control address in the first transmission device 110 whose time interval from the aging time is less than or equal to a preset duration.
[0087] The media access control address management system 700 provided by the embodiments of the present application can realize the various processes of the method embodiments shown in FIG. 4, and achieve similar or the same technical effects. To avoid repetition, details are not described herein.
[0088] The embodiments of the present application also provide an electronic device. Please refer to FIG. 8, which is an internal structure diagram of an electronic device provided by the embodiments of the present application. The electronic device 800 includes a processor 820, a memory 830 and a network interface 840 connected through a system bus 810. The memory includes a non-volatile storage medium 8310 and an internal memory 8320. The non-volatile storage medium 8310 of the electronic device 800 stores an operating system 8311, and can also store a computer program. When the computer program is executed by the processor 820, the processor 820 can implement the media access control address management method applied to the electronic device 800 in the above embodiments. The internal memory 8320 can also store a computer program. When the computer program is executed by the processor 820, the processor 820 can execute the media access control address management method. Those skilled in the art can understand that the structure shown in FIG. 8 is only a block diagram of part of the structure related to the scheme of the present application, and does not limit the electronic device 800 to which the scheme of the present application is applied. Specifically, the electronic device 800 can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0089] The embodiment of the application further discloses a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, the management method of the media access control address is realized.
[0090] The embodiment of the application provides a computer program product, which is stored in a storage medium. The computer program product is executed by at least one processor to realize each process of the embodiment of the management method of the media access control address, and achieve similar or same technical effects. To avoid repetition, details are not described herein.
[0091] The management method of the media access control address provided by the embodiment of the application can extend the aging time to the first storage time length and send the first address state adjustment information to the second transmission device in the cross-device link aggregation group to adjust the address state of the target media access control address stored by the second transmission device to the dynamic variable state, in response to the time interval between the target media access control address and the aging time being less than or equal to the preset time length. Through the first transmission device extending the aging time and updating the address state of the target media access control address, the management of the target media access control address is realized, the situation that data is received but the MAC address corresponding to the data cannot be queried, unknown unicast data is formed, and the data is defaulted to be limited in speed to cause packet loss is avoided, the probability of packet loss is reduced, and the stability of the traffic transmission between the traffic transmission device and the server side or the target device is improved.
[0092] Those of ordinary skill in the art will realize and understand that all or some of the steps in the methods disclosed above and the functional modules / units in the systems and devices can be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component can have multiple functions, or one function or step can be performed by several physical components in cooperation. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on computer-readable media, which can include computer-readable storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer-readable storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. Computer-readable storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and that can be accessed by a computer. Furthermore, it is well known to those of ordinary skill in the art that communication media typically embodies computer-readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and can include any information delivery media.
[0093] The technical features of the above embodiments can be combined in any manner. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described, however, as long as the combinations of the technical features do not result in contradictions, they should be considered within the scope of the present disclosure.
Claims
1. A method for managing a media access control address, applied to a first transmission device in a cross-device link aggregation group, comprising: in response to a time interval from a target media access control address to its aging time being less than or equal to a preset time length, extending the aging time to a first storage time length, and sending first address state adjustment information to a second transmission device in the cross-device link aggregation group; wherein the first address state adjustment information is used to instruct the second transmission device to adjust an address state of a target media access control address stored by the second transmission device to a dynamic variable state.
2. The method of claim 1, wherein, after the sending of the first address state adjustment information to the second transmission device in the cross-device link aggregation group, further comprising: receiving second address state adjustment information sent by the second transmission device, the second address state adjustment information being sent by a target device in a target situation, the target device being a device corresponding to a next hop of the cross-device link aggregation group, and the target situation being that a transmission link is formed between the second transmission device and the target device; based on the second address state adjustment information, adjusting the address state of the target media access control address to a static state.
3. The method of claim 1, wherein, a ratio between an extension time length and the aging time of the target media access control address is in a preset range, the extension time length being a difference between the first storage time length and the time interval; the first storage time length is greater than or equal to a second storage time length, wherein the second storage time length is a corresponding aging time after the second transmission device adjusts the address state of a target media access control address stored by the second transmission device to a dynamic variable state.
4. The method of claim 1, wherein, after the extending of the aging time to the first storage time length, further comprising: in a situation of reaching the first storage time length, adjusting an aging mark bit corresponding to the target media access control address in a target media access control address table from a first identifier to a second identifier; wherein the first identifier is used to instruct the first transmission device not to process the target media access control address in a situation of scanning the target media access control address, and the second identifier is used to instruct the first transmission device to delete the target media access control address in a situation of scanning the target media access control address, the target media access control address being stored in the target media access control address table. 5.A method for managing a media access control address, applied to a second transmission device in a cross-device link aggregation group, comprising: in response to first address state adjustment information sent by a first transmission device in the cross-device link aggregation group, adjusting an address state of a target media access control address stored by the second transmission device to a dynamic variable state; wherein the first address state adjustment information is sent by the first transmission device in a situation of extending an aging time of a target media access control address to a first storage time length, and the target media access control address is a media access control address in the first transmission device with a time interval from the aging time being less than or equal to a preset time length.
6. The method of claim 5, wherein, After the address state of the target media access control address stored by the second transmission device is adjusted to a dynamic variable state, the method further comprises: In a case where transmission data sent by the target device is received within a target aging time of the second transmission device, a transmission link is established with the target device, wherein the target aging time is a corresponding aging time after the address state of the target media access control address of the second transmission device is updated to a dynamic variable address; Second address state adjustment information is sent to the first transmission device, the second address state adjustment information being used to instruct the first transmission device to adjust the address state of its target media access control address to a static state.
7. The method of claim 6, wherein, In the case where the transmission data sent by the target device is received, the transmission link is established with the target device, comprising: In response to the transmission data, the target media access control address of the second transmission device is learned and updated, and a transmission link is established with the target device according to the target media access control address.
8. An electronic device, comprising: The electronic device comprises a memory and a processor, the memory storing a computer program, the computer program being implemented when executed by the processor to realize: The management method of the media access control address according to any one of claims 1-4: or, The management method of the media access control address according to any one of claims 5-7.
9. A computer readable storage medium, wherein, The computer readable storage medium stores a computer program, the computer program being implemented when executed by one or more processors to realize: The management method of the media access control address according to any one of claims 1-4: or, The management method of the media access control address according to any one of claims 5-7.
10. A computer program product, wherein, The computer program is executed by the processor to realize: The management method of the media access control address according to any one of claims 1-4: or, The management method of the media access control address according to any one of claims 5-7.
Citation Information
Patent Citations
Device and method for optimizing ARP aging mechanism
CN104579718A
Non-aging method and device for dynamic address as well as medium
CN107707690A
Media access control address management method and device, medium and product
CN118474022A
Clearing forwarding entries dynamically and ensuring consistency of tables across ethernet fabric switch
US20130003729A1