Communication method and apparatus
By generating a traffic forwarding table entry corresponding to the first CE in the first PE and forwarding service packets according to the table entry, the packet loss problem caused by slow protocol packet processing speed in CE multi-homed access PE networking is solved, and the table entry synchronization speed and service packet transmission reliability are improved.
Patent Information
- Application Number
- CN202411427074.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-10-12
AI Technical Summary
In a CE multi-homed access PE network, any PE in the multi-homed PE may process synchronously received protocol messages slowly, leading to packet loss of service messages.
When the first PE receives a broadcast message forwarded by the second PE from the first CE, the first PE generates a traffic forwarding table entry corresponding to the first CE locally. When it receives a service message forwarded by the third PE, it forwards the service message to the first CE through the specified interface according to the traffic forwarding table entry.
It improves the speed of table entry synchronization between multi-homed devices, reduces traffic loss caused by service packets being hashed to multi-homed devices that have not completed synchronization, and ensures that service packets are not lost.
Smart Images

Figure CN119363640B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, and in particular to a communication method and device. BACKGROUND
[0002] Ethernet Virtual Private Network (EVPN) is a kind of Layer 2 VPN technology. Its control plane adopts MP-BGP to advertise EVPN routing information, and the data plane adopts VXLAN encapsulation to forward packets. EVPN multi-homing is a technology that supports CE connecting to multiple PEs, and different user network edges (CEs) are distinguished by Ethernet Segment Identifier (ESI) configured on the Provider Edge (PE).
[0003] In the existing CE multi-homing access PE networking, Layer 2 traffic 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 the other multi-homed PE (for example, PE2) and the remote PE (for example, PE3) through BGP EVPN protocol. PE1 and PE3 learn and generate the table entries corresponding to the CE respectively (PE3 also synchronizes the learned MAC or ARP routes to the remote CE), so that after receiving the traffic of the CE, the traffic is forwarded through the corresponding table entries.
[0004] As known from the above, if the CPU of PE2 is busy or the BGP module is busy, the processing speed of PE2 for EVPN protocol packets is slow, even if the remote PE and the remote CE have completed table entry learning. The traffic from the remote CE to the opposite CE may also be packet-dropped because PE3 is hashed to PE2. SUMMARY
[0005] Therefore, the present application provides a communication method and device to solve the problem that any PE in the multi-homed PE has a slow processing speed for the protocol packets received synchronously, resulting in packet loss of service packets in the existing CE multi-homed access PE networking.
[0006] In a first aspect, the present application provides a communication method, which is applied to a first PE, the first PE is connected with a first CE, the first CE is also connected with a second PE, the first PE and the second PE are both connected with a third PE, and a second CE is connected with the third PE, and the method comprises the following steps.
[0007] when receiving the broadcast message sent by the first CE and forwarded by the second PE and no forwarding table item corresponding to the first CE exists in the first PE, generating a first traffic forwarding table item corresponding to the first CE according to the broadcast message, the first traffic forwarding table item comprising a first address of the first CE and a first out-interface identifier;
[0008] when receiving the service message sent by the second CE and forwarded by the third PE, if a destination address included in the service message matches the first address, forwarding the service message to the first CE through a first interface indicated by the first out-interface identifier according to the first traffic forwarding table item.
[0009] In a second aspect, the present application provides a communication device, which is applied to a first PE, the first PE is connected with a first CE, the first CE is also connected with a second PE, the first PE and the second PE are both connected with a third PE, the second CE is connected with the third PE, and the device comprises:
[0010] a generating unit, configured to, when receiving the broadcast message sent by the first CE and forwarded by the second PE and no forwarding table item corresponding to the first CE exists in the first PE, generate a first traffic forwarding table item corresponding to the first CE according to the broadcast message, the first traffic forwarding table item comprising a first address of the first CE and a first out-interface identifier;
[0011] a sending unit, configured to, when receiving the service message sent by the second CE and forwarded by the third PE, if a destination address included in the service message matches the first address, forward the service message to the first CE through a first interface indicated by the first out-interface identifier according to the first traffic forwarding table item.
[0012] In a third aspect, the present application provides a network device, comprising a processor and a machine readable storage medium, the machine readable storage medium stores machine executable instructions which 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 application, when the broadcast message sent by the first CE and forwarded by the second PE is received and there is no forwarding table item corresponding to the first CE in the first PE, the first PE generates a first traffic forwarding table item corresponding to the first CE according to the broadcast message, the first traffic forwarding table item including the first address of the first CE and the first out-interface identifier; when the 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, the first PE forwards the service message to the first CE through the first interface indicated by the first out-interface identifier according to the first traffic forwarding table item.
[0014] In this way, the corresponding traffic forwarding table item is generated through learning of the broadcast message. The table item synchronization speed between the multi-homed devices is improved. Especially in the case of busy network devices, the traffic loss caused by hashing of the service message to the multi-homed device which has not completed synchronization can be effectively reduced. The problem that any PE in the multi-homed PE has a slow processing speed for the protocol message received through synchronization in the prior art CE multi-homed access PE networking, resulting in loss of the service message, is solved. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 A flowchart of the communication method provided for the embodiments of the application;
[0016] Figure 2 A networking schematic diagram suitable for the communication method provided for the embodiments of the application;
[0017] Figure 3 A position schematic diagram of the first identifier in the message provided for the embodiments of the application;
[0018] Figure 4 Another position schematic diagram of the first identifier in the message provided for the embodiments of the application;
[0019] Figure 5 A structure diagram of the communication device provided for the embodiments of the application;
[0020] Figure 6 A network device hardware structure provided for the embodiments of the application. DETAILED DESCRIPTION
[0021] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The following description is only one of the exemplary embodiments consistent with the present application. Unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all the 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 terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting. As used in this application and the appended claims, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0023] It is to be understood that, although the terms first, second, third, etc. can be used herein to describe various information, the information should not be limited to these terms. These terms are only used to differentiate one piece of information from another. For example, a first information can also be termed a second information, similarly, a second information can also be termed a first information without departing from the scope of the present application. Depending on the context, the word "if' as used herein can be interpreted as meaning "when" or "in response to determining".
[0024] The communication method provided by the embodiments of the present application is described in detail below. Referring to Figure 1 , Figure 1 The flowchart of the communication method provided by the embodiments of the present application is shown. The method is applied to a first PE. The communication method provided by the embodiments of the present application can include the following steps.
[0025] Step 110, when receiving the broadcast packet sent by the first CE and forwarded by the second PE and there is no forwarding table item corresponding to the first CE in the first PE, generating a first traffic forwarding table item corresponding to the first CE according to the broadcast packet, the first traffic forwarding table item including a first address of the first CE and a first out-interface identifier;
[0026] Specifically, the first CE accesses the first PE and the second PE through an aggregation port. The first PE and the second PE access the third PE through different links respectively, and form an ECPM. The second CE accesses the third PE.
[0027] It can be understood that the first PE and the second PE can also be referred to as local PEs, and the third PE can also be referred to as a remote PE.
[0028] The MAC address and the IP address of the opposite end have been learned or configured in the first CE and the second CE. Before the first CE and the second CE perform two-layer and three-layer traffic forwarding, the first CE sends a broadcast packet (the process of sending the broadcast packet can also be referred to as an original forwarding process, so that the MAC address and the IP address are learned and the forwarding table item is generated). When it is determined that the out-interface indication of forwarding the broadcast packet is the aggregation port, the first CE determines to forward the broadcast packet to the second PE through a member port connected with the second PE by using a hash algorithm.
[0029] After receiving the broadcast message, the second PE retrieves the first identifier corresponding to the Ethernet identifier from its local second identifier mapping table (referred to as the second identifier mapping table for easy distinction from the first identifier mapping table in the first PE) based on the Ethernet segment identifier of the interface that received the broadcast message. The second PE adds the retrieved first identifier to the broadcast message and broadcasts it to both the first PE and the third PE. The second identifier mapping table is generated by the second PE based on the EVPN Class I route sent by the first PE. The EVPN Class I route includes a first identifier and a second identifier; 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. Using the address information of the first CE, the first PE checks locally whether there is a forwarding table entry corresponding to the first CE.
[0031] If the address information of the first CE is not found, meaning the first PE has not learned it, then the first PE generates a forwarding table entry corresponding to the first CE locally based on the broadcast message. This forwarding table entry includes the first address of the first CE and the first outgoing interface identifier. This forwarding table entry is generated by the first PE based on the broadcast traffic; therefore, it can also be called a traffic forwarding table entry.
[0032] In this embodiment, after receiving the broadcast message, the second PE first learns the address information of the first CE locally and generates a forwarding table entry corresponding to the first CE locally. Then, 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. The first EVPN protocol message includes the address of the first CE and a second identifier. In this embodiment, the first EVPN protocol message is specifically an EVPN Type II route.
[0034] According to the first EVPN protocol message, the first PE generates a forwarding table entry corresponding to the first CE locally. This forwarding table entry includes the first address of the first CE and the first outgoing interface identifier (based on the second identifier, the interface identifier of the first interface bound to the second identifier is obtained as the first outgoing interface identifier). The above forwarding table entry is generated by the first PE according to the EVPN protocol message, so this 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 corresponding to the first CE and generated by the first PE locally, but the sources of the two table items are different. The first PE can add a source field in the forwarding table item and record the source of each forwarding table item. In this way, the above two table items can be stored in the first PE at the same time.
[0036] It can be understood that if the above two table items exist in the first PE at the same time, after the first PE subsequently receives service traffic sent to the first CE (the third PE forwards the service traffic sent to the first CE to the first PE through a hash algorithm), the first PE preferentially uses the protocol forwarding table item to match and forward the service traffic; if the traffic forwarding table item exists in the first PE and the protocol forwarding table item does not exist (possibly no EVPN protocol packet is received, or an EVPN protocol packet is received but no protocol forwarding table item is generated), the first PE uses the traffic forwarding table item to match and forward the service traffic, without discarding the service traffic, thereby ensuring no packet loss.
[0037] Optionally, the broadcast packet includes a first address of the first CE and a first identifier.
[0038] The specific process in which the first PE generates the first traffic forwarding table item corresponding to the first CE locally according to the broadcast packet is as follows: according to the first identifier, the first PE obtains a second identifier corresponding to the first identifier from the first identifier mapping table. The second identifier is specifically an Ethernet segment identifier, that is, an ESI. According to the second identifier, the first PE obtains an interface identifier of a first interface bound to the ESI; the first PE takes the interface identifier of the first interface as a first out-interface identifier; and the first PE generates the first traffic forwarding table item.
[0039] The first identifier mapping table includes a mapping relationship between the first identifier of the first PE and the second identifier.
[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).
[0041] The first address includes a MAC address and an IP address of the first CE, and the first identifier includes a first label or a first parameter.
[0042] The first label or the first parameter is a label or a parameter corresponding to a second identifier bound to an interface through which the second PE receives the broadcast packet, which is obtained by the second PE from a second mapping table.
[0043] Optionally, the first traffic forwarding table item is a MAC address table item of the first CE.
[0044] The first traffic forwarding table item is an ARP table item of the first CE and a routing table item of the first CE; or
[0045] The first traffic forwarding table item is an ND table item of the first CE and a routing table item of the first CE.
[0046] Optionally, in the embodiment of the 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., close to the L3 header). The label field can carry multiple labels and arrange the multiple labels in order.
[0047] Optionally, in the embodiment of the application, when the first identifier is a first parameter, the broadcast message is an inner message, and an SRH header and an IPv6 basic header are encapsulated in the outer layer of the inner message respectively. 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 a VPN SID under a 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 a last hop node, the destination address field is used to carry the VPN SID 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 VPN SID under the VSI instance corresponding to the ESI.
[0048] Step 120, when receiving 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 interface identifier according to the first traffic forwarding table item.
[0049] Specifically, according to the description of step 110, after the first PE generates the first traffic forwarding table item locally, when receiving 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 interface identifier according to the first traffic forwarding table item. In this way, when there is no protocol forwarding table item in the first PE, the first PE uses the traffic forwarding table item to match and forward the service traffic, without discarding the service traffic, so that packet loss is avoided.
[0050] Therefore, by applying the communication method provided in the application, when a broadcast packet sent by a first CE and forwarded by a second PE is received and there is no forwarding table item corresponding to the first CE in the first PE, the first PE generates a first traffic forwarding table item corresponding to the first CE according to the broadcast packet, the first traffic forwarding table item including a first address of the first CE and a first out-interface identifier; when a service packet sent by a second CE and forwarded by a third PE is received, if a destination address included in the service packet matches the first address, the first PE forwards the service packet to the first CE through a first interface indicated by the first out-interface identifier according to the first traffic forwarding table item.
[0051] In this way, by learning the broadcast packet, the corresponding traffic forwarding table item is generated. The table item synchronization speed between multi-homed devices is improved. Especially in the case of busy network devices, the traffic loss caused by hashing the service packet to the multi-homed device that has not completed synchronization can be effectively reduced. The problem that any PE in the multi-homed PE processes the protocol packet received through synchronization at a slower speed, resulting in packet loss of the service packet, in the existing CE multi-homed access PE networking is solved.
[0052] The communication method provided in the embodiments of the application will be described in detail below. Referring to Figure 2 , Figure 2 The networking schematic diagram suitable for the communication method provided in the embodiments of the application. In Figure 2 , the networking includes CE1, CE2, PE1, PE2 and PE3. Through the aggregation port, CE1 is multi-homed to PE1 and PE2 through member ports (Port) 1 and Port 2 respectively; PE1 and PE2 are connected to Port 5 and Port 6 of PE3 in the ECPM mode through Port 3 and Port 4 respectively; CE2 is connected to Port 7 of PE3; PE1 and PE2 are also connected through Port 8 and Port 9, and the communication connection between them can be different according to different networking environments. For example, under the MPLS network (LSP) and under the SRv6 network (Policy), the connection mode between PE1 and PE2 is also different.
[0053] The PE1 and PE2 have configured a VSI instance (for example, VSI 1), and an EVPN instance is configured under the VSI instance. CE1 is connected to PE1 and PE2 through different Ethernet links, and these links constitute an Ethernet segment (English: Ethernet Segment, abbreviated as: ES). The above-mentioned links have configured a same ES identifier (English: ES Identifier, abbreviated as: ESI), for example, ES1.
[0054] The PE1 and PE2 respectively further include a Ragg1 belonging to the aggregation group, and the Ragg1 respectively establishes a binding relationship with ES1.
[0055] After the network is set up, PE1 generates an EVPN Type 1 route and sends it to PE2 and PE3. The EVPN Type 1 route includes an identifier 1 corresponding to ES1 in PE1 and ES1. After receiving the BGP EVPN Type 1 route, PE2 locally generates an identifier mapping table 1 and records, in the mapping table 1, a mapping relationship between PE1, ES1 and the identifier 1. PE1 also locally generates an identifier mapping table 2 and records, in the identifier mapping table 2, a mapping relationship between ES1 and the identifier 1. For example, the identifier 1 can be specifically a label of ES1 in PE1 in an MPLS network or arguments in a VPN SID corresponding to a VSI instance of ES1 in PE1 in an SRv6 network.
[0056] Similarly, after the network is set up, PE2 also generates an EVPN Type 1 route and sends it to PE2 and PE3. The EVPN Type 1 route is similar to the EVPN Type 1 route generated by PE1, which is not repeated here.
[0057] The following describes, by way of example, a two-layer traffic forwarding between CE1 and CE2.
[0058] Both CE1 and CE2 have learned or configured a MAC address of a peer. CE1 generates a two-layer broadcast message, which includes a source MAC address and a destination MAC address. The source MAC address is a MAC address of CE1 and the destination MAC address is a MAC address of CE2. CE1 determines that an interface is an aggregation port and determines, by using a hash calculation, to send the two-layer broadcast message to PE2 through Port2.
[0059] After receiving the two-layer broadcast message, PE2 obtains the source MAC address therefrom. PE2 learns the MAC address of CE1 and locally generates a MAC forwarding table item 1 corresponding to CE1. Meanwhile, after receiving the two-layer broadcast message, PE2 obtains, in the identifier mapping table 1, an identifier 1 corresponding to ES1 in PE1 belonging to the same ES1 as Ragg1 according to the Ragg1 interface receiving the two-layer broadcast message.
[0060] PE2 carries the identifier 1 in the two-layer broadcast message and sends the two-layer broadcast message to PE1 and PE3 through Port4 and Port9.
[0061] In an implementation manner, when the identifier 1 is a label 1, the broadcast message includes a label (Lable) field and PE2 stores the label 1 at a bottom of the label field (i.e., close to an L3 header). As shown in FIG. 4, Figure 3 Figure 3 FIG. 4 is a schematic diagram of a position of a first identifier in a message provided by an embodiment of the present application. Figure 3 In the embodiment, the label field can carry multiple labels and arrange the multiple labels in sequence. 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, which is not 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 outside the original message respectively. 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 a VPN SID under a VSI instance corresponding to ES1 of PE1. The SID includes an Args field, and the Args field is used to carry parameter 1. As shown in Figure 4 Figure 4 Another location diagram of the first identifier in the message is provided in the embodiment. In the embodiment, PE1 is the last hop node, and therefore, PE2 stores a VPN SID under a VSI instance corresponding to ES1 of PE1 in the destination address field. The SID further includes a Locator field and a Function field, and the two fields can be set according to the existing SRv6 protocol, which is not repeated here.
[0063] Meanwhile, PE2 generates an EVPN class II route after learning the MAC address of CE1. The EVPN class II route includes the MAC address of CE1 and ES1. PE2 sends the EVPN class II route to PE1 and PE3 through Port4 and Port9 respectively.
[0064] PE1 obtains the MAC address of CE1 and identifier 1 from the layer 2 broadcast message. According to identifier 1, PE1 obtains the ESI corresponding to identifier 1 from the identifier mapping table 2. According to the ESI, PE1 obtains the local interface bound to the ESI, that is, the local Ragg1. PE1 generates a MAC forwarding table item 2 corresponding to CE1, which includes the MAC address of CE1 and the out-interface identifier (that is, the local Ragg1).
[0065] PE1 obtains the MAC address of CE1 and ES1 from the EVPN class II route. According to ES1, PE1 obtains the interface bound to ES1, that is, the local Ragg1. PE1 generates a MAC forwarding table item 3 corresponding to CE1, which includes the MAC address of CE1 and the out-interface identifier (that is, the local Ragg1). PE1 issues the MAC forwarding table item 3 in the EVPN instance under the corresponding VSI instance.
[0066] It should be noted that the MAC forwarding entry 2 and the MAC forwarding entry 3 are both the MAC forwarding entries corresponding to the CE1 and generated by the PE1 locally, but the sources of the two entries are different. The PE1 can add a source field in the forwarding entry and record the source of each forwarding entry. In this way, the above two entries can be stored in the VSI instance at the same time.
[0067] The PE3 also learns the MAC address of the CE1 after receiving the EVPN class II route, and generates a remote MAC forwarding entry 4 corresponding to the CE1. The PE3 distributes the remote MAC forwarding entry 4 in the EVPN instance under the corresponding VSI instance. Meanwhile, according to the EVPN class II route and the EVPN class I routes respectively sent by the PE1 and the PE2, the PE3 determines that the outgoing interface identifier included in the remote MAC forwarding entry 4 is the interface (i.e., Port3 and Port4) pointing to the ECMP path of the PE1 and the PE2.
[0068] The PE3 also sends the layer 2 broadcast message to the CE2. The CE2 learns the MAC address of the CE1 included in the layer 2 broadcast message, and generates a MAC forwarding entry 5 corresponding to the CE1. The outgoing interface identifier included in the MAC forwarding entry 5 is the interface (i.e., Port7) receiving the layer 2 broadcast message.
[0069] If at this time, the CE2 sends layer 2 unicast traffic to the CE1. The PE3 forwards the layer 2 unicast traffic by generating the remote MAC forwarding entry 4 corresponding to the CE1. When forwarding the layer 2 unicast traffic, if the PE3 determines by the hash algorithm that the outgoing interface is Port3, the PE3 forwards the layer 2 unicast traffic to the PE1.
[0070] After receiving the layer 2 unicast traffic, if the PE1 does not generate the MAC forwarding entry 3 in the process of learning the EVPN class II route, the PE1 can forward the layer 2 unicast traffic by the MAC forwarding entry 2 generated in advance, and send to the CE1.
[0071] Subsequently, if the PE1 generates the MAC forwarding entry 3, the layer 2 unicast traffic can be sent to the CE1 by the MAC forwarding entry 3.
[0072] Similarly, the process of the CE1 learning the MAC address of the CE2 and the process of the CE1 sending traffic to the CE2 in the reverse direction are similar to the foregoing process, which will not be repeated here.
[0073] The following takes the layer 3 traffic (IPv4 traffic) forwarding between the CE1 and the CE2 as an example for description.
[0074] The MAC address and IP address of the opposite end have been learned or configured in the CE1 and CE2. The CE1 generates an ARP request and performs a Layer 2 broadcast, and the ARP request includes a source IP address, a destination IP address, a source MAC address and a destination MAC address. The source IP address and the source MAC address are the IP address and the MAC address of the CE1, and the destination IP address and the destination MAC address are the IP address and the MAC address of the CE2. The CE1 determines that the interface is an aggregation port, and determines to send the ARP request to the PE2 through the Port2 by using hash calculation.
[0075] The PE2 receives the ARP request, and obtains the source MAC address and the source IP address from the ARP request. The PE2 learns the MAC address and the IP address of the CE1, and generates an ARP entry 1 corresponding to the CE1 locally. Meanwhile, the PE2 obtains an identifier 1 corresponding to the ES1 in the PE1 belonging to the same ES1 as the Ragg1 in the identifier mapping table 1 according to the Ragg1 interface receiving the ARP request.
[0076] The PE2 carries the identifier 1 in the ARP request, and sends the ARP request to the PE1 and the PE3 through the Port4 and the Port9.
[0077] In an implementation manner, when the identifier 1 is a label 1, the broadcast message includes a label (Lable) field, and the PE2 stores the label 1 at the bottom of the label field (that is, close to the L3 layer header). As shown in Figure 3 .
[0078] In another implementation manner, when the first identifier is a parameter 1, the ARP request is an inner layer message, and an SRH header and an IPv6 basic header are respectively encapsulated outside the inner layer message. 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 a VPN SID under a VSI instance corresponding to the ES1. The SID includes an Args field, and the Args field is used to carry the parameter 1. As shown in Figure 4 . In the embodiment of the present application, the PE1 is the last hop node, and therefore, the PE2 stores the VPN SID under the VSI instance corresponding to the ES1 in the PE1 in the destination address field.
[0079] Meanwhile, the PE2 also generates an EVPN class II route after learning the MAC address and the IP address of the CE1. The EVPN class II route includes the MAC address, the IP address of the CE1 and the ES1. The PE2 sends the EVPN class II route to the PE1 and the PE3 through the Port4 and the Port9 respectively.
[0080] PE1 receives the ARP request, and obtains the MAC address, IP address of CE1 and the identifier 1 from the ARP request. According to the identifier 1, PE1 obtains the ESI corresponding to the identifier 1 from the identifier mapping table 2. According to the ESI, PE1 obtains the local interface bound to the ESI, i.e. the local Ragg1. PE1 generates the ARP entry 2 corresponding to CE1, which includes the MAC address, IP address of CE1 and the out-interface identifier (i.e. the local Ragg1).
[0081] PE1 receives the EVPN class II route, and obtains the MAC address, IP address of CE1 and the ES1 from the EVPN class II route. According to the ES1, PE1 obtains the interface bound to the ES1, i.e. the local Ragg1. PE1 generates the ARP entry 3 corresponding to CE1, which includes the MAC address, IP address of CE1 and the out-interface identifier (i.e. the local Ragg1). PE1 distributes the ARP entry 3 in the EVPN instance under the corresponding VSI instance.
[0082] It should be noted that the ARP entry 2 and the ARP entry 3 are both ARP entries corresponding to CE1 generated by PE1 locally, but the sources of the two entries are different. PE1 can add a source field in the entries 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] PE3 receives the EVPN class II route, and also learns the MAC address, IP address of CE1, and generates the remote ARP entry 4 and the remote route entry 1 corresponding to CE1. PE3 distributes the remote ARP entry 4 and the remote route entry 1 in the EVPN instance under the corresponding VSI instance. Meanwhile, according to the EVPN class II route and the EVPN class I routes respectively sent by PE1 and PE2, PE3 determines that the out-interface identifiers included in the remote ARP entry 4 and the remote route entry 1 are the interfaces (i.e. Port3 and Port4) of the ECMP path pointing to PE1 and PE2.
[0084] PE3 also sends the ARP request to CE2. CE2 learns the MAC address, IP address of CE1 included in the ARP request, and generates the ARP entry 5 and the route entry 2 corresponding to CE1. The out-interface identifiers included in the ARP entry 5 and the route entry 2 are the interfaces (i.e. Port7) receiving the ARP request.
[0085] If at this time, CE2 sends IPv4 traffic to CE1. PE3 forwards the IPv4 traffic through the generated remote ARP entry 4 and the remote route entry 1 corresponding to CE1. When forwarding the IPv4 traffic, if the hash algorithm determines that the out-interface is Port3, PE3 forwards the IPv4 traffic to PE1.
[0086] After PE1 receives the IPv4 traffic, if PE1 learns the EVPN Class-2 route and does not generate the ARP entry 3, PE1 can perform the forwarding processing on the IPv4 traffic through the previously generated ARP entry 2 and send the IPv4 traffic to CE1.
[0087] Subsequently, if PE1 generates the ARP entry 3, the IPv4 traffic can be sent to CE1 through the ARP entry 3.
[0088] Similarly, the process of CE1 learning the MAC address and IP address of CE2 and the process of CE1 sending traffic to CE2 in the reverse direction are similar to the foregoing process, which will not be repeated here.
[0089] The following describes the forwarding of three-layer traffic (IPv6 traffic) between CE1 and CE2 as an example.
[0090] The MAC address and IP address of the opposite end are learned or configured in CE1 and CE2. CE1 generates an ND request and performs two-layer broadcast, and the ND request includes a source IP address, a destination IP address, a source MAC address and a destination MAC address. The source IP address and the source MAC address are the IP address and the MAC address of CE1, and the destination IP address and the destination MAC address are the IP address and the MAC address of CE2. CE1 determines that the interface is the aggregation port and determines to send the ARP request to PE2 through Port2 by using hash calculation.
[0091] After PE2 receives the ARP request, the source MAC address and the source IP address are obtained therefrom. PE2 learns the MAC address and the IP address of CE1 and generates an ND entry 1 corresponding to CE1 locally. Meanwhile, after receiving the ND request, PE2 obtains the identifier 1 corresponding to the ES1 in the PE1 belonging to the same ES1 as the Ragg1 interface receiving the ND request in the identifier mapping table 1.
[0092] PE2 carries the identifier 1 in the ND request and sends the ND request to PE1 and PE3 through Port4 and Port9.
[0093] In an implementation mode, the identifier 1 is a label 1, the broadcast packet includes a label (Lable) field, and PE2 stores the label 1 at the bottom of the label field (i.e., close to the L3 layer header). As shown in Figure 3 .
[0094] In another implementation, the first identifier is parameter 1, the ND request is an inner-layer packet, and an SRH header and an IPv6 basic header are respectively encapsulated in the outer layer of the ND request. 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 a VPN SID under a VSI instance corresponding to ES1. The SID includes an Args field, and the Args field is used to carry parameter 1. As shown in the following table. Figure 4 In the embodiment of the present application, PE1 is the last hop node, and therefore, PE2 stores, in the destination address field, a VPN SID under a VSI instance corresponding to ES1 in PE1.
[0095] Meanwhile, after learning the MAC address and the IP address of CE1, PE2 further generates an EVPN class II route. The EVPN class II route includes the MAC address and the IP address of CE1 and ES1. PE2 sends the EVPN class II route to PE1 and PE3 through Port4 and Port9 respectively.
[0096] After receiving the ND request, PE1 obtains the MAC address, the IP address of CE1, and identifier 1 from the ND request. According to identifier 1, PE1 obtains the ESI corresponding to identifier 1 from the identifier mapping table 2. According to the ESI, PE1 obtains a local interface bound to the ESI, that is, local Ragg1. PE1 generates an ND entry 2 corresponding to CE1, and the ND entry 2 includes the MAC address, the IP address of CE1, and an out-interface identifier (that is, local Ragg1).
[0097] After receiving the EVPN class II route, PE1 obtains the MAC address, the IP address of CE1, and ES1 from the EVPN class II route. According to ES1, PE1 obtains an interface bound to ES1, that is, local Ragg1. PE1 generates an ND entry 3 corresponding to CE1, and the ND entry 3 includes the MAC address, the IP address of CE1, and an out-interface identifier (that is, local Ragg1). PE1 distributes the ND entry 3 in an EVPN instance under the corresponding VSI instance.
[0098] It should be noted that the ND entry 2 and the ND entry 3 are both ND entries corresponding to CE1 and generated by PE1 locally, but the sources of the two entries are different. PE1 can add a source field in the entries and record the source of each entry. In this way, the two entries can be stored in the VSI instance at the same time.
[0099] After receiving the EVPN type 2 route, PE3 also learns the MAC address and IP address of CE1, and generates a remote ND entry 4 and a remote route entry 3 corresponding to CE1. PE3 distributes the remote ND entry 4 and the remote route entry 3 in the EVPN instance under the corresponding VSI instance. Meanwhile, according to the EVPN type 2 route and the EVPN type 1 routes respectively sent by PE1 and PE2, PE3 determines that the out-interface identifiers included in the remote ND entry 4 and the remote route entry 3 are the interfaces (i.e., Port3 and Port4) pointing to the ECMP paths of PE1 and PE2.
[0100] PE3 also sends an ND request to CE2. CE2 learns the MAC address and IP address of CE1 included in the ND request, and generates an ND entry 5 and a route entry 4 corresponding to CE1. The out-interface identifiers included in the ND entry 5 and the route entry 4 are respectively the interface (i.e., Port7) receiving the ND request.
[0101] If at this time CE2 sends IPv6 traffic to CE1, PE3 forwards the IPv6 traffic by using the generated remote ND entry 4 and the remote route entry 3 corresponding to CE1. When forwarding the IPv6 traffic, if the hash algorithm determines that the out-interface is Port3, PE3 forwards the IPv6 traffic to PE1.
[0102] After receiving the IPv6 traffic, if PE1 has not generated the ND entry 3 in the process of learning the EVPN type 2 route, PE1 can forward the IPv6 traffic by using the previously generated ND entry 2, and sends the IPv6 traffic to CE1.
[0103] Subsequently, if PE1 generates the ND entry 3, the IPv6 traffic can be sent to CE1 by using the ND entry 3.
[0104] Similarly, the process of CE1 learning the MAC address and IP address of CE2 and the process of CE1 sending traffic to CE2 in the reverse direction are similar to the foregoing processes, and are not repeated here.
[0105] Based on the same inventive concept, the embodiments of the present application also provide a communication device corresponding to the communication method. Referring to Figure 5 , Figure 5 The communication device provided by the embodiments of the present application is applied to a first PE, the first PE is connected with a first CE, the first CE is also connected with a second PE, the first PE and the second PE are both connected with a third PE, a second CE is connected with the third PE, and the device comprises:
[0106] The first generating unit 510 is configured to, when receiving the broadcast packet sent by the first CE and forwarded by the second PE and there is no forwarding table item corresponding to the first CE in the first PE, generating a first traffic forwarding table item corresponding to the first CE according to the broadcast packet, the first traffic forwarding table item including a first address of the first CE and a first out-interface identifier.
[0107] The sending unit 520 is configured to, when receiving the service packet sent by the second CE and forwarded by the third PE, if a destination address included in the service packet matches the first address, forwarding the service packet to the first CE through a first interface indicated by the first out-interface identifier according to the first traffic forwarding table item.
[0108] Optionally, the apparatus further includes:
[0109] The second generating unit (not shown in the figure) is configured to, when receiving a first EVPN protocol packet sent by the second PE, generating a first protocol forwarding table item corresponding to the first CE according to the first EVPN protocol packet, the first protocol forwarding table item including the first address and the first out-interface identifier.
[0110] Optionally, the broadcast packet includes the first address and a first identifier.
[0111] The first generating unit 510 is specifically configured to, according to the first identifier, acquire a second identifier corresponding to the first identifier from a first identifier mapping table.
[0112] According to the second identifier, acquire an interface identifier of the first interface bound to the second identifier.
[0113] Take the interface identifier of the first interface as the first out-interface identifier.
[0114] Generate the first traffic forwarding table item.
[0115] Optionally, the apparatus further includes:
[0116] The receiving unit (not shown in the figure) is configured to receive a second EVPN protocol packet sent by the second PE, the second EVPN protocol packet including the first identifier and the second identifier, so that the second PE generates a second identifier mapping table locally, the second identifier mapping table including a corresponding relationship 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 label or a first parameter.
[0118] The first address includes the MAC address and IP address of the first CE, and the first identifier includes the first tag or the first parameter;
[0119] Wherein, the first tag or the first parameter is the tag or 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 the MAC address table entry of the first CE; or;
[0121] The first traffic forwarding table entry is the ARP table entry of the first CE and the routing table entry of the first CE; or;
[0122] The first traffic forwarding table entry is the ND table entry of the first CE and the routing table entry of the first CE.
[0123] Therefore, by applying the communication device provided in this application, when a broadcast message sent by the first CE is received by the second PE and there is no forwarding table entry corresponding to the first CE in the first PE, the first PE generates a first traffic forwarding table entry corresponding to the first CE locally according to the broadcast message. The first traffic forwarding table entry includes the first address of the first CE and the first outgoing interface identifier. When a service message sent by the second CE is received by the third PE, if the destination address included in the service message matches the first address, the first PE forwards the service message to the first CE through the first interface indicated by the first outgoing interface identifier according to the first traffic forwarding table entry.
[0124] In this way, by learning from broadcast messages, corresponding traffic forwarding table entries are generated, improving the synchronization speed of entries between multi-homed devices. Especially under busy network conditions, it can effectively reduce traffic loss caused by service packets being hashed to multi-homed devices that have not yet completed synchronization. It also solves the problem in existing CE multi-homed access PE networks where any PE in a multi-homed network processes synchronously received protocol messages slowly, leading to service packet loss.
[0125] Based on the same inventive concept, embodiments of this application also provide a network device, such as... Figure 6 As shown, the system includes a processor 610, a transceiver 620, and a machine-readable storage medium 630. The machine-readable storage medium 630 stores machine-executable instructions that can be executed by the processor 610. The processor 610 is prompted by the machine-executable instructions to execute the communication method provided in the embodiments of this application. (The foregoing...) Figure 5 The communication device shown can be used as follows: Figure 6 The hardware structure of the network device shown is implemented.
[0126] The computer readable storage medium 630 can include a random access memory (RAM) and can also include a non-volatile memory (NVM), such as at least one disk storage. Optionally, the computer readable storage medium 630 can also be at least one storage device that is located remotely from the processor 610.
[0127] The processor 610 can be a general processor, including a central processing unit (CPU), a network processor (NP), etc., and can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
[0128] In the embodiments 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 the transceiver 620 to perform the communication method described in the foregoing embodiments of the present application.
[0129] In addition, the embodiments of the present application provide a machine readable storage medium 630, which stores machine executable instructions. When the machine executable instructions are called and executed by the processor 610, the machine executable instructions enable the processor 610 itself and the transceiver 620 to perform the communication method described in the foregoing embodiments of the present application.
[0130] The implementation processes of the functions and roles of the units in the apparatus are specifically described in the implementation processes of the corresponding steps in the foregoing method, and will not be described here.
[0131] For the device embodiment, since it basically corresponds to the method embodiment, the relevant part can be seen from the part of the method embodiment. The device embodiment described above is only illustrative, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the scheme of the present application according to actual needs. Those skilled in the art can understand and implement it without creative labor.
[0132] For the communication device and machine readable storage medium embodiments, since the method content involved is basically similar to the foregoing method embodiment, the description is relatively simple, and the relevant part can be seen from the part of the method embodiment.
[0133] The above is only the preferred embodiment of the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A communication method characterized by comprising: The method is applied to a first PE, the first PE is connected with a first CE, the first CE also accesses a second PE, the first PE and the second PE both access a third PE, and a second CE accesses the third PE, and the method comprises the following steps of: when receiving a broadcast packet sent by the first CE and forwarded by the second PE and no forwarding table item corresponding to the first CE exists in the first PE, generating a first traffic forwarding table item corresponding to the first CE according to the broadcast packet, the first traffic forwarding table item comprising a first address of the first CE and a first out-interface identifier; when receiving a service packet sent by the second CE and forwarded by the third PE, if a destination address included in the service packet matches the first address, forwarding the service packet to the first CE through a first interface indicated by the first out-interface identifier according to the first traffic forwarding table item; The method further comprises the following steps of: when receiving a first EVPN protocol packet sent by the second PE, generating a first protocol forwarding table item corresponding to the first CE according to the first EVPN protocol packet, the first protocol forwarding table item comprising the first address and the first out-interface identifier.
2. The method of claim 1, wherein, The broadcast packet comprises the first address and a first identifier; The first traffic forwarding table item corresponding to the first CE is generated according to the broadcast packet, and specifically comprises the following steps of: obtaining a second identifier corresponding to the first identifier from a first identifier mapping table according to the first identifier; obtaining an interface identifier of the first interface bound to the second identifier according to the second identifier; taking the interface identifier of the first interface as the first out-interface identifier; generating the first traffic forwarding table item.
3. The method of claim 2, wherein, The method further comprises the following steps of: receiving a second EVPN protocol packet sent by the second PE, the second EVPN protocol packet comprising the first identifier and the second identifier, so that the second PE generates a second identifier mapping table locally, the second identifier mapping table comprising a corresponding relationship between the first identifier and the second identifier.
4. The method of claim 3, wherein, The first address comprises a MAC address of the first CE, and the first identifier comprises a first label or a first parameter; or The first address comprises a MAC address and an IP address of the first CE, and the first identifier comprises the first label or the first parameter; The first label or the first parameter is a label or a parameter corresponding to the second identifier bound to an interface through which the second PE receives the broadcast packet, and the label or the parameter is obtained from the second identifier mapping table according to the interface.
5. The method of claim 1, wherein, The first traffic forwarding table item is a MAC address table item of the first CE; or The first traffic forwarding table item is an ARP table item of the first CE and a routing table item of the first CE; or The first traffic forwarding table item is an ND table item of the first CE and a routing table item of the first CE.
6. A communication device, characterized by The device is applied to a first PE, the first PE is connected with a first CE, the first CE also accesses a second PE, the first PE and the second PE both access a third PE, and a second CE accesses the third PE, and the device comprises: a first generating unit, configured to, when receiving a broadcast packet sent by the first CE and forwarded by the second PE and no forwarding table item corresponding to the first CE existing in the first PE, generate a first traffic forwarding table item corresponding to the first CE according to the broadcast packet, the first traffic forwarding table item comprising a first address of the first CE and a first out-interface identifier; a sending unit, configured to, when receiving a service packet sent by the second CE and forwarded by the third PE, if a destination address included in the service packet matches the first address, forwarding the service packet to the first CE through a first interface indicated by the first out-interface identifier according to the first traffic forwarding table item; The device further comprises: a second generating unit, configured to, when receiving a first EVPN protocol packet sent by the second PE, generating a first protocol forwarding table item corresponding to the first CE according to the first EVPN protocol packet, the first protocol forwarding table item comprising the first address and the first out-interface identifier.
7. The apparatus of claim 6, wherein, The broadcast packet comprises the first address and a first identifier; The first generating unit is specifically configured to, according to the first identifier, acquiring a second identifier corresponding to the first identifier from a first identifier mapping table; According to the second identifier, acquiring an interface identifier of the first interface bound with the second identifier; Taking the interface identifier of the first interface as the first out-interface identifier; Generating the first traffic forwarding table item.
8. The apparatus of claim 7, wherein, The device further comprises: a receiving unit, configured to receiving a second EVPN protocol packet sent by the second PE, the second EVPN protocol packet comprising the first identifier and the second identifier, so that the second PE generates a second identifier mapping table locally, the second identifier mapping table comprising a corresponding relationship between the first identifier and the second identifier.
9. The apparatus of claim 8, wherein, The first address comprises a MAC address of the first CE, and the first identifier comprises a first label or a first parameter; or The first address comprises a MAC address and an IP address of the first CE, and the first identifier comprises the first label or the first parameter; The first label or the first parameter is a label or a parameter corresponding to the first PE acquired by the second PE from the second identifier mapping table according to an interface receiving the broadcast packet.
10. The apparatus of claim 6, wherein, The first traffic forwarding table item is a MAC address table item of the first CE; or The first traffic forwarding table item is an ARP table item of the first CE and a routing table item of the first CE; or The first traffic forwarding table item is an ND table item of the first CE and a routing table item of the first CE.
Citation Information
Patent Citations
Local-bias forwarding of L2 multicast, unknown unicast, and broadcast traffic for an ethernet VPN
US10841216B1
Method and device for processing IP address conflict in evpn
WO2018033153A1