CN111130978B - Network traffic forwarding method and device, electronic equipment and machine-readable storage medium - Google Patents

Network traffic forwarding method and device, electronic equipment and machine-readable storage medium Download PDF

Info

Publication number
CN111130978B
CN111130978B CN201911220505.8A CN201911220505A CN111130978B CN 111130978 B CN111130978 B CN 111130978B CN 201911220505 A CN201911220505 A CN 201911220505A CN 111130978 B CN111130978 B CN 111130978B
Authority
CN
China
Prior art keywords
protocol stack
traffic
local
address
vtep
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.)
Active
Application number
CN201911220505.8A
Other languages
Chinese (zh)
Other versions
CN111130978A (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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201911220505.8A priority Critical patent/CN111130978B/en
Publication of CN111130978A publication Critical patent/CN111130978A/en
Application granted granted Critical
Publication of CN111130978B publication Critical patent/CN111130978B/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
    • 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/74Address processing for routing
    • H04L45/741Routing in networks with a plurality of addressing schemes, e.g. with both IPv4 and IPv6
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/251Translation of Internet protocol [IP] addresses between different IP versions

Abstract

The application provides a network traffic forwarding method and device, electronic equipment and a machine-readable storage medium. In the application, the local terminal equipment receives a cross-protocol stack mapping table item aiming at target flow sent by a user; wherein, the cross-protocol stack mapping table item at least comprises an address mapping relation of the IP address of the local end VTEP which is mapped from the first protocol stack to the second protocol stack; based on the cross-protocol stack mapping table, the local terminal equipment forwards the target flow to the opposite terminal equipment, so that cross-protocol stack service communication based on VXLAN is provided for equipment which is accessed to the EVPN system and only supports a single stack, flexible network deployment is realized, and networking equipment cost is reduced.

Description

Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a network traffic forwarding method and apparatus, an electronic device, and a machine-readable storage medium.
Background
VXLAN (Virtual Extensible local area network), a network virtualization technology, can establish a two-layer ethernet network tunnel based on an IP network and in a "MAC in UDP" encapsulation form on the basis of a three-layer network, thereby implementing a two-layer interconnection across regions.
The VXLAN technology creates a large number of virtual extensible local area networks on an existing Network by establishing VXLAN tunnels, and different virtual extensible local area networks are identified by using VNI (virtual extensible local area Network Identifier). As is known, because the VLAN has a limited header of only 12 bits, the limited number of VLANs is 2^12 ^ 4096, which cannot meet the increasing demand. And at present, the header of the VXLAN message has 24 bits, which can support the number of VNIs of power 2^24 (the VXLAN is identified by the VNI, which is equivalent to VLAN ID). During implementation, the VXLAN technology may establish a VXLAN Tunnel through two network devices serving as VTEPs (VXLAN Tunnel Endpoint), and perform VXLAN encapsulation and VXLAN decapsulation on an original message entering the network devices.
VXLAN technology can be applied in different scenarios in general, for example: a VPN scenario, which can provide two-layer interconnection for existing service providers or decentralized physical sites of enterprise IP networks based on VXLAN, and can provide service isolation for different tenants; another example is: the cloud computing scene provides two-layer-based extended deployment for a large cloud computing environment which is deployed across three layers.
Disclosure of Invention
The application provides a network flow forwarding method, which is applied to member network equipment of an EVPN system; the member network device may be configured as a home terminal device of a home terminal VTEP or as an opposite terminal device of an opposite terminal VTEP, where a network layer protocol stack of the home terminal device is a first protocol stack and a network layer protocol stack of the opposite terminal device is a second protocol stack; the method comprises the following steps:
the method comprises the steps that local end equipment receives a cross-protocol stack mapping table item aiming at target flow sent by a user; wherein, the cross-protocol stack mapping table item at least comprises an address mapping relation of the IP address of the local end VTEP which is mapped from the first protocol stack to the second protocol stack;
based on the cross-protocol stack mapping table item, the local terminal equipment forwards the target flow to the opposite terminal equipment.
Optionally, the forwarding, by the home terminal device, the target traffic to the peer device based on the cross-protocol stack mapping table entry includes:
checking whether the target traffic has routing traffic based on VXLAN encapsulation;
if the target traffic has routing traffic based on VXLAN encapsulation, replacing the IP address of the local VTEP based on the first protocol stack carried in the routing traffic with the corresponding IP address of the local VTEP based on the second protocol stack based on the address mapping relation of the IP address of the local VTEP;
and carrying out protocol encapsulation on the routing traffic after the IP address of the local terminal VTEP is replaced based on the second protocol stack and forwarding the routing traffic to opposite terminal equipment so as to establish a routing relation indicated by the routing traffic and a VXLAN tunnel for data traffic transmission between the opposite terminal equipment and the local terminal equipment.
Optionally, the cross-protocol stack mapping table entry further includes a service network segment mapping relationship in which a service network segment of a service device connected to the home terminal device is mapped from the first protocol stack to the second protocol stack;
the forwarding, by the local end device, the target traffic to the peer end device based on the cross-protocol stack mapping table entry further includes:
checking whether the target traffic has data traffic based on VXLAN encapsulation;
if the target traffic also has data traffic packaged based on VXLAN, replacing the service network segment based on the first protocol stack carried in the data traffic with a corresponding service network segment based on the second protocol stack based on the address mapping relation of the service network segment of the service equipment connected with the local end equipment;
and after carrying out protocol encapsulation on the data traffic after the service network segment is replaced based on the second protocol stack, forwarding the data traffic to opposite-end equipment through the VXLAN tunnel so that the opposite-end equipment carries out protocol processing corresponding to the second protocol stack on the data traffic locally.
Optionally, the first protocol stack is IPv4 and the second protocol stack is IPv6, or the first protocol stack is IPv6 and the second protocol stack is IPv 4.
The application also provides a network flow forwarding device, which is applied to member network equipment of the EVPN system; the member network device may be configured as a home terminal device of a home terminal VTEP or as an opposite terminal device of an opposite terminal VTEP, where a network layer protocol stack of the home terminal device is a first protocol stack and a network layer protocol stack of the opposite terminal device is a second protocol stack; the device comprises:
the local terminal equipment receives a cross-protocol stack mapping table item aiming at target flow sent by a user; wherein, the cross-protocol stack mapping table item at least comprises an address mapping relation of the IP address of the local end VTEP which is mapped from the first protocol stack to the second protocol stack;
and the forwarding module is used for forwarding the target flow to the opposite terminal equipment by the local terminal equipment based on the cross-protocol stack mapping table item.
Optionally, the forwarding module further:
checking whether the target traffic has routing traffic based on VXLAN encapsulation;
if the target traffic has routing traffic based on VXLAN encapsulation, replacing the IP address of the local VTEP based on the first protocol stack carried in the routing traffic with the corresponding IP address of the local VTEP based on the second protocol stack based on the address mapping relation of the IP address of the local VTEP;
and carrying out protocol encapsulation on the routing traffic after the IP address of the local terminal VTEP is replaced based on the second protocol stack and forwarding the routing traffic to opposite terminal equipment so as to establish a routing relation indicated by the routing traffic and a VXLAN tunnel for data traffic transmission between the opposite terminal equipment and the local terminal equipment.
Optionally, the cross-protocol stack mapping table entry further includes a service network segment mapping relationship in which a service network segment of a service device connected to the home terminal device is mapped from the first protocol stack to the second protocol stack;
the forwarding module further:
checking whether the target traffic has data traffic based on VXLAN encapsulation;
if the target traffic also has data traffic packaged based on VXLAN, replacing the service network segment based on the first protocol stack carried in the data traffic with a corresponding service network segment based on the second protocol stack based on the address mapping relation of the service network segment of the service equipment connected with the local end equipment;
and after carrying out protocol encapsulation on the data traffic after the service network segment is replaced based on the second protocol stack, forwarding the data traffic to opposite-end equipment through the VXLAN tunnel so that the opposite-end equipment carries out protocol processing corresponding to the second protocol stack on the data traffic locally.
Optionally, the first protocol stack is IPv4 and the second protocol stack is IPv6, or the first protocol stack is IPv6 and the second protocol stack is IPv 4.
The application also provides an electronic device, which comprises a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are mutually connected through the bus;
the memory stores machine-readable instructions, and the processor executes the method by calling the machine-readable instructions.
The present application also provides a machine-readable storage medium having stored thereon machine-readable instructions which, when invoked and executed by a processor, implement the above-described method.
Through the embodiment, the cross-protocol stack mapping table item is set for the member network equipment of the EVPN system, so that when the member network equipment which is intercommunicated across the protocol stacks performs routing and data communication based on VXLAN, the VTEP address and the service network segment are mapped and replaced through the cross-protocol stack mapping table item, thereby providing cross-protocol stack service communication based on VXLAN for the equipment which is accessed into the EVPN system and only supports a single stack, realizing flexible network deployment and reducing the equipment cost of networking.
Drawings
Fig. 1 is a networking diagram of an EVPN system provided by an exemplary embodiment;
fig. 2 is a flow chart of a method for forwarding network traffic according to an example embodiment;
fig. 3 is a block diagram of a network traffic forwarding device provided by an example embodiment;
fig. 4 is a hardware block diagram of an electronic device according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to enable those skilled in the art to better understand the technical solution in the embodiment of the present application, a brief description will be given below to the related technology of network traffic forwarding related to the embodiment of the present application.
Referring to fig. 1, fig. 1 is a networking diagram of an EVPN system according to an embodiment of the present disclosure.
The networking shown in fig. 1 includes: operator edge routing devices (PE1, PE2), customer edge routing devices (CE1, CE2, CE3, CE4), traffic devices (h1, h2, h3, h4, h5, h 6);
PE1 and PE2 may establish a VXLAN tunnel, and h1, h2, and h3 may communicate via the VXLAN tunnel via connected CE1, CE2, and PE1, and h4, h5, and h6 connected to PE2, CE3, and CE4, respectively.
It should be noted that, in general, the network protocol stacks supported by PE1 and PE2 need to be the same to ensure that the service devices locally connected to PE1 and the service devices locally connected to PE2 perform VXLAN communications.
For example, in some scenarios, the network protocol stacks supported by PE1 and PE2 are both IPv4 or both IPv6, so that service devices (h1, h2, h3) locally connected to PE1 and service devices (h4, h5, h6) locally connected to PE2 can perform normal communication based on VXLAN.
For another example, in some scenarios, the network protocol stack supported by PE1 is IPv6, and the network protocol stack supported by PE2 is IPv4, then the IPv 6-based service devices (h1, h2, h3) locally connected to PE1 and the IPv 4-based service devices (h4, h5, h6) locally connected to PE2 cannot communicate based on VXLAN.
For another example, in some scenarios, the network protocol stack supported by PE1 is IPv4, and the network protocol stack supported by PE2 is IPv6, then the IPv 4-based service devices (h1, h2, h3) locally connected to PE1 and the IPv 6-based service devices (h4, h5, h6) locally connected to PE2 cannot communicate based on VXLAN.
On the basis of the networking architecture, the application aims to provide a technical scheme for forwarding network traffic based on VXLAN among member network devices with different network protocol stacks in an EVPN system.
When implemented, the member network device of the EVPN system may be configured as a home device of the home VTEP or as an opposite device of the opposite VTEP; the network layer protocol stack of the local terminal device is a first protocol stack and the network layer protocol stack of the opposite terminal device is a second protocol stack.
Further, the local terminal equipment receives a cross-protocol stack mapping table item which is issued by a user and aims at the target flow; wherein, the cross-protocol stack mapping table item at least comprises the address mapping relation of the IP addresses of the local terminal VTEP in the first protocol stack and the second protocol stack; based on the cross-protocol stack mapping table, the local terminal device forwards the target traffic to the opposite terminal device.
In the above scheme, based on setting the cross-protocol-stack mapping table entry for the member network device of the EVPN system, when the member network device interworking across protocol stacks performs routing and data communication based on VXLAN, the VTEP address and the service network segment are mapped and replaced through the cross-protocol-stack mapping table entry, so that the cross-protocol-stack service communication based on VXLAN is provided for the device which only supports a single stack and accesses the EVPN system, thereby implementing flexible network deployment and reducing the networking device cost.
The present application is described below with reference to specific embodiments and specific application scenarios.
Referring to fig. 2, fig. 2 is a flowchart of a network traffic forwarding method provided in an embodiment of the present application, where the method is applied to a member network device of an EVPN system; wherein, the member network device may be configured as a home device of the home VTEP or as an opposite device of the opposite VTEP, a network layer protocol stack of the home device is a first protocol stack and a network layer protocol stack of the opposite device is a second protocol stack, and the method executes the following steps:
step 202, the home terminal equipment receives a cross-protocol stack mapping table item aiming at target traffic, which is issued by a user; wherein, the cross-protocol stack mapping table entry at least comprises an address mapping relation that the IP address of the local end VTEP is mapped from the first protocol stack to the second protocol stack.
And step 204, based on the cross-protocol stack mapping table, the local terminal device forwards the target traffic to the opposite terminal device.
In this specification, the EVPN system includes at least two EVPN technology-enabled member network devices;
wherein, the member network device may be configured as a home terminal device of the home terminal VTEP or as an opposite terminal device of the opposite terminal VTEP; the local terminal device and the opposite terminal device can establish a VXLAN tunnel.
For convenience of understanding, the following EVPN (Ethernet Virtual Private Network) is briefly introduced here.
With the increasing business of data centers, the user demand is continuously improved, the scale and the function of the data centers are gradually complicated, and the management difficulty is higher and higher. Due to disaster recovery, multiple deployments of enterprise branches, improvement of resource utilization rate and other considerations, an enterprise may deploy its own data center network at different physical sites. Therefore, how to interconnect the data center sites and achieve the purposes of reducing the management cost of the data center and flexibly expanding the data center service becomes an important task of the enterprise data center. Thus, in the above background, EVPN arises as it stands by. EVPN is a two-layer network interconnection technology for constructing a data center. The EVPN transmits information such as MAC (media Access Control address) and ARP (address Resolution protocol) of the network node through an extended MP-BGP (multi-protocol extended border gateway protocol), and performs two-layer and three-layer message forwarding through the generated MAC table entry and routing table entry, so as to achieve the purpose of data center interconnection. For the detailed architecture and technical principle of EVPN, please refer to EVPN technical description, which is not described herein.
In this specification, the home device and the peer device refer to two member network devices that establish a VXLAN tunnel in the EVPN system based on a home VTEP and a peer VTEP established by the home device and the peer device, respectively.
It should be noted that the home device and the peer device are relative concepts based on the flow of network traffic. For example, referring to fig. 1, when network traffic flows from a service device (any one or combination of h1, h2, and h3) locally connected to PE1 to a service device (any one or combination of h4, h5, and h6) locally connected to PE2, the local device is PE1, and the peer device is PE 2.
Of course, in practical application, the local device and the peer device may be interchanged. For example, referring to fig. 1, when network traffic flows from a service device (any one or combination of h4, h5, and h6) locally connected to PE2 to a service device (any one or combination of h1, h2, and h3) locally connected to PE1, the local device is PE2, and the peer device is PE 1.
For convenience of understanding and description, the following description is made when network traffic flows from the service device locally connected to PE1 to the service device locally connected to PE2, that is, when the local device is PE1 and the peer device is PE 2.
In this specification, the network layer protocol stack of the local device is a first protocol stack and the network layer protocol stack of the opposite device is a second protocol stack.
The network layer protocol stack is a protocol stack of a network layer of an OSI (Open System Interconnection) model, and corresponds to an IP protocol stack of an IP layer in a TCP/IP model.
In an illustrated embodiment, the network layer protocol stack of the local device is IPv4, and the network layer protocol stack of the peer device is IPv 6.
In another illustrated embodiment, the network layer protocol stack of the local device is IPv6, and the network layer protocol stack of the peer device is IPv 4.
It should be noted that IPv6(Internet Protocol Version 6) is a second Generation standard Protocol of network layer Protocol, also called IPNG (IP Next Generation Internet), which is a set of specifications designed by IETF (Internet Engineering Task Force), and is an upgraded Version of IPv 4. The biggest problem of IPv4 is that the network address resource is limited, which severely restricts the application and development of Internet; the use of the IPv6 can not only solve the problem of the number of network address resources, but also solve the obstacle of connecting various access devices to the Internet. The most significant differences between IPv6 and IPv4 are: the length of the IP address is increased from 32 bits to 128 bits. For detailed descriptions of IPv6 and IPv4, please refer to technical documents of IPv6 and IPv4, which are not described herein again. For convenience of description, the IPv6 protocol stack and the IPv4 protocol stack are abbreviated as IPv6 and IPv4, respectively.
In this specification, the target traffic refers to network traffic flowing from the local device to the peer device.
For example, referring to fig. 1, the target traffic may include network traffic flowing from PE1 to PE2 and to a service device (any one or combination of h4, h5, and h6) locally connected to PE1 (any one or combination of h1, h2, and h 3).
In this specification, the cross-protocol stack mapping table entry refers to a cross-protocol stack mapping table entry used for the local device to forward the cross-network layer protocol stack traffic of the target traffic to the opposite device;
wherein, the cross-protocol stack mapping table entry at least includes an address mapping relationship that the IP address of the local VTEP is mapped from the first protocol stack to the second protocol stack.
For example, taking the first protocol stack as IPv6 and the second protocol stack as IPv4 for illustration, please refer to fig. 1, where the local device is PE1 based on IPv6, and the opposite device is PE2 based on IPv 4. The above-mentioned cross-protocol stack mapping table entry at least includes an address mapping relationship that the IP address of the VTEP of PE1 based on IPv6 is mapped from IPv6 to IPv4, see table 1 below:
Figure BDA0002300708350000091
TABLE 1
As shown in Table 1 above, the IP address of the VTEP of PE1 is an IPv6 address before mapping: a, mapping the table entry mapping of the cross protocol stack corresponding to the number 1 as shown in table 1, where the IP address of the VTEP of PE1 is an IPv4 address after mapping: B.
for another example, the first protocol stack is IPv4 and the second protocol stack is IPv6, please refer to fig. 1, where the local device is PE1 based on IPv4 and the peer device is PE2 based on IPv 6. The above-mentioned cross-protocol stack mapping table entry at least includes an address mapping relationship that the IP address of the VTEP of PE1 based on IPv4 is mapped from IPv4 to IPv6, as shown in table 2 below:
Figure BDA0002300708350000101
TABLE 2
As shown in Table 1 above, the IP address of the VTEP of PE1 is an IPv4 address before mapping: c, mapping the cross-protocol stack mapping table entry corresponding to the number 1 as shown in table 2, where the IP address of the VTEP of PE1 is an IPv6 address after mapping: D.
it should be noted that, in a normal case, the address of the IP address of the local VTEP of the local device may use an address of a local Loopback interface (Loopback interface) of the local device.
In this specification, based on the cross-protocol stack mapping table entry, the home device forwards the target traffic to the peer device.
For example, taking the first protocol stack as IPv6 and the second protocol stack as IPv4 for illustration, based on the cross-protocol stack mapping table entry shown in table 1, the home device PE1 forwards the target traffic to the peer device PE 2.
For another example, taking the first protocol stack as IPv4 and the second protocol stack as IPv6 for example, based on the cross-protocol stack mapping table entry shown in table 2, the home device PE1 forwards the target traffic to the peer device PE 2.
In an embodiment shown in the present invention, in a process that the local device forwards the target traffic to the peer device based on the cross-protocol stack mapping table, the local device checks whether the target traffic has a routing traffic based on VXLAN encapsulation;
for example, taking the first protocol stack as IPv6 and the second protocol stack as IPv4 for example, in the process that the local device PE1 forwards the target traffic to the peer device PE2 based on the cross-protocol stack mapping table shown in table 1, the local device PE1 checks whether the target traffic has routing traffic based on VXLAN encapsulation.
It should be noted that the routing traffic based on VXLAN encapsulation refers to a control plane where the local device and the upper peer device use MP-BGP (multi-Protocol Border Gateway Protocol, that is, multi-Protocol Border Gateway Protocol) as EVPN routes, and VXLAN is network traffic for performing routing Protocol interaction and carried by data of the EVPN routes; the EVPN routes include various types, for example, the EVPN routes may include type2 routes (MAC/IP routes based on EVPN), type3 routes (exclusive multicast routes based on EVPN, also often referred to as IMET routes for short), type5 routes (IP prefix routes based on EVPN), and the like. For the EVPN routing type and routing principle, please refer to EVPN technical description, which is not described herein.
In this specification, if the target traffic includes a routing traffic encapsulated by VXLAN, the local device replaces the IP address of the local VTEP based on the first protocol stack, which is carried in the routing traffic, with the corresponding IP address of the local VTEP based on the second protocol stack, based on the address mapping relationship of the IP address of the local VTEP.
Continuing with the above example, if the target traffic has routing traffic based on VXLAN encapsulation, the local device PE1 maps the IP address of the local VTEP based on IPv6 carried in the routing traffic according to the address mapping relationship of the IP address of the local VTEP shown in table 1: a, replacing the IP address of the corresponding home terminal VTEP based on IPv 4: B.
in this specification, the local device further forwards the routing traffic after replacing the IP address of the local VTEP to the peer device, so that the peer device and the local device establish a routing relationship indicated by the routing traffic and a VXLAN tunnel used for data traffic transmission.
Continuing with the above example, the local device PE1 forwards the routing traffic after replacing the IP address of the local VTEP to the peer device PE2, so that the peer device and the local device establish a BGP peer in a routing relationship indicated by the routing traffic and a VXLAN tunnel for data traffic transmission.
Certainly, in practical application, in addition to replacing the IP address of the local VTEP with the local device, the local device needs to perform protocol encapsulation again on the routing traffic based on the IP protocol stack after the IP address of the local VTEP is replaced. Such as: if the target traffic has routing traffic based on VXLAN encapsulation, the local device PE1 maps the IP address of the local VTEP based on IPv6 carried in the routing traffic according to the address mapping relationship of the IP address of the local VTEP shown in table 1: a, replacing the IP address of the corresponding home terminal VTEP based on IPv 4: after B, performing IPv4 encapsulation on the routing traffic again based on the IPv4 protocol stack, please refer to the IPv4 protocol description specifically, which is not described herein again.
In this specification, the data traffic refers to network traffic that carries out ordinary service data transmission and is carried by data in which the local device and the upper peer device use MP-BGP as the control plane of the EVPN route and VXLAN as the EVPN route.
For example, in practical applications, the data traffic may include network traffic of any data traffic (e.g., audio/video data, web data, etc.) flowing from PE1 to PE2 and flowing to service devices (any one or combination of h4, h5, and h6) locally connected to PE2, where the service devices (any one or combination of h1, h2, and h3) are locally connected to PE 1.
In an embodiment shown in the foregoing description, the cross-protocol stack mapping table entry includes, in addition to an address mapping relationship in which an IP address of a local VTEP is mapped from the first protocol stack to the second protocol stack, a service segment mapping relationship in which a service segment of a service device connected to the local device is mapped from the first protocol stack to the second protocol stack.
For example, taking the first protocol stack as IPv6 and the second protocol stack as IPv4 for illustration, please refer to fig. 1, where the local device PE1 includes, in addition to the cross-protocol stack mapping table entry shown in table 1 or table 2 above, a service segment mapping relationship in which a service segment of a service device (h1, h2, h3) connected to the local device PE1 is mapped from IPv6 to IPv4, please refer to table 3 below:
Figure BDA0002300708350000121
Figure BDA0002300708350000131
TABLE 3
It should be noted that the service segment E based on IPv6 may be represented based on a network prefix and an interface ID defined by an IPv6 protocol stack, and the service segment F based on IPv4 may be represented based on a network number, a host number, and a mask defined by an IPv4 protocol stack, for specific reference, see the technical descriptions of IPv6 and IPv4, which are not described herein again.
In this specification, further, in a process that the local device forwards the target traffic to the peer device based on the cross-protocol stack mapping table, the local device may further check whether the target traffic has the data traffic encapsulated based on VXLAN based on the cross-protocol stack mapping table.
For example, continuing with the example that the first protocol stack is IPv6 and the second protocol stack is IPv4, in the process that the local device PE1 forwards the target traffic to the peer device PE2 based on the cross-protocol stack mapping table entry shown in table 3, the local device PE1 checks whether the target traffic has the data traffic encapsulated by VXLAN.
In this specification, further, if the target traffic further includes data traffic encapsulated based on VXLAN, the local device replaces the service segment based on the first protocol stack carried in the data traffic with a corresponding service segment based on the second protocol stack based on the address mapping relationship of the service segment of the service device connected to the local VTEP.
Continuing with the above example, if the target traffic has the data traffic encapsulated by VXLAN, the local device PE1 maps the service segments of the service devices (h1, h2, h3) connected to the local device PE1 according to the address mapping relationship of the service segments, as shown in table 3, of the service devices based on IPv6 carried in the data traffic: e, replacing the service network segment based on the IPv4 with the corresponding service network segment: F.
of course, in practical applications, in addition to replacing the service segment based on the first protocol stack carried in the data traffic with the corresponding service segment based on the second protocol stack based on the address mapping relationship of the service segment of the service device connected to the VTEP at the home terminal, the protocol encapsulation is performed again on the data traffic based on the IP protocol stack after the IP address replacement of the VTEP at the home terminal. Such as: if the target traffic has the data traffic encapsulated based on VXLAN, the local device PE1 maps the service segments of the service devices (h1, h2, h3) connected to the local device PE1 according to the address mapping relationship of the service segments, which is shown in table 3, of the service devices (h1, h2, h3) that are carried in the data traffic and are based on IPv 6: e, replacing the service network segment based on the IPv4 with the corresponding service network segment: after F, performing IPv4 encapsulation on the data traffic again based on the IPv4 protocol stack, please refer to the IPv4 protocol description specifically, which is not described herein again.
In this specification, the local device forwards the data traffic, which is obtained by replacing the service segment of the service device connected to the local device, to the peer device through the VXLAN tunnel, so that the peer device performs a protocol process corresponding to the second protocol stack on the data traffic locally.
Continuing with the above example, the local device PE1 forwards the data traffic after replacing the service network segment of the service device (h1, h2, h3) connected to the local device to the opposite device through the VXLAN tunnel for data traffic transmission established after the routing traffic interaction, so that the opposite device locally performs protocol processing corresponding to IPv4 on the data traffic.
It should be noted that, based on the cross-protocol stack mapping table entry, mapping the cross-protocol stacks in the routing traffic and the data traffic ensures that, under the condition that the network protocol stacks of the local device and the opposite device are different, for devices that only support a single stack (for example, h1, h2, and h3 that access PE1 through CE1 and CE2 as shown in fig. 1, where h1, h2, and h3 may be mobile terminals or computer terminals that only support a single stack, Soho routing terminals, and the like) that access the EVPN system, service communication based on a cross-protocol stack of VXLAN is provided, so that it is avoided that PE1 and PE2 are replaced with devices that support a double stack, thereby saving device cost and realizing flexible network deployment.
In this specification, the technical solutions and examples described above are described in terms of network traffic flowing from the local device (PE1) to the peer device (PE2) according to the target traffic. In practical applications, the target traffic may also be network traffic flowing from the peer device (PE2) to the home device (PE1), and the specific process is similar and will not be described herein again.
In the above technical solution, a cross-protocol stack mapping table entry is set for a member network device of an EVPN system, so that when a member network device interworking across protocol stacks performs routing and data communication based on VXLAN, a VTEP address and a service network segment are mapped and replaced through the cross-protocol stack mapping table entry, thereby providing cross-protocol stack service communication based on VXLAN for a device that only supports a single stack and accesses the EVPN system, achieving flexible deployment of a network and reducing equipment cost of networking.
Fig. 3 is a block diagram of a network traffic forwarding device according to an exemplary embodiment of the present application. Corresponding to the embodiment of the method, the application also provides an embodiment of a network flow forwarding device, wherein the device is applied to member network equipment of an EVPN system; please refer to fig. 3, which illustrates a network traffic forwarding apparatus 30, where the member network device may be configured to be a home device of a home VTEP or an opposite device of an opposite VTEP, a network layer protocol stack of the home device is a first protocol stack, and a network layer protocol stack of the opposite device is a second protocol stack, and the apparatus includes:
a receiving module 301, where the home terminal device receives a cross-protocol stack mapping table item for a target traffic, which is issued by a user; wherein, the cross-protocol stack mapping table item at least comprises an address mapping relation of the IP address of the local end VTEP which is mapped from the first protocol stack to the second protocol stack;
a forwarding module 302, configured to forward, by the home device, the target traffic to the peer device based on the cross-protocol stack mapping table entry.
In this embodiment, the forwarding module 302 further:
checking whether the target traffic has routing traffic based on VXLAN encapsulation;
if the target traffic has routing traffic based on VXLAN encapsulation, replacing the IP address of the local VTEP based on the first protocol stack carried in the routing traffic with the corresponding IP address of the local VTEP based on the second protocol stack based on the address mapping relation of the IP address of the local VTEP;
and carrying out protocol encapsulation on the routing traffic after the IP address of the local terminal VTEP is replaced based on the second protocol stack and forwarding the routing traffic to opposite terminal equipment so as to establish a routing relation indicated by the routing traffic and a VXLAN tunnel for data traffic transmission between the opposite terminal equipment and the local terminal equipment.
In this embodiment, the cross-protocol stack mapping table entry further includes a service network segment mapping relationship in which a service network segment of a service device connected to the home terminal device is mapped from the first protocol stack to the second protocol stack;
the forwarding module 302 further:
checking whether the target traffic has data traffic based on VXLAN encapsulation;
if the target traffic also has data traffic packaged based on VXLAN, replacing the service network segment based on the first protocol stack carried in the data traffic with a corresponding service network segment based on the second protocol stack based on the address mapping relation of the service network segment of the service equipment connected with the local end equipment;
and after carrying out protocol encapsulation on the data traffic after the service network segment is replaced based on the second protocol stack, forwarding the data traffic to opposite-end equipment through the VXLAN tunnel so that the opposite-end equipment carries out protocol processing corresponding to the second protocol stack on the data traffic locally.
In this embodiment, the first protocol stack is IPv4 and the second protocol stack is IPv6, or the first protocol stack is IPv6 and the second protocol stack is IPv 4.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The systems, devices, modules or modules illustrated in the above embodiments may be implemented by a computer chip or an entity, or by an article of manufacture with certain functionality. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The embodiment of the network traffic forwarding apparatus of the present application can be applied to the electronic device shown in fig. 4. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is a machine executable instruction formed by reading a corresponding computer program instruction in a machine readable storage medium through a processor of the electronic device where the device is located and then running the computer program instruction. In terms of hardware, as shown in fig. 4, the electronic device in which the network traffic forwarding apparatus is located according to the present application is a hardware structure diagram, except for the processor, the communication interface, the bus, and the machine-readable storage medium shown in fig. 4, the electronic device in which the apparatus is located in the embodiment may also include other hardware according to an actual function of the electronic device, which is not described again.
Correspondingly, an embodiment of the present application further provides a hardware structure of an electronic device of the apparatus shown in fig. 3, please refer to fig. 4, and fig. 4 is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. The apparatus comprises: a communication interface 401, a processor 402, a machine-readable storage medium 403, and a bus 404; the communication interface 401, the processor 402 and the machine-readable storage medium 403 are configured to communicate with each other via a bus 404. The communication interface 401 is used for performing network communication. The processor 402 may be a Central Processing Unit (CPU), and the processor 402 may execute machine-readable instructions stored in a machine-readable storage medium 403 to implement the methods described above.
The machine-readable storage medium 403 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: volatile memory, non-volatile memory, or similar storage media. In particular, the machine-readable storage medium 403 may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard disk drive), a solid state disk, any type of storage disk (e.g., a compact disk, a DVD, etc.), or similar storage medium, or a combination thereof.
Up to this point, the description of the hardware configuration shown in fig. 4 is completed.
Further, the present application provides a machine-readable storage medium, such as machine-readable storage medium 403 in fig. 4, including machine-executable instructions, which can be executed by processor 402 in the data processing apparatus to implement the data processing method described above.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (8)

1. The network flow forwarding method is applied to member network equipment of an EVPN system; the member network device may be configured as a home terminal device of a home terminal VTEP or as an opposite terminal device of an opposite terminal VTEP, where a network layer protocol stack of the home terminal device is a first protocol stack and a network layer protocol stack of the opposite terminal device is a second protocol stack; the method comprises the following steps:
the method comprises the steps that local end equipment receives a cross-protocol stack mapping table item aiming at target flow sent by a user; wherein, the cross-protocol stack mapping table item at least comprises an address mapping relation of the IP address of the local end VTEP which is mapped from the first protocol stack to the second protocol stack;
based on the cross-protocol stack mapping table item, the local terminal equipment forwards the target flow to the opposite terminal equipment;
the cross-protocol stack mapping table entry further comprises a service network segment mapping relation that a service network segment of service equipment connected with the home terminal equipment is mapped from the first protocol stack to the second protocol stack;
the forwarding, by the local end device, the target traffic to the peer end device based on the cross-protocol stack mapping table entry further includes:
checking whether the target traffic has data traffic based on VXLAN encapsulation;
if the target traffic also has data traffic packaged based on VXLAN, replacing the service network segment based on the first protocol stack carried in the data traffic with a corresponding service network segment based on the second protocol stack based on the address mapping relation of the service network segment of the service equipment connected with the local end equipment;
and after carrying out protocol encapsulation on the data traffic after the service network segment is replaced based on the second protocol stack, forwarding the data traffic to opposite-end equipment through the VXLAN tunnel so that the opposite-end equipment carries out protocol processing corresponding to the second protocol stack on the data traffic locally.
2. The method of claim 1, wherein forwarding, by the peer device, the target traffic to the peer device based on the cross-protocol stack mapping table entry comprises:
checking whether the target traffic has routing traffic based on VXLAN encapsulation;
if the target traffic has routing traffic based on VXLAN encapsulation, replacing the IP address of the local VTEP based on the first protocol stack carried in the routing traffic with the corresponding IP address of the local VTEP based on the second protocol stack based on the address mapping relation of the IP address of the local VTEP;
and carrying out protocol encapsulation on the routing traffic after the IP address of the local terminal VTEP is replaced based on the second protocol stack and forwarding the routing traffic to opposite terminal equipment so as to establish a routing relation indicated by the routing traffic and a VXLAN tunnel for data traffic transmission between the opposite terminal equipment and the local terminal equipment.
3. The method of claim 1, wherein the first protocol stack is IPv4 and the second protocol stack is IPv6, or wherein the first protocol stack is IPv6 and the second protocol stack is IPv 4.
4. The network traffic forwarding device is applied to member network equipment of an EVPN system; the member network device may be configured as a home terminal device of a home terminal VTEP or as an opposite terminal device of an opposite terminal VTEP, where a network layer protocol stack of the home terminal device is a first protocol stack and a network layer protocol stack of the opposite terminal device is a second protocol stack; the device comprises:
the local terminal equipment receives a cross-protocol stack mapping table item aiming at target flow sent by a user; wherein, the cross-protocol stack mapping table item at least comprises an address mapping relation of the IP address of the local end VTEP which is mapped from the first protocol stack to the second protocol stack;
a forwarding module, configured to forward, by the home device, the target traffic to the peer device based on the inter-protocol stack mapping table entry;
the cross-protocol stack mapping table entry further comprises a service network segment mapping relation that a service network segment of service equipment connected with the home terminal equipment is mapped from the first protocol stack to the second protocol stack;
the forwarding module further:
checking whether the target traffic has data traffic based on VXLAN encapsulation;
if the target traffic also has data traffic packaged based on VXLAN, replacing the service network segment based on the first protocol stack carried in the data traffic with a corresponding service network segment based on the second protocol stack based on the address mapping relation of the service network segment of the service equipment connected with the local end equipment;
and after carrying out protocol encapsulation on the data traffic after the service network segment is replaced based on the second protocol stack, forwarding the data traffic to opposite-end equipment through the VXLAN tunnel so that the opposite-end equipment carries out protocol processing corresponding to the second protocol stack on the data traffic locally.
5. The apparatus of claim 4, wherein the forwarding module is further to:
checking whether the target traffic has routing traffic based on VXLAN encapsulation;
if the target traffic has routing traffic based on VXLAN encapsulation, replacing the IP address of the local VTEP based on the first protocol stack carried in the routing traffic with the corresponding IP address of the local VTEP based on the second protocol stack based on the address mapping relation of the IP address of the local VTEP;
and carrying out protocol encapsulation on the routing traffic after the IP address of the local terminal VTEP is replaced based on the second protocol stack and forwarding the routing traffic to opposite terminal equipment so as to establish a routing relation indicated by the routing traffic and a VXLAN tunnel for data traffic transmission between the opposite terminal equipment and the local terminal equipment.
6. The apparatus of claim 4, wherein the first protocol stack is IPv4 and the second protocol stack is IPv6, or wherein the first protocol stack is IPv6 and the second protocol stack is IPv 4.
7. An electronic device is characterized by comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are connected with each other through the bus;
the memory has stored therein machine-readable instructions, the processor executing the method of any of claims 1 to 3 by calling the machine-readable instructions.
8. A machine-readable storage medium having stored thereon machine-readable instructions which, when invoked and executed by a processor, carry out the method of any of claims 1 to 3.
CN201911220505.8A 2019-12-03 2019-12-03 Network traffic forwarding method and device, electronic equipment and machine-readable storage medium Active CN111130978B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911220505.8A CN111130978B (en) 2019-12-03 2019-12-03 Network traffic forwarding method and device, electronic equipment and machine-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911220505.8A CN111130978B (en) 2019-12-03 2019-12-03 Network traffic forwarding method and device, electronic equipment and machine-readable storage medium

Publications (2)

Publication Number Publication Date
CN111130978A CN111130978A (en) 2020-05-08
CN111130978B true CN111130978B (en) 2021-11-23

Family

ID=70497270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911220505.8A Active CN111130978B (en) 2019-12-03 2019-12-03 Network traffic forwarding method and device, electronic equipment and machine-readable storage medium

Country Status (1)

Country Link
CN (1) CN111130978B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114301994B (en) * 2021-12-29 2023-09-19 迈普通信技术股份有限公司 Dual-stack conversion method, device, network equipment and storage medium
WO2023169364A1 (en) * 2022-03-11 2023-09-14 华为技术有限公司 Routing generation method and apparatus, and data message forwarding method and apparatus

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197858A (en) * 2008-01-07 2008-06-11 杭州华三通信技术有限公司 Address translation method, device and router with the same
CN105162674A (en) * 2015-10-16 2015-12-16 上海斐讯数据通信技术有限公司 Method and network card for physical machine to access to virtual network
CN105490884A (en) * 2015-12-14 2016-04-13 迈普通信技术股份有限公司 VXLAN tunnel detection method and apparatus
CN106998286A (en) * 2017-05-05 2017-08-01 杭州迪普科技股份有限公司 A kind of VXLAN message forwarding methods and device
CN109218158A (en) * 2017-07-05 2019-01-15 中国电信股份有限公司 Data transmission method, control method and controller, gateway, intermediate NE and system based on VxLAN
CN110391994A (en) * 2019-07-24 2019-10-29 杭州迪普科技股份有限公司 Network flow retransmission method, device, electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197858A (en) * 2008-01-07 2008-06-11 杭州华三通信技术有限公司 Address translation method, device and router with the same
CN105162674A (en) * 2015-10-16 2015-12-16 上海斐讯数据通信技术有限公司 Method and network card for physical machine to access to virtual network
CN105490884A (en) * 2015-12-14 2016-04-13 迈普通信技术股份有限公司 VXLAN tunnel detection method and apparatus
CN106998286A (en) * 2017-05-05 2017-08-01 杭州迪普科技股份有限公司 A kind of VXLAN message forwarding methods and device
CN109218158A (en) * 2017-07-05 2019-01-15 中国电信股份有限公司 Data transmission method, control method and controller, gateway, intermediate NE and system based on VxLAN
CN110391994A (en) * 2019-07-24 2019-10-29 杭州迪普科技股份有限公司 Network flow retransmission method, device, electronic equipment

Also Published As

Publication number Publication date
CN111130978A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN112470436B (en) Systems, methods, and computer-readable media for providing multi-cloud connectivity
US10333836B2 (en) Convergence for EVPN multi-homed networks
US10320664B2 (en) Cloud overlay for operations administration and management
US10757231B2 (en) Providing network efficiencies in forwarding packets among provider networks and applying segment routing policies
CN108718278B (en) Message transmission method and device
CN108259303B (en) Message forwarding method and device
US7856014B2 (en) High capacity multicast forwarding
JP2020520612A (en) Packet transmission method, edge device, and machine-readable storage medium
CN110213148B (en) Data transmission method, system and device
US11121969B2 (en) Routing between software defined networks and physical networks
US20220029917A1 (en) Executing workloads across multiple cloud service providers
WO2023165137A1 (en) Cross-cluster network communication system and method
CN111130978B (en) Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
CN113783781A (en) Method and device for interworking between virtual private clouds
CN113542111A (en) Message forwarding method and network equipment
CN113660164A (en) Message forwarding method and network equipment
WO2019134637A1 (en) Method, device, and system for multi-type network virtualization overlay interconnection
CN108471374B (en) Data message forwarding method and device
CN111010344B (en) Message forwarding method and device, electronic equipment and machine-readable storage medium
CN116418632A (en) Message processing method, device, equipment and machine-readable storage medium
CN110752989A (en) Method and device for forwarding east-west traffic
CN110086702B (en) Message forwarding method and device, electronic equipment and machine-readable storage medium
CN113542112B (en) Message forwarding method and network equipment
CN115665026A (en) Cluster networking method and device
US11743180B2 (en) System and method for routing traffic onto an MPLS network

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