Nothing Special   »   [go: up one dir, main page]

WO2021057293A1 - Message forwarding method and apparatus in evpn, and device and storage medium - Google Patents

Message forwarding method and apparatus in evpn, and device and storage medium Download PDF

Info

Publication number
WO2021057293A1
WO2021057293A1 PCT/CN2020/108465 CN2020108465W WO2021057293A1 WO 2021057293 A1 WO2021057293 A1 WO 2021057293A1 CN 2020108465 W CN2020108465 W CN 2020108465W WO 2021057293 A1 WO2021057293 A1 WO 2021057293A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
interface
forwarding
local
local interface
Prior art date
Application number
PCT/CN2020/108465
Other languages
French (fr)
Chinese (zh)
Inventor
唐亮
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2021057293A1 publication Critical patent/WO2021057293A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/20Hop count for routing purposes, e.g. TTL
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering

Definitions

  • the embodiment of the present invention relates to but not limited to the field of communications, and specifically relates to but not limited to a message forwarding method, device, device and storage medium in EVPN.
  • EVPN Extra Network Virtual Private Network
  • VXLAN Virtual Extensible Local Area Network
  • VXLAN Virtual Extensible Local Area Network
  • VXLAN Virtual Extended local area network
  • the next device After receiving the VXLAN packet, the next device needs to decapsulate the VXLAN packet, which increases the processing overhead of the device.
  • VXLAN packet header Increase the length of the message, which may result in the need to sub-package the message, which reduces the efficiency of device message forwarding.
  • the method, device, device, and storage medium for message forwarding in EVPN provided by the embodiments of the present invention solve the technical problems, at least to a certain extent, that the existing message forwarding efficiency is low and the overhead is high.
  • an embodiment of the present invention provides a message forwarding method in EVPN, including: receiving a message; forwarding the message preferentially from a local interface, where the local interface belongs to a local local area network Interface.
  • An embodiment of the present invention also provides a message forwarding device in EVPN, which includes: a receiving module for receiving messages; a sending module for forwarding the messages preferentially from a local interface, where the local interface belongs to a local local area network Interface.
  • the embodiment of the present invention also provides a device, the device includes a processor, a memory, and a communication bus; the communication bus is used to realize the connection and communication between the processor and the memory; the processor is used to execute one stored in the memory Or multiple computer programs to implement the steps of the message forwarding method in EVPN.
  • the embodiment of the present invention also provides a storage medium, the storage medium stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to realize the message forwarding in the above-mentioned EVPN Method steps.
  • Fig. 1 is a flowchart of a method for forwarding packets in EVPN according to the first embodiment of the present invention
  • FIG. 2 is a flowchart of a method for forwarding a message according to Embodiment 1 of the present invention
  • Fig. 3 is a flowchart of a method for generating a hardware forwarding table according to the first embodiment of the present invention
  • FIG. 4 is a flowchart of a method for forwarding packets in EVPN according to the second embodiment of the present invention.
  • FIG. 5 is a flowchart of a method for forwarding packets in EVPN according to the third embodiment of the present invention.
  • FIG. 6 is a flowchart of a method for forwarding packets in EVPN according to the fourth embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a message forwarding device in EVPN according to the fifth embodiment of the present invention.
  • Fig. 8 is a schematic diagram of the structure of the device according to the sixth embodiment of the present invention.
  • next-hop interface when a packet from a device is transmitted to a destination address, there are usually multiple paths, that is, there are multiple next-hop interfaces, and the next-hop interface may have an interface that belongs to a different VPN from the device, and the device is receiving After the message arrives, it will select a next hop interface from all next hop interfaces corresponding to the destination address of the message according to policies such as load balancing, and then forward the message from the next hop interface. Since the selected next hop interface may be an interface that belongs to a different VPN from the device, when forwarding, the packet needs to be VXLAN encapsulated and then bypassed through the VXLAN tunnel. The next device will receive the VXLAN packet after receiving the VXLAN packet.
  • an embodiment of the present invention provides a method for forwarding packets in EVPN.
  • the method for forwarding packets in EVPN includes:
  • a message sent by another device or a message generated by the device is received.
  • the message is forwarded preferentially from the local interface.
  • the message is forwarded preferentially from the local interface.
  • the local interface is an interface belonging to the local area network.
  • preferentially forwarding the message from the local interface includes: if there is a local interface in the next hop interface corresponding to the message, then the message is forwarded from the local interface; if the message corresponds to the next hop interface If there is no local interface, the packet will be forwarded from the corresponding next-hop interface.
  • preferentially forwarding the message from the local interface can be: according to the destination address of the message, look up the routing and forwarding table corresponding to the message, and determine whether there is a next hop interface belonging to the local interface in the routing and forwarding table, if If it exists, the message is forwarded subordinate to the next hop interface of the local interface. If it does not exist, the message is forwarded subordinate to the next hop interface of the remote interface.
  • the remote interface is an interface that does not belong to the local LAN, that is, the interface belongs to the remote LAN.
  • the routing and forwarding table includes the destination address and the next hop interface corresponding to the destination address. It should be understood that each of the routing and forwarding tables The routing entry is obtained according to the routing protocol.
  • Equal-Cost Multipath Routing the ECMP routing entry is obtained according to the routing protocol corresponding to ECMP, and the ECMP routing forwarding table is generated; of course, in In other scenarios, routing entries can also be obtained according to the corresponding routing protocol to generate a routing forwarding table.
  • preferentially forwarding the message locally may also include:
  • S201 Determine whether there is a local interface in the next hop interface corresponding to the packet.
  • judging whether there is a local interface in the next hop interface corresponding to the message may include: judging whether there is a next hop interface in the next hop interface corresponding to the message according to a hardware forwarding table, where the hardware transfer The publication includes the destination address and the next hop interface belonging to the local interface corresponding to the destination address, that is, the next hop interface in the hardware forwarding table is all local interfaces. That is to say, after receiving the message, if the corresponding hardware forwarding table is found according to the destination address of the message, it indicates that there is a local interface in the next hop interface corresponding to the message, and the process goes to S202. Since this method requires a hardware forwarding table, before judging whether there is a next hop interface in the next hop interface corresponding to the message according to the hardware forwarding table, as shown in Figure 3, it also includes:
  • the routing entry includes the next hop interface corresponding to the destination address.
  • the routing entry can be obtained according to the corresponding routing protocol. It should be noted that the obtained routing entries may include routing entries belonging to the remote interface and/or the local interface.
  • S302 Generate a hardware forwarding table of the destination address based on the routing entry belonging to the local interface among the routing entries corresponding to the destination address.
  • next hop interface belonging to the local interface corresponding to the destination address is added to the hardware forwarding table.
  • judging whether there is a local interface in the next hop interface corresponding to the message may include: judging whether there is a next hop interface in the next hop interface corresponding to the message according to the target address, and if the purpose of the message is If the address matches the target address, it indicates that there is a local interface in the next hop interface corresponding to the message, and then go to S202.
  • the target address is already determined, and the address of the local interface exists in the corresponding next hop interface.
  • the destination ACL (Access Control Lists) entry can be used to determine whether the destination address of the packet matches the destination address. When the packet hits the destination ACL entry, it indicates that the destination address of the packet matches the destination address.
  • the target ACL entry includes the target address
  • the message hits the target ACL entry means that the message matches the target address in the target ACL entry.
  • the target ACL entry can be generated according to the target address after the target address is determined, and its action To forward packets from the local interface.
  • the destination address is needed to determine whether there is a local interface in the next hop interface corresponding to the message. Therefore, the target address is used to determine whether there is a next hop interface in the next hop interface corresponding to the message.
  • determining the target address may include: receiving a message and determining that there is a local interface in the next hop interface corresponding to the message, setting the target address of the message as the target address.
  • determining the target address may include: when a routing entry group corresponding to a certain destination address is obtained, or when a new routing entry is obtained, judging whether there is a next hop belonging to the local interface in the routing entry If the interface exists, set the destination address in the routing entry as the destination address.
  • the message when a local interface exists in the next hop interface corresponding to the message, the message can be directly forwarded from the local interface, or the message can be added to the target QOS (Quality of Service, quality of service) queue In which, the message in the target QOS queue is forwarded from the local interface.
  • QOS Quality of Service
  • next hop interface forwarding when judging whether there is a next hop interface in the next hop interface corresponding to the message according to the hardware forwarding table in S201, when the message is forwarded from the local interface, it can be directly transferred from the hardware forwarding table corresponding to the message Select a next hop interface (because the hardware forwarding table only includes the next hop interface belonging to the local interface, therefore, the next hop interface selected must be the local interface), and the message is selected from the next hop interface.
  • Hop interface forwarding when judging whether there is a next hop interface in the next hop interface corresponding to the message according to the hardware forwarding table in S201, when the message is forwarded from the local interface, it can be directly transferred from the hardware forwarding table corresponding to the message Select a next hop interface (because the hardware forwarding table only includes the next hop interface belonging to the local interface, therefore, the next hop interface selected must be the local interface), and the message is selected from the next hop interface.
  • Hop interface forwarding when judging whether there is a next hop interface in the next hop interface corresponding to the message
  • the messages are forwarded preferentially from the local interface.
  • the local interface is an interface belonging to the local local area network.
  • the message is preferentially forwarded from the local interface. Forwarding reduces the process of VXLAN encapsulation and decapsulation of packets, thereby improving the efficiency of packet forwarding.
  • FIG. 4 is a flowchart of a method for forwarding packets in EVPN according to an embodiment of the present invention, including:
  • the device obtains the ECMP group of a certain destination address according to the ECMP routing protocol, and the ECMP group includes the next hop interface corresponding to the destination address.
  • 10.1.1.1 and 20.1.1.1 are local interfaces
  • 30.1.1.1 and 40.1.1.1 are remote interfaces learned through EVPN RT2.
  • S402 Generate a hardware forwarding table of the destination address according to the ECMP group of the destination address.
  • the hardware forwarding table includes the destination address, and the next hop address of the local interface in the ECMP group of the destination address.
  • the hardware forwarding table of the message is found according to the destination address of the message.
  • S405 Forward the message from the local interface according to the hardware forwarding table.
  • forwarding the message from the local interface according to the hardware forwarding table includes selecting a next hop interface from the hardware forwarding table, and forwarding the message from the selected next hop interface.
  • a next hop interface can be selected according to parameters such as the current load status of each next hop interface.
  • the messages are forwarded preferentially from the local interface.
  • the local interface is an interface belonging to the local local area network.
  • the message is preferentially forwarded from the local interface. Forwarding reduces the process of VXLAN encapsulation and decapsulation of packets, thereby improving the efficiency of packet forwarding.
  • FIG. 5 is a flowchart of a method for forwarding packets in EVPN according to an embodiment of the present invention, including:
  • S502 Determine whether there is a local interface in the next hop interface corresponding to the message.
  • judging whether the message belongs to a local message can be, judging whether the next hop interface belonging to the local interface can be found from the ECMP routing and forwarding table corresponding to the message, if found, go to S503; if not found , Then go to S507.
  • the packet is forwarded from the next hop interface that belongs to the local interface found.
  • S504 Generate a target ACL entry according to the destination address of the message.
  • the target ACL entry includes the destination address of the packet, and its action is local forwarding.
  • the packet hitting the target target ACL entry includes that the destination address of the packet matches the destination address in the target target ACL entry.
  • forwarding the message from the local interface includes: finding the corresponding ECMP routing and forwarding table according to the message, selecting a next-hop interface belonging to the local interface, and sending the message. The text is forwarded from the selected local interface.
  • next-hop interface is selected from the ECMP routing and forwarding table corresponding to the packet, and the packet is forwarded from the selected next-hop interface.
  • next hop interface is selected from the ECMP routing and forwarding table, and the message is forwarded from the selected next hop interface .
  • the obtained ECMP routing and forwarding table is shown in Table 2.
  • 10.1.1.2 and 20.1.1.2 belong to the local interface
  • 30.1 .1.2 belongs to the remote interface.
  • Table 2 is found, and the next hop interface is judged according to Table 2 to have a local interface, and it is forwarded from 10.1.1.2 or 20.1.1.2, and A target ACL entry including 100.0.0.2 is formed, and its action is local forwarding.
  • subsequent packets with a destination address of 100.0.0.2 are received, they will all hit the target ACL entry, and then 10.1.1.2 or 20.1.1.2 are preferred to be forwarded from Table 2.
  • the messages are forwarded preferentially from the local interface.
  • the local interface is an interface belonging to the local local area network.
  • the message is preferentially forwarded from the local interface. Forwarding reduces the process of VXLAN encapsulation and decapsulation of packets, thereby improving the efficiency of packet forwarding.
  • FIG. 6 is a flowchart of a method for forwarding packets in EVPN according to an embodiment of the present invention, including:
  • S602 Determine whether there is a local interface in the next hop interface corresponding to the message.
  • judging whether the message belongs to a local message can be, judging whether the next hop interface belonging to the local interface can be found from the ECMP routing and forwarding table corresponding to the message, if it is found, go to S603; if it is not found , Then go to S608.
  • the packet is forwarded from the next hop interface that belongs to the local interface found.
  • S604 Generate a target ACL entry according to the destination address of the message.
  • the target ACL entry includes the destination address of the message, and its action is to add to the target QOS queue.
  • the packet hitting the target ACL entry includes that the destination address of the packet matches the destination address in the target ACL entry.
  • the message hits a certain target ACL entry, the message is added to the target QOS queue, where the target QOS queue is a queue for the message to be forwarded from the local interface.
  • Forwarding the message in the target QOS queue from the local interface includes: extracting the message from the target QOS queue, finding the corresponding ECMP routing and forwarding table based on the message, selecting a next hop interface belonging to the local interface, and The message is forwarded from the selected local interface.
  • next hop interface is selected from the ECMP routing and forwarding table, and the message is forwarded from the selected next hop interface .
  • the obtained ECMP routing and forwarding table is shown in Table 3.
  • 10.1.1.3 and 20.1.1.3 belong to the local interface
  • 30.1 .1.3 belongs to the remote interface.
  • Table 3 is found, and it is determined according to Table 3 that there is a local interface in the next hop interface, and it is forwarded from 10.1.1.3 or 20.1.1.3, and A target ACL entry including 100.0.0.3 is formed, and its action is to add it to the target QOS queue.
  • the target ACL entry When subsequent messages with a destination address of 100.0.0.3 are received, the target ACL entry will be hit and added to the target QOS queue. Then, extract a message from the QOS queue, find the ECMP routing and forwarding table corresponding to the message, select a next hop interface belonging to the local interface from the ECMP routing and forwarding table, and forward the message, for example, For a message with a destination address of 100.0.0.3, select 10.1.1.3 or 20.1.1.3 to forward it.
  • the messages are forwarded preferentially from the local interface.
  • the local interface is an interface belonging to the local local area network.
  • the message is preferentially forwarded from the local interface. Forwarding reduces the process of VXLAN encapsulation and decapsulation of packets, thereby improving the efficiency of packet forwarding.
  • the embodiment of the present invention proposes a message forwarding device in EVPN.
  • the device includes a receiving module 701 and a sending module 702.
  • the receiving module 701 is used to receive messages. In some instances, messages sent by other devices or locally generated messages are received.
  • the sending module 702 preferentially forwards the message from the local interface.
  • the local interface is an interface belonging to the local area network.
  • preferentially forwarding the message from the local interface includes: if there is a local interface in the next hop interface corresponding to the message, then the message is forwarded from the local interface; if the message corresponds to the next hop interface If there is no local interface, the packet will be forwarded from the corresponding next-hop interface.
  • preferentially forwarding the message from the local interface can be: according to the destination address of the message, look up the routing and forwarding table corresponding to the message, and determine whether there is a next hop interface belonging to the local interface in the routing and forwarding table, if If it exists, the message is forwarded subordinate to the next hop interface of the local interface. If it does not exist, the message is forwarded subordinate to the next hop interface of the remote interface.
  • the remote interface is an interface that does not belong to the local LAN, that is, the interface belongs to the remote LAN.
  • the routing and forwarding table includes the destination address and the next hop interface corresponding to the destination address. It should be understood that each of the routing and forwarding tables The routing entry is obtained according to the routing protocol.
  • the ECMP routing entry is obtained according to the routing protocol corresponding to ECMP, and the ECMP routing forwarding table is generated; of course, in other scenarios, the route can also be obtained according to the corresponding routing protocol The entry generates a routing forwarding table.
  • preferentially forwarding the message from the local may also include: judging whether there is a local interface in the next hop interface corresponding to the message; when there is a local interface in the next hop interface corresponding to the message, sending the message The text is forwarded from the local interface.
  • judging whether there is a local interface in the next hop interface corresponding to the message may include: judging whether there is a next hop interface in the next hop interface corresponding to the message according to a hardware forwarding table, where the hardware transfer The publication includes the destination address and the next hop interface belonging to the local interface corresponding to the destination address, that is, the next hop interface in the hardware forwarding table is all local interfaces. In other words, after receiving a message, according to the destination address of the message, if the corresponding hardware forwarding table is found, it indicates that there is a local interface in the next hop interface corresponding to the message.
  • this method requires a hardware forwarding table, before judging whether there is a next hop interface in the next hop interface corresponding to the message according to the hardware forwarding table, it also includes: obtaining a routing entry corresponding to a destination address Based on the routing entry corresponding to the destination address, the routing entry belonging to the local interface generates the hardware forwarding table of the destination address, that is, the next hop interface belonging to the local interface corresponding to the destination address is added to the hardware forwarding table. Wherein, the routing entry includes the next hop interface corresponding to the destination address. In the embodiment of the present invention, the routing entry can be obtained according to the corresponding routing protocol. It should be noted that the obtained routing entries may include routing entries belonging to the remote interface and/or the local interface.
  • judging whether there is a local interface in the next hop interface corresponding to the message may include: judging whether there is a next hop interface in the next hop interface corresponding to the message according to the target address, and if the purpose of the message is If the address matches the destination address, it indicates that there is a local interface in the next hop interface corresponding to the packet.
  • the target address is already determined, and the address of the local interface exists in the corresponding next hop interface.
  • the destination ACL entry can be used to determine whether the destination address of the packet matches the destination address. When the packet hits the destination ACL entry, it indicates that the destination address of the packet matches the destination address.
  • the destination ACL entry includes the destination address and the destination address.
  • the message hits the target ACL entry means that the message matches the target address in the target ACL entry.
  • the target ACL entry can be generated according to the target address after the target address is determined, and its action is to forward the message from the local interface.
  • the destination address is needed to determine whether there is a local interface in the next hop interface corresponding to the message. Therefore, the target address is used to determine whether there is a next hop interface in the next hop interface corresponding to the message.
  • determining the target address may include: receiving a message and determining that there is a local interface in the next hop interface corresponding to the message, setting the target address of the message as the target address.
  • determining the target address may include: when a routing entry group corresponding to a certain destination address is obtained, or when a new routing entry is obtained, judging whether there is a next hop belonging to the local interface in the routing entry If the interface exists, set the destination address in the routing entry as the destination address.
  • the message when a local interface exists in the next hop interface corresponding to the message, the message can be directly forwarded from the local interface, or the message can be added to the target QOS (Quality of Service, quality of service) queue In which, the message in the target QOS queue is forwarded from the local interface.
  • QOS Quality of Service
  • next hop interface when judging whether there is a next hop interface in the next hop interface corresponding to the message according to the hardware forwarding table, when forwarding the message from the local interface, you can directly select from the hardware forwarding table corresponding to the message A next hop interface (because the hardware forwarding table only includes the next hop interface belonging to the local interface, therefore, the selected next hop interface must be the local interface), and the packet is transferred from the selected next hop interface Forward.
  • the routing and forwarding table corresponding to the message is searched, and the message corresponds to In the routing and forwarding table, select a next hop interface belonging to the local interface, and forward the packet from the selected next hop interface.
  • the receiving module 701 may be implemented by an antenna or other hardware modules
  • the transmitting module 702 may be implemented by an antenna or other hardware modules.
  • the message forwarding device in EVPN provided by the embodiment of the present invention forwards the message preferentially from the local interface by receiving the message.
  • the local interface is an interface belonging to the local local area network.
  • the message is preferentially forwarded from the local interface. Forwarding reduces the process of VXLAN encapsulation and decapsulation of packets, thereby improving the efficiency of packet forwarding.
  • An embodiment of the present invention provides a device. As shown in FIG. 8, it includes a processor 801, a memory 802, and a communication bus 803, where:
  • the communication bus 803 is used to implement connection and communication between the processor 801 and the memory 802;
  • the processor 801 is configured to execute one or more computer programs stored in the memory 802 to implement at least one step in the method for forwarding messages in EVPN in the above-mentioned Embodiment 1, Embodiment 2, Embodiment 3, and Embodiment 4.
  • the embodiment of the present invention also provides a storage medium, which includes volatile or non-volatile data implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules, or other data).
  • volatile or non-volatile data implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules, or other data).
  • Non-volatile, removable or non-removable media are examples of volatile or non-volatile data implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules, or other data).
  • Computer readable storage media include but are not limited to RAM (Random Access Memory), ROM (Read-Only Memory, read-only memory), EEPROM (Electrically Erasable Programmable read only memory, charged Erasable Programmable Read-Only Memory) ), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, Or any other medium that can be used to store desired information and that can be accessed by a computer.
  • the storage medium in the embodiment of the present invention may be used to store one or more computer programs, and the stored one or more computer programs may be executed by a processor to implement the above-mentioned Embodiment 1, Embodiment 2, Embodiment 3 and Embodiments. At least one step in the packet forwarding method in the EVPN of No. 4.
  • the device and storage medium provided by the embodiment of the present invention, by receiving the message, preferentially forward the message from the local interface.
  • the local interface is an interface belonging to the local local area network.
  • the message is preferentially forwarded from the local interface. The process of VXLAN encapsulation and decapsulation of packets is reduced, thereby improving the efficiency of packet forwarding.
  • the functional modules/units in the system, and the device can be implemented as software (which can be implemented by computer program code executable by a computing device. ), firmware, hardware and their appropriate combination.
  • the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may consist of several physical components. The components are executed cooperatively.
  • Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit .
  • communication media usually contain computer-readable instructions, data structures, computer program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery medium. Therefore, the present invention is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A message forwarding method and apparatus in an EVPN, and a device and a storage medium. The method comprises: receiving a message (S101), and preferentially forwarding the message from a local interface (S102), wherein the local interface is an interface belonging to a local area network. The apparatus comprises: a receiving module (701) for receiving the message; and a sending module (702) used for preferentially forwarding the message from the local interface, wherein the local interface is an interface belonging to the local area network.

Description

EVPN中报文转发方法、装置、设备及存储介质Message forwarding method, device, equipment and storage medium in EVPN
相关申请的交叉引用Cross-references to related applications
本申请基于申请号为201910919635.4、申请日为2019年9月26日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is filed based on a Chinese patent application with an application number of 201910919635.4 and an application date of September 26, 2019, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated into this application by reference.
技术领域Technical field
本发明实施例涉及但不限于通信领域,具体而言,涉及但不限于EVPN中报文转发方法、装置、设备及存储介质。The embodiment of the present invention relates to but not limited to the field of communications, and specifically relates to but not limited to a message forwarding method, device, device and storage medium in EVPN.
背景技术Background technique
在EVPN(Ethernet Virtual Private Network,以太网虚拟专用网络)中,一个设备中的报文传输到目的地址,通常会存在多条路径,即存在多个下一跳接口,下一跳接口中可能存在与该设备属于不同VPN(Virtual Private Network,虚拟专用网络)的接口,在通过与该设备属于不同VPN的下一跳接口进行报文转发时,需要对报文进行VXLAN(Virtual Extensible Local Area Network,虚拟扩展局域网)封装,然后经过VXLAN隧道进行绕行,下一设备在接收到VXLAN报文后,需要进行VXLAN报文的解封装,增加了设备的处理开销,同时,由于VXLAN报文头的增加,增加了报文的长度,可能导致需要对报文进行分包处理,降低了设备报文转发的效率。In EVPN (Ethernet Virtual Private Network), when a packet in a device is transmitted to a destination address, there are usually multiple paths, that is, there are multiple next-hop interfaces, and there may be multiple next-hop interfaces. For interfaces that belong to a different VPN (Virtual Private Network) with the device, when packets are forwarded through the next-hop interface that belongs to a different VPN from the device, the packets need to be VXLAN (Virtual Extensible Local Area Network). Virtual extended local area network) encapsulation, and then detour through the VXLAN tunnel. After receiving the VXLAN packet, the next device needs to decapsulate the VXLAN packet, which increases the processing overhead of the device. At the same time, due to the increase of the VXLAN packet header , Increase the length of the message, which may result in the need to sub-package the message, which reduces the efficiency of device message forwarding.
发明内容Summary of the invention
本发明实施例提供的EVPN中报文转发方法、装置、设备及存储介质,至少在一定程度上解决的技术问题是现有报文转发效率低,占用开销大的问题。The method, device, device, and storage medium for message forwarding in EVPN provided by the embodiments of the present invention solve the technical problems, at least to a certain extent, that the existing message forwarding efficiency is low and the overhead is high.
为至少在一定程度上解决上述技术问题,本发明实施例提供一种EVPN中报文转发方法,包括:接收报文;将所述报文优先从本地接口转发,所述本地接口为属于本地局域网的接口。In order to at least solve the above technical problems to a certain extent, an embodiment of the present invention provides a message forwarding method in EVPN, including: receiving a message; forwarding the message preferentially from a local interface, where the local interface belongs to a local local area network Interface.
本发明实施例还提供一种EVPN中报文转发装置,包括:接收模块,用于接收报文;发送模块,用于将所述报文优先从本地接口转发,所述本地接口为属于本地局域网的接口。An embodiment of the present invention also provides a message forwarding device in EVPN, which includes: a receiving module for receiving messages; a sending module for forwarding the messages preferentially from a local interface, where the local interface belongs to a local local area network Interface.
本发明实施例还提供一种设备,所述设备包括处理器、存储器及通信总线;所述通信总线用于实现处理器和存储器之间的连接通信;所述处理器用于执行存储器中存储的一个或者多个计算机程序,以实现上述EVPN中报文转发方法的步骤。The embodiment of the present invention also provides a device, the device includes a processor, a memory, and a communication bus; the communication bus is used to realize the connection and communication between the processor and the memory; the processor is used to execute one stored in the memory Or multiple computer programs to implement the steps of the message forwarding method in EVPN.
本发明实施例还提供一种存储介质,所述存储介质存储有一个或者多个计算机程序,所述一个或者多个计算机程序可被一个或者多个处理器执行,以实现上述EVPN中报文转 发方法的步骤。The embodiment of the present invention also provides a storage medium, the storage medium stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to realize the message forwarding in the above-mentioned EVPN Method steps.
本发明其他特征和相应的有益效果在说明书的后面部分进行阐述说明,且应当理解,至少部分有益效果从本发明说明书中的记载变的显而易见。Other features and corresponding beneficial effects of the present invention are described in the latter part of the specification, and it should be understood that at least part of the beneficial effects will become apparent from the description in the specification of the present invention.
附图说明Description of the drawings
图1为本发明实施例一的EVPN中报文转发方法流程图;Fig. 1 is a flowchart of a method for forwarding packets in EVPN according to the first embodiment of the present invention;
图2为本发明实施例一的一种报文转发方法流程图;FIG. 2 is a flowchart of a method for forwarding a message according to Embodiment 1 of the present invention;
图3为本发明实施例一的硬件转发表生成方法流程图;Fig. 3 is a flowchart of a method for generating a hardware forwarding table according to the first embodiment of the present invention;
图4为本发明实施例二的EVPN中报文转发方法流程图;4 is a flowchart of a method for forwarding packets in EVPN according to the second embodiment of the present invention;
图5为本发明实施例三的EVPN中报文转发方法流程图;5 is a flowchart of a method for forwarding packets in EVPN according to the third embodiment of the present invention;
图6为本发明实施例四的EVPN中报文转发方法流程图;6 is a flowchart of a method for forwarding packets in EVPN according to the fourth embodiment of the present invention;
图7为本发明实施例五的EVPN中报文转发装置结构示意图;FIG. 7 is a schematic structural diagram of a message forwarding device in EVPN according to the fifth embodiment of the present invention;
图8为本发明实施例六的设备结构示意图。Fig. 8 is a schematic diagram of the structure of the device according to the sixth embodiment of the present invention.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,下面通过具体实施方式结合附图对本发明实施例作进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions, and advantages of the present invention clearer, the following further describes the embodiments of the present invention in detail through specific implementations in conjunction with the accompanying drawings. It should be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention.
实施例一:Example one:
在EVPN中,一个设备中的报文传输到目的地址,通常会存在多条路径,即存在多个下一跳接口,下一跳接口中可能存在与该设备属于不同VPN的接口,设备在接收到报文后,会根据负载均衡等策略从该报文的目的地址对应的所有下一跳接口中,选择一个下一跳接口,然后从该下一跳接口中将该报文转发出去。由于选中的下一跳接口可能是与该设备属于不同VPN的接口,在进行转发时,需要先对报文进行VXLAN封装,然后经过VXLAN隧道进行绕行,下一设备在接收到VXLAN报文后,需要进行VXLAN报文的解封装,增加了设备的处理开销,同时,由于VXLAN报文头的增加,增加了报文的长度,可能导致需要对报文进行分包处理,降低了设备报文转发的效率。为了解决上述技术问题,本发明实施例提供一种EVPN中报文转发方法,请参见图1,EVPN中报文转发方法包括:In EVPN, when a packet from a device is transmitted to a destination address, there are usually multiple paths, that is, there are multiple next-hop interfaces, and the next-hop interface may have an interface that belongs to a different VPN from the device, and the device is receiving After the message arrives, it will select a next hop interface from all next hop interfaces corresponding to the destination address of the message according to policies such as load balancing, and then forward the message from the next hop interface. Since the selected next hop interface may be an interface that belongs to a different VPN from the device, when forwarding, the packet needs to be VXLAN encapsulated and then bypassed through the VXLAN tunnel. The next device will receive the VXLAN packet after receiving the VXLAN packet. , The need to decapsulate the VXLAN message, which increases the processing overhead of the device. At the same time, due to the increase of the VXLAN message header, the length of the message is increased, which may lead to the need to subpackage the message, which reduces the device message The efficiency of forwarding. In order to solve the above technical problems, an embodiment of the present invention provides a method for forwarding packets in EVPN. Referring to FIG. 1, the method for forwarding packets in EVPN includes:
S101、接收报文。S101. Receive a message.
本发明实施例中,在设备运行过程中,接收其他设备发送过来的报文,或者,设备生成的报文。In the embodiment of the present invention, during the operation of the device, a message sent by another device or a message generated by the device is received.
S102、将报文优先从本地接口转发。S102. The message is forwarded preferentially from the local interface.
本发明实施例中,在接收到报文后,将报文优先从本地接口转发。需要说明的是,本地接口为属于本地局域网的接口。其中,将报文优先从本地接口转发包括:若该报文对应 的下一跳接口中,存在本地接口时,则将该报文从本地接口转发;若该报文对应的下一跳接口中,不存在本地接口,则将该报文从对应的下一跳接口转发。In the embodiment of the present invention, after the message is received, the message is forwarded preferentially from the local interface. It should be noted that the local interface is an interface belonging to the local area network. Wherein, preferentially forwarding the message from the local interface includes: if there is a local interface in the next hop interface corresponding to the message, then the message is forwarded from the local interface; if the message corresponds to the next hop interface If there is no local interface, the packet will be forwarded from the corresponding next-hop interface.
其中,将报文优先从本地接口转发可以是:根据该报文的目的地址,查找该报文对应的路由转发表,并判断该路由转发表中是否存在属于本地接口的下一跳接口,若存在,则将该报文从属于本地接口的下一跳接口转发,若不存在,则将该报文从属于远端接口的下一跳接口转发。需要说明的是,远端接口为不属于本地局域网的接口,即属于远端局域网的接口,路由转发表包括目的地址和该目的地址对应的下一跳接口,应当理解的,路由转发表中各路由条目根据路由协议获取,例如,在ECMP(Equal-Cost Multi path Routing,等价多路径)场景下,即会根据ECMP对应的路由协议获取ECMP路由条目,并生成ECMP路由转发表;当然,在其它场景下,还可以根据对应的路由协议获取路由条目生成路由转发表。Wherein, preferentially forwarding the message from the local interface can be: according to the destination address of the message, look up the routing and forwarding table corresponding to the message, and determine whether there is a next hop interface belonging to the local interface in the routing and forwarding table, if If it exists, the message is forwarded subordinate to the next hop interface of the local interface. If it does not exist, the message is forwarded subordinate to the next hop interface of the remote interface. It should be noted that the remote interface is an interface that does not belong to the local LAN, that is, the interface belongs to the remote LAN. The routing and forwarding table includes the destination address and the next hop interface corresponding to the destination address. It should be understood that each of the routing and forwarding tables The routing entry is obtained according to the routing protocol. For example, in the Equal-Cost Multipath Routing (Equal-Cost Multipath Routing) scenario, the ECMP routing entry is obtained according to the routing protocol corresponding to ECMP, and the ECMP routing forwarding table is generated; of course, in In other scenarios, routing entries can also be obtained according to the corresponding routing protocol to generate a routing forwarding table.
本发明实施例中,参见图2所示,将报文优先从本地转发也可以包括:In the embodiment of the present invention, referring to FIG. 2, preferentially forwarding the message locally may also include:
S201、判断报文对应的下一跳接口中是否存在本地接口。S201: Determine whether there is a local interface in the next hop interface corresponding to the packet.
本发明实施例中,判断报文对应的下一跳接口中是否存在本地接口可以包括:根据硬件转发表来判断该报文对应的下一跳接口中是否存在下一跳接口,其中,硬件转发表包括目的地址和该目的地址对应的属于本地接口的下一跳接口,也即,硬件转发表中的下一跳接口均为本地接口。也就是说,在接收到报文后,根据该报文的目的地址,若查找到对应的硬件转发表,则表明该报文对应的下一跳接口中,存在本地接口,转S202。由于该种方式中,需要硬件转发表,因此,在根据硬件转发表来判断该报文对应的下一跳接口中是否存在下一跳接口之前,参见图3所示,还包括:In the embodiment of the present invention, judging whether there is a local interface in the next hop interface corresponding to the message may include: judging whether there is a next hop interface in the next hop interface corresponding to the message according to a hardware forwarding table, where the hardware transfer The publication includes the destination address and the next hop interface belonging to the local interface corresponding to the destination address, that is, the next hop interface in the hardware forwarding table is all local interfaces. That is to say, after receiving the message, if the corresponding hardware forwarding table is found according to the destination address of the message, it indicates that there is a local interface in the next hop interface corresponding to the message, and the process goes to S202. Since this method requires a hardware forwarding table, before judging whether there is a next hop interface in the next hop interface corresponding to the message according to the hardware forwarding table, as shown in Figure 3, it also includes:
S301、获取某一目的地址对应的路由条目。S301. Obtain a routing entry corresponding to a certain destination address.
其中,路由条目中包括该目的地址对应的下一跳接口。本发明实施例中,可以根据对应的路由协议获取路由条目。需要说明的是,获取的路由条目中可能包括属于远端接口和/或本地接口的路由条目。Wherein, the routing entry includes the next hop interface corresponding to the destination address. In the embodiment of the present invention, the routing entry can be obtained according to the corresponding routing protocol. It should be noted that the obtained routing entries may include routing entries belonging to the remote interface and/or the local interface.
S302、基于该目的地址对应的路由条目中,属于本地接口的路由条目生成该目的地址的硬件转发表。S302: Generate a hardware forwarding table of the destination address based on the routing entry belonging to the local interface among the routing entries corresponding to the destination address.
也就是说,将该目的地址对应的属于本地接口的下一跳接口,添加到硬件转发表中。That is, the next hop interface belonging to the local interface corresponding to the destination address is added to the hardware forwarding table.
本发明实施例中,判断报文对应的下一跳接口中是否存在本地接口可以包括:根据目标地址来判断该报文对应的下一跳接口中是否存在下一跳接口,若报文的目的地址与目标地址匹配,则表明该报文对应的下一跳接口中存在本地接口,转S202。其中,目标地址为已经确定的,对应的下一跳接口中,存在本地接口的地址。其中,可以通过目标ACL(Access Control Lists,访问控制列表)条目来判断报文的目的地址是否与目标地址匹配,在报 文命中目标ACL条目时,表明报文的目的地址与目标地址匹配,转S202,其中,目标ACL条目包括目标地址,报文命中目标ACL条目为报文与该目标ACL条目中的目标地址匹配,其中,目标ACL条目可以在确定目标地址后,根据目标地址生成,其动作为将报文从本地接口转发。由于该种方式中,需要通过目标地址来判断报文对应的下一跳接口中是否存在本地接口,因此,根据目标地址来判断该报文对应的下一跳接口中是否存在下一跳接口之前,还包括:确定目标地址。In the embodiment of the present invention, judging whether there is a local interface in the next hop interface corresponding to the message may include: judging whether there is a next hop interface in the next hop interface corresponding to the message according to the target address, and if the purpose of the message is If the address matches the target address, it indicates that there is a local interface in the next hop interface corresponding to the message, and then go to S202. Among them, the target address is already determined, and the address of the local interface exists in the corresponding next hop interface. Among them, the destination ACL (Access Control Lists) entry can be used to determine whether the destination address of the packet matches the destination address. When the packet hits the destination ACL entry, it indicates that the destination address of the packet matches the destination address. S202, where the target ACL entry includes the target address, and the message hits the target ACL entry means that the message matches the target address in the target ACL entry. The target ACL entry can be generated according to the target address after the target address is determined, and its action To forward packets from the local interface. In this method, the destination address is needed to determine whether there is a local interface in the next hop interface corresponding to the message. Therefore, the target address is used to determine whether there is a next hop interface in the next hop interface corresponding to the message. , Also includes: determining the target address.
本发明实施例中,确定目标地址可以包括:接收报文并判定该报文对应的下一跳接口中存在本地接口时,将该报文的目的地址设置为目标地址。其中,此处可以通过查找到报文对应的路由转发表,并判断是否在路由转发表中查找到属于本地接口的下一跳接口,来判断该报文对应的下一跳接口中是否存在本地接口。In the embodiment of the present invention, determining the target address may include: receiving a message and determining that there is a local interface in the next hop interface corresponding to the message, setting the target address of the message as the target address. Here, you can find the routing and forwarding table corresponding to the message and determine whether the next hop interface belonging to the local interface is found in the routing and forwarding table to determine whether there is a local next hop interface corresponding to the message. interface.
本发明实施例中,确定目标地址可以包括:在获取到某一目的地址对应的路由条目组时,或,在获取到新的路由条目时,判断路由条目中是否存在属于本地接口的下一跳接口,若存在,则将该路由条目中的目的地址设置为目标地址。In the embodiment of the present invention, determining the target address may include: when a routing entry group corresponding to a certain destination address is obtained, or when a new routing entry is obtained, judging whether there is a next hop belonging to the local interface in the routing entry If the interface exists, set the destination address in the routing entry as the destination address.
S202、在该报文对应的下一跳接口中存在本地接口时,将报文从本地接口转发。S202: When there is a local interface in the next hop interface corresponding to the message, forward the message from the local interface.
本发明实施例中,在该报文对应的下一跳接口中存在本地接口时,可以直接将报文从本地接口转发,或者,将报文添加到目标QOS(Quality of Service,服务质量)队列中,其中,该目标QOS队列中的报文从本地接口转发。In the embodiment of the present invention, when a local interface exists in the next hop interface corresponding to the message, the message can be directly forwarded from the local interface, or the message can be added to the target QOS (Quality of Service, quality of service) queue In which, the message in the target QOS queue is forwarded from the local interface.
其中,在S201中根据硬件转发表来判断该报文对应的下一跳接口中是否存在下一跳接口时,在将报文从本地接口转发时,可以直接从该报文对应的硬件转发表中选择出一个下一跳接口(由于硬件转发表中只包括属于本地接口的下一跳接口,因此,选择出的下一跳接口必然是本地接口),将该报文从选择出的下一跳接口转发。Among them, when judging whether there is a next hop interface in the next hop interface corresponding to the message according to the hardware forwarding table in S201, when the message is forwarded from the local interface, it can be directly transferred from the hardware forwarding table corresponding to the message Select a next hop interface (because the hardware forwarding table only includes the next hop interface belonging to the local interface, therefore, the next hop interface selected must be the local interface), and the message is selected from the next hop interface. Hop interface forwarding.
在S201中根据目标地址来判断该报文对应的下一跳接口中是否存在下一跳接口时,在将报文从本地接口转发时,则查找该报文对应的路由转发表,从该报文对应的路由转发表中,选择一个属于本地接口的下一跳接口,将该报文从选择出的下一跳接口转发。In S201, when judging whether there is a next-hop interface in the next-hop interface corresponding to the message according to the target address, when the message is forwarded from the local interface, the routing and forwarding table corresponding to the message is searched, and the message In the routing and forwarding table corresponding to the text, select a next-hop interface belonging to the local interface, and forward the packet from the selected next-hop interface.
本发明实施例提供的EVPN中报文转发方法,通过接收报文,将报文优先从本地接口转发,本地接口为属于本地局域网的接口,在某些实施过程中,优先将报文从本地接口转发,减少了对报文进行VXLAN封装、解封装等过程,从而提升了报文转发效率。In the method for forwarding messages in EVPN provided by the embodiment of the present invention, by receiving messages, the messages are forwarded preferentially from the local interface. The local interface is an interface belonging to the local local area network. In some implementation processes, the message is preferentially forwarded from the local interface. Forwarding reduces the process of VXLAN encapsulation and decapsulation of packets, thereby improving the efficiency of packet forwarding.
实施例二:Embodiment two:
更好的理解本发明,本实施例结合更加具体的示例进行说明。参见图3所示,图4为本发明实施例提供的EVPN中报文转发方法的流程图,包括:For a better understanding of the present invention, this embodiment is described in conjunction with more specific examples. Referring to FIG. 3, FIG. 4 is a flowchart of a method for forwarding packets in EVPN according to an embodiment of the present invention, including:
S401、获取某一目的地址的ECMP组。S401. Obtain an ECMP group of a certain destination address.
本发明实施例中,设备根据ECMP路由协议获取到某一目的地址的ECMP组,ECMP组中 包括该目的地址对应的下一跳接口。In the embodiment of the present invention, the device obtains the ECMP group of a certain destination address according to the ECMP routing protocol, and the ECMP group includes the next hop interface corresponding to the destination address.
例如,假设设备获取到目的地址为100.0.0.1的ECMP组,包括4个下一跳接口,分别为10.1.1.1、20.1.1.1、30.1.1.1、40.1.1.1。其中,10.1.1.1、20.1.1.1为本地接口,30.1.1.1、40.1.1.1为通过EVPN RT2学习到的远端接口。For example, suppose the device obtains an ECMP group with a destination address of 100.0.0.1, including 4 next-hop interfaces, namely 10.1.1.1, 20.1.1.1, 30.1.1.1, and 40.1.1.1. Among them, 10.1.1.1 and 20.1.1.1 are local interfaces, and 30.1.1.1 and 40.1.1.1 are remote interfaces learned through EVPN RT2.
S402、根据该目的地址的ECMP组生成该目的地址的硬件转发表。S402: Generate a hardware forwarding table of the destination address according to the ECMP group of the destination address.
其中,硬件转发表中包括目的地址,和该目的地址的ECMP组中,属于本地接口的下一跳地址。Among them, the hardware forwarding table includes the destination address, and the next hop address of the local interface in the ECMP group of the destination address.
承接上例,目的地址为100.0.0.1的硬件转发表如表1所示。Following the above example, the hardware forwarding table with the destination address of 100.0.0.1 is shown in Table 1.
表1Table 1
Figure PCTCN2020108465-appb-000001
Figure PCTCN2020108465-appb-000001
S403、接收报文。S403. Receive a message.
S404、查找该报文对应的硬件转发表。S404. Search the hardware forwarding table corresponding to the message.
本发明实施例中,根据该报文的目的地址查找到该报文的硬件转发表。In the embodiment of the present invention, the hardware forwarding table of the message is found according to the destination address of the message.
承接上例,假设接收到的报文的目的地址为100.0.0.1,则查找到表1。Continuing the above example, assuming that the destination address of the received message is 100.0.0.1, Table 1 is found.
S405、根据硬件转发表将该报文从本地接口转发。S405: Forward the message from the local interface according to the hardware forwarding table.
本发明实施例中,根据硬件转发表,将该报文从本地接口转发包括,从硬件转发表中选择一个下一跳接口,将该报文从选择出的下一跳接口转发出去。其中,可以根据各下一跳接口当前的负载状态等参数从中选择一个下一跳接口。In the embodiment of the present invention, forwarding the message from the local interface according to the hardware forwarding table includes selecting a next hop interface from the hardware forwarding table, and forwarding the message from the selected next hop interface. Among them, a next hop interface can be selected according to parameters such as the current load status of each next hop interface.
承接上例,从表1中选择一个下一跳接口,如选择10.1.1.1,则将报文从10.1.1.1转发出去。Continuing the above example, select a next hop interface from Table 1. If 10.1.1.1 is selected, the message will be forwarded from 10.1.1.1.
本发明实施例提供的EVPN中报文转发方法,通过接收报文,将报文优先从本地接口转发,本地接口为属于本地局域网的接口,在某些实施过程中,优先将报文从本地接口转发,减少了对报文进行VXLAN封装、解封装等过程,从而提升了报文转发效率。In the method for forwarding messages in EVPN provided by the embodiment of the present invention, by receiving messages, the messages are forwarded preferentially from the local interface. The local interface is an interface belonging to the local local area network. In some implementation processes, the message is preferentially forwarded from the local interface. Forwarding reduces the process of VXLAN encapsulation and decapsulation of packets, thereby improving the efficiency of packet forwarding.
实施例三:Example three:
更好的理解本发明,本实施例结合更加具体的示例进行说明。参见图3所示,图5为本发明实施例提供的EVPN中报文转发方法的流程图,包括:For a better understanding of the present invention, this embodiment is described in conjunction with more specific examples. Referring to FIG. 3, FIG. 5 is a flowchart of a method for forwarding packets in EVPN according to an embodiment of the present invention, including:
S501、接收报文。S501. Receive a message.
S502、判断该报文对应的下一跳接口中是否存在本地接口。S502: Determine whether there is a local interface in the next hop interface corresponding to the message.
若是,转S503;若否,则转S507。If yes, go to S503; if not, go to S507.
其中,判断该报文是否属于本地报文可以是,判断是否能从该报文对应的ECMP路由 转发表中查找到属于本地接口的下一跳接口,若查找到,转S503;若没有查找到,则转S507。Among them, judging whether the message belongs to a local message can be, judging whether the next hop interface belonging to the local interface can be found from the ECMP routing and forwarding table corresponding to the message, if found, go to S503; if not found , Then go to S507.
S503、将该报文从本地接口转发。S503: Forward the message from the local interface.
将该报文从查找到的属于本地接口的下一跳接口转发出去。The packet is forwarded from the next hop interface that belongs to the local interface found.
S504、根据该报文的目的地址生成一条目标ACL条目。S504: Generate a target ACL entry according to the destination address of the message.
该目标ACL条目中包括该报文的目的地址,其动作为本地转发。The target ACL entry includes the destination address of the packet, and its action is local forwarding.
S505、接收报文。S505: Receive a message.
S506、在该报文命中目标ACL条目时,将该报文从本地接口转发。S506: When the message hits the target ACL entry, forward the message from the local interface.
其中,报文命中目标目标ACL条目包括,该报文的目的地址与目标目标ACL条目中的目的地址匹配。在该报文命中某一目标ACL条目时,将该报文从本地接口转发包括:根据该报文查找到对应的ECMP路由转发表,从中选择一个属于本地接口的下一跳接口,将该报文从选择出的本地接口转发出去。Wherein, the packet hitting the target target ACL entry includes that the destination address of the packet matches the destination address in the target target ACL entry. When the message hits a target ACL entry, forwarding the message from the local interface includes: finding the corresponding ECMP routing and forwarding table according to the message, selecting a next-hop interface belonging to the local interface, and sending the message. The text is forwarded from the selected local interface.
若报文未命中所有目标ACL条目,则从该报文对应的ECMP路由转发表中选择一个下一跳接口,将该报文从选择出的下一跳接口转发出去。If the packet does not hit all target ACL entries, a next-hop interface is selected from the ECMP routing and forwarding table corresponding to the packet, and the packet is forwarded from the selected next-hop interface.
S507、从路由转发表中选择一个下一跳接口,将该报文转发出去。S507. Select a next hop interface from the routing and forwarding table, and forward the message.
由于该报文对应的路由转发表中不存在属于本地接口的下一跳接口,因此,从ECMP路由转发表选择一个下一跳接口,从选择出的下一跳接口,将该报文转发出去。Since there is no next hop interface belonging to the local interface in the routing and forwarding table corresponding to the message, a next hop interface is selected from the ECMP routing and forwarding table, and the message is forwarded from the selected next hop interface .
为了更好的理解本发明,此处以一个示例进行说明,假设目的地址为100.0.0.2,获取到的ECMP路由转发表如表2所示,其中,10.1.1.2和20.1.1.2属于本地接口,30.1.1.2属于远端接口。在第一次接收到一个目的地址为100.0.0.2的报文时,查找到表2,根据表2判断下一跳接口中存在本地接口,将其从10.1.1.2或20.1.1.2转发出去,并形成一条包括100.0.0.2的目标ACL条目,其动作为本地转发。在后续接收到目的地址为100.0.0.2的报文时,均会命中该目标ACL条目,则从表2中优先选择10.1.1.2或20.1.1.2将该报文转发出去。In order to better understand the present invention, here is an example for description. Assuming that the destination address is 100.0.0.2, the obtained ECMP routing and forwarding table is shown in Table 2. Among them, 10.1.1.2 and 20.1.1.2 belong to the local interface, and 30.1 .1.2 belongs to the remote interface. When a message with a destination address of 100.0.0.2 is received for the first time, Table 2 is found, and the next hop interface is judged according to Table 2 to have a local interface, and it is forwarded from 10.1.1.2 or 20.1.1.2, and A target ACL entry including 100.0.0.2 is formed, and its action is local forwarding. When subsequent packets with a destination address of 100.0.0.2 are received, they will all hit the target ACL entry, and then 10.1.1.2 or 20.1.1.2 are preferred to be forwarded from Table 2.
表2Table 2
Figure PCTCN2020108465-appb-000002
Figure PCTCN2020108465-appb-000002
本发明实施例提供的EVPN中报文转发方法,通过接收报文,将报文优先从本地接口转发,本地接口为属于本地局域网的接口,在某些实施过程中,优先将报文从本地接口转发,减少了对报文进行VXLAN封装、解封装等过程,从而提升了报文转发效率。In the method for forwarding messages in EVPN provided by the embodiment of the present invention, by receiving messages, the messages are forwarded preferentially from the local interface. The local interface is an interface belonging to the local local area network. In some implementation processes, the message is preferentially forwarded from the local interface. Forwarding reduces the process of VXLAN encapsulation and decapsulation of packets, thereby improving the efficiency of packet forwarding.
实施例四:Embodiment four:
更好的理解本发明,本实施例结合更加具体的示例进行说明。参见图3所示,图6为本发明实施例提供的EVPN中报文转发方法的流程图,包括:For a better understanding of the present invention, this embodiment is described in conjunction with more specific examples. Referring to FIG. 3, FIG. 6 is a flowchart of a method for forwarding packets in EVPN according to an embodiment of the present invention, including:
S601、接收报文。S601. Receive a message.
S602、判断该报文对应的下一跳接口中是否存在本地接口。S602: Determine whether there is a local interface in the next hop interface corresponding to the message.
若是,转S603;若否,则转S608。If yes, go to S603; if not, go to S608.
其中,判断该报文是否属于本地报文可以是,判断是否能从该报文对应的ECMP路由转发表中查找到属于本地接口的下一跳接口,若查找到,转S603;若没有查找到,则转S608。Among them, judging whether the message belongs to a local message can be, judging whether the next hop interface belonging to the local interface can be found from the ECMP routing and forwarding table corresponding to the message, if it is found, go to S603; if it is not found , Then go to S608.
S603、将该报文从本地接口转发。S603. Forward the message from the local interface.
将该报文从查找到的属于本地接口的下一跳接口转发出去。The packet is forwarded from the next hop interface that belongs to the local interface found.
S604、根据该报文的目的地址生成一条目标ACL条目。S604: Generate a target ACL entry according to the destination address of the message.
该目标ACL条目中包括该报文的目的地址,其动作为添加到目标QOS队列。The target ACL entry includes the destination address of the message, and its action is to add to the target QOS queue.
S605、接收报文。S605. Receive a message.
S606、在该报文命中目标ACL条目时,将该报文添加到目标QOS队列。S606: When the message hits the target ACL entry, add the message to the target QOS queue.
其中,报文命中目标ACL条目包括,该报文的目的地址与目标ACL条目中的目的地址匹配。在该报文命中某一目标ACL条目时,将该报文添加到目标QOS队列,其中,目标QOS队列为报文从本地接口转发的队列。Wherein, the packet hitting the target ACL entry includes that the destination address of the packet matches the destination address in the target ACL entry. When the message hits a certain target ACL entry, the message is added to the target QOS queue, where the target QOS queue is a queue for the message to be forwarded from the local interface.
S607、将目标QOS队列中的报文从本地接口转发。S607: Forward the message in the target QOS queue from the local interface.
将目标QOS队列中的报文从本地接口转发包括:从目标QOS队列中提取出报文,根据该报文查找到对应的ECMP路由转发表,从中选择一个属于本地接口的下一跳接口,将该报文从选择出的本地接口转发出去。Forwarding the message in the target QOS queue from the local interface includes: extracting the message from the target QOS queue, finding the corresponding ECMP routing and forwarding table based on the message, selecting a next hop interface belonging to the local interface, and The message is forwarded from the selected local interface.
S608、从路由转发表中选择一个下一跳接口,将该报文转发出去。S608. Select a next hop interface from the routing and forwarding table, and forward the message.
由于该报文对应的路由转发表中不存在属于本地接口的下一跳接口,因此,从ECMP路由转发表选择一个下一跳接口,从选择出的下一跳接口,将该报文转发出去。Since there is no next hop interface belonging to the local interface in the routing and forwarding table corresponding to the message, a next hop interface is selected from the ECMP routing and forwarding table, and the message is forwarded from the selected next hop interface .
为了更好的理解本发明,此处以一个示例进行说明,假设目的地址为100.0.0.3,获取到的ECMP路由转发表如表3所示,其中,10.1.1.3和20.1.1.3属于本地接口,30.1.1.3属于远端接口。在第一次接收到一个目的地址为100.0.0.3的报文时,查找到表3,根据表3判定下一跳接口中存在本地接口,将其从10.1.1.3或20.1.1.3转发出去,并形成一条包括100.0.0.3的目标ACL条目,其动作为添加到目标QOS队列。在后续接收到目的地址为100.0.0.3的报文时,均会命中该目标ACL条目,将其添加到目标QOS队列。然后,从QOS队列中提取出一个报文,查找到该报文对应的ECMP路由转发表,从ECMP路由转发 表中选择一个属于本地接口的下一跳接口,将该报文转发出去,例如,对于目的地址为100.0.0.3的报文,则选择10.1.1.3或20.1.1.3将该转发出去。In order to better understand the present invention, an example is described here. Assuming that the destination address is 100.0.0.3, the obtained ECMP routing and forwarding table is shown in Table 3. Among them, 10.1.1.3 and 20.1.1.3 belong to the local interface, and 30.1 .1.3 belongs to the remote interface. When a message with a destination address of 100.0.0.3 is received for the first time, Table 3 is found, and it is determined according to Table 3 that there is a local interface in the next hop interface, and it is forwarded from 10.1.1.3 or 20.1.1.3, and A target ACL entry including 100.0.0.3 is formed, and its action is to add it to the target QOS queue. When subsequent messages with a destination address of 100.0.0.3 are received, the target ACL entry will be hit and added to the target QOS queue. Then, extract a message from the QOS queue, find the ECMP routing and forwarding table corresponding to the message, select a next hop interface belonging to the local interface from the ECMP routing and forwarding table, and forward the message, for example, For a message with a destination address of 100.0.0.3, select 10.1.1.3 or 20.1.1.3 to forward it.
表3table 3
Figure PCTCN2020108465-appb-000003
Figure PCTCN2020108465-appb-000003
本发明实施例提供的EVPN中报文转发方法,通过接收报文,将报文优先从本地接口转发,本地接口为属于本地局域网的接口,在某些实施过程中,优先将报文从本地接口转发,减少了对报文进行VXLAN封装、解封装等过程,从而提升了报文转发效率。In the method for forwarding messages in EVPN provided by the embodiment of the present invention, by receiving messages, the messages are forwarded preferentially from the local interface. The local interface is an interface belonging to the local local area network. In some implementation processes, the message is preferentially forwarded from the local interface. Forwarding reduces the process of VXLAN encapsulation and decapsulation of packets, thereby improving the efficiency of packet forwarding.
实施例五Example five
本发明实施例在实施例一、二、三、四的基础上,提出一种EVPN中报文转发装置,参见图7所示,包括:接收模块701和发送模块702。On the basis of the first, second, third, and fourth embodiments, the embodiment of the present invention proposes a message forwarding device in EVPN. As shown in FIG. 7, the device includes a receiving module 701 and a sending module 702.
接收模块701,用于接收报文。在一些实例中,接收其他设备发送的报文或接收本地生成的报文。The receiving module 701 is used to receive messages. In some instances, messages sent by other devices or locally generated messages are received.
发送模块702,将报文优先从本地接口转发。需要说明的是,本地接口为属于本地局域网的接口。其中,将报文优先从本地接口转发包括:若该报文对应的下一跳接口中,存在本地接口时,则将该报文从本地接口转发;若该报文对应的下一跳接口中,不存在本地接口,则将该报文从对应的下一跳接口转发。The sending module 702 preferentially forwards the message from the local interface. It should be noted that the local interface is an interface belonging to the local area network. Wherein, preferentially forwarding the message from the local interface includes: if there is a local interface in the next hop interface corresponding to the message, then the message is forwarded from the local interface; if the message corresponds to the next hop interface If there is no local interface, the packet will be forwarded from the corresponding next-hop interface.
其中,将报文优先从本地接口转发可以是:根据该报文的目的地址,查找该报文对应的路由转发表,并判断该路由转发表中是否存在属于本地接口的下一跳接口,若存在,则将该报文从属于本地接口的下一跳接口转发,若不存在,则将该报文从属于远端接口的下一跳接口转发。需要说明的是,远端接口为不属于本地局域网的接口,即属于远端局域网的接口,路由转发表包括目的地址和该目的地址对应的下一跳接口,应当理解的,路由转发表中各路由条目根据路由协议获取,例如,在ECMP场景下,即会根据ECMP对应的路由协议获取ECMP路由条目,并生成ECMP路由转发表;当然,在其它场景下,还可以根据对应的路由协议获取路由条目生成路由转发表。Wherein, preferentially forwarding the message from the local interface can be: according to the destination address of the message, look up the routing and forwarding table corresponding to the message, and determine whether there is a next hop interface belonging to the local interface in the routing and forwarding table, if If it exists, the message is forwarded subordinate to the next hop interface of the local interface. If it does not exist, the message is forwarded subordinate to the next hop interface of the remote interface. It should be noted that the remote interface is an interface that does not belong to the local LAN, that is, the interface belongs to the remote LAN. The routing and forwarding table includes the destination address and the next hop interface corresponding to the destination address. It should be understood that each of the routing and forwarding tables The routing entry is obtained according to the routing protocol. For example, in the ECMP scenario, the ECMP routing entry is obtained according to the routing protocol corresponding to ECMP, and the ECMP routing forwarding table is generated; of course, in other scenarios, the route can also be obtained according to the corresponding routing protocol The entry generates a routing forwarding table.
本发明实施例中,将报文优先从本地转发也可以包括:判断报文对应的下一跳接口中是否存在本地接口;在该报文对应的下一跳接口中存在本地接口时,将报文从本地接口转发。In the embodiment of the present invention, preferentially forwarding the message from the local may also include: judging whether there is a local interface in the next hop interface corresponding to the message; when there is a local interface in the next hop interface corresponding to the message, sending the message The text is forwarded from the local interface.
本发明实施例中,判断报文对应的下一跳接口中是否存在本地接口可以包括:根据硬件转发表来判断该报文对应的下一跳接口中是否存在下一跳接口,其中,硬件转发表包括 目的地址和该目的地址对应的属于本地接口的下一跳接口,也即,硬件转发表中的下一跳接口均为本地接口。也就是说,在接收到报文后,根据该报文的目的地址,若查找到对应的硬件转发表,则表明该报文对应的下一跳接口中,存在本地接口。由于该种方式中,需要硬件转发表,因此,在根据硬件转发表来判断该报文对应的下一跳接口中是否存在下一跳接口之前,还包括:获取某一目的地址对应的路由条目,基于该目的地址对应的路由条目中,属于本地接口的路由条目生成该目的地址的硬件转发表,即将该目的地址对应的属于本地接口的下一跳接口,添加到硬件转发表中。其中,路由条目中包括该目的地址对应的下一跳接口。本发明实施例中,可以根据对应的路由协议获取路由条目。需要说明的是,获取的路由条目中可能包括属于远端接口和/或本地接口的路由条目。In the embodiment of the present invention, judging whether there is a local interface in the next hop interface corresponding to the message may include: judging whether there is a next hop interface in the next hop interface corresponding to the message according to a hardware forwarding table, where the hardware transfer The publication includes the destination address and the next hop interface belonging to the local interface corresponding to the destination address, that is, the next hop interface in the hardware forwarding table is all local interfaces. In other words, after receiving a message, according to the destination address of the message, if the corresponding hardware forwarding table is found, it indicates that there is a local interface in the next hop interface corresponding to the message. Because this method requires a hardware forwarding table, before judging whether there is a next hop interface in the next hop interface corresponding to the message according to the hardware forwarding table, it also includes: obtaining a routing entry corresponding to a destination address Based on the routing entry corresponding to the destination address, the routing entry belonging to the local interface generates the hardware forwarding table of the destination address, that is, the next hop interface belonging to the local interface corresponding to the destination address is added to the hardware forwarding table. Wherein, the routing entry includes the next hop interface corresponding to the destination address. In the embodiment of the present invention, the routing entry can be obtained according to the corresponding routing protocol. It should be noted that the obtained routing entries may include routing entries belonging to the remote interface and/or the local interface.
本发明实施例中,判断报文对应的下一跳接口中是否存在本地接口可以包括:根据目标地址来判断该报文对应的下一跳接口中是否存在下一跳接口,若报文的目的地址与目标地址匹配,则表明该报文对应的下一跳接口中存在本地接口。其中,目标地址为已经确定的,对应的下一跳接口中,存在本地接口的地址。其中,可以通过目标ACL条目来判断报文的目的地址是否与目标地址匹配,在报文命中目标ACL条目时,表明报文的目的地址与目标地址匹配,其中,目标ACL条目包括目标地址,报文命中目标ACL条目为报文与该目标ACL条目中的目标地址匹配,其中,目标ACL条目可以在确定目标地址后,根据目标地址生成,其动作为将报文从本地接口转发。由于该种方式中,需要通过目标地址来判断报文对应的下一跳接口中是否存在本地接口,因此,根据目标地址来判断该报文对应的下一跳接口中是否存在下一跳接口之前,还包括:确定目标地址。In the embodiment of the present invention, judging whether there is a local interface in the next hop interface corresponding to the message may include: judging whether there is a next hop interface in the next hop interface corresponding to the message according to the target address, and if the purpose of the message is If the address matches the destination address, it indicates that there is a local interface in the next hop interface corresponding to the packet. Among them, the target address is already determined, and the address of the local interface exists in the corresponding next hop interface. Among them, the destination ACL entry can be used to determine whether the destination address of the packet matches the destination address. When the packet hits the destination ACL entry, it indicates that the destination address of the packet matches the destination address. The destination ACL entry includes the destination address and the destination address. The message hits the target ACL entry means that the message matches the target address in the target ACL entry. The target ACL entry can be generated according to the target address after the target address is determined, and its action is to forward the message from the local interface. In this method, the destination address is needed to determine whether there is a local interface in the next hop interface corresponding to the message. Therefore, the target address is used to determine whether there is a next hop interface in the next hop interface corresponding to the message. , Also includes: determining the target address.
本发明实施例中,确定目标地址可以包括:接收报文并判定该报文对应的下一跳接口中存在本地接口时,将该报文的目的地址设置为目标地址。其中,此处可以通过查找到报文对应的路由转发表,并判断是否在路由转发表中查找到属于本地接口的下一跳接口,来判断该报文对应的下一跳接口中是否存在本地接口。In the embodiment of the present invention, determining the target address may include: receiving a message and determining that there is a local interface in the next hop interface corresponding to the message, setting the target address of the message as the target address. Here, you can find the routing and forwarding table corresponding to the message and determine whether the next hop interface belonging to the local interface is found in the routing and forwarding table to determine whether there is a local next hop interface corresponding to the message. interface.
本发明实施例中,确定目标地址可以包括:在获取到某一目的地址对应的路由条目组时,或,在获取到新的路由条目时,判断路由条目中是否存在属于本地接口的下一跳接口,若存在,则将该路由条目中的目的地址设置为目标地址。In the embodiment of the present invention, determining the target address may include: when a routing entry group corresponding to a certain destination address is obtained, or when a new routing entry is obtained, judging whether there is a next hop belonging to the local interface in the routing entry If the interface exists, set the destination address in the routing entry as the destination address.
本发明实施例中,在该报文对应的下一跳接口中存在本地接口时,可以直接将报文从本地接口转发,或者,将报文添加到目标QOS(Quality of Service,服务质量)队列中,其中,该目标QOS队列中的报文从本地接口转发。In the embodiment of the present invention, when a local interface exists in the next hop interface corresponding to the message, the message can be directly forwarded from the local interface, or the message can be added to the target QOS (Quality of Service, quality of service) queue In which, the message in the target QOS queue is forwarded from the local interface.
其中,在根据硬件转发表来判断该报文对应的下一跳接口中是否存在下一跳接口时,在将报文从本地接口转发时,可以直接从该报文对应的硬件转发表中选择出一个下一跳接口(由于硬件转发表中只包括属于本地接口的下一跳接口,因此,选择出的下一跳接口必 然是本地接口),将该报文从选择出的下一跳接口转发。Among them, when judging whether there is a next hop interface in the next hop interface corresponding to the message according to the hardware forwarding table, when forwarding the message from the local interface, you can directly select from the hardware forwarding table corresponding to the message A next hop interface (because the hardware forwarding table only includes the next hop interface belonging to the local interface, therefore, the selected next hop interface must be the local interface), and the packet is transferred from the selected next hop interface Forward.
在根据目标地址来判断该报文对应的下一跳接口中是否存在下一跳接口时,在将报文从本地接口转发时,则查找该报文对应的路由转发表,从该报文对应的路由转发表中,选择一个属于本地接口的下一跳接口,将该报文从选择出的下一跳接口转发。When judging whether there is a next hop interface in the next hop interface corresponding to the message according to the destination address, when forwarding the message from the local interface, the routing and forwarding table corresponding to the message is searched, and the message corresponds to In the routing and forwarding table, select a next hop interface belonging to the local interface, and forward the packet from the selected next hop interface.
本发明实施例中,接收模块701可以由天线或其他硬件模块来实施,发送模块702可以由天线或其他硬件模块来实施。In the embodiment of the present invention, the receiving module 701 may be implemented by an antenna or other hardware modules, and the transmitting module 702 may be implemented by an antenna or other hardware modules.
本发明实施例提供的EVPN中报文转发装置,通过接收报文,将报文优先从本地接口转发,本地接口为属于本地局域网的接口,在某些实施过程中,优先将报文从本地接口转发,减少了对报文进行VXLAN封装、解封装等过程,从而提升了报文转发效率。The message forwarding device in EVPN provided by the embodiment of the present invention forwards the message preferentially from the local interface by receiving the message. The local interface is an interface belonging to the local local area network. In some implementation processes, the message is preferentially forwarded from the local interface. Forwarding reduces the process of VXLAN encapsulation and decapsulation of packets, thereby improving the efficiency of packet forwarding.
实施例六Example Six
本发明实施例提供了一种设备,参见图8所示,其包括处理器801、存储器802及通信总线803,其中:An embodiment of the present invention provides a device. As shown in FIG. 8, it includes a processor 801, a memory 802, and a communication bus 803, where:
通信总线803用于实现处理器801和存储器802之间的连接通信;The communication bus 803 is used to implement connection and communication between the processor 801 and the memory 802;
处理器801用于执行存储器802中存储的一个或者多个计算机程序,以实现上述实施例一、实施例二、实施例三和实施例四中的EVPN中报文转发方法中的至少一个步骤。The processor 801 is configured to execute one or more computer programs stored in the memory 802 to implement at least one step in the method for forwarding messages in EVPN in the above-mentioned Embodiment 1, Embodiment 2, Embodiment 3, and Embodiment 4.
本发明实施例还提供了一种存储介质,该存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、计算机程序模块或其他数据)的任何方法或技术中实施的易失性或非易失性、可移除或不可移除的介质。计算机可读存储介质包括但不限于RAM(Random Access Memory,随机存取存储器),ROM(Read-Only Memory,只读存储器),EEPROM(Electrically Erasable Programmable read only memory,带电可擦可编程只读存储器)、闪存或其他存储器技术、CD-ROM(Compact Disc Read-Only Memory,光盘只读存储器),数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。The embodiment of the present invention also provides a storage medium, which includes volatile or non-volatile data implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules, or other data). Non-volatile, removable or non-removable media. Computer readable storage media include but are not limited to RAM (Random Access Memory), ROM (Read-Only Memory, read-only memory), EEPROM (Electrically Erasable Programmable read only memory, charged Erasable Programmable Read-Only Memory) ), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, Or any other medium that can be used to store desired information and that can be accessed by a computer.
本发明实施例中的存储介质可用于存储一个或者多个计算机程序,其存储的一个或者多个计算机程序可被处理器执行,以实现上述实施例一、实施例二、实施例三和实施例四中的EVPN中报文转发方法中的至少一个步骤。The storage medium in the embodiment of the present invention may be used to store one or more computer programs, and the stored one or more computer programs may be executed by a processor to implement the above-mentioned Embodiment 1, Embodiment 2, Embodiment 3 and Embodiments. At least one step in the packet forwarding method in the EVPN of No. 4.
本发明实施例提供的设备及存储介质,通过接收报文,将报文优先从本地接口转发,本地接口为属于本地局域网的接口,在某些实施过程中,优先将报文从本地接口转发,减少了对报文进行VXLAN封装、解封装等过程,从而提升了报文转发效率。The device and storage medium provided by the embodiment of the present invention, by receiving the message, preferentially forward the message from the local interface. The local interface is an interface belonging to the local local area network. In some implementation processes, the message is preferentially forwarded from the local interface. The process of VXLAN encapsulation and decapsulation of packets is reduced, thereby improving the efficiency of packet forwarding.
可见,本领域的技术人员应该明白,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件(可以用计算装置可执行的计算机程序代码来实现)、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/ 单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。It can be seen that those skilled in the art should understand that all or some of the steps in the methods disclosed above, the functional modules/units in the system, and the device can be implemented as software (which can be implemented by computer program code executable by a computing device. ), firmware, hardware and their appropriate combination. In hardware implementations, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may consist of several physical components. The components are executed cooperatively. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit .
此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、计算机程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。所以,本发明不限制于任何特定的硬件和软件结合。In addition, as is well known to those of ordinary skill in the art, communication media usually contain computer-readable instructions, data structures, computer program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery medium. Therefore, the present invention is not limited to any specific combination of hardware and software.
以上内容是结合具体的实施方式对本发明实施例所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。The above content is a further detailed description of the embodiments of the present invention in combination with specific implementations, and it cannot be considered that the specific implementations of the present invention are limited to these descriptions. For those of ordinary skill in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as belonging to the protection scope of the present invention.

Claims (10)

  1. 一种以太网虚拟专用网络EVPN中报文转发方法,包括:A method for forwarding messages in an Ethernet virtual private network EVPN includes:
    接收报文;Receive message;
    将所述报文优先从本地接口转发,所述本地接口为属于本地局域网的接口。The message is preferentially forwarded from a local interface, and the local interface is an interface belonging to a local local area network.
  2. 如权利要求1所述的EVPN中报文转发方法,其中,所述将所述报文优先从本地接口转发包括:The method for forwarding messages in EVPN according to claim 1, wherein said forwarding said messages preferentially from a local interface comprises:
    在所述报文对应的下一跳接口中,存在本地接口时,将所述报文从本地接口转发。When a local interface exists in the next hop interface corresponding to the message, the message is forwarded from the local interface.
  3. 如权利要求2所述的EVPN中报文转发方法,其中,所述在所述报文对应的下一跳接口中,存在本地接口时,将所述报文从本地接口转发包括:The method for forwarding messages in EVPN according to claim 2, wherein said forwarding the message from the local interface when there is a local interface in the next hop interface corresponding to the message comprises:
    在根据所述报文的目的地址,查找到对应的硬件转发表时,将所述报文从本地接口转发,所述硬件转发表包括目的地址和对应的属于所述本地接口的下一跳接口。When the corresponding hardware forwarding table is found according to the destination address of the message, the message is forwarded from the local interface, and the hardware forwarding table includes the destination address and the corresponding next-hop interface belonging to the local interface .
  4. 如权利要求2所述的EVPN中报文转发方法,其中,所述在所述报文对应的下一跳接口中,存在本地接口时,将所述报文从本地接口转发包括:The method for forwarding messages in EVPN according to claim 2, wherein said forwarding the message from the local interface when there is a local interface in the next hop interface corresponding to the message comprises:
    在所述报文的目的地址与目标地址匹配时,将所述报文从本地接口转发,所述目标地址为对应的下一跳接口中存在本地接口的目的地址。When the destination address of the message matches the target address, the message is forwarded from the local interface, where the target address is the destination address of the local interface in the corresponding next hop interface.
  5. 如权利要求4所述的EVPN中报文转发方法,其中,所述在所述报文的目的地址与目标地址匹配时,将所述报文从本地接口转发包括:5. The method for forwarding messages in EVPN according to claim 4, wherein when the destination address of the message matches the destination address, forwarding the message from the local interface comprises:
    在所述报文命中目标访问控制列表ACL条目时,将所述报文从本地接口转发,所述报文命中目标ACL条目包括,所述报文的目的地址与所述目标ACL条目中的目标地址匹配。When the message hits the target access control list ACL entry, the message is forwarded from the local interface, and the message hits the target ACL entry including the destination address of the message and the target in the target ACL entry The addresses match.
  6. 如权利要求4所述的EVPN中报文转发方法,其中,所述将所述报文从本地接口转发包括:The method for forwarding messages in EVPN according to claim 4, wherein said forwarding the messages from a local interface comprises:
    将所述报文添加到目标服务质量QOS队列;Adding the message to the target quality of service QOS queue;
    将所述目标QOS队列中的报文从本地接口转发。The message in the target QOS queue is forwarded from the local interface.
  7. 如权利要求4所述的EVPN中报文转发方法,其中,所述在所述报文的目的地址与目标地址匹配时,将所述报文从本地接口转发之前,还包括:The method for forwarding messages in EVPN according to claim 4, wherein when the destination address of the message matches the destination address, before forwarding the message from the local interface, the method further comprises:
    接收报文并在判定所述报文对应的下一跳接口中存在本地接口时,将所述报文的目的地址设置为目标地址;When receiving a message and determining that there is a local interface in the next hop interface corresponding to the message, setting the destination address of the message as the target address;
    或,or,
    在获取的路由条目中的下一跳接口属于本地接口时,将所述路由条目中的目的地址设置为所述目标地址。When the next hop interface in the obtained routing entry belongs to the local interface, the destination address in the routing entry is set as the target address.
  8. 一种EVPN中报文转发装置,包括:A message forwarding device in EVPN includes:
    接收模块,用于接收报文;The receiving module is used to receive messages;
    发送模块,用于将所述报文优先从本地接口转发,所述本地接口为属于本地局域网的接口。The sending module is configured to forward the message preferentially from a local interface, and the local interface is an interface belonging to a local local area network.
  9. 一种设备,包括处理器、存储器及通信总线;其中:A device that includes a processor, a memory, and a communication bus; among them:
    所述通信总线用于实现处理器和存储器之间的连接通信;The communication bus is used to realize the connection and communication between the processor and the memory;
    所述处理器用于执行存储器中存储的一个或者多个计算机程序,以实现如权利要求1至7中任一项所述的EVPN中报文转发方法的步骤。The processor is configured to execute one or more computer programs stored in the memory to implement the steps of the method for forwarding messages in EVPN according to any one of claims 1 to 7.
  10. 一种存储介质,存储有一个或者多个计算机程序,其中所述一个或者多个计算机程序能够被一个或者多个处理器执行,以实现如权利要求1至7中任一项所述的EVPN中报文转发方法的步骤。A storage medium storing one or more computer programs, wherein the one or more computer programs can be executed by one or more processors to implement the EVPN according to any one of claims 1 to 7 Steps of the message forwarding method.
PCT/CN2020/108465 2019-09-26 2020-08-11 Message forwarding method and apparatus in evpn, and device and storage medium WO2021057293A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910919635.4A CN112565045B (en) 2019-09-26 2019-09-26 Method, device, equipment and storage medium for forwarding message in EVPN
CN201910919635.4 2019-09-26

Publications (1)

Publication Number Publication Date
WO2021057293A1 true WO2021057293A1 (en) 2021-04-01

Family

ID=75030135

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/108465 WO2021057293A1 (en) 2019-09-26 2020-08-11 Message forwarding method and apparatus in evpn, and device and storage medium

Country Status (2)

Country Link
CN (1) CN112565045B (en)
WO (1) WO2021057293A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115701052A (en) * 2021-07-14 2023-02-07 中兴通讯股份有限公司 Method and device for searching forwarding table, storage medium and electronic device
CN115914069A (en) * 2021-09-30 2023-04-04 中兴通讯股份有限公司 Data forwarding method, system, electronic device and storage medium
CN117499299A (en) * 2022-07-25 2024-02-02 中兴通讯股份有限公司 Route forwarding method, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135420A (en) * 2014-07-31 2014-11-05 华为技术有限公司 A method, apparatus and system for forwarding message
US20170250904A1 (en) * 2016-02-26 2017-08-31 Juniper Networks, Inc. Split-horizon packet forwarding in a multi-home pbb-evpn network
CN108199968A (en) * 2018-03-30 2018-06-22 新华三技术有限公司 Route processing method and device
CN109246012A (en) * 2017-07-10 2019-01-18 中兴通讯股份有限公司 Message forwarding method, device and computer readable storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986638B (en) * 2014-05-27 2017-08-08 新华三技术有限公司 The method and apparatus of many public network links of ADVPN tunnel binding
CN105450526B (en) * 2014-05-28 2018-09-21 华为技术有限公司 A kind of message processing method and equipment
CN104022973A (en) * 2014-06-18 2014-09-03 福建星网锐捷网络有限公司 Message forwarding method, switching module, firewall card and switch
CN105915427B (en) * 2016-03-31 2019-12-17 华为技术有限公司 Message sending and receiving method and device
CN107634905A (en) * 2016-07-19 2018-01-26 南京中兴新软件有限责任公司 Data forwarding method and device in pile system
CN110191042B (en) * 2019-05-21 2021-08-24 新华三技术有限公司 Message forwarding method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135420A (en) * 2014-07-31 2014-11-05 华为技术有限公司 A method, apparatus and system for forwarding message
US20170250904A1 (en) * 2016-02-26 2017-08-31 Juniper Networks, Inc. Split-horizon packet forwarding in a multi-home pbb-evpn network
CN109246012A (en) * 2017-07-10 2019-01-18 中兴通讯股份有限公司 Message forwarding method, device and computer readable storage medium
CN108199968A (en) * 2018-03-30 2018-06-22 新华三技术有限公司 Route processing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
RABADAN J,, ED, SAJASSI A, DRAKE CISCO J, NAGARAJ JUNIPER K, SATHAPPAN S: "Track Framework for EVPN Designated Forwarder Election Extensibility draft-ietf-bess-evpn-df-election-framework-08", 18 January 2019 (2019-01-18), pages 1 - 29, XP055796582, [retrieved on 20210419] *

Also Published As

Publication number Publication date
CN112565045B (en) 2024-05-07
CN112565045A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
US11706138B2 (en) Distributing service function chain data and service function instance data in a network
JP7327876B2 (en) Method and system for determining packet forwarding paths and network nodes
WO2021057293A1 (en) Message forwarding method and apparatus in evpn, and device and storage medium
US10178025B2 (en) Methods and apparatus to route traffic in a virtual private network
US10129137B2 (en) Transferring data in a gateway
WO2020001393A1 (en) Method and network node for sending network performance parameter and calculating network performance
US8630294B1 (en) Dynamic bypass mechanism to alleviate bloom filter bank contention
US8566257B2 (en) Address data learning and registration within a distributed virtual bridge
WO2017114196A1 (en) Packet processing method, related apparatus and nvo3 network system
JP6989621B2 (en) Packet transmission methods, edge devices and machine-readable storage media
US11165693B2 (en) Packet forwarding
CN113411243B (en) Data transmission method and device
WO2015096513A1 (en) Packet processing method, node and system
US9565277B2 (en) Dual-homed external network access in a distributed internet protocol (IP) router
CN113296869B (en) Virtual machine VM (virtual machine) migration method and device
US11108699B2 (en) Method, apparatus, and system for implementing rate adjustment at transmit end
US11805049B2 (en) Communication method and communications device
JP2021530158A (en) BGP message sending method, BGP message receiving method, and device
WO2023202639A1 (en) Message sending method, network device and communication system
EP4020903B1 (en) Method and apparatus for preventing traffic bypassing
US9749290B2 (en) Distributing and virtualizing a network address translation (NAT)
WO2021000619A1 (en) Method and device for packet forwarding
CN110708229A (en) Method, device and system for receiving and transmitting message
JP2023551938A (en) Packet transmission method, correspondence acquisition method, device, and system
WO2017211211A1 (en) Packet forwarding method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20869813

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20869813

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 28/02/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20869813

Country of ref document: EP

Kind code of ref document: A1