Packet transmission method and apparatus for EVPN, device, and medium
By introducing matching fields and control actions for EVPN type traffic in Flowspec NLRI, the problem of existing technology being unable to control EVPN packets is solved, device-side traffic control and forwarding strategies for EVPN packets are implemented, and the flexibility of flow control is improved. sex and accuracy.
Patent Information
- Application Number
- PCT/CN2024/074688
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-28
- Filing Date
- 2024-01-30
- Publication Date
- 2024-09-06
AI Technical Summary
Existing Flowspec technology cannot implement device-side traffic control of EVPN packets through NLRI, which limits the ability to identify and control EVPN type traffic.
An EVPN message transmission method is designed. By introducing the matching field and flow control action field for EVPN type traffic in Flowspec NLRI, including EVPN instance identification, outer and inner MAC address information, and extended flow control actions, Such as Redirect to EVPN instance and EVPN label action to identify and control EVPN type packets.
It implements device-side flow control of EVPN messages, supports routing devices to identify and forward EVPN type traffic, solves the problem that Flowspec technology cannot control EVPN messages, and expands the flexibility and accuracy of flow control.
Smart Images

Figure CN2024074688_06092024_PF_FP
Abstract
Description
EVPN message transmission method, device, equipment and medium
[0001] Cross-references
[0002] This application claims priority to a Chinese patent application filed with the Patent Office of China on February 28, 2023, with application number 202310223590.3 and invention name “A method, apparatus, device and medium for transmitting messages of EVPN”. The entire contents of the application are incorporated herein by reference. Technical Field
[0003] The present application relates to the field of communication technologies, and in particular to an EVPN message transmission method, apparatus, device, and medium. Background Art
[0004] Ethernet Virtual Private Network (EVPN) is an evolution of traditional Layer 2 Virtual Private Network (VPN). EVPN overturns the traditional process of learning Media Access Control (MAC) addresses on the forwarding plane and instead learns MAC addresses on the control plane based on the multi-protocol extension of the Border Gateway Protocol (BGP).
[0005] Flow Specification (Flowspec) technology is an extension of BGP for Network Layer Reachability Information (NLRI), which can control device traffic policies through BGP messaging.
[0006] With the development of network forwarding and control planes, EVPN will be more widely used in the future. However, Flowspec currently does not have the ability to identify EVPN-type traffic, and device-side traffic control for EVPN packets cannot be implemented through Flowspec NLRI.
[0007] Summary of the Invention
[0008] The purpose of this application is to provide an EVPN message transmission method, apparatus, device and medium, which can implement device-side flow control for EVPN messages through FlowspecNLRI.
[0009] In order to achieve the above purpose, the embodiments of this specification are implemented as follows:
[0010] In a first aspect, a flow control method for an Ethernet virtual private network (EVPN) is provided, comprising: obtaining at least one flow specification network layer reachability information (Flowspec NLRI), each of the Flowspec NLRIs including a matching field and a flow control action field configured exclusively for EVPN type traffic; after receiving a target message, matching the target message with the matching field of the EVPN type traffic corresponding to the at least one Flowspec NLRI to determine a target Flowspec NLRI; determining a target port corresponding to the target message based on the flow control action field corresponding to the target Flowspec NLRI, and sending the target message through the target port.
[0011] According to a second aspect, an electronic device is provided, characterized in that the device comprises: a processor; and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, cause the processor to execute the method described in the first aspect.
[0012] According to a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions implement the method described in the first aspect when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0014] FIG1 is a flow chart of a method for controlling traffic of an EVPN according to an embodiment of the present application.
[0015] FIG2 is a schematic diagram of the structure of the Flowspec NLRI according to an embodiment of the present application.
[0016] FIG3 is a schematic diagram of a first application scenario of the EVPN traffic control method according to an embodiment of the present application.
[0017] FIG4 is a schematic diagram of a second application scenario of the EVPN traffic control method according to an embodiment of the present application.
[0018] FIG5 is a schematic diagram of a third application scenario of the EVPN traffic control method according to an embodiment of the present application.
[0019] FIG6 is a schematic diagram of a fourth application scenario of the EVPN traffic control method according to an embodiment of the present application.
[0020] FIG7 is a schematic structural diagram of an EVPN traffic control device according to an embodiment of the present application.
[0021] FIG8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this specification.
[0023] Flowspec technology is a BGP extension of NLRI. It uses BGP to transmit messages to implement flow control on the device side. That is, the device performs flow control on the packets on its inbound port based on the Flowspec NLRI information received from the remote end.
[0024] Currently, Flowspec provides traffic match and traffic action in the Flowspec NLRI information for inbound IP traffic on the global or VPN port. These are used to accurately identify traffic on the device side and execute forwarding actions, respectively.
[0025] When a packet enters the device's inbound port, it matches the packet against the traffic match information in the Flowspec NLRI information. If the packet matches all the traffic match items, the device performs the traffic forwarding action corresponding to the traffic match. If the packet does not match all the traffic match items, the device performs the traffic forwarding action according to the preconfigured forwarding table.
[0026] As network forwarding and control planes evolve, EVPN will be more widely used. However, Flowspec currently lacks the ability to identify EVPN-type traffic, making it impossible to implement device-side flow control for EVPN packets using Flowspec NLRI. This significantly limits the future application scenarios of Flowspec technology.
[0027] To this end, the present application aims to provide a message transmission method for EVPN, which can implement device-side flow control for EVPN messages through FlowspecNLRI.
[0028] Specifically, referring to FIG1 , an embodiment of the present application provides a flow control method for an Ethernet virtual private network, comprising the following steps.
[0029] S102: Obtain at least one flow specification network layer reachability information Flowspec NLRI, each Flowspec NLRI including a matching field and a flow control action field configured specifically for EVPN type traffic.
[0030] In the embodiment of the present application, the Flowspec NLRI may be issued by the Flowspec server to the routing device. The match field for EVPN type traffic in the Flowspec NLRI is the traffic match field described above, and the flow control action field for EVPN type traffic in the Flowspec NLRI is the traffic action field described above.
[0031] It should be noted that BGP NLRI is typically configured with two attributes: Extended Protocol Reachable (MP_REACH_NLRI) and Extended Protocol Unreachable (MP_UNREACH_NLRI). Both attributes include the address family (AFI) and sub-address family (SAFI). The address family is a configuration module for network layer protocols that classifies different types of networks. By setting address families and sub-address families, BGP can configure networks running different network layer protocols separately, facilitating the management of different network types.
[0032] In the original technical implementation, NLRI only defines the address family types of IPv4, IPv6, VPNv4 and VPNv6. Therefore, the solution of the embodiment of the present application also needs to further introduce the address family setting of EVPN type traffic on the routing device side.
[0033] Here, each type of traffic is marked with a traffic type identifier (Traffic Type Identifier). The AFI / SAFI configuration corresponding to each type of traffic in the embodiment of the present application is shown in the following table.
[0034] In addition to pre-configuring the address family for EVPN-type traffic in the Border Gateway Protocol of the routing device, this application also requires redesigning the Flowspec NLRI.
[0035] As one of the feasible solutions, this application uses TLV to encapsulate traffic match.
[0036] TLV stands for "Type-Length-Value." Type indicates the type of information carried in the structure; Value indicates the information carried by the TLV; and Length indicates the valid byte length of the "Value" field. TLVs are nested structures, and nested TLVs are called sub-TLVs. In this application, each sub-TLV can represent a traffic match. Accordingly, the FlowspecNLRI implementation, as shown in Figure 2, includes the following fields.
[0037] 1) total-length: includes the field length of all Sub-TLVs.
[0038] 2) Route distinguisher: A new optional option used for VPN identification.
[0039] 3)order: Flowspec global match item order.
[0040] 4)identifier: match item identifier.
[0041] 5) type: identifies an NRLI in TLV format.
[0042] 6)length-Sub-TLV: The length of the Sub-TLV value part.
[0043] 7) value: the value contained in the Sub-TLV.
[0044] The type field, also known as the "Type" in the "Type-Length-Value" field, is used in this embodiment to represent all supported traffic types, including L2 traffic, L3 traffic, MPLS traffic, SRv6 traffic, and EVPN traffic. Accordingly, the type field is designed as follows: -0 - Reserved field; -1 - L2 (Ethernet or VPN) traffic match; -2 - L3 (IP or VPN) traffic match; -3 - MPLS traffic match; -4 - Reserved for SRv6; -5 - EVPN traffic match.
[0045] In the Flowspec NLRI of the embodiment of the present application, multiple traffic matches (Sub-TLVs) may be included through multiple components, and traffic actions may be carried through community attributes.
[0046] It should be noted that the above packaging design is specific to Flowspec NLRI. Compared to the types of traffic already supported by NLRI, EVPN traffic is transmitted via Multi-Protocol Label Switching (MPLS), which has unique forwarding mechanisms. Specifically, during the encapsulation of the original inner packet, the source and destination MAC addresses based on the forwarding device are encapsulated in the outermost layer of the packet, resulting in the packet containing both inner and outer MAC address information.
[0047] To this end, dedicated traffic matching and traffic action designs are required for EVPN traffic.
[0048] The traffic match for EVPN traffic can contain the following fields:
[0049] 1) EVPN instance identifier (EVPN label).
[0050] In MPLS-EVPN scenarios, after EVPN iteration, forwarded packets carry the EVPN label to identify the EVPN broadcast domain. Therefore, this field is optional and is used to match packets with EVPN traffic.
[0051] 2) Outer Source MAC address information (Outer Source MAC).
[0052] 3) Outer Destination MAC address information (Outer Destination MAC).
[0053] 4) Inner source MAC address information (Inner Source MAC).
[0054] 5) Inner destination MAC address information (Inner Destination MAC).
[0055] In addition, traffic actions for EVPN traffic still retain the following three traditional functions.
[0056] 1) Redirection: The forwarding table can be ignored and the new next hop is selected as the port specified in the NLRI information.
[0057] 2) Remark: the DSCP value in the message can be rewritten.
[0058] 3) Rate limit: You can define the upper limit of traffic rate, the size of data content, etc.
[0059] Regarding the traffic action for the aforementioned EVPN type traffic, this application only extends the redirect action, which has the following traffic control actions.
[0060] 1) Redirect to EVPN instance
[0061] The "Redirect to EVPN instance" action is used to associate packets with a specific EVPN instance. As you can see, the "Redirect to EVPN instance" action directly specifies the EVPN instance to which packets from the routing device's inbound port are applied.
[0062] 2) Redirect to EVPN tunnel
[0063] Redirect to EVPN tunnel is an EVPN channel redirection action used to associate packets with a specified Multi-Protocol Label Switching (MPLS) tunnel or Segment Routing (SR-TE) tunnel. The MPLS tunnel or SR-TE tunnel is mapped to an EVPN instance. Redirect to EVPN tunnel is equivalent to associating packets from the inbound port of the routing device with a specific MPLS tunnel or SR-TE tunnel, thereby routing them to a specific EVPN instance.
[0064] 3) EVPN label action
[0065] EVPN label action is an EVPN instance label action used to switch EVPN instances for packets.
[0066] Specifically, the EVPN label action is configured with actions such as pop, swap, and insert, as shown in the following table, to implement EVPN instance switching during traffic forwarding.
[0067] It should be understood that the purpose of this extended traffic action is to associate the target packet with a specific EVPN instance. An EVPN instance includes a specific traffic control policy that specifies the port used to send the packet. Routing devices can then send EVPN packets based on the port used by the successfully matched EVPN instance.
[0068] The above is an introduction to Flowspec NLRI. In actual applications, after receiving the Flowspec NLRI, the routing device can perform a validity check on the Flowspec NLR based on the BGP routing security protocol. If the check fails, the received Flowspec NLR can be ignored. As an example, the validity check of the Flowspec NLR can be considered from two dimensions: traffic match and traffic action. First, the traffic match must include the L3 destination prefix (Destination Prefix). Second, if the traffic action includes a redirect IP, the redirect destination address must come from the BGP route published by the Flowspec server.
[0069] S104: After receiving the target message, match the target message with a matching field of EVPN type traffic corresponding to at least one Flowspec NLRI to determine the target Flowspec NLRI.
[0070] In the embodiment of the present application, the target message is the message to be forwarded received by the routing device.
[0071] After receiving the target packet, the routing device needs to match the traffic match of the EVPN type traffic in at least one Flowspec NLRI with at least one target match item contained in the target packet.
[0072] As previously mentioned, the traffic match for EVPN traffic includes matching items such as the EVPN label, Outer Source MAC, Outer Destination MAC, Inner Source MAC, and Inner Destination MAC. In this application, as long as at least one target matching item of the target packet matches one of the matching items for EVPN traffic, the Flowspec NLRI of the traffic match to which that matching item belongs is determined as the target Flowspec NLRI.
[0073] In actual applications, a target packet may contain multiple EVPN traffic match entries and may successfully match traffic matches in multiple Flowspec NLRIs. If a target packet successfully matches traffic matches in multiple Flowspec NLRIs, a unique EVPN instance cannot be mapped using a single traffic action.
[0074] To avoid this situation, the matching priority of all target matching items in the target packet is determined based on the preconfigured first matching rule. Then, a target matching item is selected in descending order of matching priority in the first matching rule to match the traffic matches for EVPN traffic in all Flowspec NLRIs. During the matching process, if the currently selected target matching item matches the traffic match for EVPN traffic in one of the Flowspec NLRIs, the selected Flowspec NLRI is determined as the target Flowspec NLRI, and the matching process ends.
[0075] Specifically, according to actual business needs, the embodiment of the present application can be set in the first matching rule: the matching priority of the EVPN instance identifier is higher than the matching priority of the outer destination MAC address information, the matching priority of the outer destination MAC address information is higher than the matching priority of the outer source MAC address information, the matching priority of the outer source MAC address information is higher than the matching priority of the inner destination MAC address information, and the matching priority of the inner destination MAC address information is higher than the inner meta MAC address information.
[0076] When matching the target Flowspec NLRI for the target packet, the EVPN instance identifier in the target packet is first matched with the EVPN label of the EVPN type traffic in each Flowspec NLRI. If the EVPN instance identifier in the target packet does not match the EVPN label in all Flowspec NLRIs, the match fails. The outer destination MAC address in the target packet is then matched with the Outer Source MAC of the EVPN type traffic in each Flowspec NLRI. Similarly, if the outer destination MAC address in the target packet does not match the Outer Source MAC1 in all Flowspec NLRIs, the match fails. The outer source MAC address in the target packet is then matched with the Outer Destination MAC of the EVPN type traffic in each Flowspec NLRI, and so on, until a target Flowspec NLRI that matches the target packet is determined.
[0077] It's also worth noting that in practice, the target packet can belong to any of the aforementioned traffic types: L2, L3, MPLS, SRv6, and EVPN. That is, in addition to traffic matches and traffic actions for EVPN traffic, the Flowspec NLRI also includes traffic matches and traffic actions for at least one of L2, L3, MPLS, and SRv6.
[0078] For routing devices, different matching priorities can be configured for different types of traffic, and one type of traffic is selected in turn according to the matching priority to match the target message, until the type of traffic to which the target message belongs is determined from the above types of traffic.
[0079] Specifically, all traffic types with matching rules and traffic control action fields in all Flowspec NLRIs are defined as target traffic types. Upon receiving a target packet, a routing device first identifies all supported target traffic types—that is, traffic types with traffic matches and traffic actions—based on the type field in each Flowspec NLRI. Next, it determines the matching priority for all target traffic types based on the preconfigured second matching rule. Finally, it selects a target traffic type in descending order of matching priority according to the second matching rule, matching the target packet against the traffic matches for all selected target traffic types corresponding to the Flowspec NLRIs.
[0080] Specifically, according to actual business needs, embodiments of the present application can set the following in the second matching rule: L2 traffic has a higher matching priority than L3 traffic, L3 traffic has a higher matching priority than MPLS traffic, MPLS traffic has a higher matching priority than SRv6 traffic, and SRv6 traffic has a higher matching priority than EVPN traffic. In this step, if the matching fields of all target traffic types with a higher matching priority than EVPN traffic fail to match the target packet, the target packet is then matched against the matching fields of the EVPN traffic corresponding to at least one Flowspec NLRI.
[0081] S106: Determine a target port corresponding to the target message based on the flow control action field corresponding to the target Flowspec NLRI, and send the target message through the target port.
[0082] Specifically, this step determines the target flow control action to be applied to the target packet based on the flow control action field corresponding to the target Flowspec NLRI, namely, one of the EVPN instance redirect action, EVPN channel redirect action, and EVPN instance flag action described above. Then, based on the target flow control action, the corresponding target EVPN instance is determined, and the port used to send the packet in the target EVPN instance is used as the target port corresponding to the target packet, so that the target packet is sent through the target port.
[0083] Based on the above, it can be seen that the method of the embodiments of the present application designs EVPN-specific matching fields and flow control action fields in the Flowspec NLRI, which can support routing devices in identifying EVPN-encapsulated traffic and similarly support routing devices in implementing forwarding policies for EVPN-type packets. Specifically, after receiving a target packet to be forwarded, the routing device can attempt to identify whether the target packet is EVPN-type traffic based on the matching fields for EVPN-type traffic provided by the Flowspec NLRI. If the target packet is EVPN-type traffic, the routing device can further perform flow control on the target packet based on the flow control action field corresponding to EVPN-type traffic. Specifically, the routing device determines the target port corresponding to the target packet and selects the target port to transmit the target packet. This solves the problem that current Flowspec technology cannot implement device-side flow control for EVPN packets.
[0084] The flow control of the embodiment of the present application is described in detail below in combination with actual application scenarios.
[0085] As shown in FIG3 , in the application scenario of the embodiment of the present application:
[0086] The routing information of the routing device indicates that the next hop for traffic destined for DA 12.12.12.1 / 24 on the public network is A. Assume that directly connected address B belongs to a VPN route, the corresponding VRF forwading instance is 1234, the encapsulation mode is EVPN, and the VPN corresponds to RD = 12:34 and RT = 12:34. The remaining information is omitted.
[0087] The routing device receives traffic from a native IP address on its ingress port. The routing device receives a packet with a destination address (DA) of 12.12.12.1 / 24, a source address (SA) of 10.10.10.1 / 24, and a DSCP value of 10 on its ingress port.
[0088] In Flowspec NLRI (①), the remote Flowspec server sends a traffic match message to the routing device. The traffic match message includes Sub-TLV type 2, with the optional match options for destination address DA 12.12.12.1 / 24 and source address SA 10.10.10.1 / 24. In the traffic action field, select redirect and set the redirection to VPN instance name 1234.
[0089] In Flowspec NLRI ②, the remote Flowspec server sends a traffic match message to the routing device. The traffic match message includes Sub-TLV type 2, with the optional destination address DA 12.12.12.1 / 24 and DSCP 10. The traffic action is set to redirect, redirecting the traffic to the VPN instance with RT 12:34.
[0090] Correspondingly, the process of the application scenario shown in FIG3 includes the following steps.
[0091] Step 1: When no Flowspec route is received, the routing device's public network port Int1 receives traffic destined for the Native IP. The next hop address in the routing device's public network forwarding table is A. The traffic then flows out of the egress port Int2 and reaches A.
[0092] Step 2: The routing device that receives Flowspec NLRI① verifies the validity of the Flowspec route in Flowspec NLRI① and applies it to the inbound port Int1.
[0093] Step 3: The routing device receives native IP traffic on its inbound port, applies the Flowspec policy, matches the traffic match, and hits DA = 12.12.12.1 / 24 and SA = 10.10.10.1 / 24. The traffic action is executed, and the traffic action redirects the traffic to the VPN instance named 1234. The forwarding plane of the routing device queries the VPN instance and the corresponding egress next hop, and chooses to redirect the traffic to egress port Int3 to reach B.
[0094] Step 4: The routing device that receives Flowspec NLRI② verifies the validity of the Flowspec route in Flowspec NLRI② and applies it to the inbound port Int1.
[0095] Step 5: The routing device receives native IP traffic on its inbound port, applies the Flowspec policy, matches the traffic match, and hits DA = 12.12.12.1 / 24 and DSCP = 10. The traffic action is executed, and the traffic action redirects the traffic to the VPN instance with RT = 12:34. The forwarding plane of the routing device queries the VPN instance and the corresponding egress port next hop, and chooses to redirect the traffic to egress port Int3 to reach B.
[0096] As shown in FIG4 , in the application scenario of the embodiment of the present application:
[0097] The router information on the router indicates that the Layer 2 MAC forwarding table for traffic with destination MAC address 0010.9901.0002 forwards the next route to directly connected address A. The device has VPLS EVPN instance 1234, with both its RD and RT configured as 12:34.
[0098] The routing device's ingress port receives Native IP traffic indication: The routing device's ingress port Int1 receives a packet with a destination MAC address of 0010.9901.0002, a source MAC address of 0011.9401.0002, and a VLAN value of 10.
[0099] In Flowspec NLRI (①), the remote Flowspec server sends a traffic match message to the routing device. The traffic match message includes Sub-TLV type = 1, and the optional match destination MAC address is 0010.9901.0002 and VLAN ID = 10. In the traffic action field, select redirect and set the redirection to VPLS EVPN instance name 1234.
[0100] In Flowspec NLRI ②, the remote Flowspec server sends a traffic match message to the routing device. The traffic match message includes Sub-TLV type 1, with the optional source MAC address 0011.9401.0002 and VLAN 10. The traffic action is set to redirect, redirecting traffic to the VPLS EVPN instance with RT 12:34.
[0101] The L2 encapsulated traffic sent from the outbound port of the routing device indicates that the traffic matches the Flowspec, undergoes a redirect action by the routing device, and is forwarded by the AC egress port Int3 of the VPLS EVPN instance to next hop B.
[0102] Correspondingly, the process of the application scenario shown in FIG4 includes the following steps.
[0103] Step 1: When no Flowspec route is received, the router receives inbound Layer 2 Ethernet traffic on the public port Int1. The router queries the local MAC forwarding table or the corresponding Layer 2 forwarding instance to forward the traffic through the VLAN. The traffic then flows out through the egress port Int2 to the next hop A.
[0104] Step 2: The routing device that receives Flowspec NLRI① verifies the validity of the Flowspec route in Flowspec NLRI① and applies it to the inbound port Int1.
[0105] Step 3: The routing device receives Layer 2 Ethernet traffic on its inbound port. The Flowspec policy is applied to the traffic match. If DMAC = 0010.9901.0002 and VLAN = 10 are matched, the traffic action is executed. The traffic action redirects traffic to the VLPS EVPN instance named 1234. The forwarding plane of the routing device queries the VPN instance and the corresponding egress next hop, redirecting the traffic to egress port Int3 to B. The traffic is then diverted to VPLS forwarding.
[0106] Step 4: The routing device that receives Flowspec NLRI② verifies the validity of the Flowspec route in Flowspec NLRI② and applies it to the inbound port Int1.
[0107] Step 5: The routing device receives native IP traffic on its inbound port, applies the Flowspec policy, matches the traffic match, and hits SMAC = 0011.9401.0002 and VLAN = 10. The traffic action is executed, and the traffic action redirects the traffic to the VPLS EVPN instance with RT = 12:34. The forwarding plane of the routing device queries the VPLS EVPN instance and the corresponding egress next hop, and redirects the traffic to egress port Int3 to B. The packet is then diverted to VPLS forwarding.
[0108] As shown in FIG5 , in the application scenario of the embodiment of the present application:
[0109] The routers information on the router indicates that the next hop for traffic destined for 12.12.12.1 / 24 is directly connected to address A. The device has VPLS EVPN instance 1234, with both its RD and RT configured as 12:34. An SR-TE tunnel is deployed on the device, with the corresponding tunnel ID set to 1.
[0110] The inbound port of the routing device receives native IP traffic. The inbound port of the routing device receives a packet with a destination address (DA) of 12.12.12.1 / 24, a source address (SA) of 10.10.10.1 / 24, and a DSCP value of 10.
[0111] In Flowspec NLRI (①), the remote Flowspec server sends a traffic match message to the device. The traffic match message includes Sub-TLV type = 2 and optionally matches the destination address 12.12.12.1 / 24 and the source address 10.10.10.1 / 24. The traffic action is set to redirect, redirecting to the tunnel with tunnel ID = 1 and iterating to EVPN instance name 1234.
[0112] In Flowspec NLRI ②, the remote Flowspec server sends a traffic match message to the device. The traffic match message includes Sub-TLV type 2 and the optional match options for the destination address 12.12.12.1 / 24 and the source address 10.10.10.1 / 24. The traffic action option is set to redirect, redirecting to a tunnel with tunnel ID 1 and iterating to EVPN RT 12:34.
[0113] The MPLS-EVPN encapsulated traffic sent from the outbound port of the routing device indicates that: Flowspec matches the traffic, the device completes the redirection action, and the outer layer encapsulates the DMAC, SMAC, MPLS label, and EVPN label information. The traffic is forwarded by the egress port Int3 of the tunnel iteration to the next hop B.
[0114] Correspondingly, the process of the application scenario shown in FIG5 includes the following steps.
[0115] Step 1: When no Flowspec route is received, the device's public network port Int1 receives traffic destined for the Native IP. The next hop address in the device's public network forwarding table is A. The traffic then flows out of the egress port Int2 and reaches A.
[0116] Step 2: The routing device that receives Flowspec NLRI① verifies the validity of the Flowspec route in Flowspec NLRI① and applies it to the inbound port Int1.
[0117] Step 3: The routing device receives native IP traffic on its inbound port, applies the Flowspec policy, matches the traffic match, and matches DA = 12.12.12.1 / 24 and SA = 10.10.10.1 / 24. The traffic action is executed, which redirects the traffic to the SR-TE tunnel with tunnel ID = 1. The traffic is then iterated to the forwarding of EVPN instance name 1234. The forwarding plane of the device queries the VPN instance and the corresponding egress next hop, redirecting the traffic to egress port Int3 to B. The packet is then forwarded through the tunnel.
[0118] Step 4: The routing device that receives Flowspec NLRI② verifies the validity of the Flowspec route in Flowspec NLRI② and applies it to the inbound port Int1.
[0119] Step 5: The routing device receives native IP traffic on its inbound port, applies the Flowspec policy, matches the traffic match, and matches DA = 12.12.12.1 / 24 and SA = 10.10.10.1 / 24. The traffic action is executed, which redirects the traffic to the SR-TE tunnel with tunnel ID = 1. The traffic is then iterated to the forwarding of the EVPN instance RT = 12:34. The forwarding plane of the device queries the VPN instance and the corresponding egress port next hop, redirecting the traffic to egress port Int3 to B. The packet is then forwarded into the tunnel.
[0120] As shown in FIG6 , in the application scenario of the embodiment of the present application:
[0121] Routers information: Device label forwarding table information indicates that the next hop for traffic with MPLS label 99991 is directly connected address A. The routing device has VPLS EVPN instance 1, which forwards traffic with EVPN label 45678. The routing device has VPLS EVPN instance 2, which forwards traffic with EVPN label 56789.
[0122] The inbound port of the routing device receives MPLS-EVPN traffic: The inbound port of the routing device receives a packet with MPLS label = 99991 and EVPN label = 45678.
[0123] In Flowspec NLRI (①), the remote Flowspec server sends a traffic match message to the routing device. The traffic match message includes Sub-TLV type 3 and an optional MPLS label match of 99991. In the traffic action field, select redirect, set the EVPN label swap action, and switch the EVPN label to 56789.
[0124] In Flowspec NLRI ②, the remote Flowspec server sends a traffic match message to the routing device. The traffic match message contains Sub-TLV type = 5 and optionally selects the EVPN label to match as 45678. In the traffic action field, select redirect and set the EVPN label pop action.
[0125] MPLS-EVPN encapsulated traffic sent from the outbound port of the routing device: Flowspec matches the traffic, which is redirected by the routing device. The label forwarding table iterates through outbound port Int2 and forwards it to next hop A.
[0126] Correspondingly, the process of the application scenario shown in FIG6 includes the following steps.
[0127] Step 1: When no Flowspec route is received, the routing device's public network port Int1 receives inbound MPLS-EVPN traffic. The next hop address in the device's label forwarding table is A. The traffic then flows out through the egress port Int2 to reach A.
[0128] Step 2: The routing device that receives Flowspec NLRI① verifies the validity of the Flowspec route in Flowspec NLRI① and applies it to the inbound port Int1.
[0129] Step 3: The routing device receives MPLS-EVPN traffic on its ingress port. The Flowspec policy is applied to the traffic match. If MPLS label = 99991 is found, the traffic action is executed. The traffic action executes redirect to replace the EVPN label with 56789. The routing device's forwarding plane queries the label forwarding table and finds the next hop address is A. Therefore, the traffic is routed out of egress port Int2 to A.
[0130] Step 4: The routing device that receives Flowspec NLRI② verifies the validity of the Flowspec route in Flowspec NLRI② and applies it to the inbound port Int1.
[0131] Step 5: The routing device receives native IP traffic on its inbound port, applies the Flowspec policy, matches the traffic match, and finds EVPN label = 45678. The traffic action is executed, and the traffic action executes redirect to remove the EVPN label. The forwarding plane of the routing device queries the label forwarding table and finds the next hop address is A. Therefore, the traffic is forwarded out of egress port Int2 to A.
[0132] Corresponding to the method shown in FIG1 above, an embodiment of the present application also provides a flow control device for an Ethernet virtual private network (EVPN), which can be applied to a routing device. FIG7 is a schematic structural diagram of a flow control device 700 according to an embodiment of the present application, comprising: an acquisition module 710 for acquiring at least one flow specification network layer reachability information Flowspec NLRI, each of the Flowspec NLRIs containing a matching field and a flow control action field configured exclusively for EVPN type traffic. A matching module 720 is configured to, after receiving a target message, match the target message with the matching field of the EVPN type traffic corresponding to the at least one Flowspec NLRI to determine the target Flowspec NLRI. A sending module 730 determines the target port corresponding to the target message based on the flow control action field corresponding to the target Flowspec NLRI, and sends the target message through the target port.
[0133] Based on the apparatus of the embodiments of the present application, it can be seen that the present application designs a matching field and flow control action field specifically for EVPN in the Flowspec NLRI, which can support routing devices in identifying EVPN-encapsulated traffic and similarly support routing devices in implementing forwarding policies for EVPN-type packets. Specifically, after receiving a target packet to be forwarded, the routing device can attempt to identify whether the target packet is EVPN-type traffic according to the matching field for EVPN-type traffic provided by the Flowspec NLRI. If the target packet is EVPN-type traffic, the routing device can further perform flow control on the target packet according to the flow control action field corresponding to the EVPN-type traffic. Specifically, the routing device determines the target port corresponding to the target packet and selects the target port to transmit the target packet. This solves the problem that current Flowspec technology cannot implement device-side flow control for EVPN packets.
[0134] Optionally, the sending module 730 determines the target port corresponding to the target message based on the flow control action field corresponding to the target Flowspec NLRI, including: determining the target flow control action applied to the target message based on the flow control action field corresponding to the target Flowspec NLRI; determining the corresponding target EVPN instance based on the target flow control action, and using the port used to send the message in the target EVPN instance as the target port corresponding to the target message.
[0135] Optionally, the target traffic control action includes one of the following: an EVPN instance redirection action, used to introduce the message association into a specified EVPN instance; an EVPN tunnel redirection action, used to introduce the message association into a specified Multi-Protocol Label Switching MPLS tunnel or Segment Routing Traffic Engineering SR-TE tunnel, where the MPLS tunnel or SR-TE tunnel is mapped with an EVPN instance; an EVPN instance marking action, used to switch the EVPN instance for the message.
[0136] Optionally, the matching module 720 matches the target message with the matching field of the EVPN type traffic provided by the at least one Flowspec NLRI to determine the target Flowspec NLRI, including: when the target message contains at least one target matching item corresponding to the EVPN type traffic, determining the matching priority of all target matching items based on a pre-configured first matching rule; selecting one target matching item in descending order of matching priority in the first matching rule, and matching it with the matching fields in all Flowspec NLRIs; and, when one of the selected target matching items matches the matching field in one of the Flowspec NLRIs, determining one of the Flowspec NLRIs as the target Flowspec NLRI.
[0137] Optionally, the target message includes at least one of the following matching items: an EVPN instance identifier, outer source MAC address information, outer destination MAC address information, inner source MAC address information, and inner destination MAC address information.
[0138] Optionally, in the first matching rule, the matching priority of the EVPN instance identifier is higher than the matching priority of the outer destination MAC address information, the matching priority of the outer destination MAC address information is higher than the matching priority of the outer source MAC address information, the matching priority of the outer source MAC address information is higher than the matching priority of the inner destination MAC address information, and the matching priority of the inner destination MAC address information is higher than the inner meta MAC address information.
[0139] Optionally, the at least one Flowspec NLRI also includes a matching field and a flow control action field for other types of traffic; the matching module 720 matches the target message with the matching field of the EVPN type traffic corresponding to the at least one Flowspec NLRI after receiving the target message, including: after receiving the target message, determining the matching priority of all target type traffic based on a pre-configured second matching rule, the target type traffic being the type traffic corresponding to a matching rule and a flow control action field in the at least one Flowspec NLRI; selecting one target type traffic in descending order of matching priority in the second matching rule, so as to match the target message with the matching field of the target type traffic to be selected by the at least one Flowspec NLRI, until the matching fields of all other target type traffic with a matching priority higher than the EVPN type traffic fail to match the target message, and then matching the target message with the matching field of the EVPN type traffic corresponding to the at least one Flowspec NLRI.
[0140] Optionally, the other types of traffic include at least one of L2 type traffic, L3 type traffic, MPLS type traffic and SRv6 type traffic; in the second matching rule, the matching priority of the L2 type traffic is higher than the matching priority of the L3 type traffic, the matching priority of the L3 type traffic is higher than the matching priority of the MPLS type traffic, the matching priority of the MPLS type traffic is higher than the matching priority of the SRv6 type traffic, and the matching priority of the SRv6 type traffic is higher than the matching priority of the EVPN type traffic.
[0141] Optionally, the at least one Flowspec NLRI includes a type field, and the type field is used to indicate the type of traffic to which the Flowspec NLRI belongs, which includes a matching field and a flow control action field; before the matching module 720 determines the matching priority of all target type traffic based on the pre-configured second matching rule, it also determines all target type traffic based on the type field of the at least one Flowspec NLRI.
[0142] Optionally, the address family of the EVPN type traffic is pre-configured in the Border Gateway Protocol of the routing device.
[0143] Obviously, the device shown in Figure 7 can be used as the execution subject of the method shown in Figure 1, and thus can implement the steps and corresponding functions of the method shown in Figure 1. Since the principles are the same, this article will not elaborate on them in detail.
[0144] In addition, an embodiment of the present application further provides an electronic device. Figure 8 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Referring to Figure 8, at the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network port, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.
[0145] The processor, network port, and memory can be interconnected via an internal bus, such as an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. These buses can be categorized as address buses, data buses, and control buses. For ease of illustration, FIG5 shows only one bidirectional arrow, but this does not imply that there is only one bus or only one type of bus.
[0146] The memory is used to store programs. Specifically, the program may include program code, which includes computer operating instructions. The memory may include internal memory and non-volatile memory, and provides instructions and data to the processor.
[0147] The processor reads the corresponding computer program from the non-volatile memory into the internal memory and then runs it, forming the message transmission method shown in Figure 5 above at a logical level. Accordingly, the processor executes the program stored in the memory and is specifically configured to perform the following operations: obtain at least one flow specification network layer reachability information (Flowspec NLRI), each of which includes a matching field and a flow control action field configured specifically for EVPN-type traffic. After receiving a target message, the processor matches the target message with the matching field of the EVPN-type traffic corresponding to the at least one Flowspec NLRI to determine the target Flowspec NLRI. Based on the flow control action field corresponding to the target Flowspec NLRI, the processor determines the target port corresponding to the target message and sends the target message through the target port.
[0148] Based on the electronic devices of the embodiments of the present application, it can be seen that the present application designs a matching field and flow control action field specifically for EVPN in the Flowspec NLRI, which can support routing devices to identify EVPN-encapsulated traffic and similarly support routing devices' forwarding policies for EVPN-type packets. Specifically, after receiving a target packet to be forwarded, the routing device can attempt to identify whether the target packet is EVPN-type traffic according to the matching field for EVPN-type traffic provided by the Flowspec NLRI. If the target packet is EVPN-type traffic, the routing device can further perform flow control on the target packet according to the flow control action field corresponding to the EVPN-type traffic. Specifically, the routing device determines the target port corresponding to the target packet and selects the target port to transmit the target packet. This solves the problem that current Flowspec technology cannot implement device-side flow control for EVPN packets.
[0149] The Ethernet virtual private network flow control method disclosed in the embodiments of this specification can be applied to and implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor or software instructions. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0150] Of course, in addition to software implementation, the electronic device in this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0151] In addition, an embodiment of the present application also proposes a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions.
[0152] Optionally, when the above instructions are executed by a portable electronic device that includes multiple applications, the portable electronic device can perform the steps of the method shown in Figure 1, including: obtaining at least one flow specification network layer reachability information Flowspec NLRI, each of the Flowspec NLRIs including a matching field and a flow control action field configured specifically for EVPN type traffic. After receiving a target message, the target message is matched with the matching field of the EVPN type traffic corresponding to the at least one Flowspec NLRI to determine a target Flowspec NLRI. Based on the flow control action field corresponding to the target Flowspec NLRI, a target port corresponding to the target message is determined, and the target message is sent through the target port.
[0153] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Thus, this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0154] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0155] The above are merely examples of the present invention and are not intended to limit this specification. For those skilled in the art, various modifications and variations of this specification are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification shall be included within the scope of the claims of this specification. In addition, all other embodiments obtained by those of ordinary skill in the art without creative effort shall fall within the scope of protection of this document.
Claims
1. A method for transmitting a message of an Ethernet virtual private network EVPN, applied to a routing device, comprising: Obtain at least one flow specification network layer reachability information Flowspec NLRI, each of the Flowspec NLRIs including a matching field and a flow control action field configured specifically for EVPN type traffic; After receiving the target message, match the target message with the matching field of the EVPN type traffic corresponding to the at least one Flowspec NLRI to determine the target Flowspec NLRI; The target port corresponding to the target message is determined based on the flow control action field corresponding to the target Flowspec NLRI, and the target message is sent through the target port.
2. The method according to claim 1, wherein: The determining, based on the flow control action field corresponding to the target Flowspec NLRI, the target port corresponding to the target message includes: Determine a target flow control action applied to the target message based on the flow control action field corresponding to the target Flowspec NLRI; A corresponding target EVPN instance is determined based on the target traffic control action, and a port used for sending messages in the target EVPN instance is used as a target port corresponding to the target message.
3. The method according to claim 2, wherein: The target flow control action includes one of the following: EVPN instance redirection action, used to associate packets with a specified EVPN instance. An EVPN tunnel redirection action is used to associate and introduce a message to a specified multi-protocol label switching MPLS tunnel or segment routing traffic engineering SR-TE tunnel, where the MPLS tunnel or SR-TE tunnel is mapped with an EVPN instance; EVPN instance flag action, used to switch the EVPN instance for packets.
4. The method according to claim 1, wherein: The matching field of the EVPN type traffic provided by the at least one Flowspec NLRI is matched with the target message to determine the target Flowspec NLRI, including: In a case where the target message includes at least one target matching item corresponding to EVPN type traffic, determining the matching priority of all target matching items based on a pre-configured first matching rule; Selecting a target matching item in descending order of matching priority in the first matching rule, and matching it with the matching fields in all Flowspec NLRIs; and, In the case that the selected one of the target matching items matches the matching field in one of the Flowspec NLRIs, the one of the Flowspec NLRIs is determined as the target Flowspec NLRI.
5. The method according to claim 4, wherein: The target message includes at least one of the following matching items: EVPN instance identifier, outer source MAC address information, outer destination MAC address information, inner source MAC address information, and inner destination MAC address information.
6. The method according to claim 5, wherein: In the first matching rule, the matching priority of the EVPN instance identifier is higher than the matching priority of the outer destination MAC address information, the matching priority of the outer destination MAC address information is higher than the matching priority of the outer source MAC address information, the matching priority of the outer source MAC address information is higher than the matching priority of the inner destination MAC address information, and the matching priority of the inner destination MAC address information is higher than the inner meta MAC address information.
7. The method according to claim 1, wherein: The at least one Flowspec NLRI further includes a configuration field and a flow control action field for other types of traffic; After receiving the target message, matching the target message with a matching field of the EVPN type traffic corresponding to the at least one Flowspec NLRI includes: After receiving the target message, determine the matching priority of all target type traffic based on the pre-configured second matching rule, wherein the target type traffic is the type traffic corresponding to the matching rule and the flow control action field in the at least one Flowspec NLRI; Select a target type of traffic in sequence according to the order of the matching priority from high to low in the second matching rule, so as to match the target message with the matching field of the target type of traffic that should be selected corresponding to the at least one Flowspec NLRI, until the matching fields of all other target type of traffic with a matching priority higher than the EVPN type traffic fail to match the target message, and then match the target message with the matching field of the EVPN type traffic corresponding to the at least one Flowspec NLRI.
8. The method according to claim 7, wherein: The other types of traffic include at least one of L2 type traffic, L3 type traffic, MPLS type traffic and SRv6 type traffic; in the second matching rule, the matching priority of the L2 type traffic is higher than the matching priority of the L3 type traffic, the matching priority of the L3 type traffic is higher than the matching priority of the MPLS type traffic, the matching priority of the MPLS type traffic is higher than the matching priority of the SRv6 type traffic, and the matching priority of the SRv6 type traffic is higher than the matching priority of the EVPN type traffic.
9. The method according to claim 7, wherein: The at least one Flowspec NLRI includes a type field, where the type field is used to indicate the type of flow that the Flowspec NLRI includes a match field and a flow control action field; Before determining the matching priority of all target type traffic based on the pre-configured second matching rule, the method further includes: Based on the type field of the at least one Flowspec NLRI, all target type flows are determined.
10. The method according to any one of claims 1 to 9, wherein: The address family of the EVPN type traffic is pre-configured in the border gateway protocol of the routing device.
11. An electronic device, comprising: processor; And, a memory configured to store computer executable instructions, which, when executed, cause the processor to perform the method according to any one of claims 1 to 10.
12. A computer-readable storage medium, the computer-readable storage medium being used to store computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
EVPN message forwarding method and system, storage medium and terminal
CN112311643A
Network layer reachable information transmission method, system and device and network equipment
CN114095416A
Neighbor resolution for remote EVPN hosts in IPV6 EVPN environment
US9860169B1
Routing obtaining method and apparatus, storage medium, and electronic apparatus
WO2022237879A1
Cited By
Route sending method and device and storage medium
CN122437805A
Routing transmission methods, devices and storage media
CN122437805B
