CN112565045A - Method, device, equipment and storage medium for forwarding EVPN (error vector magnitude) message - Google Patents

Method, device, equipment and storage medium for forwarding EVPN (error vector magnitude) message Download PDF

Info

Publication number
CN112565045A
CN112565045A CN201910919635.4A CN201910919635A CN112565045A CN 112565045 A CN112565045 A CN 112565045A CN 201910919635 A CN201910919635 A CN 201910919635A CN 112565045 A CN112565045 A CN 112565045A
Authority
CN
China
Prior art keywords
message
forwarding
interface
local interface
next hop
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201910919635.4A
Other languages
Chinese (zh)
Other versions
CN112565045B (en
Inventor
唐亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201910919635.4A priority Critical patent/CN112565045B/en
Priority to PCT/CN2020/108465 priority patent/WO2021057293A1/en
Publication of CN112565045A publication Critical patent/CN112565045A/en
Application granted granted Critical
Publication of CN112565045B publication Critical patent/CN112565045B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

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

Embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for forwarding a message in an EVPN, where the method, the apparatus, and the storage medium receive the message and preferentially forward the message from a local interface, where the local interface is an interface belonging to a local area network.

Description

Method, device, equipment and storage medium for forwarding EVPN (error vector magnitude) message
Technical Field
The embodiments of the present invention relate to, but are not limited to, the field of communications, and in particular, but not limited to, a method, an apparatus, a device, and a storage medium for forwarding a message in EVPN.
Background
In EVPN (Ethernet Virtual Private Network), a message in one device is transmitted to a destination address, and there are usually multiple paths, that is, there are multiple next-hop interfaces, where an interface belonging to a different VPN (Virtual Private Network) from the device may exist in the next-hop interface, and when forwarding the message through the next-hop interface belonging to a different VPN from the device, it is necessary to perform VXLAN (Virtual Extensible Local Area Network) encapsulation on the message, and then perform a detour through a VXLAN tunnel, and after receiving the VXLAN message, the next device needs to perform decapsulation of the VXLAN message, so that the length of the message is increased, and therefore, the message may need to be subjected to packet processing, and the efficiency of forwarding the message by the device is reduced.
Disclosure of Invention
The method, the device, the equipment and the storage medium for forwarding the EVPN message mainly solve the technical problems of low efficiency and large occupied cost of the conventional message forwarding.
In order to solve the above technical problem, an embodiment of the present invention provides a method for forwarding a packet in an EVPN, including:
receiving a message;
and preferentially forwarding the message from a local interface, wherein the local interface belongs to a local area network.
An embodiment of the present invention further provides a device for forwarding a packet in an EVPN, including:
the receiving module is used for receiving the message;
and the sending module is used for preferentially forwarding the message from a local interface, wherein the local interface belongs to a local area network.
The embodiment of the invention also provides equipment, which comprises a processor, a memory and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more computer programs stored in the memory to implement the steps of the above-described EVPN message forwarding method.
Embodiments of the present invention also provide a storage medium, where one or more computer programs are stored, and the one or more computer programs may be executed by one or more processors to implement the steps of the method for forwarding a message in EVPN described above.
The invention has the beneficial effects that:
according to the method, the device, the equipment and the storage medium for forwarding the message in the EVPN provided by the embodiment of the invention, the message is preferentially forwarded from the local interface by receiving the message, the local interface belongs to a local area network, and in some implementation processes, the message is preferentially forwarded from the local interface, so that processes of VXLAN encapsulation, decapsulation and the like of the message are reduced, and the message forwarding efficiency is improved.
Additional features and corresponding advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a flowchart of a method for forwarding an EVPN message according to a first embodiment of the present invention;
fig. 2 is a flowchart of a message forwarding method according to a first embodiment of the present invention;
fig. 3 is a flowchart of a method for generating a hardware forwarding table according to a first embodiment of the present invention;
fig. 4 is a flowchart of a method for forwarding an EVPN message according to a second embodiment of the present invention;
fig. 5 is a flowchart of a method for forwarding a message in an EVPN according to a third embodiment of the present invention;
fig. 6 is a flowchart of a method for forwarding an EVPN message according to a fourth embodiment of the present invention;
fig. 7 is a schematic structural diagram of a packet forwarding apparatus in EVPN according to a fifth embodiment of the present invention;
fig. 8 is a schematic structural diagram of an apparatus according to a sixth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention are described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The first embodiment is as follows:
in EVPN, a message in a device is transmitted to a destination address, multiple paths usually exist, that is, multiple next hop interfaces may exist, interfaces belonging to different VPNs from the device may exist in the next hop interfaces, and after receiving the message, the device selects one next hop interface from all the next hop interfaces corresponding to the destination address of the message according to policies such as load balancing, and then forwards the message from the next hop interface. Because the selected next hop interface may be an interface belonging to a different VPN from the device, when forwarding, the message needs to be subjected to VXLAN encapsulation first, and then detours through the VXLAN tunnel, and after receiving the VXLAN message, the next device needs to perform decapsulation of the VXLAN message, which increases the processing overhead of the device. In order to solve the above technical problem, an embodiment of the present invention provides a method for forwarding a packet in an EVPN, and please refer to fig. 1, the method for forwarding a packet in an EVPN includes:
s101, receiving a message.
In the embodiment of the invention, in the operation process of the equipment, the message sent by other equipment or the message generated by the equipment is received.
S102, the message is preferentially forwarded from the local interface.
In the embodiment of the invention, after the message is received, the message is preferentially forwarded from the local interface. It should be noted that the local interface is an interface belonging to a local area network. Wherein the preferentially forwarding the packet from the local interface comprises: if a local interface exists in a next hop interface corresponding to the message, forwarding the message from the local interface; and if the local interface does not exist in the next hop interface corresponding to the message, forwarding the message from the corresponding next hop interface.
The priority of forwarding the packet from the local interface may be: and searching a route forwarding table corresponding to the message according to the destination address of the message, judging whether a next hop interface belonging to the local interface exists in the route forwarding table, if so, forwarding the message to the next hop interface belonging to the local interface, and if not, forwarding the message to the next hop interface belonging to the remote interface. It should be noted that the remote interface is an interface that does not belong to the local area network, that is, an interface that belongs to the remote area network, and the Routing forwarding table includes a destination address and a next hop interface corresponding to the destination address, it should be understood that each Routing entry in the Routing forwarding table is obtained according to a Routing protocol, for example, in an ECMP (Equal-Cost Multi path Routing) scenario, an ECMP Routing entry is obtained according to a Routing protocol corresponding to the ECMP, and an ECMP Routing forwarding table is generated; of course, in other scenarios, the route entry may also be acquired according to the corresponding routing protocol to generate the route forwarding table.
In the embodiment of the present invention, referring to fig. 2, preferentially forwarding the packet from the local may also include:
s201, judging whether a local interface exists in a next hop interface corresponding to the message.
In this embodiment of the present invention, determining whether a local interface exists in a next hop interface corresponding to the packet may include: and judging whether a next hop interface exists in the next hop interface corresponding to the message according to a hardware forwarding table, wherein the hardware forwarding table comprises a destination address and the next hop interface which belongs to the local interface and corresponds to the destination address, namely, the next hop interfaces in the hardware forwarding table are all local interfaces. That is, after receiving the message, according to the destination address of the message, if the corresponding hardware forwarding table is found, it indicates that a local interface exists in the next hop interface corresponding to the message, and the process goes to S202. Since a hardware forwarding table is needed in this manner, before determining whether a next hop interface exists in a next hop interface corresponding to the packet according to the hardware forwarding table, as shown in fig. 3, the method further includes:
s301, obtaining a routing entry corresponding to a certain destination address.
Wherein, the route entry includes the next hop interface corresponding to the destination address. In the embodiment of the invention, the route entry can be obtained according to the corresponding routing protocol. It should be noted that the obtained routing entry may include a routing entry belonging to a remote interface and/or a local interface.
S302, based on the routing entries corresponding to the destination address, the routing entries belonging to the local interface generate a hardware forwarding table of the destination address.
That is, the next hop interface belonging to the local interface and corresponding to the destination address is added to the hardware forwarding table.
In this embodiment of the present invention, determining whether a local interface exists in a next hop interface corresponding to the packet may include: and judging whether a next hop interface exists in the next hop interface corresponding to the message according to the target address, if the target address of the message is matched with the target address, indicating that a local interface exists in the next hop interface corresponding to the message, and turning to S202. And the target address is determined, and the address of the local interface exists in the corresponding next hop interface. Whether a destination address of a message is matched with a target address can be judged through a target ACL (Access Control list) entry, when the message hits the target ACL entry, the destination address of the message is matched with the target address, and S202 is carried out, wherein the target ACL entry comprises the target address, the message hits the target ACL entry, the message is matched with 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 the action of the target ACL entry is used for forwarding the message from a local interface. In this manner, it is necessary to determine whether a local interface exists in the next hop interface corresponding to the packet according to the destination address, and therefore, determining whether a next hop interface exists in the next hop interface corresponding to the packet according to the destination address further includes: a target address is determined.
In this embodiment of the present invention, determining the target address may include: and when receiving the message and judging that a local interface exists in a next hop interface corresponding to the message, setting the destination address of the message as a target address. Here, whether a local interface exists in the next hop interface corresponding to the packet may be determined by finding the route forwarding table corresponding to the packet and determining whether the next hop interface belonging to the local interface is found in the route forwarding table.
In this embodiment of the present invention, determining the target address may include: when a routing entry group corresponding to a certain destination address is acquired, or when a new routing entry is acquired, whether a next hop interface belonging to a local interface exists in the routing entry is judged, and if the next hop interface exists, the destination address in the routing entry is set as the destination address.
S202, when a local interface exists in the next hop interface corresponding to the message, the message is forwarded from the local interface.
In the embodiment of the present invention, when a local interface exists in a next hop interface corresponding to the packet, the packet may be directly forwarded from the local interface, or the packet may be added to a target QOS (Quality of Service) queue, where the packet in the target QOS queue is forwarded from the local interface.
When determining whether a next hop interface exists in the next hop interface corresponding to the packet according to the hardware forwarding table in S201, when forwarding the packet from the local interface, a next hop interface may be directly selected from the hardware forwarding table corresponding to the packet (since the hardware forwarding table only includes the next hop interface belonging to the local interface, the selected next hop interface is necessarily the local interface), and the packet is forwarded from the selected next hop interface.
In S201, when determining whether a next hop interface exists in the next hop interface corresponding to the packet according to the destination address, when forwarding the packet from the local interface, the routing forwarding table corresponding to the packet is searched, and a next hop interface belonging to the local interface is selected from the routing forwarding table corresponding to the packet, and the packet is forwarded from the selected next hop interface.
According to the EVPN message forwarding method provided by the embodiment of the invention, the message is preferentially forwarded from the local interface by receiving the message, the local interface belongs to the local area network, and in some implementation processes, the message is preferentially forwarded from the local interface, so that processes of VXLAN encapsulation, decapsulation and the like of the message are reduced, and the message forwarding efficiency is improved.
Example two:
for a better understanding of the present invention, the present embodiment is described with reference to more specific examples. Referring to fig. 3, fig. 4 is a flowchart of a method for forwarding a packet in EVPN according to an embodiment of the present invention, where the method includes:
s401, an ECMP group of a certain destination address is obtained.
In the embodiment of the invention, the device acquires an ECMP group of a certain destination address according to an ECMP routing protocol, wherein the ECMP group comprises a next hop interface corresponding to the destination address.
For example, it is assumed that the device acquires an ECMP group with a destination address of 100.0.0.1, which includes 4 next hop interfaces, 10.1.1, 20.1.1.1, 30.1.1.1, and 40.1.1.1, respectively. 10.1.1.1, 20.1.1.1 are local interfaces, 30.1.1.1, 40.1.1.1 are remote interfaces learned through EVPN RT 2.
S402, generating a hardware forwarding table of the destination address according to the ECMP group of the destination address.
The hardware forwarding table includes a destination address and a next hop address belonging to the local interface in the ECMP group of the destination address.
Taking the above example, the hardware forwarding table with destination address 100.0.0.1 is shown in table 1.
TABLE 1
Figure BDA0002217178040000071
S403, receiving the message.
S404, searching a hardware forwarding table corresponding to the message.
In the embodiment of the invention, the hardware forwarding table of the message is found according to the destination address of the message.
Bearing the above example, assume that the destination address of the received message is 100.0.0.1, then table 1 is found.
S405, forwarding the message from the local interface according to the hardware forwarding table.
In the embodiment of the invention, the step of forwarding the message from the local interface according to the hardware forwarding table comprises the steps of selecting a next hop interface from the hardware forwarding table and forwarding the message from the selected next hop interface. Wherein, one next hop interface can be selected according to the parameters such as the current load state of each next hop interface.
Bearing the above example, selecting a next hop interface from table 1, if selecting 10.1.1.1, forwarding the message from 10.1.1.1.
According to the EVPN message forwarding method provided by the embodiment of the invention, the message is preferentially forwarded from the local interface by receiving the message, the local interface belongs to the local area network, and in some implementation processes, the message is preferentially forwarded from the local interface, so that processes of VXLAN encapsulation, decapsulation and the like of the message are reduced, and the message forwarding efficiency is improved.
Example three:
for a better understanding of the present invention, the present embodiment is described with reference to more specific examples. Referring to fig. 3, fig. 5 is a flowchart of a method for forwarding a packet in EVPN according to an embodiment of the present invention, where the method includes:
s501, receiving a message.
S502, judging whether a local interface exists in a next hop interface corresponding to the message.
If yes, go to S503; if not, go to S507.
If the message is judged to belong to the local message, judging whether a next hop interface belonging to the local interface can be found from an ECMP routing forwarding table corresponding to the message, and if the next hop interface belonging to the local interface can be found, turning to S503; if not, go to S507.
S503, forwarding the message from the local interface.
And forwarding the message from the found next hop interface belonging to the local interface.
S504, a target ACL entry is generated according to the destination address of the message.
The destination ACL entry includes the destination address of the message, which acts as a local forwarding.
And S505, receiving the message.
S506, when the message hits the target ACL entry, the message is forwarded from the local interface.
Wherein, the message hits the target ACL entry, including that the destination address of the message matches with the destination address in the target ACL entry. When the message hits a certain target ACL entry, forwarding the message from the local interface comprises: and finding a corresponding ECMP routing forwarding table according to the message, selecting a next hop interface belonging to the local interface from the ECMP routing forwarding table, and forwarding the message from the selected local interface.
And if the message does not hit all the target ACL entries, selecting a next hop interface from the ECMP routing forwarding table corresponding to the message, and forwarding the message from the selected next hop interface.
S507, selecting a next hop interface from the route forwarding table, and forwarding the message.
Because the route forwarding table corresponding to the message does not have a next hop interface belonging to the local interface, a next hop interface is selected from the ECMP route forwarding table, and the message is forwarded from the selected next hop interface.
For better understanding of the present invention, an example is described here, and assuming that the destination address is 100.0.0.2, the obtained ECMP routing forwarding table is shown in table 2, where 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 the destination address of 100.0.0.2 is received for the first time, table 2 is searched, a local interface exists in the next hop interface according to table 2, the local interface is forwarded from 10.1.1.2 or 20.1.1.2, and a target ACL entry including 100.0.0.2 is formed, wherein the action is local forwarding. When a message with the destination address of 100.0.0.2 is subsequently received, the target ACL entry is hit, and 10.1.1.2 or 20.1.1.2 is preferably selected from table 2 to forward the message.
TABLE 2
Figure BDA0002217178040000091
According to the EVPN message forwarding method provided by the embodiment of the invention, the message is preferentially forwarded from the local interface by receiving the message, the local interface belongs to the local area network, and in some implementation processes, the message is preferentially forwarded from the local interface, so that processes of VXLAN encapsulation, decapsulation and the like of the message are reduced, and the message forwarding efficiency is improved.
Example four:
for a better understanding of the present invention, the present embodiment is described with reference to more specific examples. Referring to fig. 3, fig. 6 is a flowchart of a method for forwarding a packet in EVPN according to an embodiment of the present invention, where the method includes:
s601, receiving a message.
S602, judging whether a local interface exists in a next hop interface corresponding to the message.
If yes, turning to S603; if not, go to S608.
If the message is judged to belong to the local message, judging whether a next hop interface belonging to the local interface can be found from an ECMP routing forwarding table corresponding to the message, and if the next hop interface belonging to the local interface can be found, turning to S603; if not, go to S608.
S603, forwarding the message from the local interface.
And forwarding the message from the found next hop interface belonging to the local interface.
S604, generating a target ACL entry according to the destination address of the message.
The destination ACL entry includes the destination address of the message, which acts as an add to the destination QOS queue.
S605, receiving the message.
S606, when the message hits the target ACL entry, the message is added to the target QOS queue.
Wherein, the message hits the target ACL entry, including that the destination address of the message is matched with the destination address in the target ACL entry. And when the message hits a certain target ACL entry, adding the message to a target QOS queue, wherein the target QOS queue is a queue for forwarding the message from a local interface.
S607, the message in the target QOS queue is forwarded from the local interface.
Forwarding the message in the target QOS queue from the local interface comprises: and extracting a message from the target QOS queue, searching a corresponding ECMP routing forwarding table according to the message, selecting a next hop interface belonging to the local interface from the ECMP routing forwarding table, and forwarding the message from the selected local interface.
S608, selecting a next hop interface from the route forwarding table, and forwarding the message.
Because the route forwarding table corresponding to the message does not have a next hop interface belonging to the local interface, a next hop interface is selected from the ECMP route forwarding table, and the message is forwarded from the selected next hop interface.
For better understanding of the present invention, an example is described here, and assuming that the destination address is 100.0.0.3, the obtained ECMP routing forwarding table is shown in table 3, where 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 the destination address of 100.0.0.3 is received for the first time, table 3 is searched, the local interface in the next hop interface is determined to exist according to table 3, the local interface is forwarded from 10.1.1.3 or 20.1.1.3, and a target ACL entry comprising 100.0.0.3 is formed, and the action of the target ACL entry is to be added to the target QOS queue. When a message with the destination address of 100.0.0.3 is received subsequently, the target ACL entry is hit and added to the target QOS queue. Then, a message is extracted from the QOS queue, an ECMP routing forwarding table corresponding to the message is found, a next hop interface belonging to the local interface is selected from the ECMP routing forwarding table, and the message is forwarded, for example, for a message with a destination address of 100.0.0.3, 10.1.1.3 or 20.1.1.3 is selected to forward the message.
TABLE 3
Figure BDA0002217178040000111
According to the EVPN message forwarding method provided by the embodiment of the invention, the message is preferentially forwarded from the local interface by receiving the message, the local interface belongs to the local area network, and in some implementation processes, the message is preferentially forwarded from the local interface, so that processes of VXLAN encapsulation, decapsulation and the like of the message are reduced, and the message forwarding efficiency is improved.
EXAMPLE five
The embodiment of the present invention provides a device for forwarding a message in an EVPN based on the first, second, third, and fourth embodiments, as shown in fig. 7, including: a receiving module 701 and a transmitting module 702.
A receiving module 701, configured to receive a message. Receiving messages sent by other equipment or receiving locally generated messages
The sending module 702 preferentially forwards the packet from the local interface. It should be noted that the local interface is an interface belonging to a local area network. Wherein the preferentially forwarding the packet from the local interface comprises: if a local interface exists in a next hop interface corresponding to the message, forwarding the message from the local interface; and if the local interface does not exist in the next hop interface corresponding to the message, forwarding the message from the corresponding next hop interface.
The priority of forwarding the packet from the local interface may be: and searching a route forwarding table corresponding to the message according to the destination address of the message, judging whether a next hop interface belonging to the local interface exists in the route forwarding table, if so, forwarding the message to the next hop interface belonging to the local interface, and if not, forwarding the message to the next hop interface belonging to the remote interface. It should be noted that the remote interface is an interface that does not belong to the local area network, that is, an interface that belongs to the remote area network, and the route forwarding table includes a destination address and a next hop interface corresponding to the destination address, it should be understood that each route entry in the route forwarding table is obtained according to a routing protocol, for example, in an ECMP scenario, an ECMP route entry is obtained according to a routing protocol corresponding to the ECMP, and an ECMP route forwarding table is generated; of course, in other scenarios, the route entry may also be acquired according to the corresponding routing protocol to generate the route forwarding table.
In this embodiment of the present invention, the preferentially forwarding the packet from the local may also include: judging whether a local interface exists in a next hop interface corresponding to the message; and forwarding the message from the local interface when the local interface exists in the next hop interface corresponding to the message.
In this embodiment of the present invention, determining whether a local interface exists in a next hop interface corresponding to the packet may include: and judging whether a next hop interface exists in the next hop interface corresponding to the message according to a hardware forwarding table, wherein the hardware forwarding table comprises a destination address and the next hop interface which belongs to the local interface and corresponds to the destination address, namely, the next hop interfaces in the hardware forwarding table are all local interfaces. That is, after receiving a message, if the corresponding hardware forwarding table is found according to the destination address of the message, it indicates that a local interface exists in the next hop interface corresponding to the message. Since a hardware forwarding table is needed in this manner, before determining whether a next hop interface exists in a next hop interface corresponding to the packet according to the hardware forwarding table, the method further includes: and acquiring a routing entry corresponding to a certain destination address, and generating a hardware forwarding table of the destination address based on the routing entry belonging to the local interface in the routing entry corresponding to the destination address, namely adding a next hop interface belonging to the local interface and corresponding to the destination address into the hardware forwarding table. Wherein, the route entry includes the next hop interface corresponding to the destination address. In the embodiment of the invention, the route entry can be obtained according to the corresponding routing protocol. It should be noted that the obtained routing entry may include a routing entry belonging to a remote interface and/or a local interface.
In this embodiment of the present invention, determining whether a local interface exists in a next hop interface corresponding to the packet may include: and judging whether a next hop interface exists in the next hop interface corresponding to the message or not according to the target address, and if the target address of the message is matched with the target address, indicating that a local interface exists in the next hop interface corresponding to the message. And the target address is determined, and the address of the local interface exists in the corresponding next hop interface. The method comprises the steps of judging whether a destination address of a message is matched with a destination address or not through a destination ACL entry, and when the message hits the destination ACL entry, indicating that the destination address of the message is matched with the destination address, wherein the destination ACL entry comprises the destination address, and the message hits the destination ACL entry as the message is matched with the destination address in the destination ACL entry, wherein the destination ACL entry can be generated according to the destination address after the destination address is determined, and the destination ACL entry acts as forwarding the message from a local interface. In this manner, it is necessary to determine whether a local interface exists in the next hop interface corresponding to the packet according to the destination address, and therefore, determining whether a next hop interface exists in the next hop interface corresponding to the packet according to the destination address further includes: a target address is determined.
In this embodiment of the present invention, determining the target address may include: and when receiving the message and judging that a local interface exists in a next hop interface corresponding to the message, setting the destination address of the message as a target address. Here, whether a local interface exists in the next hop interface corresponding to the packet may be determined by finding the route forwarding table corresponding to the packet and determining whether the next hop interface belonging to the local interface is found in the route forwarding table.
In this embodiment of the present invention, determining the target address may include: when a routing entry group corresponding to a certain destination address is acquired, or when a new routing entry is acquired, whether a next hop interface belonging to a local interface exists in the routing entry is judged, and if the next hop interface exists, the destination address in the routing entry is set as the destination address.
In the embodiment of the present invention, when a local interface exists in a next hop interface corresponding to the packet, the packet may be directly forwarded from the local interface, or the packet may be added to a target QOS (Quality of Service) queue, where the packet in the target QOS queue is forwarded from the local interface.
When judging whether a next hop interface exists in the next hop interface corresponding to the message according to the hardware forwarding table, when forwarding the message from the local interface, directly selecting a next hop interface from the hardware forwarding table corresponding to the message (since the hardware forwarding table only includes the next hop interface belonging to the local interface, the selected next hop interface is necessarily the local interface), and forwarding the message from the selected next hop interface.
When judging whether a next hop interface exists in the next hop interface corresponding to the message according to the destination address, when forwarding the message from the local interface, searching a routing forwarding table corresponding to the message, selecting one next hop interface belonging to the local interface from the routing forwarding table corresponding to the message, and forwarding the message from the selected next hop interface.
According to the EVPN message forwarding method provided by the embodiment of the invention, the message is preferentially forwarded from the local interface by receiving the message, the local interface belongs to the local area network, and in some implementation processes, the message is preferentially forwarded from the local interface, so that processes of VXLAN encapsulation, decapsulation and the like of the message are reduced, and the message forwarding efficiency is improved.
In the embodiment of the present invention, the receiving module 701 may be implemented by an antenna or other hardware module, and the sending module 702 may be implemented by an antenna or other hardware module
According to the EVPN message forwarding device provided by the embodiment of the invention, the message is preferentially forwarded from the local interface by receiving the message, the local interface belongs to the local area network, and in some implementation processes, the message is preferentially forwarded from the local interface, so that processes of VXLAN encapsulation, decapsulation and the like of the message are reduced, and the message forwarding efficiency is improved.
EXAMPLE six
An embodiment of the present invention provides an apparatus, as shown in fig. 8, which includes a processor 801, a memory 802, and a communication bus 803, where:
the communication bus 803 is used for realizing connection 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 of the EVPN message forwarding method in the first embodiment, the second embodiment, the third embodiment, and the fourth embodiment.
Embodiments of the present invention also provide a storage medium including volatile or nonvolatile, removable or non-removable media implemented in any method or technology for storage of 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), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash Memory or other Memory technology, CD-ROM (Compact disk Read-Only Memory), Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer.
The storage medium in the embodiment of the present invention may be configured to store one or more computer programs, and the stored one or more computer programs may be executed by the processor to implement at least one step of the EVPN message forwarding method in the first embodiment, the second embodiment, the third embodiment, and the fourth embodiment.
The device and the storage medium provided by the embodiment of the invention transmit the message from the local interface preferentially by receiving the message, wherein the local interface belongs to the local area network, and the message is preferentially transmitted from the local interface in some implementation processes, so that processes of VXLAN encapsulation, decapsulation and the like of the message are reduced, and the message transmitting efficiency is improved.
It will be apparent to those skilled in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software (which may be implemented in computer program code executable by a computing device), firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit.
In addition, communication media typically embodies computer readable instructions, data structures, computer program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to one of ordinary skill in the art. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a more detailed description of embodiments of the present invention, and the present invention is not to be considered limited to such descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (10)

1. A method for forwarding a message in an Ethernet Virtual Private Network (EVPN), comprising the following steps:
receiving a message;
and preferentially forwarding the message from a local interface, wherein the local interface belongs to a local area network.
2. The EVPN message forwarding method of claim 1, wherein said preferentially forwarding the message from a local interface comprises:
and forwarding the message from the local interface when the local interface exists in the next hop interface corresponding to the message.
3. The EVPN message forwarding method of claim 2, wherein forwarding the message from the local interface when a local interface exists in the next-hop interface corresponding to the message comprises:
and when finding out a corresponding hardware forwarding table according to the destination address of the message, forwarding the message from a local interface, wherein the hardware forwarding table comprises the destination address and a corresponding next hop interface belonging to the local interface.
4. The EVPN message forwarding method of claim 2, wherein forwarding the message from the local interface when a local interface exists in the next-hop interface corresponding to the message comprises:
and when the destination address of the message is matched with the target address, forwarding the message from the local interface, wherein the target address is the destination address of the local interface in the corresponding next hop interface.
5. The EVPN message forwarding method of claim 4, wherein said forwarding the message from a local interface when the destination address of the message matches the destination address comprises:
and when the message hits a target Access Control List (ACL) entry, forwarding the message from a local interface, wherein the message hits the target ACL entry, and the target address of the message is matched with the target address in the target ACL entry.
6. The EVPN message forwarding method of claim 4, wherein said forwarding the message from a local interface comprises:
adding the message to a target quality of service (QOS) queue;
and forwarding the message in the target QOS queue from a local interface.
7. The EVPN message forwarding method of claim 4, wherein before forwarding the message from a local interface when the destination address of the message matches the destination address, further comprising:
receiving a message and setting a destination address of the message as a target address when judging that a local interface exists in a next hop interface corresponding to the message;
or the like, or, alternatively,
and when the next hop interface in the acquired routing entry belongs to the local interface, setting the destination address in the routing entry as the target address.
8. A message forwarding device in EVPN comprises:
the receiving module is used for receiving the message;
and the sending module is used for preferentially forwarding the message from a local interface, wherein the local interface belongs to a local area network.
9. An apparatus comprising a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more computer programs stored in the memory to implement the steps of the EVPN message forwarding method according to any one of claims 1 to 7.
10. A storage medium storing one or more computer programs executable by one or more processors to implement the steps of the EVPN message forwarding method according to any one of claims 1 to 7.
CN201910919635.4A 2019-09-26 2019-09-26 Method, device, equipment and storage medium for forwarding message in EVPN Active CN112565045B (en)

Priority Applications (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
PCT/CN2020/108465 WO2021057293A1 (en) 2019-09-26 2020-08-11 Message forwarding method and apparatus in evpn, and device and storage medium

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN112565045A true CN112565045A (en) 2021-03-26
CN112565045B CN112565045B (en) 2024-05-07

Family

ID=75030135

Family Applications (1)

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

Country Status (2)

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

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023284675A1 (en) * 2021-07-14 2023-01-19 中兴通讯股份有限公司 Forwarding table lookup method and apparatus, and storage medium and electronic apparatus
WO2023050818A1 (en) * 2021-09-30 2023-04-06 中兴通讯股份有限公司 Data forwarding method and system, electronic device, and storage medium
WO2024021764A1 (en) * 2022-07-25 2024-02-01 中兴通讯股份有限公司 Routing forwarding method, electronic device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986638A (en) * 2014-05-27 2014-08-13 杭州华三通信技术有限公司 Method and device for binding multiple public network links for ADVPN tunnel
CN104022973A (en) * 2014-06-18 2014-09-03 福建星网锐捷网络有限公司 Message forwarding method, switching module, firewall card and switch
CN105450526A (en) * 2014-05-28 2016-03-30 华为技术有限公司 Message processing method and equipment
CN105915427A (en) * 2016-03-31 2016-08-31 华为技术有限公司 Message sending and receiving method and message sending and receiving equipment
CN107634905A (en) * 2016-07-19 2018-01-26 南京中兴新软件有限责任公司 Data forwarding method and device in pile system
CN108199968A (en) * 2018-03-30 2018-06-22 新华三技术有限公司 Route processing method and device
CN110191042A (en) * 2019-05-21 2019-08-30 新华三技术有限公司 A kind of message forwarding method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135420B (en) * 2014-07-31 2017-12-29 华为技术有限公司 A kind of method, equipment and the system of message forwarding
US10148566B2 (en) * 2016-02-26 2018-12-04 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

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986638A (en) * 2014-05-27 2014-08-13 杭州华三通信技术有限公司 Method and device for binding multiple public network links for ADVPN tunnel
CN105450526A (en) * 2014-05-28 2016-03-30 华为技术有限公司 Message processing method and equipment
CN104022973A (en) * 2014-06-18 2014-09-03 福建星网锐捷网络有限公司 Message forwarding method, switching module, firewall card and switch
CN105915427A (en) * 2016-03-31 2016-08-31 华为技术有限公司 Message sending and receiving method and message sending and receiving equipment
CN107634905A (en) * 2016-07-19 2018-01-26 南京中兴新软件有限责任公司 Data forwarding method and device in pile system
CN108199968A (en) * 2018-03-30 2018-06-22 新华三技术有限公司 Route processing method and device
CN110191042A (en) * 2019-05-21 2019-08-30 新华三技术有限公司 A kind of message forwarding method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023284675A1 (en) * 2021-07-14 2023-01-19 中兴通讯股份有限公司 Forwarding table lookup method and apparatus, and storage medium and electronic apparatus
WO2023050818A1 (en) * 2021-09-30 2023-04-06 中兴通讯股份有限公司 Data forwarding method and system, electronic device, and storage medium
WO2024021764A1 (en) * 2022-07-25 2024-02-01 中兴通讯股份有限公司 Routing forwarding method, electronic device and storage medium

Also Published As

Publication number Publication date
WO2021057293A1 (en) 2021-04-01
CN112565045B (en) 2024-05-07

Similar Documents

Publication Publication Date Title
JP7327876B2 (en) Method and system for determining packet forwarding paths and network nodes
US11792100B2 (en) Network performance parameter sending method, network performance calculation method, and network node
US8312066B2 (en) Hash collision resolution with key compression in a MAC forwarding data structure
EP3143732B1 (en) Scalable segment identifier allocation in segment routing
US10135717B2 (en) Transferring data in a gateway
CN108259347B (en) Message transmission method and device
CN113411243B (en) Data transmission method and device
CN112565045B (en) Method, device, equipment and storage medium for forwarding message in EVPN
CN109104364B (en) Designated forwarder election method and device
US9565277B2 (en) Dual-homed external network access in a distributed internet protocol (IP) router
EP4068704A1 (en) Packet sending method, routing table entry generation method, device, and storage medium
US11445428B2 (en) Method and device for setting up route path
CN110430135B (en) Message processing method and device
US11805049B2 (en) Communication method and communications device
EP4117239A1 (en) Methods, apparatus and device for sending routing and processing routing, and storage medium
US11924103B2 (en) Traffic processing method, apparatus, and network device
CN112351050A (en) Method, device, communication equipment and storage medium for mirroring data stream
US20110019671A1 (en) Partitioned Forwarding of Packets Originated on a Broadcast Link Among Layer 2 Forwarding Devices of Different Adjacency Networks
CN111010344B (en) Message forwarding method and device, electronic equipment and machine-readable storage medium
CN113840016A (en) Message processing method and device and computer readable storage medium
CN113055268A (en) Method, device, equipment and medium for tunnel traffic load balancing
CN109714259B (en) Traffic processing method and device
CN116980341A (en) Message sending method, network equipment and communication system
CN112511665A (en) Route detection method, route switching method, device, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant