Communication method and apparatus

By configuring the black hole MAC address function and synchronizing black hole marking in the EVPN VPLS network, the loop problem caused by incorrect PE device wiring was resolved, resulting in reduced network stability and CPU load.

CN122160307APending Publication Date: 2026-06-05NEW H3C TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2026-02-06
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In EVPN VPLS networks, repeated MAC address migrations caused by incorrect PE device connections can lead to loops and network chaos. Existing solutions cannot effectively break the loop problem when the home PE enters the MAC address migration suppression state before the network PE.

Method used

By configuring the black hole MAC address function on the first PE device, the oscillating MAC address is set as the black hole MAC address type, and synchronized to the remote device through EVPN Category 2 routing, carrying the black hole mark, so that the remote device learns and discards the corresponding packets.

Benefits of technology

Completely eliminate BUM traffic loops, reduce the risk of high CPU load and chaos on network devices, and ensure network stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122160307A_ABST
    Figure CN122160307A_ABST
Patent Text Reader

Abstract

The application provides a communication method and device, which are applied to a first PE device, the first PE device has started a MAC address repetitive migration inhibition state mode, and the method comprises the following steps: if the first PE device has configured a black hole MAC address function, setting a first MAC address determined as an oscillation to a black hole MAC address type; and sending a first message to a second PE device, wherein the first message comprises the first MAC address and a first black hole mark, so that the second PE device discards a second message when receiving the second message and a second MAC address included in the second message is the same as the first MAC address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a communication method and apparatus. Background Technology

[0002] In Ethernet Virtual Private Network (EVPN) and Virtual Private LAN Service (VPLS) networks, such as Figure 1 As shown, Figure 1 This is a schematic diagram of an existing EVPN VPLS network. Figure 1 In this system, the host connects to the customer edge (CE) device, the CE device connects to the provider edge (PE) device via an access-side link, and the PE devices are interconnected via a network-side link.

[0003] In practical applications, due to deployment reasons, PE devices may be interconnected simultaneously via network-side and access-side links, such as... Figure 2 As shown, Figure 2 This is a diagram illustrating an anomaly in an existing EVPN VPLS network. Figure 2 In the network, an incorrect connection caused PE3 to interconnect with PE1 and PE2 via CE1. During network anomalies, if different PE devices advertise the same Media Access Control (MAC) address, it will cause the PE devices to continuously synchronize MAC address information and update the MAC address entries in their local EVPN. At this time, the PE devices perceive that the hosts are constantly migrating, resulting in BUM traffic loops within the network and routing oscillations, affecting the normal operation of network devices.

[0004] To address the aforementioned BUM traffic loop issue, the current solution is to enable MAC address oscillation suppression within the PE device. By default, the PE device checks the number of MAC address table entries within a detection cycle (default 180 seconds). If the number of oscillations exceeds a threshold (default 5 times), the PE device determines that MAC address oscillation has occurred in the network and suppresses the oscillating MAC addresses, that is, it sets the oscillating MAC addresses to the black hole MAC address type.

[0005] After the PE device sets the oscillating MAC address to the black hole MAC address type, for access-side traffic, if the source MAC address or destination MAC address of the traffic is the same as the black hole MAC address, the traffic will be discarded; for network-side traffic, if the destination MAC address of the traffic is the same as the black hole MAC address, the traffic will be discarded.

[0006] exist Figure 2 If PE3 enters the MAC address recurring migration suppression state and sets its MAC address to the black hole address type before the home device (PE1 or PE2), the loop is broken. However, if the home device PE1 (or PE2) enters the MAC address recurring migration suppression state and sets its MAC address to the black hole MAC address type before PE3, a loop will occur because PE3 has not entered the MAC address recurring migration suppression state.

[0007] For example, when CE1 receives a service packet, it can forward it through two paths: Path 1: via aggregation port hash to PE1. Since PE1 has entered a state of repeated MAC address migration and its MAC address is set to a black hole MAC address type, the service packet is discarded; Path 2: via an erroneous connection to PE3, and then PE3 broadcasts it to PE1 and PE2. Service packets forwarded to PE1 are discarded due to the existence of the black hole MAC address; service packets forwarded to PE2 can continue to be forwarded to CE1, thus forming a traffic loop of CE1-PE3-PE2-CE1. Summary of the Invention

[0008] In view of this, this application provides a communication method and apparatus to solve the problem of loops caused by the home PE entering the MAC address migration suppression state before the network PE.

[0009] In a first aspect, this application provides a communication method applied to a first PE device, wherein the first PE device has activated a MAC address recurrence migration suppression mode, the method comprising: If the first PE device has been configured with the black hole MAC address function, then the first MAC address that has been determined to be oscillating will be set as the black hole MAC address type; A first message is sent to the second PE device. The first message includes the first MAC address and a first black hole marker, so that when the second PE device receives a second message and the second MAC address included in the second message is the same as the first MAC address, the second message is discarded.

[0010] Secondly, this application provides a communication device applied to a first PE device, the first PE device having activated a MAC address recurrence migration suppression mode, the device comprising: The setting unit is used to set the first MAC address that has been determined to be oscillating to the black hole MAC address type if the first PE device has been configured with the black hole MAC address function; The sending unit is configured to send a first message to the second PE device, the first message including the first MAC address and a first black hole marker, so that the second PE device discards the second message when it receives a second message and the second MAC address included in the second message is the same as the first MAC address.

[0011] Thirdly, this application provides a network device including a processor and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, which in turn cause the processor to perform the method provided in the first aspect of this application.

[0012] Therefore, when using the communication method and apparatus provided in this application, if the first PE device has been configured with the black hole MAC address function, the first PE device sets the first MAC address that has been determined to be oscillating as the black hole MAC address type; the first PE device sends a first message to the second PE device, the first message including the first MAC address and the first black hole marker, so that when the second PE device receives the second message and the second MAC address included in the second message is the same as the first MAC address, the second PE device discards the second message.

[0013] In this way, by synchronizing MAC addresses configured as black hole MAC addresses to remote devices via EVPN Category 2 routing, the remote devices learn and determine that the address type of this MAC address is a black hole MAC address, and discard subsequent packets containing this MAC address. This solves the problem of loops caused by the home PE entering the MAC address migration suppression state before the network PE, while also reducing the risk of high CPU load on network devices and network chaos. Attached Figure Description

[0014] Figure 1 This is a schematic diagram of an existing EVPN VPLS network. Figure 2 This is a diagram illustrating an anomaly in an existing EVPN VPLS network. Figure 3 A flowchart illustrating the communication method provided in the embodiments of this application; Figure 4 A schematic diagram illustrating the format of the MAC Mobility Extended Community attribute provided in an embodiment of this application; Figure 5 A structural diagram of a communication device provided in an embodiment of this application; Figure 6The network device hardware structure provided in the embodiments of this application. Detailed Implementation

[0015] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0016] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the corresponding listed items.

[0017] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0018] The communication method provided in the embodiments of this application will be described in detail below. See also... Figure 3 , Figure 3 A flowchart illustrating a communication method provided in an embodiment of this application. This method is applied to a first PE device. The communication method provided in an embodiment of this application may include the following steps.

[0019] Step 310: If the first PE device has been configured with the black hole MAC address function, then set the first MAC address that has been determined to be oscillating to the black hole MAC address type; Specifically, in EVPN VPLS networking anomaly scenarios, the first PE device, following existing solutions for resolving BUM traffic loops, locally initiates a MAC address recurrence migration suppression mode. Simultaneously, the first PE device is configured with a black hole MAC address function, setting the address type of the first MAC address identified as oscillating to the black hole MAC address type.

[0020] The first PE device is any PE within the EVPN VPLS network, and the first MAC address is the MAC address of the host.

[0021] Optionally, in this embodiment, after the first PE device sets the first MAC address to a black hole MAC address type, it generates a first MAC address entry corresponding to the first MAC address locally. This first MAC address entry includes the first MAC address and a first black hole marker.

[0022] The first MAC address entry also includes an outgoing interface identifier, which indicates the interface through which the first PE device connects to the CE device. The first black hole marker is a special marker indicating that the address type of the first MAC address is a black hole MAC address type.

[0023] Step 320: Send a first message to the second PE device. The first message includes the first MAC address and a first black hole marker, so that when the second PE device receives the second message and the second MAC address included in the second message is the same as the first MAC address, it discards the second message.

[0024] Specifically, according to the description of step 310, after the first PE device sets the first MAC address to the black hole MAC address type, it generates a first message, which includes the first MAC address and the first black hole marker. The first PE device then sends the first message to the second PE device in the network.

[0025] After receiving the first message, the second PE device obtains the first MAC address and the first black hole marker from it. The second PE learns the first MAC address and also generates a corresponding MAC address table entry locally, which includes the first MAC address and the first black hole marker.

[0026] Thus, when the second PE device receives a packet from the access side or the network side, if the MAC address (source MAC address or destination MAC address) included in the packet is the same as the first MAC address, the second PE obtains the corresponding MAC address entry and determines that the address type of the MAC address is a black hole MAC address type through the MAC address entry. At this time, the second PE discards the packet, thereby completely breaking the BUM traffic loop regardless of whether access side service traffic or network side service traffic is received.

[0027] Optionally, in this embodiment, the first message is specifically an EVPN Type II route. This EVPN Type II route is specifically a BGP protocol message. In this embodiment, the first message includes first path attributes, which include first extended communities attributes. The first extended communities attribute includes a first MAC Mobility Extended Community attribute, which indicates the number of times a host migration occurs when a host migration occurs. Figure 4 As shown, Figure 4 This is a schematic diagram illustrating the format of the MAC Mobility Extended Community attribute provided in an embodiment of this application.

[0028] exist Figure 4 In the MAC Mobility Extended Community attribute, there are four fields: Type, Sub-Type, Flags, Reserved, and Sequence Number. The Type, Sub-Type, Flags, and Reserved fields each occupy 1 octet, while the Sequence Number field occupies 4 octets. An octet refers to 8 bits of binary data (i.e., 1 byte).

[0029] The value of the type field is 0x06; the value of the subtype field is 0x00; the last bit of the flag field is used to identify whether the MAC address is a static MAC address. When the value is 1, it means that the MAC address is a static MAC address and cannot be migrated; the value of the reserved field is 0; the value of the sequence number field indicates the number of times the MAC address has been migrated.

[0030] In this embodiment, the second-to-last bit in the flag field is used to carry the first black hole flag. The value of this bit indicates whether the MAC address type of the MAC address is a black hole MAC address type. For example, when this bit is 1, it indicates that the MAC address type of the MAC address is a black hole MAC address type. At this time, the value of the type field is 0x06; the value of the subtype field is 0x00; the value of the reserved field is 0; and the value of the sequence number field is 0.

[0031] Understandably, in practical applications, additional attributes can be added to carry the first black hole marker. These additional attributes include a Type field, a Sub-Type field, and a Flags field. The Type field, Sub-Type field, and Flags field each occupy 1 octet. The value of the type field should be distinct from the values ​​of other type fields included in the attributes. While ensuring the type field's value is distinct from the values ​​of other type fields included in the attributes, the value of the subtype field can be customized. If the type field's value is the same as the values ​​of other type fields included in the attributes, then the value of the subtype field should be distinct from the values ​​of the subtype fields included in the other attributes. In this case, any one bit in the flag field can be used to carry the first black hole marker; the value of this bit can be set according to the actual application.

[0032] Optionally, in this embodiment of the application, the first PE device may also receive a third message sent by the second PE device to generate a MAC address table entry with a MAC address type of black hole MAC address locally.

[0033] Furthermore, the second PE device can also perform the aforementioned steps 310-320 as the first PE device to generate and send a third message in the network. The third message includes a third MAC address and a second black hole marker.

[0034] After receiving the third message, the first PE device obtains the third MAC address and the second black hole marker from it. The first PE learns the third MAC address and generates a corresponding second MAC address entry locally, which includes the third MAC address and the second black hole marker.

[0035] Optionally, in this embodiment, the third message is also specifically an EVPN Type II route. The third message includes a second MAC Mobility Extended Community attribute, which includes a second flag field, in which the second-to-last bit is used to carry a second black hole marker.

[0036] The second MAC Mobility Extended Community attribute is located within the second extended community attribute of the second path attribute included in the third message.

[0037] Understandably, this has already been discussed in the preceding text. Figure 4 The first message provides a detailed explanation of how it carries the first black hole marker. Similarly, the third message has the same format as the first message, and both use the second-to-last bit in the flag field to carry the black hole marker. This will not be repeated here.

[0038] Optionally, in this embodiment, after the first PE device receives a packet (e.g., a fourth packet) from the access side or the network side, if the MAC address (source MAC address or destination MAC address) included in the fourth packet is the same as the first MAC address (or the third MAC address), the first PE obtains the corresponding first MAC address entry (or second MAC address entry) and determines that the address type of the MAC address is a black hole MAC address type through the first MAC address entry (or second MAC address entry). At this time, the first PE discards the fourth packet, thereby completely breaking the BUM traffic loop regardless of whether access side service traffic or network side service traffic is received.

[0039] Therefore, using the communication method provided in this application, if the first PE device has been configured with the black hole MAC address function, the first PE device sets the first MAC address, which has been determined to be oscillating, as the black hole MAC address type; the first PE device sends a first message to the second PE device, the first message including the first MAC address and the first black hole marker, so that when the second PE device receives the second message and the second MAC address included in the second message is the same as the first MAC address, the second PE device discards the second message.

[0040] In this way, by synchronizing MAC addresses configured as black hole MAC addresses to remote devices via EVPN Category 2 routing, the remote devices learn and determine that the address type of this MAC address is a black hole MAC address, and discard subsequent packets containing this MAC address. This solves the problem of loops caused by the home PE entering the MAC address migration suppression state before the network PE, while also reducing the risk of high CPU load on network devices and network chaos.

[0041] The communication method provided in the embodiments of this application will be described in detail below. See also... Figure 2 Host 1 connects to CE1, and CE1 is multi-homed to PE1 and PE2; PE1 and PE2 establish tunnels with PE3 respectively; Host 2 connects to CE2; CE2 connects to PE3; a backup tunnel has been established between PE1 and PE2.

[0042] In practical applications, due to deployment reasons, PE devices are interconnected simultaneously via network-side and access-side links. Figure 2In this scenario, an incorrect connection causes PE3 to interconnect with PE1 and PE2 via CE1. During network anomalies, if different PE devices (any one of PE1, PE2, or PE3) announce the same host MAC address to each other, it will cause the PE devices to continuously synchronize MAC address information and update the MAC address table entries in the local EVPN. At this time, the PE devices perceive the host as constantly migrating and activate a MAC address migration suppression function within the PE device. By default, the PE device checks the number of MAC address table entries hopping within a detection cycle (default 180 seconds). If the number of hopping exceeds a threshold (default 5 times), the PE device determines that MAC address oscillation has occurred in the network and suppresses the oscillating MAC addresses, that is, it sets the oscillating MAC addresses to the black hole MAC address type.

[0043] Let's take PE3 as an example. PE3 determines that MAC address 1 of host 1 is oscillating, and suppresses MAC address 1 by setting MAC address 1 to a black hole MAC address type.

[0044] After PE3 enters the MAC address migration suppression state and sets MAC address 1 to the black hole address type, PE3 generates MAC address table entry 1 locally corresponding to MAC address 1. This MAC address table entry 1 includes MAC address 1 and black hole marker 1.

[0045] MAC address entry 1 also includes an outgoing interface identifier 1, which indicates the interface 1 through which PE3 connects to CE1. The black hole marker 1 is a special marker that indicates that the address type of MAC address 1 is a black hole MAC address type.

[0046] After PE3 sets MAC address 1 to the black hole MAC address type, it generates protocol message 1, which includes MAC address 1 and black hole marker 1. PE3 sends protocol message 1 to PE1 and PE2 in the network.

[0047] After receiving protocol message 1, PE1 and PE2 obtain MAC address 1 and black hole marker 1 from it. PE1 and PE2 learn MAC address 1 and also generate a corresponding MAC address table entry 2 locally, which includes MAC address 1 and black hole marker 1.

[0048] Among them, MAC address entry 2 also includes outgoing interface identifier 2, which indicates the interface 2 (or interface 3) through which PE3 connects to PE1 (or PE2).

[0049] By using black hole marker 1, PE1, and PE2, it is determined that the address type of MAC address 1 is a black hole MAC address type.

[0050] In this embodiment, the aforementioned protocol message 1 is specifically an EVPN Type II route. This EVPN Type II route is specifically a BGP protocol message. Protocol message 1 includes path attributes, which include extended community attributes. These extended community attributes include the MAC Mobility Extended Community attribute. For example... Figure 4 As shown, the MAC Mobility ExtendedCommunity attribute includes a type field, a subtype field, a flag field, a reserved field, and a serial number field.

[0051] The second-to-last bit in the flag field is used to carry the black hole flag 1. The value of this bit indicates whether the MAC address type of MAC address 1 is a black hole MAC address type. For example, when this bit is 1, it indicates that the MAC address type of MAC address 1 is a black hole MAC address type.

[0052] Thus, when a PE device (any one of PE1, PE2, or PE3 mentioned above) receives service packet 1 from the access side or the network side, if the MAC address 2 (source MAC address or destination MAC address) included in service packet 1 is the same as MAC address 1, the PE device obtains the corresponding MAC address table entry and determines that the address type of MAC address 2 is a black hole MAC address type through the MAC address table entry. At this time, the PE device discards service packet 2, thereby completely breaking the BUM traffic loop regardless of whether access side service traffic or network side service traffic is received.

[0053] Based on the same inventive concept, embodiments of this application also provide a communication device corresponding to the communication method. See also Figure 5 , Figure 5 The communication device provided in this application embodiment is applied to a first PE device, the first PE device having activated a MAC address recurrence migration suppression mode, the device comprising: The setting unit 510 is used to set the first MAC address that has been determined to be oscillating to the black hole MAC address type if the first PE device has been configured with the black hole MAC address function. The sending unit 520 is configured to send a first message to the second PE device. The first message includes the first MAC address and a first black hole marker, so that when the second PE device receives a second message and the second MAC address included in the second message is the same as the first MAC address, the second PE device discards the second message.

[0054] Optionally, the device further includes: The generation unit (not shown in the figure) is used to generate a first MAC address entry corresponding to the first MAC address locally. The first MAC address entry includes the first MAC address and the first black hole marker.

[0055] Optionally, the device further includes: The receiving unit (not shown in the figure) is used to receive a third message sent by the second PE device, the third message including a third MAC address and a second black hole marker; The generation unit (not shown in the figure) is also used to generate a second MAC address entry corresponding to the third MAC address locally, the second MAC address entry including the third MAC address and the second black hole marker.

[0056] Optionally, the receiving unit (not shown in the figure) is further configured to receive a fourth message, the fourth message including a MAC address; The device further includes a discarding unit (not shown in the figure), configured to discard the fourth packet if the MAC address is the same as the first MAC address or the MAC address is the same as the third MAC address.

[0057] Optionally, the first message includes a first MAC Mobility Extended Community attribute, which includes a first flag field, wherein the second to last bit of the first flag field is used to carry the first black hole marker; or; The third message includes a second MAC Mobility Extended Community attribute, which includes a second flag field, in which the second-to-last bit is used to carry the second black hole marker; Wherein, the first MAC Mobility Extended Community attribute is within the first extended community attribute of the first path attribute included in the first message; the second MAC Mobility Extended Community attribute is within the second extended community attribute of the second path attribute included in the third message.

[0058] Therefore, when using the communication device provided in this application, if the first PE device has been configured with the black hole MAC address function, the first PE device sets the first MAC address that has been determined to be oscillating as the black hole MAC address type; the first PE device sends a first message to the second PE device, the first message including the first MAC address and the first black hole marker, so that when the second PE device receives the second message and the second MAC address included in the second message is the same as the first MAC address, the second PE device discards the second message.

[0059] In this way, by synchronizing MAC addresses configured as black hole MAC addresses to remote devices via EVPN Category 2 routing, the remote devices learn and determine that the address type of this MAC address is a black hole MAC address, and discard subsequent packets containing this MAC address. This solves the problem of loops caused by the home PE entering the MAC address migration suppression state before the network PE, while also reducing the risk of high CPU load on network devices and network chaos.

[0060] Based on the same inventive concept, embodiments of this application also provide a network device, such as... Figure 6 As shown, the system includes a processor 610, a transceiver 620, and a machine-readable storage medium 630. The machine-readable storage medium 630 stores machine-executable instructions that can be executed by the processor 610. The processor 610 is prompted by the machine-executable instructions to execute the communication method provided in the embodiments of this application. (The foregoing...) Figure 5 The communication device shown can be used as follows: Figure 6 The hardware structure of the network device shown is implemented.

[0061] The aforementioned computer-readable storage medium 630 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the computer-readable storage medium 630 may also be at least one storage device located remotely from the aforementioned processor 610.

[0062] The processor 610 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0063] In this embodiment of the application, the processor 610 reads the machine-executable instructions stored in the machine-readable storage medium 630, and is prompted by the machine-executable instructions to enable the processor 610 itself and the transceiver 620 to execute the communication method described in the foregoing embodiment of the application.

[0064] In addition, this application provides a machine-readable storage medium 630 that stores machine-executable instructions. When called and executed by the processor 610, the machine-executable instructions cause the processor 610 itself and the transceiver 620 to execute the communication method described in the aforementioned application.

[0065] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0066] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0067] For the embodiments of communication devices and machine-readable storage media, since the methods involved are basically similar to those of the aforementioned method embodiments, the description is relatively simple, and relevant details can be found in the descriptions of the method embodiments.

[0068] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A communication method, characterized in that, Applied to a first PE device, the first PE device has activated a MAC address recurrence migration suppression mode, the method includes: If the first PE device has been configured with the black hole MAC address function, then the first MAC address that has been determined to be oscillating will be set as the black hole MAC address type; A first message is sent to the second PE device. The first message includes the first MAC address and a first black hole marker, so that when the second PE device receives a second message and the second MAC address included in the second message is the same as the first MAC address, the second message is discarded.

2. The method according to claim 1, characterized in that, The method further includes: A first MAC address entry corresponding to the first MAC address is generated locally. The first MAC address entry includes the first MAC address and the first black hole marker.

3. The method according to claim 1, characterized in that, The method further includes: Receive a third message sent by the second PE device, the third message including a third MAC address and a second black hole marker; A second MAC address entry corresponding to the third MAC address is generated locally. The second MAC address entry includes the third MAC address and the second black hole marker.

4. The method according to any one of claims 2 or 3, characterized in that, The method further includes: Receive a fourth message, the fourth message including a MAC address; If the MAC address is the same as the first MAC address or the MAC address is the same as the third MAC address, then the fourth packet is discarded.

5. The method according to claim 3, characterized in that, The first message includes a first MAC MobilityExtended Community attribute, which includes a first flag field, in which the second-to-last bit is used to carry the first black hole marker; or; The third message includes a second MAC Mobility Extended Community attribute, which includes a second flag field, in which the second-to-last bit is used to carry the second black hole marker; Wherein, the first MAC Mobility Extended Community attribute is within the first extended community attribute of the first path attribute included in the first message; the second MAC Mobility Extended Community attribute is within the second extended community attribute of the second path attribute included in the third message.

6. A communication device, characterized in that, Applied to a first PE device, the first PE device has activated a MAC address recurrence migration suppression mode, the device includes: The setting unit is used to set the first MAC address that has been determined to be oscillating to the black hole MAC address type if the first PE device has been configured with the black hole MAC address function; The sending unit is configured to send a first message to the second PE device, the first message including the first MAC address and a first black hole marker, so that the second PE device discards the second message when it receives a second message and the second MAC address included in the second message is the same as the first MAC address.

7. The apparatus according to claim 6, characterized in that, The device further includes: The generation unit is configured to generate a first MAC address entry corresponding to the first MAC address locally, wherein the first MAC address entry includes the first MAC address and the first black hole marker.

8. The apparatus according to claim 7, characterized in that, The device further includes: The receiving unit is configured to receive a third message sent by the second PE device, the third message including a third MAC address and a second black hole marker; The generation unit is further configured to generate a second MAC address entry locally corresponding to the third MAC address, the second MAC address entry including the third MAC address and the second black hole marker.

9. The apparatus according to any one of claims 7 or 8, characterized in that, The receiving unit is further configured to receive a fourth message, the fourth message including a MAC address; The device further includes a discarding unit, configured to discard the fourth packet if the MAC address is the same as the first MAC address or the MAC address is the same as the third MAC address.

10. The apparatus according to claim 8, characterized in that, The first message includes a first MAC MobilityExtended Community attribute, which includes a first flag field, in which the second-to-last bit is used to carry the first black hole marker; or; The third message includes a second MAC Mobility Extended Community attribute, which includes a second flag field, in which the second-to-last bit is used to carry the second black hole marker; Wherein, the first MAC Mobility Extended Community attribute is within the first extended community attribute of the first path attribute included in the first message; the second MAC Mobility Extended Community attribute is within the second extended community attribute of the second path attribute included in the third message.