Message forwarding method and related device

By deencapsulating packets to be forwarded in EVPN multi-home network, obtaining packet tags, and performing MAC search or VLAN broadcast domain forwarding, the problem of packet loss or multi-packet in traffic forwarding under asymmetry between PE devices is solved, and the problem of packet loss or multi-packet in traffic forwarding is realized. Normal forwarding and stability of traffic.

CN116366546BActive Publication Date: 2024-11-29SUZHOU CENTEC COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310424863.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-20
Publication Date
2024-11-29
Estimated Expiration
2043-04-20

AI Technical Summary

Technical Problem

In EVPN multi-home network, when there is asymmetry between PE devices, the traffic forwarding from CE2 to CE1 may have packet loss or multi-packet problems.

Method used

By decapsulating the packet to be forwarded from the incoming PE device, obtaining the message tag, and performing MAC search or VLAN broadcast domain forwarding according to the tag type, ensuring that normal forwarding of traffic is achieved in asymmetric scenarios.

Benefits of technology

It effectively avoids traffic packet loss or multi-packet problems in asymmetric scenarios, and ensures the stability and reliability of the traffic forwarding process from CE2 to CE1.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116366546B_ABST
    Figure CN116366546B_ABST
Patent Text Reader

Abstract

The present invention provides a message forwarding method and related devices, which relate to the field of data communication. The message forwarding method: first decapsulate the message to be forwarded from the inbound PE device to obtain the message label; then, if the message label is a unicast label, perform MAC search based on the message label to generate a search result, wherein the unicast label indicates that there is a MAC table entry for a multi-home CE device on the inbound PE device; if the search result is not empty, forward the message to be forwarded to the multi-home CE device according to the search result; if the search result is empty, forward the message to be forwarded to the multi-home CE device according to the pre-set VLAN broadcast domain, thereby realizing normal forwarding of traffic in an asymmetric scenario and avoiding packet loss.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data communication, and in particular to a message forwarding method and related devices. Background Art

[0002] EVPN (Ethernet Virtual Private Network) multi-homing means that a CE (Customer Edge) device accesses multiple PE (Provide Edge) devices in the EVPN network through different Ethernet links, and the traffic of the CE device is load balanced among multiple PE devices.

[0003] like Figure 1 As shown, CE1 is dual-homed to PE1 and PE2, PE1 and PE2 are connected to PE3 respectively, and CE2 is connected to PE3. Normally, when MAC table entries related to certain services on CE1 exist on PE1, PE2, and PE3 or none of them exist, traffic forwarding from CE2 to CE1 can be completed normally, but when an asymmetric situation occurs, traffic forwarding may be abnormal. For example, when PE3, which is an inbound PE device, has MAC table entries related to certain services on CE1, and PE1 and / or PE2, which are outbound PE devices, do not have MAC table entries related to certain services on CE1, packet loss may occur in the traffic forwarding process from CE2 to CE1. Summary of the invention

[0004] The embodiment of the present invention provides a message forwarding method and related device, which can realize normal forwarding of traffic in an asymmetric scenario.

[0005] The technical solution of the embodiment of the present invention can be implemented as follows:

[0006] In a first aspect, an embodiment of the present invention provides a message forwarding method, which is applied to a target outbound PE device in a message forwarding system, wherein the message forwarding system includes a plurality of outbound PE devices, each of which is communicatively connected to a multi-homed CE device, and the message forwarding system further includes an inbound PE device, each of which is communicatively connected to the inbound PE device, and the method includes:

[0007] Decapsulate the message to be forwarded from the inbound PE device to obtain a message label;

[0008] If the message label is a unicast label, a MAC search is performed based on the message label to generate a search result, wherein the unicast label indicates that a MAC table entry for the multi-homed CE device exists on the inbound PE device;

[0009] If the search result is not empty, forwarding the message to be forwarded to the multi-homed CE device according to the search result;

[0010] If the search result is empty, the message to be forwarded is forwarded to the multi-homed CE device according to the preset VLAN broadcast domain to avoid packet loss.

[0011] Optionally, the step of performing MAC address lookup based on the message tag and generating a lookup result includes:

[0012] Determine a target forwarding domain according to the label value of the message label and a local MPLS table entry;

[0013] Performing a MAC lookup in the target forwarding domain according to the inner MAC address carried in the message to be forwarded;

[0014] If an AC port pointing to the multi-homed CE device is found, the AC port is used as the search result;

[0015] If the AC port pointing to the multi-homed CE device is not found, the search result is set to empty.

[0016] Optionally, the VLAN broadcast domain includes AC ports on all outbound PE devices pointing to the multi-homed CE device, and the step of forwarding the message to be forwarded to the multi-homed CE device according to the pre-set VLAN broadcast domain includes:

[0017] The message to be forwarded is broadcasted to the AC ports on all outbound PE devices pointing to the multi-homed CE device, so as to forward the message to be forwarded to the multi-homed CE device through the AC ports on all outbound PE devices pointing to the multi-homed CE device.

[0018] Optionally, the method further comprises:

[0019] If the message label is a BUM label, the message to be forwarded is forwarded to the multi-homed CE device using a pre-created BUM multicast group to avoid multiple packets, wherein the BUM label indicates that there is no MAC table entry for the multi-homed CE device on the inbound PE device.

[0020] In a second aspect, an embodiment of the present invention provides a message forwarding method, which is applied to an inbound PE device in a message forwarding system, wherein the message forwarding system includes a plurality of outbound PE devices, each of which is communicatively connected to the inbound PE device, and each of which is also communicatively connected to a multi-homed CE device, wherein the method includes:

[0021] If there is a MAC table entry for the multi-homed CE device, a unicast label is added to the message to be forwarded;

[0022] The message to be forwarded carrying the unicast label is sent to any target outgoing PE device among the multiple outgoing PE devices, so that the target outgoing PE device performs a MAC lookup based on the unicast label, and when the obtained lookup result is not empty, the message to be forwarded is forwarded to the multi-home CE device according to the lookup result; when the obtained lookup result is empty, the message to be forwarded is forwarded to the multi-home CE device according to the pre-set VLAN broadcast domain to avoid packet loss.

[0023] Optionally, the method further comprises:

[0024] If there is no MAC table entry for the multi-homed CE device, a BUM tag is added to the message to be forwarded;

[0025] The message to be forwarded carrying the BUM label is sent to the multiple outgoing PE devices, so that the DF device in the multiple outgoing PE devices uses the pre-created BUM multicast group to forward the message to be forwarded to the multi-home CE device to avoid multiple packets.

[0026] In a third aspect, an embodiment of the present invention provides a message forwarding device, which is applied to a target outbound PE device in a message forwarding system, wherein the message forwarding system includes a plurality of outbound PE devices, each of which is communicatively connected to a multi-homed CE device, and the message forwarding system further includes an inbound PE device, each of which is communicatively connected to the inbound PE device, and the device includes:

[0027] An acquisition module, used for decapsulating the message to be forwarded from the inbound PE device and acquiring a message label;

[0028] a processing module, configured to perform a MAC lookup based on the message label to generate a lookup result if the message label is a unicast label, wherein the unicast label indicates that a MAC table entry for the multi-homed CE device exists on the inbound PE device;

[0029] A forwarding module is used to forward the message to be forwarded to the multi-homed CE device according to the search result if the search result is not empty; if the search result is empty, forward the message to be forwarded to the multi-homed CE device according to a pre-set VLAN broadcast domain to avoid packet loss.

[0030] In a fourth aspect, an embodiment of the present invention provides a message forwarding device, which is applied to an inbound PE device in a message forwarding system, wherein the message forwarding system includes a plurality of outbound PE devices, each of which is communicatively connected to the inbound PE device, and each of which is also communicatively connected to a multi-homed CE device, wherein the device includes:

[0031] An adding module, configured to add a unicast label to the message to be forwarded if a MAC table entry for the multi-homed CE device exists in the module;

[0032] The sending module is used to send the message to be forwarded carrying the unicast label to any target outbound PE device among the multiple outbound PE devices, so that the target outbound PE device performs a MAC lookup based on the label value of the unicast label, and when the obtained lookup result is not empty, forward the message to be forwarded to the multi-home CE device according to the lookup result; when the obtained lookup result is empty, forward the message to be forwarded to the multi-home CE device according to a pre-set VLAN broadcast domain to avoid packet loss.

[0033] In a fifth aspect, an embodiment of the present invention provides an outbound PE device, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the message forwarding method as described in the first aspect is implemented.

[0034] In a sixth aspect, an embodiment of the present invention provides an inbound PE device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the message forwarding method as described in the second aspect is implemented.

[0035] In a seventh aspect, an embodiment of the present invention provides a message forwarding system, which includes a plurality of outbound PE devices as described in the fifth aspect and an inbound PE device as described in the sixth aspect.

[0036] In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the message forwarding method as described in the first aspect above, or the message forwarding method as described in the second aspect above.

[0037] Compared with the prior art, the embodiment of the present invention provides a message forwarding method for a target outbound PE device in a message forwarding system, which first decapsulates the message to be forwarded from the inbound PE device to obtain a message label; then, if the message label is a unicast label, a MAC search is performed based on the message label to generate a search result, wherein the unicast label indicates that there is a MAC table entry for a multi-home CE device on the inbound PE device; if the search result is not empty, the message to be forwarded is forwarded to the multi-home CE device according to the search result; if the search result is empty, the message to be forwarded is forwarded to the multi-home CE device according to the pre-set VLAN broadcast domain. Since the embodiment of the present invention uses the unicast label that indicates that there is a MAC table entry for a multi-home CE device on the inbound PE device to perform a MAC search, it is determined whether the message forwarding system is in an asymmetric situation according to whether the search result is empty, thereby determining the message forwarding mode, realizing normal forwarding of traffic in an asymmetric scenario, and avoiding packet loss. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0039] Figure 1 An example diagram of an EVPN multi-homing network model provided by an embodiment of the present invention;

[0040] Figure 2 A schematic diagram of a DF election processing flooding traffic provided by an embodiment of the present invention;

[0041] Figure 3 A schematic diagram of load sharing in an active-active redundancy mode provided by an embodiment of the present invention;

[0042] Figure 4 A flow forwarding diagram provided by an embodiment of the present invention Figure 1 ;

[0043] Figure 5 A flow forwarding diagram provided by an embodiment of the present invention Figure 2 ;

[0044] Figure 6 A flow forwarding diagram provided by an embodiment of the present invention Figure 3 ;

[0045] Figure 7 A flow forwarding diagram provided by an embodiment of the present invention Figure 4 ;

[0046] Figure 8 A schematic diagram of the structure of a message forwarding system provided by an embodiment of the present invention;

[0047] Fig. 9 A flow chart of a method for forwarding a message in an outbound PE device provided in an embodiment of the present invention Figure 1 ;

[0048] Fig.10 A flow chart of a method for forwarding a message in an outbound PE device provided in an embodiment of the present invention Figure 2 ;

[0049] Fig.11 A schematic diagram of a flow chart of a message forwarding method applied to an inbound PE device provided by an embodiment of the present invention;

[0050] Fig.12 A functional unit block diagram of a message forwarding device applied to an outbound PE device provided in an embodiment of the present invention;

[0051] Fig.13 A functional unit block diagram of a message forwarding device applied to an inbound PE device provided by an embodiment of the present invention;

[0052] Fig.14 A block diagram of a structural unit of an electronic device provided by an embodiment of the present invention.

[0053] Icons: 100 - message forwarding device applied to outgoing PE device; 101 - acquisition module; 102 - processing module; 103 - forwarding module; 200 - message forwarding device applied to incoming PE device; 201 - adding module; 202 - sending module; 300 - electronic device; 310 - memory; 320 - processor. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0055] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0057] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.

[0058] Please refer to Figure 1 In the example of the EVPN multi-homing network model shown, CE1 is dual-homed to the redundant backup group composed of PE1 and PE2. CE1 accesses the two links of PE1 and PE2 to form an ES (Ethernet Segment), which have the same ESI (Ethernet Segment Identifier). Since CE1 accesses the redundant device group through ES, CE1 is a multi-homed CE device. PE1 and PE2 are connected to PE3 through EVPN PW (EVPN Pseudo Wire), and CE2 accesses PE3.

[0059] Since CE1 is dual-homed to PE1 and PE2, when CE2 sends flood traffic to CE1, in order to avoid the waste of network resources caused by both PE1 and PE2 forwarding the flood traffic to CE1, EVPN introduces the DF election mechanism. DF election means electing a PE device from the redundant backup group as the DF (Designated Forwarder) device, which is responsible for forwarding the flood traffic to the multi-homed CE device, and other PE devices as BDF (Backup DF) devices, which will not forward flood traffic to the multi-homed CE device. Figure 2 As shown in the figure, PE1 in the redundant backup group is used as the DF device and PE2 is used as the BDF device. When CE2 sends flood traffic to CE1, only PE1 forwards the flood traffic to CE1, thereby avoiding the waste of network resources.

[0060] like Figure 3 As shown in the figure, in the active-active redundancy mode, only PE1 in the redundant backup group may be able to learn MAC addresses related to certain services of CE1. This will cause PE3, as the remote PE, to only receive MAC / IP published routes of these MAC addresses from PE1. Therefore, PE3 cannot share the traffic load accessing these MAC addresses to PE2 in the redundant backup group.

[0061] To solve this problem, the EVPN multi-homing network introduces an alias mechanism. That is, when only one PE device in the redundant backup group notifies the remote PE device of the reachability of the CE-side MAC address through MAC / IP advertising routes, the remote PE device can perceive the reachability of the CE-side MAC address of other PE devices in the redundant backup group based on the Ethernet automatic discovery route (carrying PE, ESI and other information) sent by the PE devices in the redundant backup group, and generate corresponding MAC table entries, thereby forming load sharing.

[0062] exist Figure 3 In the example, after PE1 learns the MAC address, it sends the route to PE3 through MAC / IP routing, and also sends the route to PE2. PE2 senses that the ES corresponding to this MAC also exists locally, so the data flow from this MAC address does not need to go around PE1. PE2 will then enable the AC redirection function and change the egress of this MAC address from PE1 to the AC port corresponding to the local ES. In this way, if the message from PE3 hits this MAC table entry, it can be directly forwarded from the local AC port.

[0063] According to the above description of EVPN multi-homing, it can be seen that usually, after PE1 learns the MAC addresses related to certain services on CE1, PE1 sends MAC / IP routes to PE2 and PE3 through BGP. Figure 4 As shown in the figure, when corresponding MAC entries exist on PE1, PE2, and PE3, PE3 will encapsulate the traffic from CE2 and load-share it and send it to PE1 and PE2. After receiving the encapsulated message, PE1 and PE2 will decapsulate it and forward it according to the local MAC entry, directly forwarding it from the local AC port to CE1.

[0064] When the MAC table entry on PE1 ages, PE1's BGP will send MAC / IP routes to PE2 and PE3 again to cancel the MAC. Figure 5 As shown in the figure, after MAC revocation is completed on PE1, PE2, and PE3, PE3 will broadcast the traffic from CE2 in the VLAN and broadcast it to PE1 and PE2 at the same time. Since PE1 and PE2 do not have MAC table entries, they will also broadcast in the VLAN. Due to the DF election mechanism, only the PE device selected as the DF device will forward the traffic to CE1.

[0065] That is to say, when MAC entries exist on PE1, PE2, and PE3, or when MAC entries on PE1, PE2, and PE3 are all revoked, the traffic forwarding process from CE2 to CE1 can proceed normally.

[0066] However, one issue is often overlooked, which is that BGP takes time to transfer routes. Assuming that the MAC table entry on PE1 is revoked, PE1 will send the MAC / IP route revocation message to PE3. No matter how fast it is, it will take a certain amount of time. During the time of route transfer, the traffic from CE2 is still forwarded. That is, during this short period of time, there is an asymmetric situation: the MAC table entry on PE1 has been revoked, but the MAC table entry on PE3 still exists.

[0067] In this asymmetric case, if Figure 6 As shown in the figure, the data traffic from CE2 is still considered to be forwarded on PE3 through unicast MAC and sent to PE1 or PE2 through load balancing. Assuming that PE3 sends data traffic to PE1, since the MAC table entry on PE1 has been revoked, the message can only be broadcast in the VLAN. However, due to the existence of the DF election mechanism, if PE1 is not a DF device, the traffic cannot be sent to CE1 in the form of broadcast, resulting in message loss during this period. The traffic forwarding process can only proceed normally after the MAC table entry on PE3 is revoked by MAC / IP routing and PE1 and PE2 receive the message at the same time.

[0068] In addition to the above-mentioned short-term packet loss problem, in some cases, short-term multiple packets may also occur. Assume that PE1, PE2, and PE3 have not learned the MAC address at the beginning, and the traffic is broadcast to PE1 and PE2 on PE3. PE1 and PE2 broadcast the unknown message in the VLAN. Due to the existence of the DF election mechanism, the DF device forwards the data flow to CE1. At a certain moment, PE1 learns the MAC address through the AC port and sends the MAC / IP route to PE2 and PE3 through BGP. If PE2 has received this BGP route and has issued the MAC table entry, but PE3 is far away, or has more hops and a longer delay, and has not received this MAC / IP route, then at this moment, the following asymmetric situation will occur: there is no MAC table entry on PE3, but there are MAC table entries on PE1 and PE2.

[0069] In this asymmetric case, if Figure 7 As shown in the figure, the data flow from CE2 is broadcast on PE3 and sent to PE1 and PE2 at the same time. Unicast forwarding is performed on both PE1 and PE2. CE1 may have multiple packets for a short time until PE3 receives the BGP MAC / IP route and sends the MAC table entry. PE3 will start unicast forwarding according to the MAC table entry. Only one device, PE1 or PE2, receives the message, and the multiple packets on CE1 will stop.

[0070] In general, when PE3, which is the inbound PE device, has MAC table entries related to certain services on CE1, and PE1 and / or PE2, which are the outbound PE devices, do not have MAC table entries related to certain services on CE1, packet loss will occur in the process of traffic forwarding from CE2 to CE1. When PE3, which is the inbound PE device, does not have MAC table entries related to certain services on CE1, and PE1 and / or PE2, which are the outbound PE devices, have MAC table entries related to certain services on CE1, multiple packets will occur in the process of traffic forwarding from CE2 to CE1.

[0071] In order to deal with the short-term packet loss and short-term multiple packets in asymmetric situations, the embodiment of the present invention provides a Figure 8 The message forwarding system shown and a method for applying Figure 8 The method for forwarding messages from any destination to a PE device is described in detail below.

[0072] Please refer to Figure 8 The message forwarding system includes multiple outbound PE devices, namely PE1, PE2, ..., PEn, all outbound PE devices form a redundant backup group, and the multi-homed CE device (ie, CE1) accesses the redundant backup group through the ES. The message forwarding system also includes an inbound PE device, each outbound PE device is connected to the inbound PE device, and the inbound PE device shares the traffic load from the source CE device (ie, CE2) to each outbound PE device.

[0073] Please refer to Fig. 9 The message forwarding method applied to the outgoing PE device includes steps S101 to S104.

[0074] S101, decapsulating a message to be forwarded from an inbound PE device to obtain a message label.

[0075] exist Figure 8 In the inbound direction, the PE device may unicast the message to be forwarded to any one of PE1, PE2, ..., PEn, or may broadcast the message to be forwarded to PE1, PE2, ..., PEn at the same time.

[0076] When any outbound PE device receives a message to be forwarded sent by an inbound PE device, it needs to decapsulate the message to be forwarded, obtain the message label added to the message header by the inbound PE device, and determine whether there is a MAC entry for CE1 on the inbound PE device according to the attributes of the message label.

[0077] S102: If the message label is a unicast label, perform a MAC lookup based on the message label to generate a lookup result.

[0078] The unicast label indicates that there is a MAC entry for the multi-homed CE device on the inbound PE device. The MAC entry may record the MAC address of a host connected to the multi-homed CE device or the MAC address of other terminal devices connected to the multi-homed CE device.

[0079] exist Figure 8 In the example, CE1 multi-homed accesses a redundant backup group composed of PE1, PE2, ..., PEn, and any PE device among PE1, PE2, ..., PEn can forward the message to CE1. When there is a MAC table entry for CE1 on the inbound PE device, the inbound PE device can determine a target outbound PE device among PE1, PE2, ..., PEn through load sharing. For example, PE1 is used as the target outbound PE device. After the inbound PE device sends the message to be forwarded to PE1, PE1 performs a MAC lookup based on the unicast label decapsulated from the message to be forwarded to determine whether it has a MAC table entry for CE1.

[0080] It can be understood that PE1 can determine whether the current message forwarding system is in an asymmetric situation based on the search results, that is, if the search results show that PE1 itself does not have a MAC table entry for CE1, then the current message forwarding system is in an asymmetric situation; if the search results show that PE1 itself has a MAC table entry for CE1, then the current message forwarding system is not in an asymmetric situation.

[0081] As a possible implementation manner, the implementation process of step S102 may be as follows:

[0082] S102-1, determine the target forwarding domain according to the label value of the message label and the local MPLS table entry.

[0083] Assumptions Figure 8 PE1 in the figure is the target outbound PE device. PE1 determines a fid from the local MPLS table entry using the label value of the unicast label, and the Layer 2 forwarding domain identified by the fid is the target forwarding domain.

[0084] S102-2, perform MAC lookup in the target forwarding domain according to the inner MAC address carried in the message to be forwarded.

[0085] The target outbound PE device can obtain the inner MAC address by decapsulating the message to be forwarded.

[0086] S102-3, if an AC port pointing to a multi-homed CE device is found, the AC port is taken as a search result.

[0087] Assumptions Figure 8PE1 in the figure is the target outbound PE device. PE1 uses the inner MAC address to perform MAC lookup in the target forwarding domain. If it finds its own AC port pointing to CE1, it means that PE1 itself has a MAC table entry for CE1, and the current message forwarding system is not in an asymmetric situation.

[0088] S102-4: If the AC port pointing to the multi-homed CE device is not found, the search result is set to null.

[0089] Assumptions Figure 8 PE1 in the figure is the target outbound PE device. PE1 uses the inner MAC address to perform MAC lookup in the target forwarding domain. If it does not find its own AC port pointing to CE1, it means that PE1 itself does not have a MAC table entry for CE1, and the current message forwarding system is in an asymmetric situation.

[0090] S103: If the search result is not empty, forward the message to be forwarded to the multi-homed CE device according to the search result.

[0091] Assumptions Figure 8 PE1 in the figure is the target outbound PE device. When PE1 finds its own AC port pointing to CE1, PE1 can directly use its own AC port pointing to CE1 to send the message to be forwarded to CE1.

[0092] S104: If the search result is empty, the message to be forwarded is forwarded to the multi-homed CE device according to the pre-set VLAN broadcast domain to avoid packet loss.

[0093] The VLAN broadcast domain includes all AC ports on the outbound PE devices that point to the multi-homed CE devices.

[0094] by Figure 8 Taking the packet forwarding system shown in the figure as an example, VLAN broadcast domains are pre-set on PE1, PE2, ..., PEn, and AC ports pointing to CE1 on all outbound PE devices are added to the VLAN broadcast domain.

[0095] Optionally, all outgoing PW (Pseudo Wire) ports on PE devices are also added to the VLAN broadcast domain. Usually, the AC port on the PE device is used for communication between the PE device and the CE device, and the PW port on the PE device is used for communication between the PE device and the PE device.

[0096] In a possible implementation, the implementation process of step S104 may be: broadcasting the message to be forwarded to the AC ports pointing to the multi-homed CE devices on all egress PE devices, so as to forward the message to be forwarded to the multi-homed CE devices through the AC ports pointing to the multi-homed CE devices on all egress PE devices.

[0097] Please refer to Fig.10 The message forwarding method applied to the outgoing PE device also includes step S105.

[0098] S105: If the message label is a BUM (Broadcast Unknown-unicast Multicast) label, the message to be forwarded is forwarded to a multi-homed CE device using a pre-created BUM multicast group to avoid multiple packets.

[0099] The BUM label indicates that there is no MAC entry for the multi-homed CE device on the inbound PE device.

[0100] The BUM multicast group is established based on the DF election information. That is, the BUM multicast group created on the outbound PE device that is elected as the DF device includes the AC port pointing to the multi-homed CE device, while the BUM multicast group created on the device that is not elected as the DF does not include the AC port pointing to the multi-homed CE device.

[0101] Assumptions Figure 8 If PE1 is elected as the DF device, the BUM multicast group created on PE1 includes the AC port pointing to CE1, while the BUM multicast groups created on PE2, ..., PEn do not include the AC port pointing to CE1.

[0102] It can be understood that, since among PE1, PE2, ..., PEn, only the BUM multicast group created on PE1 contains the AC port pointing to CE1, therefore, when the inbound PE device sends the message to be forwarded to PE1, PE2, ..., PEn at the same time, only the BUM multicast group created on PE1 can send the message to be forwarded to CE1, and PE1, PE2, ..., PEn will not forward the message to CE1 at the same time, resulting in multiple packets in CE1.

[0103] Since the outbound PE device needs to determine the forwarding mode of the message to be forwarded according to the message label of the message to be forwarded, and the message label of the message to be forwarded is added by the inbound PE device, the present invention also provides a method for applying Figure 8 The method for forwarding packets in the inbound direction of a PE device is described in detail below.

[0104] Please refer to Fig.11 The message forwarding method applied to the inbound PE device includes steps S201 to S204.

[0105] S201: If there is a MAC entry for a multi-homed CE device, a unicast label is added to a message to be forwarded.

[0106] When a MAC table entry for a multi-homed CE device exists on the inbound PE device, the inbound PE device needs to unicast forward the message to be forwarded. When unicast forwarding is performed, the MPLS (Multi-Protocol Label Switching) label used for unicast forwarding is called a unicast label.

[0107] S202, sending the message to be forwarded carrying the unicast label to any target egress PE device among multiple egress PE devices, so that the target egress PE device performs a MAC lookup based on the unicast label, and when the search result is not empty, forwarding the message to be forwarded to the multi-homed CE device according to the search result; when the search result is empty, forwarding the message to be forwarded to the multi-homed CE device according to the pre-set VLAN broadcast domain to avoid packet loss.

[0108] by Figure 8 Taking the packet forwarding system shown in the figure as an example, since the packets sent by the inbound PE device are added with unicast labels, after MPLS decapsulation is performed on any outbound PE device among PE1, PE2, ..., PEn, MAC lookup will be performed based on the fid and inner MAC address of the MPLS table entry. If the AC port pointing to CE1 cannot be found, the broadcast will be performed based on the VLAN broadcast domain. Since the VLAN broadcast domain is added with the AC port pointing to CE1 on all outbound PE devices, after receiving the packet, any outbound PE device among PE1, PE2, ..., PEn can forward the packet to CE1 through the AC port in the VLAN broadcast domain to avoid packet loss.

[0109] S203: If there is no MAC table entry for the multi-homed CE device, a BUM tag is added to the message to be forwarded.

[0110] When there is no MAC table entry for the multi-homed CE device on the inbound PE device, the inbound PE device needs to broadcast forward the message to be forwarded. When broadcast forwarding is performed, the MPLS label used for unknown unicast, multicast or broadcast is called a BUM label.

[0111] S204, sending the message to be forwarded carrying the BUM label to multiple outbound PE devices, so that the DF devices in the multiple outbound PE devices use the pre-created BUM multicast group to forward the message to be forwarded to the multi-home CE devices to avoid multiple packets.

[0112] by Figure 8Taking the packet forwarding system shown in the figure as an example, since the packet sent to the PE device in the inbound direction is added with a BUM label, PE1, PE2, ..., PEn will perform MPLS decapsulation after receiving the packet at the same time, and directly forward it according to the BUM multicast group bound to each other, without performing MAC lookup or broadcasting according to the VLAN broadcast domain. Since the BUM multicast group created by PE1, PE2, ..., PEn is added to the AC port pointing to CE1 according to the DF election information, even if PE1, PE2, ..., PEn receives the packet at the same time, only the DF device can forward the packet to CE1 according to the BUM multicast group. Since the packet is neither forwarded according to the VLAN broadcast domain nor forwarded according to the existing MAC table entry, but forwarded according to the BUM multicast group, multiple packets are avoided.

[0113] In order to execute the corresponding steps in the above method embodiment and each possible implementation mode, a message forwarding device 100 applied to an outbound PE device and a message forwarding device 200 applied to an inbound PE device are respectively provided below.

[0114] Please refer to Fig.12 The packet forwarding device 100 applied to the outgoing PE device includes an acquisition module 101, a processing module 102 and a forwarding module 103.

[0115] The acquisition module 101 is used to decapsulate the message to be forwarded from the inbound PE device and acquire the message label.

[0116] The processing module 102 is configured to perform a MAC lookup based on the message label to generate a lookup result if the message label is a unicast label, wherein the unicast label indicates that a MAC entry for a multi-homed CE device exists on the inbound PE device.

[0117] The forwarding module 103 is used to forward the message to be forwarded to the multi-homed CE device according to the search result if the search result is not empty; if the search result is empty, forward the message to be forwarded to the multi-homed CE device according to the pre-set VLAN broadcast domain to avoid packet loss.

[0118] Optionally, the processing module 102 is specifically used to determine the target forwarding domain according to the label value of the message label and the local MPLS table entry; perform a MAC lookup in the target forwarding domain according to the inner MAC address carried in the message to be forwarded; if an AC port pointing to a multi-home CE device is found, the AC port is used as the search result; if an AC port pointing to a multi-home CE device is not found, the search result is set to empty.

[0119] Optionally, AC ports pointing to multi-home CE devices are added to the VLAN broadcast domain, and the forwarding module 103 is used to broadcast the message to be forwarded to the AC ports pointing to the multi-home CE devices on all outbound PE devices, so as to forward the message to be forwarded to the multi-home CE device through the AC ports pointing to the multi-home CE devices on all outbound PE devices.

[0120] Optionally, the processing module 102 is also used to forward the message to be forwarded to the multi-homed CE device using a pre-created BUM multicast group if the message label is a BUM label, so as to avoid multiple packets, wherein the BUM label indicates that there is no MAC table entry for the multi-homed CE device on the inbound PE device.

[0121] Please refer to Fig.13 The message forwarding device 200 applied to the inbound PE device includes an adding module 201 and a sending module 202.

[0122] The adding module 201 is configured to add a unicast label to the message to be forwarded if there is a MAC table entry for the multi-homed CE device.

[0123] The sending module 202 is used to send the message to be forwarded carrying the unicast label to any target outbound PE device among multiple outbound PE devices, so that the target outbound PE device performs a MAC lookup based on the unicast label, and when the search result obtained is not empty, forward the message to be forwarded to the multi-home CE device according to the search result; when the search result obtained is empty, forward the message to be forwarded to the multi-home CE device according to the pre-set VLAN broadcast domain to avoid packet loss.

[0124] Optionally, the adding module 201 is further configured to add a BUM tag to the message to be forwarded if the adding module 201 does not have a MAC table entry for the multi-homed CE device.

[0125] The sending module 202 is also used to send the to-be-forwarded message carrying the BUM label to multiple outbound PE devices, so that the DF devices in the multiple outbound PE devices use the pre-created BUM multicast group to forward the to-be-forwarded message to the multi-home CE devices to avoid multiple packets.

[0126] Technical personnel in the relevant field can clearly understand that, for the convenience and conciseness of description, the specific working processes of the message forwarding device 100 applied to the outgoing PE device and the message forwarding device 200 applied to the incoming PE device described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0127] The embodiment of the present invention further provides an electronic device 300, which can be Figure 8The outbound PE device in the Figure 8 For the inbound PE device, refer to Fig.14 , the electronic device 300 may include a memory 310 and a processor 320 .

[0128] Among them, the processor 320 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs of the message forwarding method applied to the outbound PE device or the message forwarding method applied to the inbound PE device provided by the above-mentioned method embodiment.

[0129] The memory 310 may be a ROM or other types of static storage devices that can store static information and instructions, a RAM or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 310 may exist independently and be connected to the processor 320 via a communication bus. The memory 310 may also be integrated with the processor 320. Among them, the memory 310 is used to store machine executable instructions for executing the scheme of the present application. The processor 320 is used to execute the machine executable instructions stored in the memory 310 to implement the above-mentioned method embodiment.

[0130] An embodiment of the present invention also provides a computer-readable storage medium containing a computer program. When the computer program is executed, it can be used to perform relevant operations in the message forwarding method applied to the outbound PE device or the message forwarding method applied to the inbound PE device provided in the above method embodiment.

[0131] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A message forwarding method, characterized in that: The method is applied to a target egress PE device in a message forwarding system, wherein the message forwarding system includes a plurality of egress PE devices, each of which is communicatively connected to a multi-homed CE device, and the message forwarding system also includes an ingress PE device, each of which is communicatively connected to the ingress PE device. The method includes: Decapsulate the message to be forwarded from the inbound PE device to obtain a message label; If the message label is a unicast label, a MAC search is performed based on the message label to generate a search result, wherein the unicast label indicates that a MAC table entry for the multi-homed CE device exists on the inbound PE device; If the search result is not empty, forwarding the message to be forwarded to the multi-homed CE device according to the search result; If the search result is empty, the message to be forwarded is forwarded to the multi-homed CE device according to the preset VLAN broadcast domain to avoid packet loss.

2. The method according to claim 1, characterized in that The step of performing MAC address search based on the message tag and generating a search result comprises: Determine a target forwarding domain according to the label value of the message label and a local MPLS table entry; Performing a MAC lookup in the target forwarding domain according to the inner MAC address carried in the message to be forwarded; If an AC port pointing to the multi-homed CE device is found, the AC port is used as the search result; If the AC port pointing to the multi-homed CE device is not found, the search result is set to empty.

3. The method according to claim 1, characterized in that The VLAN broadcast domain has AC ports pointing to the multi-homed CE device added on all outbound PE devices, and the step of forwarding the message to be forwarded to the multi-homed CE device according to the pre-set VLAN broadcast domain includes: The message to be forwarded is broadcasted to the AC ports on all outbound PE devices pointing to the multi-homed CE device, so as to forward the message to be forwarded to the multi-homed CE device through the AC ports on all outbound PE devices pointing to the multi-homed CE device.

4. The method according to claim 1, characterized in that The method further comprises: If the message label is a BUM label, the message to be forwarded is forwarded to the multi-homed CE device using a pre-created BUM multicast group to avoid multiple packets, wherein the BUM label indicates that there is no MAC table entry for the multi-homed CE device on the inbound PE device.

5. A message forwarding method, characterized in that: Applied to an inbound PE device in a message forwarding system, the message forwarding system includes a plurality of outbound PE devices, each of the outbound PE devices is communicatively connected to the inbound PE device, and each of the outbound PE devices is also communicatively connected to a multi-homed CE device, the method comprising: If there is a MAC table entry for the multi-homed CE device, add a unicast label to the message to be forwarded; The message to be forwarded carrying the unicast label is sent to any target outgoing PE device among the multiple outgoing PE devices, so that the target outgoing PE device performs a MAC lookup based on the unicast label, and when the obtained lookup result is not empty, the message to be forwarded is forwarded to the multi-home CE device according to the lookup result; when the obtained lookup result is empty, the message to be forwarded is forwarded to the multi-home CE device according to the pre-set VLAN broadcast domain to avoid packet loss.

6. The method according to claim 5, characterized in that The method further comprises: If there is no MAC table entry for the multi-homed CE device, a BUM tag is added to the message to be forwarded; The message to be forwarded carrying the BUM label is sent to the multiple outgoing PE devices, so that the DF device in the multiple outgoing PE devices uses the pre-created BUM multicast group to forward the message to be forwarded to the multi-home CE device to avoid multiple packets.

7. A message forwarding device, characterized in that: The target egress PE device in the message forwarding system includes a plurality of egress PE devices, each of which is communicatively connected to a multi-homed CE device, and the message forwarding system also includes an ingress PE device, each of which is communicatively connected to the ingress PE device. The device includes: An acquisition module, used for decapsulating the message to be forwarded from the inbound PE device and acquiring a message label; a processing module, configured to perform a MAC lookup based on the message label to generate a lookup result if the message label is a unicast label, wherein the unicast label indicates that a MAC table entry for the multi-homed CE device exists on the inbound PE device; A forwarding module is used to forward the message to be forwarded to the multi-homed CE device according to the search result if the search result is not empty; if the search result is empty, forward the message to be forwarded to the multi-homed CE device according to a pre-set VLAN broadcast domain to avoid packet loss.

8. A message forwarding device, characterized in that: The device is applied to an inbound PE device in a message forwarding system, wherein the message forwarding system includes a plurality of outbound PE devices, each of which is communicatively connected to the inbound PE device, and each of which is also communicatively connected to a multi-homed CE device. The device includes: An adding module, configured to add a unicast label to the message to be forwarded if a MAC table entry for the multi-homed CE device exists in the module; The sending module is used to send the message to be forwarded carrying the unicast label to any target outbound PE device among the multiple outbound PE devices, so that the target outbound PE device performs a MAC lookup based on the label value of the unicast label, and when the obtained lookup result is not empty, forward the message to be forwarded to the multi-home CE device according to the lookup result; when the obtained lookup result is empty, forward the message to be forwarded to the multi-home CE device according to a pre-set VLAN broadcast domain to avoid packet loss.

9. An outbound PE device, characterized in that: It includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the message forwarding method according to any one of claims 1 to 4 is implemented.

10. An inbound PE device, characterized in that: It includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the message forwarding method as described in any one of claims 5-6 is implemented.

11. A message forwarding system, characterized in that: It includes a plurality of outbound PE devices as claimed in claim 9 and an inbound PE device as claimed in claim 10.

12. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the message forwarding method as described in any one of claims 1-4, or the message forwarding method as described in any one of claims 5-6.

Citation Information

Patent Citations

  • Virtual private LAN service (VPLS) message processing method and device

    CN106101023A

  • Message forwarding method and apparatus

    CN108259303A