Method, device, medium and program product for location detection of a customer edge device

By combining BGP flooding and ARP probing, the problem of probe failure caused by the reliance on service forwarding paths in MAC Ping and CPE Ping technologies in EVPN networks is solved, and reliable and real-time detection of the location of customer edge devices is achieved.

CN123164048APending Publication Date: 2026-11-24ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611544178.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-30
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

In EVPN networks, existing MAC Ping and CPE Ping technologies rely on service forwarding paths, leading to probe failures, especially when there are network label anomalies, tunnel failures, or CE migrations, making it impossible to accurately obtain the location of customer edge devices.

Method used

By using Border Gateway Protocol (BGP) flooding probe request routes and combining Address Resolution Protocol (ARP) probes, reliable forwarding of probe request routes and acquisition of the true location can be achieved, avoiding reliance on public network tunnels and Layer 2 EVPN labels. This method is suitable for location detection in multi-homing scenarios.

Benefits of technology

It enables reliable detection of the location of customer edge devices in the event of network failure or CE migration, ensures reliable forwarding of detection requests and responses, obtains the real location of the CE in real time, and reduces the impact of lag in ARP and MAC table updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123164048A_ABST
    Figure CN123164048A_ABST
Patent Text Reader

Abstract

The present disclosure provides a location detection method, device, medium and program product of a customer edge device. The detection method comprises: receiving a detection request route from a second PE flooding through a border gateway protocol (BGP), the detection request route comprising at least an IP address of a target CE and a first media access control (MAC) address field; generating an address resolution protocol (ARP) request message according to the IP address of the target CE, and broadcasting the ARP request message through a local access interface (AC); in response to receiving an ARP response message to the ARP request message, sending a detection reply route to enable the second PE to determine that the target CE location detection is successful; the detection reply route comprising at least the IP address of the target CE and a second MAC address field, and the first MAC address field and the second MAC address field are both used to represent that the MAC address is not specified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and in particular to a method, device, medium, and program product for location detection of a customer edge device. Background Technology

[0002] In a Layer 3 Ethernet Virtual Private Network (EVPN), the Provider Edge (PE) typically uses Internet Control Message Protocol (ICMP) Ping technology for fault detection and Customer Edge (CE) location probing. In a Layer 2 EVPN, Media Access Control Ping (MAC Ping) and Customer Premises Equipment Ping (CPEP Ping) technologies are mainly used.

[0003] However, MAC Ping and CPE Ping technologies rely on service forwarding paths, which can lead to probe failures in the following scenarios: First, MAC Ping and CPE Ping forwarding rely on the public network tunnel and Layer 2 EVPN labels or segment identifiers (SIDs). When the network label is abnormal or the tunnel experiences a one-way failure, the probe packets cannot be forwarded normally, resulting in probe failure.

[0004] Secondly, when a CE is migrated to another PE, and the Address Resolution Protocol (ARP) and MAC entries have not been updated, MAC Ping packets will be forwarded unicast to the original PE that accessed the CE, making it impossible to obtain the CE's true location, resulting in probe failure.

[0005] Third, in multi-homed scenarios (where Ethernet Segment Identifiers (ESIs) are deployed in multi-active or single-active mode), if a Ping request is initiated on one of the local PEs, the remote CE's response packet will be forwarded according to the same primary / backup or load-sharing strategy as the forwarded packet, causing the response packet to be sent to other multi-homed PEs, thus causing the probe to fail. Summary of the Invention

[0006] This disclosure provides a method, device, medium, and program product for location detection of a customer edge device.

[0007] In a first aspect, embodiments of this disclosure provide a location detection method for a customer edge device (CE), applied to a first provider edge device (PE). The method includes: receiving a probe request route flooded by a second PE via Border Gateway Protocol (BGP), the probe request route including at least the IP address of the target CE and a first Media Access Control (MAC) address field; generating an Address Resolution Protocol (ARP) request packet based on the IP address of the target CE, and broadcasting the ARP request packet via a local access interface (AC); and sending a probe reply route in response to receiving an ARP reply packet for the ARP request packet, so that the second PE determines that the location detection of the target CE was successful. The probe reply route includes at least the IP address of the target CE and a second MAC address field, both the first MAC address field and the second MAC address field being used to indicate that the MAC address is not specified.

[0008] Secondly, embodiments of this disclosure provide a location detection method for a Customer Edge Device (CE), applied to a second Provider Edge Device (PE). The method includes: generating a probe request route, the probe request route including at least the IP address of the target CE and a first Media Access Control (MAC) address field; flooding the probe request route via Border Gateway Protocol (BGP) to ensure the probe request route reaches a first PE accessing the target CE; and determining that the location detection of the target CE is successful upon receiving a probe reply route for the probe request route. The probe reply route includes at least the IP address of the target CE and a second MAC address field, both of which are used to indicate that the MAC address is not specified. The probe reply route is sent by the first PE in response to receiving an ARP reply message for an ARP request message, the ARP request message being generated by the first PE based on the IP address of the target CE and broadcast via a local AC.

[0009] Thirdly, embodiments of this disclosure provide an electronic device, including a memory and a processor; the memory stores a computer program that can be executed by the processor, and when the computer program is executed by the processor, it implements the location detection method for a customer edge device (CE) according to any one of the first and second aspects.

[0010] Fourthly, embodiments of this disclosure provide a computer-readable medium storing a computer program that, when executed by a processor, implements the location detection method for a customer edge device (CE) according to any one of the first to second aspects.

[0011] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the location detection method for a customer edge device (CE) according to any one of the first and second aspects.

[0012] This disclosure discloses a method, device, medium, and program product for location detection of customer edge devices. The detection source PE floods the probe request route via BGP, ensuring the route reaches the PE connected to the target CE. The PE connected to the target CE can also send a probe reply route via BGP on the control plane, enabling the detection source PE to obtain the target CE's location. This achieves reliable forwarding of probe requests and replies without relying on public network tunnels or Layer 2 EVPN labels or segment identifiers. Furthermore, the PE receiving the probe request route initiates an ARP probe based on the target CE's IP address carried in the route. This combination of BGP flooding of the probe request route and ARP probe allows for real-time acquisition of the CE's true location, unaffected by ARP and MAC table update lags. In multi-homed scenarios, since the PE connected to the target CE can send the probe reply route to the detection source PE via BGP, the detection source PE reliably receives the probe reply route, ensuring successful detection. Attached Figure Description

[0013] In the accompanying drawings of the embodiments disclosed herein: Figure 1 This is a flowchart illustrating a location detection method for a customer edge device (CE) provided in an embodiment of this disclosure.

[0014] Figure 2 This is a topological scenario provided in an embodiment of the present disclosure.

[0015] Figure 3 This is another topological scenario provided for an embodiment of this disclosure.

[0016] Figure 4 A flowchart illustrating another location detection method for a customer edge device (CE) provided in this embodiment of the disclosure.

[0017] Figure 5 A schematic diagram of the RT2 routing content generated by the second PE provided in this embodiment of the disclosure.

[0018] Figure 6 This is a schematic diagram of the ARP request message content generated by the first PE provided in this embodiment of the disclosure.

[0019] Figure 7 This is a schematic diagram of the ARP response message content generated by the target CE in an embodiment of this disclosure.

[0020] Figure 8 This is a schematic diagram illustrating network layer reachability information in a probe response route, as provided in an embodiment of this disclosure.

[0021] Figure 9 This is a schematic diagram of a probe response route provided in an embodiment of this disclosure.

[0022] Figure 10This is a block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0023] To enable those skilled in the art to better understand the technical solutions of this disclosure, the location detection method, device, medium, and program products of the customer edge device provided in the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.

[0024] The present disclosure will be described more fully below with reference to the accompanying drawings; however, the embodiments shown may be embodied in different forms, and the present disclosure should not be construed as limited to the embodiments set forth below. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will enable those skilled in the art to fully understand the scope of the disclosure.

[0025] The accompanying drawings are provided to further illustrate this disclosure and form part of the specification. They are used together with the detailed embodiments to explain this disclosure and do not constitute a limitation thereof. These and other features and advantages will become more apparent to those skilled in the art from the description of detailed embodiments with reference to the accompanying drawings.

[0026] Unless otherwise specified, each embodiment and feature of this disclosure may be used individually or in combination with other embodiments and features thereof.

[0027] Those skilled in the art will understand that various changes in form and detail may be made to the embodiments of this disclosure without departing from the scope of this disclosure as set forth by the appended claims.

[0028] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the disclosure. The term "and / or" as used in this disclosure includes any and all combinations of one or more of the associated enumerated entries. The singular forms "a" and "the" as used in this disclosure are also intended to include the plural forms, unless the context clearly indicates otherwise. The terms "comprising," "made of," etc., as used in this disclosure specify the presence of the stated feature, integral, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof.

[0029] Unless otherwise specified, all terms used in this disclosure (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined in this disclosure.

[0030] Firstly, referring to Figure 1This disclosure provides a location detection method for a customer edge device (CE), applicable to... Figure 2 The topological scene shown, and Figure 3 The aforementioned multi-homing topology scenario. (Refer to...) Figure 2 and Figure 3 The second PE (corresponding to) Figure 2 PE2 in the middle is the detection source PE that initiates the location detection, and the first PE (corresponding to Figure 2 PE1 in the diagram refers to the PE terminal of the target CE, and the target CE is illustrated as follows: Figure 2 and Figure 3 CE1 in the middle.

[0031] A location detection method for a customer edge device (CE), applied to a first provider edge device (PE), includes the following: S101, receive probe request routes from the second PE flood via Border Gateway Protocol (BGP). The probe request routes include at least the IP address of the target CE and the first Media Access Control (MAC) address field.

[0032] BGP is the control plane protocol of EVPN. The second PE floods the probe request route in the EVPN via BGP, that is, the second PE floods the probe request route to multiple BGP neighbors so that the probe request route can reach the first PE of the access target CE. The first PE receives the probe request route flooded from the second PE via BGP. The first MAC address field is used to indicate that the MAC address is not specified, and the first MAC address field is set to any of the following: all 0s, all Fs, or a length of 0. Because the probe request route is flooded in the control plane, that is, the forwarding path of the probe request route depends on route iteration, rather than the actual forwarding path of the data packet, even if a one-way failure occurs in the public network tunnel or the Layer 2 EVPN label / SID is abnormal, the probe request route can still reach the PE of the actual access target CE based on the control plane flooding, thus achieving reliable forwarding of the probe request and ensuring probe success. The probe request will not fail to reach the PE due to the failure of the data plane forwarding path, thus avoiding probe failure. Those skilled in the art should understand that this probe request route is a new EVPN route type specifically designed for CE location probing. Other existing EVPN route types (such as RT2 routes and RT5 routes) can also be used as probe request routes as long as they carry the target CE's IP address and the first MAC address field, and the first MAC address field is used to indicate that the MAC address is not specified.

[0033] S102, generate an Address Resolution Protocol (ARP) request message based on the IP address of the target CE, and broadcast the ARP request message through the local access interface AC (Attachment Circuit).

[0034] In this process, after the first PE receives the probe request route, it initiates an ARP probe based on the IP address of the target CE carried in the route, thereby triggering the target CE to send an ARP reply packet. Since the second PE floods the probe request route to multiple BGP neighbors, the PE receiving the probe request route initiates an ARP probe based on the IP address of the target CE carried in the route. Therefore, based on the combination of EVPN route flooding and ARP probe, the real location of the target CE can be obtained in real time. Compared to related technologies that rely on MAC forwarding tables and only send probe requests to historically accessed PEs, resulting in CE probe failure after migration, the embodiments of this disclosure are not affected by the lag in ARP and MAC table updates.

[0035] S103, in response to receiving an ARP reply message for an ARP request message, a probe reply route is sent to enable the second PE to determine that the target CE location probe was successful; the probe reply route includes at least the IP address of the target CE and a second MAC address field, the second MAC address field being used to indicate that the MAC address is not specified.

[0036] The second MAC address field is set to any of the following: all 0s, all Fs, or a length of 0. If the first PE is not connected to the target CE, it will not receive an ARP reply packet for the ARP request packet, nor will it send a probe reply route to the second PE. Only after receiving the ARP reply packet for the ARP request packet will the first PE determine that it is connected to the target CE and send a probe reply route to the second PE. It is understandable that since the first PE also sends the probe reply route via BGP, the PE connected to the target CE floods the probe reply route based on EVPN routes, thus ensuring that the PE initiating the location probe reliably receives the probe reply route, even in multi-homed scenarios.

[0037] In this embodiment, the second PE floods the probe request route via BGP in the control plane, ensuring the probe request route reaches the first PE accessing the target CE. The first PE also sends a probe reply route via BGP in the control plane, enabling the second PE to obtain the location of the target CE. This achieves reliable forwarding of probe requests and replies without relying on public network tunnels and Layer 2 EVPN labels or segment identifiers. Furthermore, the PE receiving the probe request route initiates an ARP probe based on the target CE's IP address carried in the route. This combination of BGP flooding of the probe request route and ARP probe allows for real-time acquisition of the target CE's true location, unaffected by ARP and MAC table update lags. In multi-homed scenarios, the PE accessing the target CE can send the probe reply route to the probe source PE via BGP, ensuring the probe source PE reliably receives the probe reply route and achieving successful probe. Furthermore, this disclosure defines a new EVPN routing type specifically for CE location detection, enabling probe request routes and probe response routes to have independent semantics and formats, avoiding confusion with routing in related technologies, and preventing impact on MAC learning and routing calculation processes in related technologies. At the same time, fields can be flexibly defined according to detection requirements, resulting in strong scalability.

[0038] In some embodiments, after receiving a probe request route from the second PE flood, the location detection method for the customer edge device (CE) further includes: generating a first EVPN probe table, which includes at least probe IPs, probe sources, and the mapping relationship between them.

[0039] In this system, the probe IP is the IP address of the target CE, and the probe source is the identification information of the second PE. The identification information can be a BGP connection address (i.e., BGP Router ID) or other information uniquely identifying the PE. Specifically, the probe source points to the OPE (Originating Provider Edge) TLV (Type-Length-Value) in the probe request route. Normally, the OPE TLV is the BGP connection address. For example, when reflected by an RR (Route Reflector), it becomes the BGP connection address of the original PE (i.e., the initiating PE). The identification information of the probe source is recorded in the first EVPN probe table, allowing subsequent probe reply routes to be directed to the second PE via BGP based on this information. This means that the probe reply routes are advertised to the second PE via BGP. Compared to flooding probe reply routes to all BGP neighbors, this reduces the number of routes in the network, saves network bandwidth resources, and minimizes the impact on other PEs. Recording the target CE's IP address in the first EVPN probe table can provide a basis for comparison in determining whether the ARP reply message is an ARP reply message in response to an ARP request message.

[0040] In some embodiments, after broadcasting an ARP request message through the local access interface AC, the location detection method for the customer edge device (CE) further includes: in response to receiving an ARP reply message, extracting the source IP address and destination IP address from the ARP reply message; and in response to the source IP address and destination IP address being both the IP address of the target CE, determining that the ARP reply message is an ARP reply message in response to the ARP request message.

[0041] In this scenario, if the first PE does not connect to the target CE after broadcasting an ARP request packet, it will not receive an ARP reply packet from the target CE. When the first PE broadcasts multiple ARP request packets generated from probe request routes based on different CEs, it may receive multiple ARP reply packets. In this case, it is necessary to extract the source IP address and destination IP address from each ARP reply packet and match them with the IP address of the target CE to determine if the ARP reply packet is an ARP reply packet for the ARP request packet targeting the target CE. Specifically, the first PE matches the extracted source IP address and destination IP address with the probe IPs in the first EVPN probe table. If the source IP address and destination IP address are the same and both are probe IPs in the first EVPN probe table, it can be determined that the ARP reply packet is an ARP reply packet for the ARP request packet targeting the target CE.

[0042] In some embodiments, the probe request route also includes identification information of the second PE.

[0043] Sending probe response routes includes: sending probe response routes to the second PE based on the identification information of the second PE; or, flooding probe response routes via Border Gateway Protocol (BGP) to ensure that probe response routes reach the second PE.

[0044] In this embodiment, the first PE, based on the identification information of the second PE carried in the probe request route, either sends a probe reply route via BGP in a targeted manner or floods the probe reply route via BGP, ensuring that the probe reply route reaches the second PE. This guarantees that the probe reply route returns to the second PE that initiated the probe, ensuring that the second PE reliably receives the probe reply route and achieves successful probe. Furthermore, sending the probe reply route to the second PE based on its identification information in a targeted manner avoids the additional signaling overhead of flooding probe reply routes to all PEs in the EVPN, reduces the processing burden on irrelevant PEs, saves network bandwidth resources, and improves probe efficiency.

[0045] In some embodiments, the probe request route is of type RT2 route.

[0046] The location detection method for the customer edge device (CE) further includes: in response to receiving an RT2 route, determining whether the RT2 route meets preset conditions, the preset conditions including: the carried IP address is non-zero, and the MAC address field is used to indicate that the MAC address is not specified; in response to the RT2 route meeting the preset conditions, determining that the RT2 route is a probe request route.

[0047] In this embodiment, the RT2 route, a MAC / IP advertisement route, is a forwarding route. Upon receiving an RT2 route, MAC learning is triggered, and a Layer 2 forwarding table is generated. However, this embodiment reuses the RT2 route as a probe request route. By setting the IP address to a non-zero value and setting the MAC address field to indicate that the MAC address is not specified, the PE receiving the RT2 route can identify, based on these preset conditions, that the RT2 route is not a forwarding route for advertising MAC addresses, but rather a probe request route for initiating CE location probing. This triggers the corresponding probe processing flow (such as initiating an ARP probe based on the IP address), instead of performing regular MAC learning. By reusing existing EVPN route types to implement the probe function, there is no need to define entirely new route types, ensuring compatibility with existing devices, a short deployment cycle, low modification difficulty, and the ability to reuse existing RT matching and BGP advertisement mechanisms, making implementation simple.

[0048] In some embodiments, after sending the probe response route, the location detection method for the customer edge device (CE) further includes: after a preset delay, deleting the probe request route and / or the first EVPN probe table corresponding to the probe response route.

[0049] Since both probe request routes and probe reply routes are valid BGP routes, once the probe target is detected, the corresponding routes need to be promptly withdrawn or deleted to maintain consistency between BGP routes and service routes. The first PE can be configured to delay sending the probe reply route for a preset duration before deleting the probe request route and / or the first EVPN probe table corresponding to it. The preset duration can be 5 seconds, or can be modified to adapt to network device performance.

[0050] Secondly, referring to Figure 4 This disclosure provides a location detection method for a customer edge device (CE), applied to a second provider edge device (PE). The method provided in this second aspect is based on the same inventive concept as the method provided in the first aspect, and is applied to the same application scenario. Both describe the same technical solution from the perspectives of the interacting parties and can be understood by mutual reference. The second aspect and the first aspect together constitute a complete communication system.

[0051] The location detection methods for customer edge devices (CEs) include: S201, Generate a probe request route. The probe request route includes at least the IP address of the target CE and the first media access control MAC address field.

[0052] In this embodiment, the probe request route is a new EVPN route type defined, characterized by a non-zero IP address and a first MAC address field indicating that the MAC address is not specified. This allows the PE receiving the probe request route to identify it as a probe request route for CE location probing, rather than a forwarding route for advertising MAC addresses, thus triggering the corresponding probe processing flow instead of performing conventional MAC learning. This embodiment defines a new EVPN route type specifically for CE location probing, giving the probe request route and its corresponding probe reply route independent semantics and format, avoiding confusion with routes in related technologies, and preventing impact on MAC learning and route calculation processes in related technologies. Furthermore, it allows for flexible field definition according to probing needs, offering strong scalability.

[0053] S202, flood probe request routes via Border Gateway Protocol (BGP) to ensure that probe request routes reach the first PE of the access target CE.

[0054] In this process, the second PE floods the probe request route within the EVPN network via BGP, enabling the probe request route to reach multiple PEs within the EVPN network. The second PE does not need to know the access location of the target CE in advance; it can flood the probe request route to the first PE connected to the target CE. Therefore, even if the target CE migrates, the second PE can still transmit the probe request route to the PE connected to the target CE via flooding, thus ensuring the reliable reachability of the probe request route.

[0055] S203, in response to receiving a probe reply route for the probe request route, it is determined that the target CE location probe was successful; the probe reply route includes at least the IP address of the target CE and a second MAC address field, both of which are used to indicate that the MAC address is not specified; wherein, the probe reply route is sent by the first PE in response to receiving an ARP reply message for an ARP request message, the ARP request message being generated by the first PE based on the IP address of the target CE and broadcast through the local AC.

[0056] In this process, the second PE receives the probe response route and determines that the target CE location has been successfully detected based on the probe response route. The second PE achieves successful detection of the target CE location without prior knowledge of the target CE's access location by flooding the probe request route and receiving the corresponding probe response route.

[0057] In this embodiment, the second PE floods probe request routes to all neighbors via BGP on the control plane, ensuring that the probe request routes reach the first PE connected to the target CE. The first PE connected to the target CE can also send probe reply routes via BGP on the control plane, enabling the second PE to obtain the location of the target CE. This achieves reliable forwarding of probe requests and replies without relying on public network tunnels and Layer 2 EVPN labels or segment identifiers. Furthermore, the second PE does not need to know the access location of the target CE in advance; it can flood the probe request routes to reach the first PE connected to the target CE. Therefore, even if the target CE migrates, the second PE can still flood the probe request routes to the PE connected to the target CE, ensuring reliable reachability of the probe request routes even if the CE migrates. In multi-homing scenarios, the second PE achieves successful probe by flooding the probe request routes and receiving the corresponding probe reply routes. Furthermore, this embodiment defines a new EVPN routing type specifically for CE location detection, which makes the detection request route and the detection response route have independent semantics and format, so as not to be confused with the routing in related technologies, avoids the impact on the MAC learning and routing calculation process in related technologies, and allows for flexible definition of fields according to detection needs, thus having strong extensibility.

[0058] In some embodiments, the first MAC address field is set to any one of the following: all 0s, all Fs, and a length of 0; the second MAC address field is set to any one of the following: all 0s, all Fs, and a length of 0.

[0059] The first MAC address field and the second MAC address field can be set in multiple ways. They can be set to the same or different fields. For example, the first MAC address field can be set to all 0s and the second MAC address field can be set to all 0s, or the first MAC address field can be set to all 0s and the second MAC address field can be set to all Fs, or the first MAC address field can be set to a length of 0 and the second MAC address field can be set to all Fs.

[0060] In some embodiments, after generating a probe request route, the location probing method for the customer edge device (CE) further includes generating a second EVPN probe table. The second EVPN probe table includes at least the probe IP address, the probe target location, and the mapping relationship between the two.

[0061] In this system, the probe IP is the IP address of the target CE, and the probe target location is used to record the identification information of the PE connected to the target CE. For example, the initial value of the probe target location is empty. After successfully probing the target CE location, the identification information of the first PE is filled into the probe target location. The probe response route also includes the identification information of the first PE, which can be a BGP connection address (i.e., BGP Router ID) or other information uniquely identifying the PE. After a successful probe, the second EVPN probe table records the location connected to the target CE, allowing subsequent probe requests to the same target CE to be routed directly based on the identification information of the first PE, eliminating the need for re-flooding and saving network signaling.

[0062] In some embodiments, after flooding the probe request route via Border Gateway Protocol (BGP), the location detection method for the Customer Edge Device (CE) further includes: in response to receiving routing information for which the MAC address field is not specified, obtaining the IP address of the CE carried in the routing information and matching it with the IP address of the target CE; in response to the fact that the IP address of the CE carried in the routing information matches the IP address of the target CE, determining that the routing information is a probe response route for the probe request route.

[0063] In this embodiment, after the second PE receives multiple probe response routes, it needs to obtain the CE's IP address carried in the routing information from each probe response route and match it with the target CE's IP address. In response to the CE's IP address matching the target CE's IP address, the routing information is determined to be a probe response route for the probe request route. Specifically, the second PE matches the obtained CE's IP address with the target CE's IP address in the second EVPN probe table. In response to the match, the probe response route is determined to be a probe response route for the probe request route, and the identification information of the first PE carried in the probe response route is filled into the probe target location field of the second EVPN probe table.

[0064] In some embodiments, after successfully detecting the location of the target CE, the location detection method for the customer edge device (CE) further includes: after a preset delay, deleting the probe response route and / or the second EVPN probe table corresponding to the probe request route. This maintains consistency between BGP routes and service routes. The preset delay can be 5 seconds, or it can be modified to adapt to the network device performance.

[0065] For ease of understanding, the location detection method of the customer edge device (CE) according to the present disclosure is described below with specific examples.

[0066] Example 1: The location detection method for the customer edge device (CE) in this embodiment is described using RT2 routing as a probe request route. Those skilled in the art should understand that other existing or new EVPN routing types, as long as the route carries the IP address and MAC address fields of the target CE, and the MAC address field is used to indicate that the MAC address is not specified, can also be used as probe request routes. The location detection method for the customer edge device (CE) includes: S301, the second PE generates an RT2 route. The RT2 route includes at least the IP address of the target CE and a first MAC address field, which is used to indicate that the MAC address is not specified.

[0067] Specifically, the IP address of the target CE in the RT2 route is (196.1.1.2), and the IP address length is 4 bytes; the first MAC address field is set to all zeros; the length of the first MAC address field is 6 bytes.

[0068] S302, the second PE floods the RT2 route through the Border Gateway Protocol (BGP) so that the RT2 route reaches the first PE of the access target CE.

[0069] Specifically, the second PE floods the RT2 route in the EVPN network via BGP, ensuring that the RT2 route reaches the first PE accessing the target CE, and generates a second EVPN probe table locally. The second EVPN probe table includes the probe IP, the target location, the probe source, and the mapping relationship between them. The probe IP is the IP address of the target CE, i.e., (196.1.1.2), the target location is empty, and the probe source is local. The RT2 route content generated by the second PE is referenced... Figure 5 As shown. Because RT2 routing is flooded in the control plane, meaning the forwarding path of the route depends on the route iteration rather than the actual forwarding path of the data packet, reliable forwarding of probe requests is achieved.

[0070] S303, the first PE receives the RT2 route flooded by the second PE via the Border Gateway Protocol (BGP).

[0071] S304, in response to receiving RT2 route, the first PE determines whether RT2 route meets preset conditions, the preset conditions include: the carried IP address is non-zero, and the MAC address field is used to indicate that the MAC address is not specified; in response to RT2 route meeting the preset conditions, the first PE determines that RT2 route is a probe request route.

[0072] S305, the first PE generates an Address Resolution Protocol (ARP) request message based on the IP address of the target CE, and broadcasts the ARP request message through the local access interface AC.

[0073] Specifically, the RT2 route also includes the identification information of the second PE. The first PE selects its home L2 forwarding instance based on the RT of the RT2 route, extracts the IP address of the target CE from the RT2 route, generates an ARP request packet for that IP address, and broadcasts it from the local AC of the L2 forwarding instance; it also generates a first EVPN probe table locally. The first EVPN probe table includes the probe IP, probe source, probe target location, and the mapping relationship between the three. The probe IP is (196.1.1.2), and the probe source is the identification information of the second PE. Example: The probe source points to the OPE TLV in the RT2 route. The OPE TLV is normally a BGP connection establishment address; for example, when reflected by RR, it is the BGP connection establishment address of the original PE (i.e., the initiating PE). The probe target location is empty. For example, if the corresponding L2 forwarding instance has no local AC, the RT2 route is not processed. The first EVPN probe table records the identification information of the probe source, and the probe reply route can be sent to the second PE via BGP based on the identification information. That is, the probe reply route is advertised to the second PE via BGP. Compared with the method of flooding the probe reply route to all BGP neighbors, the number of routes in the network is reduced, network bandwidth resources are saved, and the impact on other PEs is reduced.

[0074] In related technologies, when the first PE receives an RT2 route, it triggers MAC learning to generate a Layer 2 forwarding table. Since the first MAC address field of this RT2 route is all zeros and the IP address length is not zero, the first PE determines it to be a non-forwarding route (essentially a probe request route), does not learn the MAC address, and therefore does not affect the network. (See reference...) Figure 6 Example of the structure of an ARP request message (broadcast and forwarded to the local AC) generated by the first PE based on the IP address of the target CE.

[0075] If the first PE is not connected to the target CE, the first PE will not receive an ARP reply message.

[0076] S306, in response to receiving an ARP reply message, the first PE extracts the source IP address and destination IP address from the ARP reply message; in response to the source IP address and destination IP address being the IP address of the target CE, the first PE determines that the ARP reply message is an ARP reply message in response to the ARP request message.

[0077] If the first PE connects to the target CE, the target CE will receive an ARP request packet, determine that the IP address probed by the ARP request packet is its own IP address, and then reply to the first PE with an ARP reply packet. See the example of the ARP reply packet content for details. Figure 7 Based on the combination of BGP flooding probe request routing and ARP probe, the real location of the target CE can be obtained in real time. The embodiments of this disclosure are not affected by the lag in ARP and MAC entry updates.

[0078] S307, in response to receiving an ARP reply message for an ARP request message, the first PE sends a probe reply route to enable the second PE to determine that the target CE location probe was successful; the probe reply route includes at least the IP address of the target CE and a second MAC address field, the second MAC address field being used to indicate that the MAC address is not specified.

[0079] Specifically, after the first PE determines that the ARP reply packet is an ARP reply packet to the ARP request packet, the first PE queries the first EVPN probe table to find that the probe source corresponding to the probe IP is the second PE, terminates the forwarding of the ARP request packet, learns that the MAC address of the target CE points to AC2, generates the corresponding probe reply route, and sends the probe reply route. The first PE generates the probe reply route by including a TLV field representing Network Layer Reachability Information (NLRI) in the probe reply route; refer to... Figure 8The Type and Sub-Type are defined as follows: Type=0x06; Sub-Type=0x16; The reserved part is defined as 12 bytes (IPv4) or 24 bytes (IPv6); It contains four fields: mac-length, macaddress, ip-length, and ip address; where mac address is 6 bytes of all zeros, ip address is 4 bytes of IPv4 address when the probe IP is IPv4, and ip address is 16 bytes of IPv6 address when the probe IP is IPv6.

[0080] In some embodiments, the first PE sending the probe reply route includes: the first PE flooding the probe reply route via Border Gateway Protocol (BGP) to ensure the probe reply route reaches the second PE; in other words, the first PE floods the probe reply route to its BGP neighbor. For example, the second MAC address field is all zeros, the IP length is 32, and the IP value is the target CE host address; the probe reply route content is as follows. Figure 9 As shown.

[0081] In some embodiments, the first PE sending the probe reply route includes: the first PE sending the probe reply route to the second PE via BGP based on the identification information of the second PE obtained from the first EVPN probe table.

[0082] Since both RT2 routes and probe response routes are valid BGP routes, once the probe is completed, the corresponding routes need to be withdrawn in a timely manner to maintain consistency between BGP routes and service routes.

[0083] In some embodiments, after the first PE sends the probe response route, the location detection method of the customer edge device CE further includes: after a preset delay, the first PE deletes the RT2 route and / or the first EVPN probe table corresponding to the probe response route.

[0084] S308, in response to receiving the probe reply route for the RT2 route, the second PE determines that the target CE location probe was successful; wherein, the probe reply route is sent by the first PE in response to receiving the ARP reply message for the ARP request message, and the ARP request message is generated by the first PE based on the IP address of the target CE and broadcast through the local AC.

[0085] In S308, in response to receiving routing information for which the MAC address field is not specified, the second PE obtains the IP address of the CE carried in the routing information and matches it with the IP address of the target CE; in response to the fact that the IP address of the CE carried in the routing information matches the IP address of the target CE, the second PE determines that the routing information is a probe reply route for the RT2 route.

[0086] Specifically, when the second PE receives the probe response route for the RT2 route, the second PE learns that the MAC address of the target CE points to the first PE. Based on the IP address in the TLV field of the probe response route and the IP address of the local CPE Ping, it is determined that the location probe has received a response and the host probe is successful. The second PE updates the identification information of the probe target location as the first PE in the second EVPN probe table, and at the same time echoes the CPE Ping probe success and prints that the access location is the first PE.

[0087] In some embodiments, after the second PE determines that the target CE location detection is successful, the customer edge device CE location detection method further includes: after a preset delay, the second PE deletes the probe response route and / or the second EVPN probe table corresponding to the RT2 route.

[0088] Specifically, the initiating probe end (i.e., the second PE) can be set to automatically initiate route cancellation after a 5-second delay after initiating RT2 route cancellation; the access end (i.e., the first PE) can be set to automatically initiate route cancellation after a 5-second delay after initiating probe reply route cancellation; this preset duration can be modified according to the performance of the network equipment; after the route is cancelled, the corresponding EVPN probe table is also deleted.

[0089] The structure of the second EVPN probe table is shown in the table below:

[0090] The location detection method for the Customer Edge Device (CE) in this embodiment of the disclosure achieves detection by carrying CPEping messages through EVPN RT2 routing. This allows the method to obtain the location of the corresponding host and whether the target host IP exists. The forwarding path of the routing message depends on the routing iteration rather than the actual forwarding path of the data packet, thus ensuring successful detection even when network failures occur, bringing convenience to engineering operation and maintenance. Furthermore, by constructing RT2 routing on the PE side to trigger the PE device remotely accessing the target CE to initiate an ARP probe request, the method triggers the target CE to send an ARP reply packet, thereby achieving the purpose of detecting the location of the target CE on the PE.

[0091] Thirdly, referring to Figure 10 This disclosure provides an electronic device, including a memory and a processor; the memory stores a computer program that can be executed by the processor, and when the computer program is executed by the processor, it implements the location detection method of a customer edge device (CE) according to any one of the first and second aspects.

[0092] Fourthly, embodiments of this disclosure provide a computer-readable medium storing a computer program that, when executed by a processor, implements the location detection method for a customer edge device (CE) according to any one of the first to second aspects.

[0093] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the location detection method for a customer edge device (CE) according to any one of the first and second aspects.

[0094] In this embodiment of the disclosure, the processor is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory is a device with data storage capabilities, including but not limited to random access memory (RAM), more specifically such as SDRAM, DDR, etc., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface, or read-write interface, is connected between the processor and the memory, enabling information exchange between the memory and the processor, including but not limited to a data bus (Bus).

[0095] Those skilled in the art will understand that all or some of the steps, systems, and devices disclosed above, as functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0096] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be executed by several physical components working together.

[0097] Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media and communication media. In embodiments of this disclosure, computer storage media include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, and any other media that can be used to store desired information and can be accessed by a computer. In embodiments of this disclosure, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

Claims

1. A method for detecting the location of a customer edge device (CE), applied to a first provider edge device (PE), the method comprising: The probe request route is received from the second PE flood via the Border Gateway Protocol (BGP). The probe request route includes at least the IP address of the target CE and the first Media Access Control (MAC) address field. An Address Resolution Protocol (ARP) request message is generated based on the IP address of the target CE, and the ARP request message is broadcast through the local access interface (AC). In response to receiving an ARP reply message for the ARP request message, a probe reply route is sent so that the second PE determines that the location of the target CE has been successfully probed; the probe reply route includes at least the IP address of the target CE and a second MAC address field, wherein both the first MAC address field and the second MAC address field are used to indicate that the MAC address is not specified.

2. The method according to claim 1, wherein, The first MAC address field is set to any one of the following: all 0s, all Fs, or length 0; the second MAC address field is set to any one of the following: all 0s, all Fs, or length 0.

3. The method according to claim 1, wherein, After broadcasting the ARP request message through the local access interface AC, the method further includes: In response to receiving an ARP reply message, the source IP address and destination IP address are extracted from the ARP reply message; Since both the source IP address and the destination IP address are the IP address of the target CE, the ARP reply message is determined to be an ARP reply message in response to the ARP request message.

4. The method according to claim 1, wherein, The probe request route also includes the identification information of the second PE; the sending of the probe response route includes: Based on the identification information of the second PE, the probe response route is sent to the second PE; Alternatively, the probe response route can be flooded via Border Gateway Protocol (BGP) to ensure that the probe response route reaches the second PE.

5. The method according to claim 1 or 2, wherein, The probe request route is of type RT2 route. The method further includes: In response to receiving an RT2 route, it is determined whether the RT2 route meets preset conditions, the preset conditions including: the carried IP address is non-zero, and the MAC address field is used to indicate that the MAC address is not specified; In response to the RT2 route satisfying the preset condition, the RT2 route is determined to be a probe request route.

6. The method according to claim 1, wherein, After sending the probe response route, the method further includes: after a preset delay, deleting the probe request route and / or the first EVPN probe table corresponding to the probe response route; The first EVPN probe table is generated by the first PE after receiving probe request routes from the second PE flooding. The first EVPN probe table includes at least probe IP, probe source, and the mapping relationship between the two, wherein the probe IP is the IP address of the target CE, and the probe source is the identification information of the second PE.

7. A method for detecting the location of a customer edge device (CE), applied to a second provider edge device (PE), the method comprising: Generate a probe request route, the probe request route including at least the IP address of the target CE and the first media access control MAC address field; The probe request route is flooded by the Border Gateway Protocol (BGP) so that the probe request route reaches the first PE that accesses the target CE. In response to receiving a probe reply route for the probe request route, it is determined that the target CE location probe was successful; the probe reply route includes at least the IP address of the target CE and a second MAC address field, both the first MAC address field and the second MAC address field are used to indicate that the MAC address is not specified; wherein, the probe reply route is sent by the first PE in response to receiving an ARP reply packet for an ARP request packet, the ARP request packet being generated by the first PE based on the IP address of the target CE and broadcast through the local AC.

8. The method according to claim 7, wherein, The first MAC address field is set to any one of the following: all 0s, all Fs, or length 0; the second MAC address field is set to any one of the following: all 0s, all Fs, or length 0.

9. The method according to claim 7, wherein, After flooding the probe request route via Border Gateway Protocol (BGP), the method further includes: In response to receiving routing information for which the MAC address field is not specified, the IP address of the CE carried in the routing information is obtained and matched with the IP address of the target CE; In response to the fact that the IP address of the CE carried in the routing information is consistent with the IP address of the target CE, the routing information is determined to be a probe response route for the probe request route.

10. The method according to claim 7, wherein, After confirming that the target CE location has been successfully detected, the process also includes: After a preset delay, delete the probe response route and / or the second EVPN probe table corresponding to the probe request route; The second EVPN probe table is generated by the second PE after generating the probe request route. The second EVPN probe table includes at least the probe IP, the probe target location, and the mapping relationship between the two. The probe IP is the IP address of the target CE, and the probe target location is used to record the identification information of the PE accessed by the target CE.

11. An electronic device, wherein, It includes a memory and a processor; the memory stores a computer program that can be executed by the processor, and when the computer program is executed by the processor, it implements the location detection method for the customer edge device (CE) as described in any one of claims 1 to 10.

12. A computer-readable medium, wherein, The device contains a computer program that, when executed by a processor, implements the location detection method for the customer edge device (CE) as described in any one of claims 1 to 10.

13. A computer program product, wherein, Includes a computer program that, when executed by a processor, implements the location detection method for the customer edge device (CE) as described in any one of claims 1 to 10.