MAC address aging processing method, device, LPU card and storage medium
By synchronizing the MAC address aging information in the LPU card of the distributed device and deciding the deletion operation based on the hit mark information, the problem of traffic flooding and packet loss in the aging processing of the MAC address learned by the aggregate link is solved, and a higher efficiency is achieved. Reliability and bandwidth utilization.
Patent Information
- Application Number
- CN202310121834.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-14
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2043-02-14
AI Technical Summary
In data centers, the aging processing method of MAC addresses learned based on aggregated links leads to traffic flooding and packet loss. Existing technologies cannot effectively avoid packet loss.
By synchronizing the MAC address aging information learned by the aggregated link in the LPU card of the distributed device, and deciding whether to dynamically delete the MAC address based on the hit mark information of other LPU cards, this avoids traffic flooding caused by direct deletion.
It effectively avoids traffic flooding and packet loss of distributed devices, ensuring the reliability and bandwidth utilization of MAC address aging processing in the data center.
Smart Images

Figure CN116055455B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data communication, and in particular to a MAC address aging processing method, device, LPU card and storage medium. Background Art
[0002] The aging of a MAC (Media Access Control) address means that if a device does not receive a message with the learned MAC address as the source MAC within a certain period of time, the device will consider the MAC table entry to be invalid and delete the table entry information of the MAC address. The device will re-learn the MAC address the next time it receives a message.
[0003] With the rapid development of data centers, the bandwidth of single-port links can no longer meet the needs of use. Aggregate links can bind multiple single-port links together to increase bandwidth and improve link reliability. The aging processing method for MAC addresses learned based on aggregate links is to delete first and then restore. That is, after the device receives the address aging information for the MAC address, it directly deletes the MAC address and informs other devices. After receiving the learning information about the MAC address sent by other devices, it re-learns the MAC address. Before the MAC address is restored, the traffic forwarded by the device will be flooded, which requires more bandwidth. Since the bandwidth of the aggregate link is limited, the bandwidth of the flooded traffic is usually limited, that is, packet loss will occur. Summary of the invention
[0004] In order to overcome the deficiencies of the prior art, embodiments of the present invention provide a MAC address aging processing method, device, LPU card and storage medium.
[0005] The technical solution of the embodiment of the present invention can be implemented as follows:
[0006] In a first aspect, an embodiment of the present invention provides a MAC address aging processing method, which is applied to an LPU card in a distributed device, wherein the distributed device further includes a switching chip, and the LPU card is communicatively connected to the switching chip. The method includes:
[0007] If it is a source LPU card and receives the address aging information of the preset MAC address learned by the aggregated link of the distributed device sent by the switching chip, the address aging information is synchronized to other LPU cards in the distributed device, so that other LPU cards in the distributed device query the hit mark according to the preset MAC address;
[0008] According to the hit mark information returned by other LPU cards in the distributed device, it is determined whether to delete the preset MAC address written by the switching chip in a dynamic aging manner.
[0009] Optionally, the step of determining whether to delete the preset MAC address written by the switching chip in a dynamic aging manner from the switching chip according to the hit mark information returned by other LPU cards in the distributed device includes:
[0010] If the hit mark information returned by other LPU cards in the distributed device meets the preset deletion condition, the preset MAC address written by itself in a dynamic aging manner will be deleted from the switching chip.
[0011] Optionally, the method further comprises:
[0012] Send an address deletion instruction to other LPU cards in the distributed device, so that other LPU cards in the distributed device delete the preset MAC address written into the switching chip in a dynamic non-aging manner from the switching chip.
[0013] Optionally, the step of determining whether to delete the preset MAC address written by the switching chip in a dynamic aging manner according to the hit mark information returned by other LPU cards in the distributed device further includes:
[0014] If the hit mark information returned by other LPU cards in the distributed device does not meet the preset deletion condition, a new source LPU card is determined from the other LPU cards in the distributed device according to the hit mark information returned by other LPU cards in the distributed device, and an address update instruction is sent to the new source LPU card, so that the new source LPU card rewrites the preset MAC address into the switching chip in a dynamic aging manner.
[0015] Optionally, the method further comprises:
[0016] According to the update synchronization instruction sent by the new source LPU card, the source LPU card information recorded in the local table is modified so that the card itself is no longer used as the source LPU card;
[0017] The preset MAC address is rewritten into the switching chip in a dynamic and non-aging manner.
[0018] Optionally, the method further comprises:
[0019] If the card itself is not a source LPU card and receives address aging information for a preset MAC address sent by the current source LPU card in the distributed device, query whether the card itself has received a message carrying the preset MAC address;
[0020] According to the query result, hit mark information is generated, and the hit mark information is returned to the current source LPU card.
[0021] In a second aspect, an embodiment of the present invention provides a MAC address aging processing device, which is applied to an LPU card in a distributed device, wherein the distributed device further includes a switching chip, the LPU card is communicatively connected to the switching chip, and the device includes:
[0022] A synchronization module, configured to synchronize the address aging information to other LPU cards in the distributed device if the LPU card is a source LPU card and receives address aging information of a preset MAC address learned by the aggregated link of the distributed device sent by the switching chip, so that the other LPU cards in the distributed device query the hit mark according to the preset MAC address;
[0023] The processing module is used to determine whether to delete the preset MAC address written by the LPU card in a dynamic aging manner from the switching chip according to the hit mark information returned by other LPU cards in the distributed device.
[0024] In a third aspect, an embodiment of the present invention provides an LPU card, wherein the LPU card includes a logic device, wherein the logic device is burned with a computer program, and when the computer program is executed, the MAC address aging processing method as described in the first aspect is implemented.
[0025] In a fourth aspect, the present invention provides a distributed device, comprising a switching chip and a plurality of LPU cards as described in the third aspect.
[0026] In a fifth aspect, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the MAC address aging processing method as described in the first aspect above.
[0027] Compared with the prior art, the embodiment of the present invention provides a MAC address aging processing method for an LPU card in a distributed device. First, if the LPU card itself is a source LPU card and receives the address aging information of the preset MAC address learned by the aggregated link of the distributed device sent by the switching chip, the address aging information is synchronized to other LPU cards in the distributed device, so that the other LPU cards in the distributed device query the hit mark according to the preset MAC address; then, according to the hit mark information returned by the other LPU cards in the distributed device, it is determined whether to delete the preset MAC address written by itself in a dynamic aging manner from the switching chip. Since the embodiment of the present invention synchronizes the address aging information of the preset MAC address learned by the aggregated link of the distributed device sent by the switching chip to other LPU cards through the source LPU card, it is determined whether to delete the preset MAC address written by itself in a dynamic aging manner from the switching chip according to the hit mark information returned by the other LPU cards according to the preset MAC address query hit mark, thereby avoiding the direct deletion of the preset MAC address from the switching chip, which causes traffic flooding in the distributed device, and thus avoids packet loss. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0029] Figure 1 A schematic diagram of the structure of a distributed device provided by an embodiment of the present invention;
[0030] Figure 2 A schematic diagram of a MAC address aging processing method provided by an embodiment of the present invention Figure 1 ;
[0031] Figure 3 A schematic diagram of a MAC address aging processing method provided by an embodiment of the present invention Figure 2 ;
[0032] Figure 4 A schematic diagram of a MAC address aging processing method provided by an embodiment of the present invention Figure 3 ;
[0033] Figure 5 An example diagram of MAC address aging processing provided by an embodiment of the present invention;
[0034] Figure 6A functional unit block diagram of a MAC address aging processing device provided by an embodiment of the present invention.
[0035] Icon: 100-MAC address aging processing device; 101-synchronization module; 102-processing module. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0037] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0039] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.
[0040] MAC address is the identifier for identifying LAN (Local Area Network) nodes. MAC address is globally unique to a device. In layer 2 switching devices, MAC address is mainly used to guide the forwarding of known data, so ensuring the stability of MAC address is a basic function that must be implemented on the device.
[0041] With the rapid development of data centers, the bandwidth of single-port links can no longer meet usage requirements. Aggregate links can bind multiple single-port links together, increasing bandwidth and improving link reliability. Understandably, the MAC addresses learned based on aggregate links also need to ensure the correct handling of MAC address aging in order to effectively reflect the reliability of the link.
[0042] MAC address aging means that if the entire device does not receive a message with the learned MAC address as the source MAC within a certain period of time, the device considers that the entry information of the MAC address has expired, and the device will delete the entry information of the MAC address and re-learn the MAC address when it receives a message next time.
[0043] In data center scenarios, aggregated links are widely used to improve link reliability. When traffic migrates between aggregated member ports, the stability of the address will affect the reliability of the link and bandwidth consumption under big data. The current aging processing solution for aggregated link MAC address learning is: after the device receives the aging information, it directly deletes the table entry information of the relevant MAC address and sends a notification. Other devices that receive the MAC address message send learning information. The table entry information of the MAC address will be restored only after the device receives the learning information.
[0044] That is to say, the existing aging processing method for MAC addresses learned based on aggregated links is "delete first and then restore". Before the MAC address is restored, the traffic forwarded by the device will be flooded, which requires more bandwidth. Since the bandwidth of the aggregated link is limited, the bandwidth of the flooded traffic is usually limited, that is, packet loss will occur.
[0045] Since data centers have strict requirements on packet loss, usually requiring zero packet loss, an embodiment of the present invention proposes a MAC address aging processing method, which will be described in detail below.
[0046] The MAC address aging processing method proposed in the embodiment of the present invention is applied in the following situations: Figure 1 Any LPU card in the distributed device shown.
[0047] like Figure 1 As shown, there are multiple LPU (Line Processing Unit) cards on a distributed device, for example, LPU card 1, LPU card 2, ..., LPU card n, and there is also an aggregate link port L on the distributed device. The aggregate link port L includes multiple member ports, which can be ports of LPU card 1, LPU card 2, ..., LPU card n. For example, the member ports of the aggregate link port L include port A of LPU card 1, port B of LPU card 2, and port C of LPU card 3.
[0048] In the embodiment of the present invention, among the multiple LPU cards on the distributed device, only the source LPU card writes the MAC address learned for the aggregated link of the distributed device into the switching chip ( Figure 1 ), while other LPU cards write the MAC addresses learned from the aggregated links of the distributed devices into the switching chips in the distributed devices in a dynamic and non-aging manner.
[0049] Please refer to Figure 2 The MAC address aging processing method includes steps S101 to S102.
[0050] S101, if it is a source LPU card and receives the address aging information of the preset MAC address learned by the aggregated link of the distributed device sent by the switching chip, the address aging information is synchronized to other LPU cards in the distributed device, so that other LPU cards in the distributed device query the hit mark according to the preset MAC address.
[0051] It can be understood that only the source LPU card in the distributed device writes the preset MAC address learned for the aggregated link of the distributed device into the switching chip in a dynamic aging manner, which means that after reaching the aging detection cycle, if the switching chip detects that the MAC address has aged, it will send the corresponding address aging information to the source LPU card.
[0052] Other LPU cards use a dynamic non-aging method to write the preset MAC address learned for the aggregated link of distributed devices into the switching chip, which means that the preset MAC address will not be aged on the switching chip, and the address aging information can only be synchronized to other LPU cards by the source LPU card.
[0053] In an embodiment of the present invention, there are two possible situations that cause the switching chip to report the address aging information for the preset MAC address to the source LPU card. One is that the distributed device does not receive a message with the preset MAC address as the source MAC, and the other is that the distributed device receives a message with the preset MAC address as the source MAC, but the traffic within the distributed device has been migrated from the source LPU card to other LPU cards.
[0054] Therefore, for the latter case, other LPU cards need to query according to the preset MAC address whether there is a message hit that enters the distributed device through the aggregated link and the source MAC is the preset MAC address, and generate hit mark information according to the query result, and then return it to the source LPU card.
[0055] S102: Determine whether to delete the preset MAC address written by the switching chip in a dynamic aging manner according to the hit mark information returned by other LPU cards in the distributed device.
[0056] Please refer to Figure 3 , step S102 may include sub-steps S102-1 to S102-2.
[0057] S102-1, if the hit mark information returned by other LPU cards in the distributed device meets the preset deletion condition, the preset MAC address written by itself in a dynamic aging manner will be deleted from the switching chip.
[0058] The preset deletion condition refers to that the hit mark information returned by other LPU cards shows that there is no hit message whose source MAC is the preset MAC address.
[0059] It can be understood that when the hit mark information returned by other LPU cards meets the preset deletion condition, it means that the reason why the switching chip reports the address aging information for the preset MAC address to the source LPU card is that the distributed device has not received the message with the preset MAC address as the source MAC, rather than that the traffic within the distributed device has migrated from the source LPU card to other LPU cards.
[0060] S102-2, sending an address deletion instruction to other LPU cards in the distributed device, so that other LPU cards in the distributed device delete the preset MAC address written into the switch chip in a dynamic non-aging manner from the switch chip.
[0061] In the embodiment of the present invention, the distributed device does not receive a message with the preset MAC address as the source MAC, and the traffic within the distributed device is not migrated from the source LPU card to other LPU cards. Therefore, when the source LPU card deletes the preset MAC address from the switching chip, it also needs to send an address deletion instruction to other LPU cards so that other LPU cards also delete the preset MAC address from the switching chip.
[0062] Please refer again Figure 3 , step S102 may include sub-steps S102-3 to S102-5 in parallel with sub-steps S102-1 to S102-2.
[0063] S102-3, if the hit mark information returned by other LPU cards in the distributed device does not meet the preset deletion condition, a new source LPU card is determined from the other LPU cards in the distributed device according to the hit mark information returned by other LPU cards in the distributed device, and an address update instruction is sent to the new source LPU card, so that the new source LPU card rewrites the preset MAC address into the switching chip in a dynamic aging manner.
[0064] It can be understood that when the hit mark information returned by other LPU cards does not meet the preset deletion conditions, it means that the reason why the switching chip reports the address aging information for the preset MAC address to the source LPU card is that the traffic within the distributed device has migrated from the source LPU card to other LPU cards, while the distributed device is actually still receiving messages with the preset MAC address as the source MAC.
[0065] In the embodiment of the present invention, when the traffic in the distributed device migrates from the current source LPU card to another LPU card, it is necessary to re-determine a new source LPU card.
[0066] In the embodiment of the present invention, there may be only one message whose source MAC hit by other LPU card is the preset MAC address, or there may be multiple messages whose source MAC hit by other LPU cards is the preset MAC address at the same time.
[0067] For the former case, the LPU card can be directly determined as a new source LPU card, while for the latter case, a new source LPU card needs to be determined from these LPU cards.
[0068] As a possible implementation, each LPU card in the distributed device may be assigned a number in advance, and the current source LPU card uses the LPU card with the smallest or largest number among other LPU cards that hit the message whose source MAC is the preset MAC address as the new source LPU card.
[0069] As another possible implementation manner, other LPU cards with the largest number of messages whose source MAC hits the preset MAC address may be determined as new source LPU cards.
[0070] Since only the source LPU card in the distributed device writes the preset MAC address into the switch chip in a dynamic aging manner, after a new source LPU card is determined, the new source LPU card needs to rewrite the preset MAC address into the switch chip in a dynamic aging manner.
[0071] S102-4: According to the update synchronization instruction sent by the new source LPU card, modify the source LPU card information recorded in the local table entry so that the card itself is no longer used as the source LPU card.
[0072] S102-5, rewrite the preset MAC address into the switch chip in a dynamic non-aging manner.
[0073] In the embodiment of the present invention, the new source LPU card sends an update synchronization instruction to other LPU cards, so that other LPU cards know that it is the new source LPU card, and at the same time triggers the original source LPU card to rewrite the preset MAC address into the switch chip in a dynamic and non-aging manner.
[0074] Please refer to Figure 4 The MAC address aging processing method also includes steps S103 to S104 in parallel with steps S101 to S102.
[0075] S103: If the card itself is not a source LPU card and receives address aging information for a preset MAC address sent by the current source LPU card in the distributed device, query whether the card itself has received a message carrying the preset MAC address.
[0076] In the embodiment of the present invention, after receiving the address aging information sent by the current source LPU card, other LPU cards query the source MAC of the received messages within a certain time range.
[0077] As a possible implementation method, within the set time range, as long as a message carrying the preset MAC address as the source MAC is found, the query is stopped and the query result is "hit message". If no message carrying the preset MAC address as the source MAC is found within the set time range, the query result is "missed message".
[0078] As another possible implementation, the number of messages carrying a preset MAC address as the source MAC that is queried within a set time range may be used as the query result.
[0079] S104: Generate hit mark information according to the query result, and return the hit mark information to the current source LPU card.
[0080] As a possible implementation, the hit mark information may be a value reflecting different query results. For example, when the query result is "hit message", the hit mark information is 1, and when the query result is "miss message", the hit mark information is 0.
[0081] As another possible implementation manner, when the query result is the number of packets whose source MAC is a preset MAC address, the query result can be directly used as hit mark information.
[0082] The following examples will be used to further illustrate the above method provided by the embodiment of the present invention.
[0083] like Figure 5 As shown, it is assumed that there are 4 LPU cards on a distributed device, namely LPU card 1, LPU card 2, LPU card 3 and LPU card 4. There is an aggregate link port L on the distributed device. L has three member ports, namely port A of LPU card 1, port B of LPU card 2 and port C of LPU card 3.
[0084] When the traffic entering the distributed device through the aggregated link is received by port A on LPU card 1 after a decision is made at L, and the source MAC carried by the message is MAC1, and port B and port C do not receive the message with source MAC as MAC1, then LPU card 1 learns address MAC1 and synchronizes it to other LPU cards.
[0085] LPU card 1 writes MAC1 into the switch chip in a dynamic aging manner, while LPU card 2, LPU card 3 and LPU card 4 write MAC1 into the switch chip in a dynamic non-aging manner.
[0086] If the distributed device does not receive a message with MAC1 as the source MAC within a certain time range, the switching chip will report the address aging information for MAC1 to LPU card 1, and LPU card 1 will synchronize the address aging information for MAC1 to LPU card 2, LPU card 3 and LPU card 4.
[0087] After receiving the address aging information for MAC1, LPU card 2, LPU card 3 and LPU card 4 all check whether there is a message hit that enters the distributed device through the aggregated link and carries the source MAC MAC MAC1, and determine whether the traffic of the distributed device is migrated to themselves.
[0088] LPU card 2 , LPU card 3 and LPU card 4 generate hit mark information according to the query result, and return it to LPU card 1 .
[0089] If the hit mark information returned by LPU card 1 from LPU card 2, LPU card 3 and LPU card 4 meets the preset deletion condition, the MAC1 address written into the switching chip will be deleted, and LPU card 2, LPU card 3 and LPU card 4 will be notified to delete the MAC1 address written into the switching chip.
[0090] If LPU card 1 receives hit mark information returned by LPU card 2, LPU card 3 and LPU card 4, and the hit mark information of LPU card 2 shows that its hit source MAC is a message with a preset MAC address, LPU card 1 determines that LPU card 2 is a new source LPU card.
[0091] LPU card 2 rewrites MAC1 into the switching chip in a dynamic aging manner, LPU card 1 rewrites MAC1 into the switching chip in a dynamic non-aging manner, and LPU card 3 and LPU card 4 update the source LPU card information record, thereby realizing the change of the source LPU card in the distributed device.
[0092] Compared with the prior art, the beneficial effect of the embodiments of the present invention is that only the source LPU card in the distributed device writes the MAC address learned based on the aggregated link into the switching chip in a dynamic aging manner, and other LPU cards write the MAC address into the switching chip in a dynamic non-aging manner, so that only the source LPU card can receive the address aging information sent by the switching chip. The source LPU card then synchronizes the address aging information to other LPU cards to determine whether the traffic in the distributed device has migrated, thereby avoiding direct deletion of the MAC address and causing traffic flooding in the distributed device, thereby avoiding packet loss.
[0093] In order to execute the corresponding steps in the above method embodiment and each possible implementation mode, an implementation mode of a MAC address aging processing device 100 applied to any LPU card in a distributed device is respectively given below.
[0094] Please refer to Figure 6 The MAC address aging processing device 100 includes a synchronization module 101 and a processing module 102 .
[0095] The synchronization module 101 is used to synchronize the address aging information to other LPU cards in the distributed device if the LPU card is a source LPU card and receives the address aging information of the preset MAC address learned by the aggregated link of the distributed device sent by the switching chip, so that the other LPU cards in the distributed device query the hit mark according to the preset MAC address.
[0096] The processing module 102 is used to determine whether to delete the preset MAC address written by the LPU card in a dynamic aging manner from the switching chip according to the hit mark information returned by other LPU cards in the distributed device.
[0097] Optionally, when the processing module 102 is used to determine whether to delete the preset MAC address written by the LPU card in a dynamic aging manner from the switching chip based on the hit mark information returned by other LPU cards in the distributed device, it is specifically used to delete the preset MAC address written by the LPU card in a dynamic aging manner from the switching chip if the hit mark information returned by other LPU cards in the distributed device meets the preset deletion condition; and send an address deletion instruction to other LPU cards in the distributed device, so that other LPU cards in the distributed device will delete the MAC address written to the switching chip in a dynamic non-aging manner from the switching chip.
[0098] Optionally, when the processing module 102 is used to determine whether to delete the preset MAC address written by the LPU card in a dynamic aging manner from the switching chip according to the hit mark information returned by other LPU cards in the distributed device, the processing module 102 is also specifically used to, if the hit mark information returned by other LPU cards in the distributed device does not meet the preset deletion condition, determine a new source LPU card from other LPU cards in the distributed device according to the hit mark information returned by other LPU cards in the distributed device, and send an address update instruction to the new source LPU card so that the new source LPU card rewrites the preset MAC address into the switching chip in a dynamic aging manner; modify the source LPU card information recorded in the local table entry according to the update synchronization instruction sent by the new source LPU card so that the LPU card is no longer used as the source LPU card; and rewrite the preset MAC address into the switching chip in a dynamic non-aging manner.
[0099] Optionally, the processing module 102 is also used to query whether the LPU card has received a message carrying the preset MAC address if the LPU card is not a source LPU card and receives address aging information for the preset MAC address sent by the current source LPU card in the distributed device; generate hit mark information based on the query result, and return the hit mark information to the current source LPU card.
[0100] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the MAC address aging processing device 100 described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0101] Furthermore, an embodiment of the present invention also provides an LPU card, which may include a logic device, and the logic device is burned with a computer program, which, when executed, may be used to perform relevant operations in the MAC address aging processing method provided in the above method embodiment.
[0102] The embodiment of the present invention further provides a computer-readable storage medium containing a computer program. When the computer program is executed, it can be used to perform the relevant operations in the MAC address aging processing method provided by the above method embodiment.
[0103] In summary, the embodiment of the present invention provides a MAC address aging processing method, device, equipment and storage medium. First, if it is a source LPU card and receives the address aging information of the preset MAC address learned by the aggregated link of the distributed device sent by the switching chip, the address aging information is synchronized to other LPU cards in the distributed device, so that the other LPU cards in the distributed device query the hit mark according to the preset MAC address; then, according to the hit mark information returned by the other LPU cards in the distributed device, it is determined whether to delete the preset MAC address written by itself in a dynamic aging manner from the switching chip. Because the embodiment of the present invention synchronizes the address aging information of the preset MAC address learned by the aggregated link of the distributed device sent by the switching chip to other LPU cards through the source LPU card, it is determined whether to delete the preset MAC address written by itself in a dynamic aging manner from the switching chip according to the hit mark information returned by the other LPU cards according to the preset MAC address query hit mark, thereby avoiding the direct deletion of the preset MAC address from the switching chip, which causes traffic flooding in the distributed device, and thus avoids packet loss.
[0104] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A MAC address aging processing method, characterized in that: An LPU card applied to a distributed device, wherein the distributed device further comprises a switching chip, the LPU card is communicatively connected with the switching chip, and the method comprises: If it is a source LPU card and receives the address aging information of the preset MAC address learned by the aggregated link of the distributed device sent by the switching chip, the address aging information is synchronized to other LPU cards in the distributed device, so that other LPU cards in the distributed device query according to the preset MAC address whether there is a message hit that enters the distributed device through the aggregated link and the source MAC is the preset MAC address, and generates hit mark information according to the query result; According to the hit mark information returned by other LPU cards in the distributed device, determine whether to delete the preset MAC address written by itself in a dynamic aging manner from the switching chip, wherein the hit mark information returned by other LPU cards in the distributed device reflects the reason why the switching chip sends the address aging information for the preset MAC address to the source LPU card, and the other LPU cards in the distributed device write the preset MAC address to the switching chip in a dynamic non-aging manner.
2. The method according to claim 1, characterized in that The step of determining whether to delete the preset MAC address written by the switching chip in a dynamic aging manner according to the hit mark information returned by other LPU cards in the distributed device includes: If the hit mark information returned by other LPU cards in the distributed device meets the preset deletion condition, the preset MAC address written by itself in a dynamic aging manner will be deleted from the switching chip.
3. The method according to claim 2, characterized in that The method further comprises: Send an address deletion instruction to other LPU cards in the distributed device, so that other LPU cards in the distributed device delete the preset MAC address written into the switching chip in a dynamic non-aging manner from the switching chip.
4. The method according to claim 2, characterized in that The step of determining whether to delete the preset MAC address written by the switching chip in a dynamic aging manner according to the hit mark information returned by other LPU cards in the distributed device further includes: If the hit mark information returned by other LPU cards in the distributed device does not meet the preset deletion condition, a new source LPU card is determined from the other LPU cards in the distributed device according to the hit mark information returned by other LPU cards in the distributed device, and an address update instruction is sent to the new source LPU card, so that the new source LPU card rewrites the preset MAC address into the switching chip in a dynamic aging manner.
5. The method according to claim 4, characterized in that The method further comprises: According to the update synchronization instruction sent by the new source LPU card, the source LPU card information recorded in the local table is modified so that the card itself is no longer used as the source LPU card; The preset MAC address is rewritten into the switching chip in a dynamic and non-aging manner.
6. The method according to claim 1, characterized in that The method further comprises: If the card itself is not a source LPU card and receives address aging information for a preset MAC address sent by the current source LPU card in the distributed device, query whether the card itself has received a message carrying the preset MAC address; According to the query result, hit mark information is generated, and the hit mark information is returned to the current source LPU card.
7. A MAC address aging processing device, characterized in that: An LPU card applied to a distributed device, wherein the distributed device further comprises a switching chip, the LPU card is communicatively connected with the switching chip, and the device comprises: A synchronization module, for synchronizing the address aging information to other LPU cards in the distributed device if the LPU card is a source LPU card and receives address aging information of a preset MAC address learned by the aggregated link of the distributed device sent by the switching chip, so that the other LPU cards in the distributed device query according to the preset MAC address whether there is a message hit that enters the distributed device through the aggregated link and the source MAC is the preset MAC address, and generating hit mark information according to the query result; A processing module is used to determine whether to delete the preset MAC address written by the LPU card in a dynamic aging manner from the switching chip according to the hit mark information returned by other LPU cards in the distributed device, wherein the hit mark information returned by other LPU cards in the distributed device reflects the reason why the switching chip sends the address aging information for the preset MAC address to the source LPU card, and the other LPU cards in the distributed device write the preset MAC address to the switching chip in a dynamic non-aging manner.
8. An LPU card, characterized in that: The LPU card includes a logic device, and a computer program is burned into the logic device. When the computer program is executed, the MAC address aging processing method according to any one of claims 1 to 6 is implemented.
9. A distributed device, characterized in that: The distributed device comprises a switch chip and a plurality of LPU cards as claimed in claim 8.
10. A computer-readable storage medium, characterized in that: The computer program is stored therein, and when the computer program is executed by a processor, the MAC address aging processing method according to any one of claims 1 to 6 is implemented.
