Communication method and device

CN119363640AActive Publication Date: 2025-01-24NEW H3C TECH CO LTD
7 Cites 0 Cited by

Patent Information

Application Number
CN202411427074.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-01-24
Estimated Expiration
2044-10-12

Smart Images

  • Figure CN119363640A_ABST
    Figure CN119363640A_ABST
Patent Text Reader

Abstract

The invention provides a communication method and device, and the method comprises the steps: generating a first flow forwarding table item corresponding to a first CE locally according to a broadcast message when the broadcast message which is transmitted by the first CE and is forwarded by a second PE is received and a forwarding table item corresponding to the first CE does not exist in the first PE, the first flow forwarding table item comprises a first address of the first CE and a first outbound interface identifier; and when a service message sent by the second CE and forwarded by the third PE is received, if a destination address included in the service message is matched with the first address, forwarding the service message to the first CE through a first interface indicated by the first outbound interface identifier according to the first flow forwarding table item.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a communication method and device. Background Art

[0002] Ethernet Virtual Private Network (EVPN) is a Layer 2 VPN technology. Its control plane uses MP-BGP to announce EVPN routing information, and the data plane uses VXLAN encapsulation to forward messages. EVPN multi-homing is a technology that supports CE to connect to multiple PEs, and distinguishes different customer network edges (CE) through the Ethernet segment identifier (ESI) configured on the service provider network edge (PE).

[0003] In the existing CE multi-homed access PE network, the Layer 2 and Layer 3 traffic sent by the CE are hashed to one of the multi-homed PEs (for example, PE1). PE1 synchronizes the learned MAC or ARP routes to another multi-homed PE (for example, PE2) and the remote PE (for example, PE3) through the BGP EVPN protocol. PE1 and PE3 learn and generate table entries corresponding to CE respectively (PE3 will also synchronize the learned MAC or ARP routes to the remote CE) so that after receiving the traffic from CE in the future, the traffic can be forwarded through the corresponding table entries.

[0004] From the above, we can see that if the CPU or BGP module of PE2 is busy, it will process EVPN protocol packets slowly, even if the remote PE and remote CE have completed table entry learning. The traffic from the remote CE to the remote CE may also be lost because PE3 hashes to PE2. Summary of the invention

[0005] In view of this, the present application provides a communication method and apparatus to solve the problem that in the existing CE multi-homing access PE networking, any PE in the multi-homing PE processes the synchronously received protocol messages slowly, resulting in service message loss.

[0006] In a first aspect, the present application provides a communication method, the method being applied to a first PE, the first PE being connected to a first CE, the first CE also being connected to a second PE, the first PE and the second PE both being connected to a third PE, the second CE being connected to the third PE, the method comprising:

[0007] When receiving a broadcast message sent by the first CE and forwarded by the second PE and there is no forwarding table entry corresponding to the first CE in the first PE, generating a first traffic forwarding table entry corresponding to the first CE locally according to the broadcast message, wherein the first traffic forwarding table entry includes a first address and a first outbound interface identifier of the first CE;

[0008] When receiving a service message sent by the second CE and forwarded by the third PE, if the destination address included in the service message matches the first address, the service message is forwarded to the first CE through the first interface indicated by the first output interface identifier according to the first traffic forwarding table entry.

[0009] In a second aspect, the present application provides a communication device, the device is applied to a first PE, the first PE is connected to a first CE, the first CE is also connected to a second PE, the first PE and the second PE are both connected to a third PE, and the second CE is connected to the third PE, the device includes:

[0010] a generating unit, configured to, when receiving a broadcast message sent by the first CE and forwarded by the second PE and no forwarding entry corresponding to the first CE exists in the first PE, locally generate a first traffic forwarding entry corresponding to the first CE according to the broadcast message, wherein the first traffic forwarding entry includes a first address and a first outbound interface identifier of the first CE;

[0011] A sending unit is used to forward the service message sent by the second CE and forwarded by the third PE. If the destination address included in the service message matches the first address, the service message is forwarded to the first CE through the first interface indicated by the first output interface identifier according to the first traffic forwarding table entry.

[0012] In a third aspect, the present application provides a network device, including a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to execute the method provided in the first aspect of the present application.

[0013] Therefore, by applying the communication method and device provided in the present application, when a broadcast message sent by the first CE and forwarded by the second PE is received and there is no forwarding table entry corresponding to the first CE in the first PE, the first PE locally generates a first traffic forwarding table entry corresponding to the first CE according to the broadcast message, and the first traffic forwarding table entry includes the first address of the first CE and the first output interface identifier; when a service message sent by the second CE and forwarded by the third PE is received, if the destination address included in the service message matches the first address, then according to the first traffic forwarding table entry, the first PE forwards the service message to the first CE through the first interface indicated by the first output interface identifier.

[0014] In this way, by learning the broadcast message, the corresponding traffic forwarding table entry is generated. The table entry synchronization speed between multi-home devices is improved. Especially when the network equipment is busy, it can effectively reduce the traffic loss caused by the hashing of service messages to the multi-home devices that have not completed synchronization. It solves the problem that in the existing CE multi-home access PE network, any PE in the multi-home PE has a slow processing speed for the synchronously received protocol message, resulting in the loss of service messages. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A flow chart of a communication method provided in an embodiment of the present application;

[0016] Figure 2 A schematic diagram of a network suitable for a communication method provided in an embodiment of the present application;

[0017] Figure 3 A schematic diagram of the position of the first identifier in the message provided in the embodiment of the present application;

[0018] Figure 4 A schematic diagram of another position of the first identifier in the message provided in the embodiment of the present application;

[0019] Figure 5 A structural diagram of a communication device provided in an embodiment of the present application;

[0020] Figure 6 The network device hardware structure provided in the embodiment of the present application. DETAILED DESCRIPTION

[0021] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0022] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more corresponding listed items.

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

[0024] The communication method provided in the embodiment of the present application is described in detail below. Figure 1 , Figure 1 Flow chart of the communication method provided in the embodiment of the present application. The method is applied to the first PE. The communication method provided in the embodiment of the present application may include the following steps.

[0025] Step 110: when a broadcast message sent by the first CE and forwarded by the second PE is received and there is no forwarding table entry corresponding to the first CE in the first PE, a first traffic forwarding table entry corresponding to the first CE is generated locally according to the broadcast message, where the first traffic forwarding table entry includes a first address and a first outbound interface identifier of the first CE;

[0026] Specifically, through the aggregation port, the first CE is multi-homed to access the first PE and the second PE. The first PE and the second PE are respectively connected to the third PE through different links to form an ECPM. The second CE is connected to the third PE.

[0027] It can be understood that the first PE and the second PE may also be referred to as local PEs, and the third PE may also be referred to as remote PEs.

[0028] The first CE and the second CE have learned or configured the MAC address and IP address of the other end. Before forwarding the Layer 2 and Layer 3 traffic between the first CE and the second CE, the first CE sends a broadcast message (the process of sending the broadcast message can also be called the original forwarding process, so that each CE and PE learns the MAC address and IP address and generates a forwarding table entry). When it is determined that the outgoing interface indication for forwarding the broadcast message is an aggregation port, the first CE determines to forward the broadcast message to the second PE through the member port connected to the second PE using a hash algorithm.

[0029] After the second PE receives the broadcast message, the second PE obtains the first identifier corresponding to the Ethernet identifier in the first PE from the local second identifier mapping table (the identifier mapping table is referred to as the second identifier mapping table to facilitate distinction from the first identifier mapping table in the first PE) through the Ethernet segment identifier to which the interface receiving the broadcast message belongs. The second PE adds the obtained first identifier to the broadcast message and broadcasts it to the first PE and the third PE respectively. The second identifier mapping table is generated by the second PE according to the EVPN class 1 route sent by the first PE. The EVPN class 1 route includes a first identifier and a second identifier, and the second identifier is the Ethernet segment identifier, ESI.

[0030] After receiving the broadcast message, the first PE first obtains the address information of the first CE from the broadcast message, and identifies locally at the first PE whether there is no forwarding entry corresponding to the first CE based on the address information of the first CE.

[0031] If it does not exist, that is, the first PE has not learned the address information of the first CE, then the first PE generates a forwarding table entry corresponding to the first CE locally according to the broadcast message, and the forwarding table entry includes the first address of the first CE and the first outbound interface identifier. The above forwarding table entry is a forwarding table entry generated by the first PE according to the broadcast traffic, so the forwarding table entry can also be called a traffic forwarding table entry.

[0032] In the embodiment of the present application, after receiving the broadcast message, the second PE first learns the address information of the first CE locally and generates a forwarding entry corresponding to the first CE locally. Afterwards, the second PE sends the address information of the first CE to the first PE via the BGP EVPN protocol.

[0033] Optionally, the second PE sends a first EVPN protocol message to the first PE, where the first EVPN protocol message includes an address of the first CE and a second identifier. In the embodiment of the present application, the first EVPN protocol message is specifically an EVPN Class II route.

[0034] According to the first EVPN protocol message, the first PE locally generates a forwarding table entry corresponding to the first CE again, and the forwarding table entry includes the first address of the first CE and the first outbound interface identifier (according to the second identifier, the interface identifier of the first interface bound to the second identifier is obtained as the first outbound interface identifier). The above forwarding table entry is a forwarding table entry generated by the first PE according to the EVPN protocol message, so the forwarding table entry can also be called a protocol forwarding table entry.

[0035] It should be noted that the traffic forwarding table item and the protocol forwarding table item are both forwarding table items generated locally by the first PE and corresponding to the first CE, but the sources of the two items are different. The first PE can add a source field to the forwarding table item and record the source of each forwarding table item. In this way, the above two items can be stored locally in the first PE at the same time.

[0036] It can be understood that if the above two table entries exist in the first PE at the same time, then after the first PE subsequently receives the business traffic sent to the first CE (the third PE forwards the business traffic sent to the first CE to the first PE through a hash algorithm), the first PE will give priority to using the protocol forwarding table entries to match and forward the business traffic; if there are traffic forwarding table entries but no protocol forwarding table entries in the first PE (the EVPN protocol message may not be received, or the EVPN protocol message is received but the protocol forwarding table entries are not generated), the first PE uses the traffic forwarding table entries to match and forward the business traffic without discarding the business traffic, thereby ensuring that no packet loss occurs.

[0037] Optionally, the broadcast message includes a first address and a first identifier of the first CE;

[0038] The specific process of the first PE generating the first traffic forwarding table entry corresponding to the first CE locally according to the broadcast message is as follows: according to the first identifier, the first PE obtains the second identifier corresponding to the first identifier from the first identifier mapping table. The second identifier is specifically the Ethernet segment identifier, i.e., ESI. According to the second identifier, the first PE obtains the interface identifier of the first interface bound to the ESI; the first PE uses the interface identifier of the first interface as the first outgoing interface identifier; the first PE generates the first traffic forwarding table entry.

[0039] The first identifier mapping table includes a mapping relationship between the first identifier and the second identifier of the first PE.

[0040] Optionally, the first address includes a MAC address of the first CE, and the first identifier includes a first label (an MPLS label in an MPLS network) or a first parameter (arguments included in a SID in an SRv6 network); or;

[0041] The first address includes a MAC address and an IP address of the first CE, and the first identifier includes a first tag or a first parameter;

[0042] The first label or the first parameter is a label or a parameter corresponding to the second identifier bound to the interface, which is obtained by the second PE from the second mapping table according to the interface that receives the broadcast message.

[0043] Optionally, the first traffic forwarding table entry is a MAC address table entry of the first CE; or;

[0044] The first traffic forwarding table entry is an ARP table entry of the first CE and a routing table entry of the first CE; or;

[0045] The first traffic forwarding table entry is the ND table entry of the first CE and the routing table entry of the first CE.

[0046] Optionally, in an embodiment of the present application, when the first identifier is a first label, the broadcast message includes a label (Lable) field, and the second PE stores the first label at the bottom of the label field (i.e., near the L3 header). The label field can carry multiple labels, and the multiple labels are arranged in order.

[0047] Optionally, in an embodiment of the present application, when the first identifier is the first parameter, the broadcast message is an inner message, and the SRH header and the IPv6 basic header are respectively encapsulated in its outer layer. The IPv6 basic header includes a destination address field, and the SRH header includes a segment list field. The destination address field or the segment list field is used to carry the VPN SID under the VSI instance corresponding to the ESI. The SID includes an Args field, and the Args field is used to carry the first parameter. When the first PE is the last hop node, the destination address field is used to carry the VPNSID under the VSI instance corresponding to the ESI; when the first PE is an intermediate node, the segment list field is used to carry the VPNSID under the VSI instance corresponding to the ESI.

[0048] Step 120: When receiving a service message sent by the second CE and forwarded by the third PE, if the destination address included in the service message matches the first address, forwarding the service message to the first CE through the first interface indicated by the first output interface identifier according to the first traffic forwarding table entry.

[0049] Specifically, according to the description of step 110, after the first PE generates the first traffic forwarding table entry locally, when receiving the service message sent by the second CE forwarded by the third PE, if the destination address included in the service message matches the first address, the service message is forwarded to the first CE through the first interface indicated by the first outgoing interface identifier according to the first traffic forwarding table entry. In this way, when there is no protocol forwarding table entry in the first PE, the first PE uses the traffic forwarding table entry to match and forward the service traffic, and will not discard the service traffic, thereby ensuring no packet loss.

[0050] Therefore, by applying the communication method provided in the present application, when a broadcast message sent by the first CE and forwarded by the second PE is received and there is no forwarding table entry corresponding to the first CE in the first PE, the first PE locally generates a first traffic forwarding table entry corresponding to the first CE according to the broadcast message, and the first traffic forwarding table entry includes the first address of the first CE and the first output interface identifier; when a service message sent by the second CE and forwarded by the third PE is received, if the destination address included in the service message matches the first address, then according to the first traffic forwarding table entry, the first PE forwards the service message to the first CE through the first interface indicated by the first output interface identifier.

[0051] In this way, by learning the broadcast message, the corresponding traffic forwarding table entry is generated. The table entry synchronization speed between multi-home devices is improved. Especially when the network equipment is busy, it can effectively reduce the traffic loss caused by the hashing of service messages to the multi-home devices that have not completed synchronization. It solves the problem that in the existing CE multi-home access PE network, any PE in the multi-home PE has a slow processing speed for the synchronously received protocol message, resulting in the loss of service messages.

[0052] The communication method provided in the embodiment of the present application is described in detail below. Figure 2 , Figure 2 A schematic diagram of a network suitable for a communication method provided in an embodiment of the present application. Figure 2 In the example, the network includes CE1, CE2, PE1, PE2, and PE3. Through the aggregation port, CE1 accesses PE1 and PE2 through member ports (Port) 1 and Port2 respectively; PE1 and PE2 access PE3's Port5 and Port6 through Port3 and Port4 respectively in ECPM mode; CE2 accesses PE3's Port7; PE1 and PE2 also establish a communication connection through Port8 and Port9, and the communication connection can be different according to different networking environments. For example, in an MPLS network (LSP) and an SRv6 network (Policy), the connection between PE1 and PE2 is also different.

[0053] A VSI instance (for example, VSI 1) has been configured in PE1 and PE2, and an EVPN instance has been configured under the VSI instance. CE1 is connected to PE1 and PE2 through different Ethernet links, and these links form an Ethernet segment (ES). The above links have been configured with the same ES identifier (ESI), for example, ES1.

[0054] PE1 and PE2 also include Ragg1 belonging to the aggregation group, and the Ragg1 establishes a binding relationship with ES1.

[0055] After networking, PE1 generates EVPN class 1 route 1 and sends it to PE2 and PE3. The EVPN class 1 route includes identifier 1 corresponding to ES1 in PE1 and ES1. After PE2 receives the BGP EVPN class 1 route, it generates identifier mapping table 1 locally and records the mapping relationship between PE1, ES1 and identifier 1 in mapping table 1. PE1 also generates identifier mapping table 2 locally and records the mapping relationship between ES1 and identifier 1 in identifier mapping table 2. For example, identifier 1 can be specifically a label (Label) of ES1 in PE1 in an MPLS network, or it can be arguments in the VPN SID under the VSI instance corresponding to ES1 in PE1 in an SRv6 network.

[0056] Similarly, after networking, PE2 also generates EVPN class 1 routes and sends them to PE2 and PE3. This EVPN class 1 route is similar to the EVPN class 1 route generated by PE1 and will not be repeated here.

[0057] The following takes Layer 2 traffic forwarding between CE1 and CE2 as an example for explanation.

[0058] CE1 and CE2 have learned or configured the MAC address of the other end. CE1 generates a Layer 2 broadcast message, which includes the source MAC address and the destination MAC address. The source MAC address is CE1's MAC address, and the destination MAC address is CE2's MAC address. CE1 determines that the outbound interface is an aggregation port, and uses hash calculation to determine that the Layer 2 broadcast message is sent to PE2 through Port2.

[0059] After PE2 receives the Layer 2 broadcast message, it obtains the source MAC address from it. PE2 learns the MAC address of CE1 and locally generates MAC forwarding table entry 1 corresponding to CE1. At the same time, after PE2 receives the Layer 2 broadcast message, according to the Ragg1 interface that receives the Layer 2 broadcast message, it obtains the identifier 1 corresponding to ES1 in PE1 that belongs to the same ES1 as the Ragg1 in the identifier mapping table 1.

[0060] PE2 adds identifier 1 to the Layer 2 broadcast message and sends the Layer 2 broadcast message to PE1 and PE3 through Port 4 and Port 9.

[0061] In one implementation, when the identifier 1 is label 1, the broadcast message includes a label field, and PE2 stores label 1 at the bottom of the label field (ie, near the L3 header). Figure 3 As shown, Figure 3 A schematic diagram of the position of the first identifier in the message provided in the embodiment of the present application. Figure 3In the MPLS protocol, the label field can carry multiple labels and arrange the multiple labels in order. Each label includes a label field, a TC field, an S field, and a TTL field. Each field can be set according to the existing MPLS protocol and will not be repeated here.

[0062] In another implementation, when the first identifier is parameter 1, the broadcast message is an original message, and the SRH header and the IPv6 basic header are encapsulated in its outer layer. The IPv6 basic header includes a destination address field, and the SRH header includes a segment list field. The destination address field or the segment list field is used to carry the VPN SID under the VSI instance corresponding to ES1. The SID includes an Args field, and the Args field is used to carry parameter 1. Figure 4 As shown, Figure 4 Another schematic diagram of the position of the first identifier in the message provided in the embodiment of the present application. In the embodiment of the present application, PE1 is the last hop node, so PE2 stores the VPN SID under the VSI instance corresponding to ES1 in PE1 in the destination address field. The SID also includes a Locator field and a Function field, both of which can be set according to the existing SRv6 protocol and will not be repeated here.

[0063] At the same time, after learning the MAC address of CE1, PE2 also generates an EVPN Class 2 route. The EVPN Class 2 route includes the MAC address of CE1 and ES1. Through Port4 and Port9, PE2 sends the EVPN Class 2 route to PE1 and PE3 respectively.

[0064] After receiving the Layer 2 broadcast message, PE1 obtains CE1's MAC address and identifier 1. According to identifier 1, PE1 obtains the ESI corresponding to identifier 1 from identifier mapping table 2. According to ESI, the local interface bound to ESI, i.e., local Ragg1, ​​is obtained. PE1 generates MAC forwarding table entry 2 corresponding to CE1, which includes CE1's MAC address and outgoing interface identifier (i.e., local Ragg1).

[0065] After receiving the EVPN Class II route, PE1 obtains the MAC address of CE1 and ES1. According to ES1, it obtains the interface bound to ES1, that is, local Ragg1. PE1 generates MAC forwarding entry 3 corresponding to CE1, which includes the MAC address of CE1 and the outbound interface identifier (that is, local Ragg1). PE1 sends MAC forwarding entry 3 to the EVPN instance under the corresponding VSI instance.

[0066] It should be noted that MAC forwarding table entry 2 and MAC forwarding table entry 3 are both MAC forwarding table entries corresponding to CE1 generated locally by PE1, but the sources of these two entries are different. PE1 can add a source field to the forwarding table entry and record the source of each forwarding table entry. In this way, the above two entries can be stored in the VSI instance at the same time.

[0067] After receiving the EVPN Class II route, PE3 also learns the MAC address of CE1 and generates a remote MAC forwarding table entry 4 corresponding to CE1. PE3 sends the remote MAC forwarding table entry 4 to the EVPN instance under the corresponding VSI instance. At the same time, according to the EVPN Class II route and the EVPN Class I route sent by PE1 and PE2 respectively, PE3 determines that the outbound interface identifier included in the remote MAC forwarding table entry 4 is the interface of the ECMP path pointing to PE1 and PE2 (i.e., Port3 and Port4).

[0068] PE3 also sends a layer 2 broadcast message to CE2. CE2 learns the MAC address of CE1 included in the layer 2 broadcast message and generates a MAC forwarding entry 5 corresponding to CE1. The outgoing interface identifier included in the MAC forwarding entry 5 is the interface for receiving the layer 2 broadcast message (ie, Port7).

[0069] If CE2 sends Layer 2 unicast traffic to CE1 at this time, PE3 will forward it through the remote MAC forwarding table entry 4 generated corresponding to CE1. When PE3 forwards Layer 2 unicast traffic, if it determines that the outgoing interface is Port3 through the hash algorithm, PE3 will forward the Layer 2 unicast traffic to PE1.

[0070] After PE1 receives the Layer 2 unicast traffic, if PE1 is in the process of learning EVPN Class 2 routing and has not generated MAC forwarding entry 3, PE1 can forward the Layer 2 unicast traffic through the previously generated MAC forwarding entry 2 and send it to CE1.

[0071] Subsequently, if PE1 generates MAC forwarding entry 3, the layer 2 unicast traffic can be sent to CE1 through MAC forwarding entry 3.

[0072] Similarly, in the reverse direction, the process in which CE1 learns the MAC address of CE2 and the process in which CE1 sends traffic to CE2 are similar to the above process and will not be repeated here.

[0073] The following takes Layer 3 traffic (IPv4 traffic) forwarding between CE1 and CE2 as an example for description.

[0074] CE1 and CE2 have learned or configured the MAC address and IP address of the other end. CE1 generates an ARP request and broadcasts it at Layer 2. The ARP request includes the source IP address, destination IP address, source MAC address, and destination MAC address. The source IP address and source MAC address are the IP address and MAC address of CE1; the destination IP address and destination MAC address are the IP address and MAC address of CE2. CE1 determines that the outbound interface is an aggregation port, and uses hash calculation to determine that the ARP request is sent to PE2 through Port2.

[0075] After receiving the ARP request, PE2 obtains the source MAC address and source IP address from it. PE2 learns the MAC address and IP address of CE1 and generates ARP entry 1 corresponding to CE1 locally. At the same time, after receiving the ARP request, PE2 obtains the identifier 1 corresponding to ES1 in PE1 belonging to the same ES1 as Ragg1 in the identifier mapping table 1 according to the Ragg1 interface that receives the ARP request.

[0076] PE2 adds identifier 1 to the ARP request and sends the ARP request to PE1 and PE3 through Port 4 and Port 9.

[0077] In one implementation, when the identifier 1 is label 1, the broadcast message includes a label field, and PE2 stores label 1 at the bottom of the label field (ie, near the L3 layer header). Figure 3 shown.

[0078] In another implementation, when the first identifier is parameter 1, the ARP request is an inner layer message, and the outer layer thereof is divided into an SRH header and an IPv6 basic header. The IPv6 basic header includes a destination address field, and the SRH header includes a segment list field. The destination address field or the segment list field is used to carry the VPN SID under the VSI instance corresponding to ES1. The SID includes an Args field, and the Args field is used to carry parameter 1. Figure 4 In the embodiment of the present application, PE1 is the last hop node, so PE2 stores the VPN SID under the VSI instance corresponding to ES1 in PE1 in the destination address field.

[0079] At the same time, after learning the MAC address and IP address of CE1, PE2 also generates an EVPN Class II route. The EVPN Class II route includes the MAC address and IP address of CE1 and ES1. Through Port4 and Port9, PE2 sends the EVPN Class II route to PE1 and PE3 respectively.

[0080] After receiving the ARP request, PE1 obtains CE1's MAC address, IP address, and identifier 1. Based on identifier 1, PE1 obtains the ESI corresponding to identifier 1 from identifier mapping table 2. Based on ESI, the local interface bound to ESI, i.e., local Ragg1, ​​is obtained. PE1 generates ARP entry 2 corresponding to CE1, which includes CE1's MAC address, IP address, and outbound interface identifier (i.e., local Ragg1).

[0081] After receiving the EVPN Class II route, PE1 obtains the MAC address, IP address, and ES1 of CE1. According to ES1, it obtains the interface bound to ES1, namely, local Ragg1. PE1 generates ARP entry 3 corresponding to CE1, which includes the MAC address, IP address, and outbound interface identifier of CE1 (i.e., local Ragg1). PE1 sends ARP entry 3 to the EVPN instance under the corresponding VSI instance.

[0082] It should be noted that both ARP entry 2 and ARP entry 3 are ARP entries generated locally by PE1 and corresponding to CE1, but the sources of these two entries are different. PE1 can add a source field to the entry and record the source of each entry. In this way, the above two entries can be stored in the VSI instance at the same time.

[0083] After receiving the EVPN Class II route, PE3 also learns the MAC address and IP address of CE1, and generates a remote ARP entry 4 and a remote routing entry 1 corresponding to CE1. PE3 sends the remote ARP entry 4 and the remote routing entry 1 to the EVPN instance under the corresponding VSI instance. At the same time, according to the EVPN Class II route and the EVPN Class I route sent by PE1 and PE2, PE3 determines that the outbound interface identifiers included in the remote ARP entry 4 and the remote routing entry 1 are the interfaces of the ECMP path pointing to PE1 and PE2 (i.e., Port3 and Port4).

[0084] PE3 also sends an ARP request to CE2. CE2 learns the MAC address and IP address of CE1 included in the ARP request, and generates ARP entry 5 and routing entry 2 corresponding to CE1. The outbound interface identifiers included in the ARP entry 5 and routing entry 2 are the interfaces for receiving the ARP request (ie, Port 7).

[0085] If CE2 sends IPv4 traffic to CE1 at this time, PE3 will forward it through the remote ARP entry 4 and remote routing entry 1 generated for CE1. When PE3 forwards IPv4 traffic, if the outbound interface is determined to be Port3 through the hash algorithm, PE3 will forward the IPv4 traffic to PE1.

[0086] After PE1 receives the IPv4 traffic, if PE1 is in the process of learning EVPN Class 2 routes and has not generated ARP entry 3, PE1 can forward the IPv4 traffic through the previously generated ARP entry 2 and send it to CE1.

[0087] Subsequently, if PE1 generates ARP entry 3, IPv4 traffic can be sent to CE1 through ARP entry 3.

[0088] Similarly, in the reverse direction, the process in which CE1 learns the MAC address and IP address of CE2 and the process in which CE1 sends traffic to CE2 are similar to the above process and will not be repeated here.

[0089] The following takes Layer 3 traffic (IPv6 traffic) forwarding between CE1 and CE2 as an example for description.

[0090] CE1 and CE2 have learned or configured the MAC address and IP address of the other end. CE1 generates an ND request and broadcasts it at Layer 2. The ND request includes the source IP address, destination IP address, source MAC address, and destination MAC address. The source IP address and source MAC address are the IP address and MAC address of CE1; the destination IP address and destination MAC address are the IP address and MAC address of CE2. CE1 determines that the outbound interface is an aggregation port, and uses hash calculation to determine that the ARP request is sent to PE2 through Port2.

[0091] After receiving the ARP request, PE2 obtains the source MAC address and source IP address from it. PE2 learns the MAC address and IP address of CE1 and generates ND entry 1 corresponding to CE1 locally. At the same time, after receiving the ND request, PE2 obtains the identifier 1 corresponding to ES1 in PE1 belonging to the same ES1 as the Ragg1 interface that receives the ND request from the identifier mapping table 1.

[0092] PE2 adds identifier 1 to the ND request and sends the ND request to PE1 and PE3 through Port 4 and Port 9.

[0093] In one implementation, when the identifier 1 is label 1, the broadcast message includes a label field, and PE2 stores label 1 at the bottom of the label field (ie, near the L3 layer header). Figure 3 shown.

[0094] In another implementation, when the first identifier is parameter 1, the ND request is an inner layer message, and the outer layer thereof is divided into an SRH header and an IPv6 basic header. The IPv6 basic header includes a destination address field, and the SRH header includes a segment list field. The destination address field or the segment list field is used to carry the VPN SID under the VSI instance corresponding to ES1. The SID includes an Args field, and the Args field is used to carry parameter 1. Figure 4 In the embodiment of the present application, PE1 is the last hop node, so PE2 stores the VPN SID under the VSI instance corresponding to ES1 in PE1 in the destination address field.

[0095] At the same time, after learning the MAC address and IP address of CE1, PE2 also generates an EVPN Class II route. The EVPN Class II route includes the MAC address and IP address of CE1 and ES1. Through Port4 and Port9, PE2 sends the EVPN Class II route to PE1 and PE3 respectively.

[0096] After receiving the ND request, PE1 obtains CE1's MAC address, IP address, and identifier 1. Based on identifier 1, PE1 obtains the ESI corresponding to identifier 1 from identifier mapping table 2. Based on ESI, the local interface bound to ESI, i.e., local Ragg1, ​​is obtained. PE1 generates ND entry 2 corresponding to CE1, which includes CE1's MAC address, IP address, and outbound interface identifier (i.e., local Ragg1).

[0097] After receiving the EVPN Class II route, PE1 obtains the MAC address, IP address, and ES1 of CE1. According to ES1, it obtains the interface bound to ES1, namely, local Ragg1. PE1 generates ND entry 3 corresponding to CE1, which includes CE1's MAC address, IP address, and outbound interface identifier (i.e., local Ragg1). PE1 sends ND entry 3 to the EVPN instance under the corresponding VSI instance.

[0098] It should be noted that both ND entry 2 and ND entry 3 are ND entries generated locally by PE1 and corresponding to CE1, but the sources of these two entries are different. PE1 can add a source field to the entry and record the source of each entry. In this way, the above two entries can be stored in the VSI instance at the same time.

[0099] After receiving the EVPN Class II route, PE3 also learns the MAC address and IP address of CE1, and generates a remote ND entry 4 and a remote routing entry 3 corresponding to CE1. PE3 sends the remote ND entry 4 and the remote routing entry 3 to the EVPN instance under the corresponding VSI instance. At the same time, according to the EVPN Class II route and the EVPN Class I route sent by PE1 and PE2, PE3 determines that the outbound interface identifiers included in the remote ND entry 4 and the remote routing entry 3 are the interfaces of the ECMP path pointing to PE1 and PE2 (i.e., Port3 and Port4).

[0100] PE3 also sends the ND request to CE2. CE2 learns the MAC address and IP address of CE1 included in the ND request, and generates ND entry 5 and routing entry 4 corresponding to CE1. The outbound interface identifiers included in the ND entry 5 and routing entry 4 are the interfaces for receiving ND requests (ie, Port7).

[0101] If CE2 sends IPv6 traffic to CE1 at this time, PE3 will forward it through the remote ND entry 4 and remote routing entry 3 generated for CE1. When PE3 forwards IPv6 traffic, if the outbound interface is determined to be Port3 through the hash algorithm, PE3 will forward the IPv6 traffic to PE1.

[0102] After PE1 receives the IPv6 traffic, if PE1 is in the process of learning EVPN Class 2 routes and has not generated ND entry 3, PE1 can forward the IPv6 traffic through the previously generated ND entry 2 and send it to CE1.

[0103] Subsequently, if PE1 generates ND entry 3, IPv6 traffic can be sent to CE1 through ND entry 3.

[0104] Similarly, in the reverse direction, the process in which CE1 learns the MAC address and IP address of CE2 and the process in which CE1 sends traffic to CE2 are similar to the above process and will not be repeated here.

[0105] Based on the same inventive concept, the present application embodiment also provides a communication device corresponding to the communication method. Figure 5 , Figure 5 A communication device provided in an embodiment of the present application, wherein the device is applied to a first PE, the first PE is connected to a first CE, the first CE is also connected to a second PE, the first PE and the second PE are both connected to a third PE, and the second CE is connected to the third PE, and the device includes:

[0106] The first generating unit 510 is configured to, when receiving a broadcast message sent by the first CE and forwarded by the second PE and the first PE does not have a forwarding table entry corresponding to the first CE, locally generate a first traffic forwarding table entry corresponding to the first CE according to the broadcast message, wherein the first traffic forwarding table entry includes a first address and a first outbound interface identifier of the first CE;

[0107] The sending unit 520 is used to forward the service message sent by the second CE and forwarded by the third PE. If the destination address included in the service message matches the first address, the service message is forwarded to the first CE through the first interface indicated by the first output interface identifier according to the first traffic forwarding table entry.

[0108] Optionally, the device further comprises:

[0109] A second generation unit (not shown in the figure) is used to locally generate a first protocol forwarding table entry corresponding to the first CE according to the first EVPN protocol message when receiving the first EVPN protocol message sent by the second PE, wherein the first protocol forwarding table entry includes the first address and the first output interface identifier.

[0110] Optionally, the broadcast message includes the first address and a first identifier;

[0111] The first generating unit 510 is specifically configured to obtain, according to the first identifier, a second identifier corresponding to the first identifier from a first identifier mapping table;

[0112] According to the second identifier, acquiring the interface identifier of the first interface bound to the second identifier;

[0113] Using the interface identifier of the first interface as the first outgoing interface identifier;

[0114] Generate the first traffic forwarding table entry.

[0115] Optionally, the device further comprises:

[0116] A receiving unit (not shown in the figure) is used to receive a second EVPN protocol message sent by the second PE, wherein the second EVPN protocol message includes the first identifier and the second identifier, so that the second PE locally generates a second identifier mapping table, wherein the second identifier mapping table includes a correspondence between the first identifier and the second identifier.

[0117] Optionally, the first address includes a MAC address of the first CE, and the first identifier includes a first tag or a first parameter; or;

[0118] The first address includes a MAC address and an IP address of the first CE, and the first identifier includes the first tag or the first parameter;

[0119] The first label or the first parameter is a label or a parameter corresponding to the second identifier bound to the interface, which is obtained by the second PE from the second mapping table according to the interface that receives the broadcast message.

[0120] Optionally, the first traffic forwarding table entry is a MAC address table entry of the first CE; or;

[0121] The first traffic forwarding table entry is an ARP table entry of the first CE and a routing table entry of the first CE; or;

[0122] The first traffic forwarding table entry is an ND table entry of the first CE and a routing table entry of the first CE.

[0123] Therefore, by applying the communication device provided in the present application, when a broadcast message sent by the first CE and forwarded by the second PE is received and there is no forwarding table entry corresponding to the first CE in the first PE, the first PE locally generates a first traffic forwarding table entry corresponding to the first CE according to the broadcast message, and the first traffic forwarding table entry includes the first address of the first CE and the first output interface identifier; when a service message sent by the second CE and forwarded by the third PE is received, if the destination address included in the service message matches the first address, then according to the first traffic forwarding table entry, the first PE forwards the service message to the first CE through the first interface indicated by the first output interface identifier.

[0124] In this way, by learning the broadcast message, the corresponding traffic forwarding table entry is generated. The table entry synchronization speed between multi-home devices is improved. Especially when the network equipment is busy, it can effectively reduce the traffic loss caused by the hashing of service messages to the multi-home devices that have not completed synchronization. It solves the problem that in the existing CE multi-home access PE network, any PE in the multi-home PE has a slow processing speed for the synchronously received protocol message, resulting in the loss of service messages.

[0125] Based on the same inventive concept, the embodiment of the present application also provides a network device, such as Figure 6 As shown, it includes a processor 610, a transceiver 620 and a machine-readable storage medium 630, the machine-readable storage medium 630 stores machine-executable instructions that can be executed by the processor 610, and the processor 610 is prompted by the machine-executable instructions to execute the communication method provided in the embodiment of the present application. Figure 5 The communication device shown can be used as Figure 6 The network device hardware structure shown is implemented.

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

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

[0128] In the embodiment of the present application, the processor 610 reads the machine executable instructions stored in the machine readable storage medium 630, and the machine executable instructions enable the processor 610 itself and call the transceiver 620 to execute the communication method described in the aforementioned embodiment of the present application.

[0129] In addition, an embodiment of the present application provides a machine-readable storage medium 630, which stores machine-executable instructions. When called and executed by the processor 610, the machine-executable instructions prompt the processor 610 itself and the calling transceiver 620 to execute the communication method described in the aforementioned embodiment of the present application.

[0130] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0131] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0132] As for the communication device and machine-readable storage medium embodiments, since the method contents involved are basically similar to the aforementioned method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0133] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A communication method, characterized in that: The method is applied to a first PE, the first PE is connected to a first CE, the first CE is also connected to a second PE, the first PE and the second PE are both connected to a third PE, and the second CE is connected to the third PE, and the method includes: When receiving a broadcast message sent by the first CE and forwarded by the second PE and there is no forwarding table entry corresponding to the first CE in the first PE, generating a first traffic forwarding table entry corresponding to the first CE locally according to the broadcast message, wherein the first traffic forwarding table entry includes a first address and a first outbound interface identifier of the first CE; When receiving a service message sent by the second CE and forwarded by the third PE, if the destination address included in the service message matches the first address, the service message is forwarded to the first CE through the first interface indicated by the first output interface identifier according to the first traffic forwarding table entry.

2. The method according to claim 1, characterized in that The method further comprises: When receiving the first EVPN protocol message sent by the second PE, a first protocol forwarding table entry corresponding to the first CE is generated locally according to the first EVPN protocol message, where the first protocol forwarding table entry includes the first address and the first outbound interface identifier.

3. The method according to claim 1, characterized in that The broadcast message includes the first address and the first identifier; The locally generating a first traffic forwarding entry corresponding to the first CE according to the broadcast message specifically includes: According to the first identifier, obtaining a second identifier corresponding to the first identifier from a first identifier mapping table; According to the second identifier, acquiring the interface identifier of the first interface bound to the second identifier; Using the interface identifier of the first interface as the first outgoing interface identifier; Generate the first traffic forwarding table entry.

4. The method according to claim 3, characterized in that: The method further comprises: Receive a second EVPN protocol message sent by the second PE, where the second EVPN protocol message includes the first identifier and the second identifier, so that the second PE locally generates a second identifier mapping table, where the second identifier mapping table includes a correspondence between the first identifier and the second identifier.

5. The method according to claim 4, characterized in that The first address includes a MAC address of the first CE, and the first identifier includes a first tag or a first parameter; or; The first address includes a MAC address and an IP address of the first CE, and the first identifier includes the first tag or the first parameter; The first label or the first parameter is a label or a parameter corresponding to the second identifier bound to the interface, which is obtained by the second PE from the second mapping table according to the interface that receives the broadcast message.

6. The method according to claim 1, characterized in that The first traffic forwarding table entry is a MAC address table entry of the first CE; or; The first traffic forwarding table entry is an ARP table entry of the first CE and a routing table entry of the first CE; or; The first traffic forwarding table entry is an ND table entry of the first CE and a routing table entry of the first CE.

7. A communication device, characterized in that: The device is applied to a first PE, the first PE is connected to a first CE, the first CE is also connected to a second PE, the first PE and the second PE are both connected to a third PE, and the second CE is connected to the third PE, and the device includes: a first generating unit, configured to, when receiving a broadcast message sent by the first CE and forwarded by the second PE and the first PE does not have a forwarding table entry corresponding to the first CE, locally generate a first traffic forwarding table entry corresponding to the first CE according to the broadcast message, wherein the first traffic forwarding table entry includes a first address and a first outbound interface identifier of the first CE; A sending unit is used to forward the service message sent by the second CE and forwarded by the third PE. If the destination address included in the service message matches the first address, the service message is forwarded to the first CE through the first interface indicated by the first output interface identifier according to the first traffic forwarding table entry.

8. The device according to claim 7, characterized in that The device also includes: The second generating unit is configured to locally generate a first protocol forwarding table entry corresponding to the first CE according to the first EVPN protocol message when receiving the first EVPN protocol message sent by the second PE, wherein the first protocol forwarding table entry includes the first address and the first outbound interface identifier.

9. The device according to claim 7, characterized in that The broadcast message includes the first address and the first identifier; The first generating unit is specifically configured to obtain, according to the first identifier, a second identifier corresponding to the first identifier from a first identifier mapping table; According to the second identifier, acquiring the interface identifier of the first interface bound to the second identifier; Using the interface identifier of the first interface as the first outgoing interface identifier; Generate the first traffic forwarding table entry.

10. The device according to claim 9, characterized in that The device also includes: A receiving unit, used to receive a second EVPN protocol message sent by the second PE, wherein the second EVPN protocol message includes the first identifier and the second identifier, so that the second PE locally generates a second identifier mapping table, wherein the second identifier mapping table includes a correspondence between the first identifier and the second identifier.

11. The device according to claim 10, characterized in that The first address includes a MAC address of the first CE, and the first identifier includes a first tag or a first parameter; or; The first address includes a MAC address and an IP address of the first CE, and the first identifier includes the first tag or the first parameter; The first label or the first parameter is a label or a parameter corresponding to the first PE obtained by the second PE from the second mapping table according to the interface through which the broadcast message is received.

12. The device according to claim 7, characterized in that The first traffic forwarding table entry is a MAC address table entry of the first CE; or; The first traffic forwarding table entry is an ARP table entry of the first CE and a routing table entry of the first CE; or; The first traffic forwarding table entry is an ND table entry of the first CE and a routing table entry of the first CE.

Citation Information

Patent Citations

  • Packet forwarding method, system and verge equipment in virtual private network

    CN101114973A

  • Stacking system and entry issuing method and device thereof

    CN108650180A

  • Method and device for realizing butt joint of different networks under EVPN (Ethernet Virtual Private Network)

    CN113472665A

  • Protocol conversion method and device, electronic equipment and computer readable storage medium

    CN115866088A

  • Local-bias forwarding of L2 multicast, unknown unicast, and broadcast traffic for an ethernet VPN

    US10841216B1