CN115499434A - Cross-VPC flow forwarding method - Google Patents
Cross-VPC flow forwarding method Download PDFInfo
- Publication number
- CN115499434A CN115499434A CN202210911121.6A CN202210911121A CN115499434A CN 115499434 A CN115499434 A CN 115499434A CN 202210911121 A CN202210911121 A CN 202210911121A CN 115499434 A CN115499434 A CN 115499434A
- Authority
- CN
- China
- Prior art keywords
- peer
- vpc
- mac address
- traffic
- address information
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4633—Interconnection of networks using encapsulation techniques, e.g. tunneling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4641—Virtual LANs, VLANs, e.g. virtual private networks [VPN]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45595—Network integration; Enabling network access in virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请是关于一种跨VPC的流量转发方法,具体涉及云网络技术领域。在本申请中,为第一VPC、第二VPC之间的VPC对等连接引入了VPC对等网关集群,第一VPC可以对在生成对等连接流量之后,将对等连接流量发送给VPC对等网关集群,VPC对等网关集群在接收对等连接流量之后,将对等连接流量的MAC地址信息由与第一VPC相关的第一MAC地址信息修改为与第二VPC相关的第二MAC地址信息,以基于修改后的第二MAC地址信息,向第二VPC发送对等连接流量,从而实现跨VPC的流量转发。
This application relates to a cross-VPC traffic forwarding method, and specifically relates to the field of cloud network technology. In this application, a VPC peer-to-peer gateway cluster is introduced for the VPC peer-to-peer connection between the first VPC and the second VPC. The first VPC can send the peer-to-peer connection traffic to the VPC peer after generating the peer-to-peer connection traffic. Peer-to-peer gateway cluster, after the VPC peer-to-peer gateway cluster receives the peer-to-peer connection traffic, it modifies the MAC address information of the peer-to-peer connection traffic from the first MAC address information related to the first VPC to the second MAC address related to the second VPC information, so as to send peering connection traffic to the second VPC based on the modified second MAC address information, so as to realize cross-VPC traffic forwarding.
Description
技术领域technical field
本发明涉及云网络技术领域,具体涉及一种跨VPC的流量转发方法。The invention relates to the technical field of cloud networks, in particular to a cross-VPC traffic forwarding method.
背景技术Background technique
在云网络技术领域中,虚拟私有云(Virtual Private Cloud,VPC)是指云上隔离的、私密的虚拟网络环境。In the field of cloud network technology, a virtual private cloud (Virtual Private Cloud, VPC) refers to an isolated and private virtual network environment on the cloud.
相关技术中,支持同一VPC内的虚拟机(Virtual Machine,VM)的互通,比如,一个VPC可以包括多个不同的子网,支持同一VPC内的同子网下的虚拟机(Virtual Machine,VM)的互通,以及,支持同一VPC内的跨子网下的VM的互通。但是,尚未支持跨VPC的VM的互通。In related technologies, the intercommunication of virtual machines (Virtual Machines, VMs) in the same VPC is supported. For example, a VPC can include multiple different subnets, and virtual machines (Virtual Machines, VMs) under the same subnets in the same VPC can be supported. ), and supports the intercommunication of VMs across subnets in the same VPC. However, intercommunication of VMs across VPCs is not yet supported.
发明内容Contents of the invention
本申请提供了一种跨VPC的流量转发方法,该技术方案如下。The present application provides a cross-VPC traffic forwarding method, and the technical solution is as follows.
一方面,提供了一种跨VPC的流量转发方法,所述方法由VPC对等连接网络中的VPC对等网关集群执行,所述VPC对等连接网络还包括第一VPC、第二VPC,所述方法包括:On the one hand, a cross-VPC traffic forwarding method is provided, the method is executed by a VPC peer-to-peer gateway cluster in the VPC peer-to-peer connection network, and the VPC peer-to-peer connection network also includes a first VPC and a second VPC, so The methods described include:
接收所述第一VPC发送的对等连接流量,所述对等连接流量的媒体接入控制(Medium Access Control,MAC)地址信息为第一MAC地址信息,所述第一MAC地址信息与所述第一VPC中的第一分布式虚拟路由(Distributed Virtual Router,DVR)的MAC地址、所述第一VPC中的第一子网所预留的第一对等端口的MAC地址相关;receiving the peer-to-peer connection traffic sent by the first VPC, the media access control (Medium Access Control, MAC) address information of the peer-to-peer connection traffic is first MAC address information, and the first MAC address information is the same as the The MAC address of the first distributed virtual router (Distributed Virtual Router, DVR) in the first VPC, the MAC address of the first peer-to-peer port reserved by the first subnet in the first VPC;
将所述对等连接流量的MAC地址信息由所述第一MAC地址信息修改为第二MAC地址信息,所述第二MAC地址信息与所述第二VPC中的第二DVR的MAC地址、所述第二VPC中的第二子网所预留的第二对等端口的MAC地址相关;Modifying the MAC address information of the peer-to-peer connection traffic from the first MAC address information to second MAC address information, the second MAC address information is consistent with the MAC address of the second DVR in the second VPC, the related to the MAC address of the second peer-to-peer port reserved by the second subnet in the second VPC;
将地址信息修改后的所述对等连接流量发送至所述第二VPC。sending the peer-to-peer connection traffic with the address information modified to the second VPC.
一方面,提供了一种跨VPC的流量转发方法,所述方法由VPC对等连接网络中的第一VPC执行,所述VPC对等连接网络还包括VPC对等网关集群、第二VPC,所述方法包括:In one aspect, a cross-VPC traffic forwarding method is provided, the method is executed by a first VPC in a VPC peer-to-peer connection network, and the VPC peer-to-peer connection network further includes a VPC peer-to-peer gateway cluster and a second VPC, so The methods described include:
生成对等连接流量,所述对等连接流量的MAC地址信息为第三MAC地址信息,所述第三MAC地址信息与所述第一VPC中的第一DVR的MAC地址、所述第一VPC中的第一VM的MAC地址相关;Generate peer-to-peer connection traffic, the MAC address information of the peer-to-peer connection traffic is third MAC address information, and the third MAC address information is related to the MAC address of the first DVR in the first VPC, the first VPC The MAC address of the first VM in is related;
将所述对等连接流量的MAC地址信息由所述第三MAC地址信息修改为第一MAC地址信息,所述第一MAC地址信息与所述第一VPC中的第一DVR的MAC地址、所述第一VPC中的第一子网所预留的第一对等端口的MAC地址相关;Modifying the MAC address information of the peer-to-peer connection traffic from the third MAC address information to the first MAC address information, the first MAC address information is consistent with the MAC address of the first DVR in the first VPC, the related to the MAC address of the first peer-to-peer port reserved by the first subnet in the first VPC;
将地址信息修改后的所述对等连接流量发送至所述VPC对等网关集群,以使得所述VPC对等网关集群将所述对等连接流量转发给所述第二VPC。Sending the peering connection traffic with address information modified to the VPC peering gateway cluster, so that the VPC peering gateway cluster forwards the peering connection traffic to the second VPC.
在一种可能的实现方式中,所述第一对等端口的MAC地址对应于预设MAC地址前缀,所述预设MAC地址前缀用于在流量的流表匹配过程中,标识所述流量属于跨VPC转发的流量。In a possible implementation manner, the MAC address of the first peer port corresponds to a preset MAC address prefix, and the preset MAC address prefix is used to identify that the traffic belongs to Traffic forwarded across VPCs.
一方面,提供了一种跨VPC的流量转发方法,所述方法由VPC对等连接网络中的第二VPC执行,所述VPC对等连接网络还包括VPC对等网关集群、第一VPC,所述方法包括:In one aspect, a cross-VPC traffic forwarding method is provided, the method is executed by a second VPC in the VPC peer-to-peer connection network, and the VPC peer-to-peer connection network also includes a VPC peer-to-peer gateway cluster and a first VPC, so The methods described include:
接收所述VPC对等网关集群发送的对等连接流量,所述对等连接流量是所述VPC对等网关集群从所述第一VPC处接收的,所述对等连接流量的MAC地址信息为第二MAC地址信息,所述第二MAC地址信息与所述第二VPC中的第二DVR的MAC地址、所述第二VPC中的第二子网所预留的第二对等端口的MAC地址相关;receiving the peer-to-peer connection traffic sent by the VPC peer-to-peer gateway cluster, the peer-to-peer connection traffic is received by the VPC peer-to-peer gateway cluster from the first VPC, and the MAC address information of the peer-to-peer connection traffic is Second MAC address information, the second MAC address information and the MAC address of the second DVR in the second VPC, the MAC of the second peer port reserved by the second subnet in the second VPC address related;
将所述对等连接流量的MAC地址信息由所述第二MAC地址信息修改为第四MAC地址信息,所述第四MAC地址信息与所述第二VPC中的第二DVR的MAC地址、所述第二VPC中的第二VM的MAC地址相关;Modifying the MAC address information of the peer-to-peer connection traffic from the second MAC address information to fourth MAC address information, the fourth MAC address information is consistent with the MAC address of the second DVR in the second VPC, the The MAC address of the second VM in the second VPC is related;
将地址信息修改后的所述对等连接流量发送至所述第二VM。sending the peer-to-peer connection traffic with address information modified to the second VM.
在一种可能的实现方式中,所述第二对等端口的MAC地址对应于预设MAC地址前缀,所述预设MAC地址前缀用于在流量的流表匹配过程中,标识所述流量属于跨VPC转发的流量。In a possible implementation manner, the MAC address of the second peer port corresponds to a preset MAC address prefix, and the preset MAC address prefix is used to identify that the traffic belongs to the Traffic forwarded across VPCs.
又一方面,提供了一种跨VPC的流量转发装置,所述装置由VPC对等连接网络中的VPC对等网关集群执行,所述VPC对等连接网络还包括第一VPC、第二VPC,所述装置包括:流量接收模块、地址信息修改模块和流量发送模块;In yet another aspect, a cross-VPC traffic forwarding device is provided, the device is executed by a VPC peer-to-peer gateway cluster in the VPC peer-to-peer connection network, and the VPC peer-to-peer connection network further includes a first VPC and a second VPC, The device includes: a flow receiving module, an address information modification module and a flow sending module;
所述流量接收模块,用于接收所述第一VPC发送的对等连接流量,所述对等连接流量的MAC地址信息为第一MAC地址信息,所述第一MAC地址信息与所述第一VPC中的第一DVR的MAC地址、所述第一VPC中的第一子网所预留的第一对等端口的MAC地址相关;The traffic receiving module is configured to receive the peer-to-peer connection traffic sent by the first VPC, the MAC address information of the peer-to-peer connection traffic is first MAC address information, and the first MAC address information is the same as the first MAC address information. The MAC address of the first DVR in the VPC is related to the MAC address of the first peer port reserved by the first subnet in the first VPC;
所述地址信息修改模块,用于将所述对等连接流量的MAC地址信息由所述第一MAC地址信息修改为第二MAC地址信息,所述第二MAC地址信息与所述第二VPC中的第二DVR的MAC地址、所述第二VPC中的第二子网所预留的第二对等端口的MAC地址相关;The address information modification module is configured to modify the MAC address information of the peer-to-peer connection traffic from the first MAC address information to second MAC address information, and the second MAC address information is the same as that in the second VPC The MAC address of the second DVR and the MAC address of the second peer-to-peer port reserved by the second subnet in the second VPC are related;
所述流量发送模块,用于将地址信息修改后的所述对等连接流量发送至所述第二VPC。The traffic sending module is configured to send the peer-to-peer connection traffic with address information modified to the second VPC.
在一种可能的实现方式中,所述VPC对等网关集群中的网关节点包括:br-conjoin、br-south,所述br-south上创建有与VPC通信的接口,且所述br-conjoin和所述br-south之间为每一个VPC建立有Veth Pair;In a possible implementation manner, the gateway nodes in the VPC peer-to-peer gateway cluster include: br-conjoin and br-south, an interface for communicating with the VPC is created on the br-south, and the br-conjoin A Veth Pair is established for each VPC with the br-south;
所述地址信息修改模块,用于:The address information modification module is used for:
所述br-south在接收到所述第一VPC发送的所述对等连接流量之后,将所述对等连接流量从所述第一VPC对应的第一Veth Pair送出,发送至所述br-conjoin;After receiving the peer-to-peer connection traffic sent by the first VPC, the br-south sends the peer-to-peer connection traffic from the first Veth Pair corresponding to the first VPC to the br-south conjoin;
所述br-conjoin将所述对等连接流量的源MAC地址由所述第一VPC中的第一DVR的MAC地址修改为所述第二VPC中的第二子网所预留的第二对等端口的MAC地址,将所述对等连接流量的目的MAC地址由所述第一VPC中的第一子网所预留的第一对等端口的MAC地址修改为所述第二VPC中的第二DVR的MAC地址;The br-conjoin modifies the source MAC address of the peer-to-peer connection traffic from the MAC address of the first DVR in the first VPC to the second pair reserved by the second subnet in the second VPC. The MAC address of the peer port, modify the destination MAC address of the peer connection traffic from the MAC address of the first peer port reserved by the first subnet in the first VPC to the MAC address of the peer port in the second VPC MAC address of the second DVR;
所述流量发送模块,用于:The traffic sending module is used for:
所述br-conjoin将地址信息修改后的所述对等连接流量从所述第二VPC对应的第二Veth Pair送出,发送至所述br-south;The br-conjoin sends the peer-to-peer connection traffic after the address information is modified from the second Veth Pair corresponding to the second VPC, and sends it to the br-south;
所述br-south将地址信息修改后的所述对等连接流量发送至所述第二VPC。The br-south sends the peer-to-peer connection traffic with the address information modified to the second VPC.
在一种可能的实现方式中,所述br-conjoin中包括所述第二VPC对应的子网选择组流表,所述子网选择组流表用于对所述第二VPC中的子网进行负载均衡选择;In a possible implementation manner, the br-conjoin includes a subnet selection group flow table corresponding to the second VPC, and the subnet selection group flow table is used for subnet selection in the second VPC Make load balancing selection;
所述地址信息修改模块,用于在所述br-conjoin将所述对等连接流量的源MAC地址由所述第一VPC中的第一DVR的MAC地址修改为所述第二VPC中的第二子网所预留的第二对等端口的MAC地址之前,所述br-conjoin使用所述子网选择组流表选中所述第二VPC中的第二子网。The address information modifying module is configured to modify the source MAC address of the peer-to-peer connection traffic from the MAC address of the first DVR in the first VPC to the MAC address of the first DVR in the second VPC in the br-conjoin Before the MAC address of the second peer port reserved by the second subnet, the br-conjoin uses the subnet selection group flow table to select the second subnet in the second VPC.
在一种可能的实现方式中,所述br-south中包括所述第二DVR对应的DVR实例选择组流表,所述DVR实例选择组流表用于对所述第二DVR的DVR实例进行负载均衡选择;In a possible implementation manner, the br-south includes a DVR instance selection group flow table corresponding to the second DVR, and the DVR instance selection group flow table is used to perform load balancing options;
所述流量发送模块,用于:The traffic sending module is used for:
所述br-south使用所述DVR实例选择组流表选中所述第二DVR的目标DVR实例;The br-south uses the DVR instance selection group flow table to select the target DVR instance of the second DVR;
所述br-south将地址信息修改后的所述对等连接流量发送至所述第二DVR的目标DVR实例。The br-south sends the peer-to-peer connection traffic with the address information modified to the target DVR instance of the second DVR.
在一种可能的实现方式中,所述第一对等端口的MAC地址、所述第二对等端口的MAC地址对应于预设MAC地址前缀,所述预设MAC地址前缀用于在流量的流表匹配过程中,标识所述流量属于跨VPC转发的流量。In a possible implementation manner, the MAC address of the first peer port and the MAC address of the second peer port correspond to a preset MAC address prefix, and the preset MAC address prefix is used in traffic During the flow table matching process, it is identified that the traffic belongs to cross-VPC forwarded traffic.
又一方面,提供了一种跨VPC的流量转发装置,所述装置由VPC对等连接网络中的第一VPC执行,所述VPC对等连接网络还包括VPC对等网关集群、第二VPC,所述装置包括:流量生成模块、地址信息修改模块和流量发送模块;In yet another aspect, a cross-VPC traffic forwarding device is provided, the device is executed by a first VPC in a VPC peer-to-peer connection network, and the VPC peer-to-peer connection network further includes a VPC peer-to-peer gateway cluster and a second VPC, The device includes: a traffic generation module, an address information modification module and a traffic sending module;
所述流量生成模块,用于生成对等连接流量,所述对等连接流量的MAC地址信息为第三MAC地址信息,所述第三MAC地址信息与所述第一VPC中的第一DVR的MAC地址、所述第一VPC中的第一VM的MAC地址相关;The traffic generation module is configured to generate peer-to-peer connection traffic, the MAC address information of the peer-to-peer connection traffic is third MAC address information, and the third MAC address information is the same as that of the first DVR in the first VPC. The MAC address is related to the MAC address of the first VM in the first VPC;
所述地址信息修改模块,用于将所述对等连接流量的MAC地址信息由所述第三MAC地址信息修改为第一MAC地址信息,所述第一MAC地址信息与所述第一VPC中的第一DVR的MAC地址、所述第一VPC中的第一子网所预留的第一对等端口的MAC地址相关;The address information modification module is configured to modify the MAC address information of the peer-to-peer connection traffic from the third MAC address information to the first MAC address information, and the first MAC address information is the same as that in the first VPC The MAC address of the first DVR and the MAC address of the first peer-to-peer port reserved by the first subnet in the first VPC are related;
所述流量发送模块,用于将地址信息修改后的所述对等连接流量发送至所述VPC对等网关集群,以使得所述VPC对等网关集群将所述对等连接流量转发给所述第二VPC。The traffic sending module is configured to send the peer-to-peer connection traffic with address information modified to the VPC peer-to-peer gateway cluster, so that the VPC peer-to-peer gateway cluster forwards the peer-to-peer connection traffic to the Second VPC.
在一种可能的实现方式中,所述第一VPC中的第一DVR中包括对等连接路由规则,所述对等连接路由规则包括:在流量的目的IP地址属于其他VPC的目的网段时,下一跳为所述流量来自的子网所预留的对等端口的IP地址;In a possible implementation manner, the first DVR in the first VPC includes a peer-to-peer connection routing rule, and the peer-to-peer connection routing rule includes: when the destination IP address of the traffic belongs to the destination network segment of another VPC , the next hop is the IP address of the peer port reserved for the subnet from which the traffic comes;
所述地址信息修改模块,用于:The address information modification module is used for:
所述第一DVR在接收到所述第一VM发送的所述对等连接流量之后,基于所述对等连接路由规则,将所述对等连接流量的源MAC地址由所述第一VPC中的第一VM的MAC地址修改为所述第一VPC中的第一DVR的MAC地址,将所述对等连接流量的目的MAC地址由所述第一VPC中的第一DVR的MAC地址修改为所述第一VPC中的第一子网所预留的第一对等端口的MAC地址。After the first DVR receives the peer-to-peer connection traffic sent by the first VM, based on the peer-to-peer connection routing rule, the source MAC address of the peer-to-peer connection traffic is transferred from the first VPC to Modify the MAC address of the first VM in the first VPC to the MAC address of the first DVR in the first VPC, and modify the destination MAC address of the peer-to-peer connection traffic from the MAC address of the first DVR in the first VPC to The MAC address of the first peer port reserved by the first subnet in the first VPC.
在一种可能的实现方式中,所述VPC对等网关集群包括至少一组网关节点组,每组所述网关节点组中包括至少一个网关节点,所述第一VPC与所述第二VPC之间的对等连接由所述至少一组网关节点组中的目标网关节点组承载;In a possible implementation manner, the VPC peer-to-peer gateway cluster includes at least one set of gateway node groups, each set of gateway node groups includes at least one gateway node, and the connection between the first VPC and the second VPC The peer-to-peer connection between is carried by the target gateway node group in the at least one set of gateway node groups;
所述流量发送模块,用于:The traffic sending module is used for:
所述第一DVR将地址信息修改后的所述对等连接流量发送至所述第一VPC中的br-tun,所述br-tun中包括所述目标网关节点组对应的网关节点选择组流表,所述网关节点选择组流表用于对所述目标网关节点组中的网关节点进行负载均衡选择;The first DVR sends the peer-to-peer connection flow after the address information is modified to the br-tun in the first VPC, and the br-tun includes the gateway node selection group flow corresponding to the target gateway node group Table, the gateway node selection group flow table is used for load balancing selection of gateway nodes in the target gateway node group;
所述br-tun使用所述网关节点选择组流表选中所述目标网关节点组中的目标网关节点;The br-tun uses the gateway node selection group flow table to select the target gateway node in the target gateway node group;
所述br-tun将地址信息修改后的所述对等连接流量发送至所述目标网关节点。The br-tun sends the peer-to-peer connection traffic with the address information modified to the target gateway node.
在一种可能的实现方式中,所述第一对等端口的MAC地址对应于预设MAC地址前缀,所述预设MAC地址前缀用于在流量的流表匹配过程中,标识所述流量属于跨VPC转发的流量。In a possible implementation manner, the MAC address of the first peer port corresponds to a preset MAC address prefix, and the preset MAC address prefix is used to identify that the traffic belongs to Traffic forwarded across VPCs.
又一方面,提供了一种跨VPC的流量转发装置,所述装置由VPC对等连接网络中的第二VPC执行,所述VPC对等连接网络还包括VPC对等网关集群、第一VPC,所述装置包括:流量接收模块、地址信息修改模块和流量发送模块;In yet another aspect, a cross-VPC traffic forwarding device is provided, the device is executed by a second VPC in the VPC peer-to-peer connection network, and the VPC peer-to-peer connection network further includes a VPC peer-to-peer gateway cluster, a first VPC, The device includes: a flow receiving module, an address information modification module and a flow sending module;
所述流量接收模块,用于接收所述VPC对等网关集群发送的对等连接流量,所述对等连接流量是所述VPC对等网关集群从所述第一VPC处接收的,所述对等连接流量的MAC地址信息为第二MAC地址信息,所述第二MAC地址信息与所述第二VPC中的第二DVR的MAC地址、所述第二VPC中的第二子网所预留的第二对等端口的MAC地址相关;The traffic receiving module is configured to receive the peer-to-peer connection traffic sent by the VPC peer-to-peer gateway cluster, the peer-to-peer connection traffic is received by the VPC peer-to-peer gateway cluster from the first VPC, the peer The MAC address information of the waiting connection flow is the second MAC address information, and the second MAC address information is reserved with the MAC address of the second DVR in the second VPC and the second subnet in the second VPC. related to the MAC address of the second peer port;
所述地址信息修改模块,用于将所述对等连接流量的MAC地址信息由所述第二MAC地址信息修改为第四MAC地址信息,所述第四MAC地址信息与所述第二VPC中的第二DVR的MAC地址、所述第二VPC中的第二VM的MAC地址相关;The address information modification module is configured to modify the MAC address information of the peer-to-peer connection traffic from the second MAC address information to fourth MAC address information, and the fourth MAC address information is the same as that in the second VPC The MAC address of the second DVR and the MAC address of the second VM in the second VPC are related;
所述流量发送模块,用于将地址信息修改后的所述对等连接流量发送至所述第二VM。The traffic sending module is configured to send the peer-to-peer connection traffic with address information modified to the second VM.
在一种可能的实现方式中,所述第二VPC中的第二DVR中包括直连路由规则,所述直连路由规则包括:在流量的目的IP地址属于所述第二VPC的目的网段时,下一跳为所述第二VM所属的子网对应的直连网卡;In a possible implementation manner, the second DVR in the second VPC includes a direct routing rule, and the direct routing rule includes: the destination IP address of the traffic belongs to the destination network segment of the second VPC , the next hop is the directly connected network card corresponding to the subnet to which the second VM belongs;
所述地址信息修改模块,用于:The address information modification module is used for:
所述第二DVR在接收到所述VPC对等网关集群发送的所述对等连接流量之后,基于所述直连路由规则,将所述对等连接流量的源MAC地址由所述第二VPC中的第二子网所预留的第二对等端口的MAC地址修改为所述第二VPC中的第二DVR的MAC地址,将所述对等连接流量的目的MAC地址由所述第二VPC中的第二DVR的MAC地址修改为所述第二VPC中的第二VM的MAC地址。After receiving the peer-to-peer connection traffic sent by the VPC peer-to-peer gateway cluster, the second DVR transfers the source MAC address of the peer-to-peer connection traffic from the second VPC based on the direct routing rule. Modify the MAC address of the second peer-to-peer port reserved in the second subnet in the second VPC to the MAC address of the second DVR in the second VPC, and change the destination MAC address of the peer-to-peer connection traffic from the second The MAC address of the second DVR in the VPC is changed to the MAC address of the second VM in the second VPC.
在一种可能的实现方式中,所述第二对等端口的MAC地址对应于预设MAC地址前缀,所述预设MAC地址前缀用于在流量的流表匹配过程中,标识所述流量属于跨VPC转发的流量。In a possible implementation manner, the MAC address of the second peer port corresponds to a preset MAC address prefix, and the preset MAC address prefix is used to identify that the traffic belongs to the Traffic forwarded across VPCs.
再一方面,提供了一种计算机设备,所述计算机设备中包含处理器和存储器,所述存储器中存储有至少一条指令、至少一段程序、代码集或指令集,所述至少一条指令、至少一段程序、代码集或指令集由处理器加载并执行以实现上述的跨VPC的流量转发方法。In yet another aspect, a computer device is provided, the computer device includes a processor and a memory, at least one instruction, at least one program, code set or instruction set are stored in the memory, and the at least one instruction, at least one The program, code set or instruction set is loaded and executed by the processor to implement the above cross-VPC traffic forwarding method.
又一方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述至少一条指令由处理器加载并执行以实现上述的跨VPC的流量转发方法。In yet another aspect, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the above cross-VPC traffic forwarding method.
再一方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述的跨VPC的流量转发方法。In yet another aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above-mentioned cross-VPC traffic forwarding method.
本申请提供的技术方案可以包括以下有益效果:The technical solution provided by this application may include the following beneficial effects:
为第一VPC、第二VPC之间的VPC对等连接引入了VPC对等网关集群,第一VPC可以对在生成对等连接流量之后,对该对等连接流量的MAC地址进行修改,由第三MAC地址信息修改为第一MAC地址信息,以基于修改后的第一MAC地址,将对等连接流量发送给VPC对等网关集群,VPC对等网关集群在接收对等连接流量之后,将对等连接流量的MAC地址信息由与第一VPC相关的第一MAC地址信息修改为与第二VPC相关的第二MAC地址信息,以基于修改后的第二MAC地址信息,向第二VPC发送对等连接流量,第二VPC在接收对等连接流量之后,将对等连接流量的MAC地址进行修改,由第二MAC地址信息修改为第四MAC地址信息,以将该对等连接流量发送到目的VM,从而实现跨VPC的流量转发。A VPC peer-to-peer gateway cluster is introduced for the VPC peer-to-peer connection between the first VPC and the second VPC. The first VPC can modify the MAC address of the peer-to-peer connection traffic after the peer-to-peer connection traffic is generated. The third MAC address information is changed to the first MAC address information to send the peering connection traffic to the VPC peering gateway cluster based on the modified first MAC address. After the VPC peering gateway cluster receives the peering connection traffic, it will The MAC address information of the waiting connection traffic is changed from the first MAC address information related to the first VPC to the second MAC address information related to the second VPC, so as to send the pair to the second VPC based on the modified second MAC address information. Waiting for connection traffic, after receiving the peering connection traffic, the second VPC modifies the MAC address of the peering connection traffic from the second MAC address information to the fourth MAC address information, so as to send the peering connection traffic to the destination VM to implement cross-VPC traffic forwarding.
附图说明Description of drawings
为了更清楚地说明本申请具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the description of the specific embodiments or prior art. Obviously, the accompanying drawings in the following description The drawings are some implementations of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.
图1是根据一示例性实施例示出的计算节点内部的虚拟网络的示意图。Fig. 1 is a schematic diagram of a virtual network inside a computing node according to an exemplary embodiment.
图2是根据一示例性实施例示出的网络节点内部的虚拟网络的示意图。Fig. 2 is a schematic diagram of a virtual network inside a network node according to an exemplary embodiment.
图3是根据一示例性实施例示出的同VPC同子网下的东西向流量的示意图。Fig. 3 is a schematic diagram of east-west traffic under the same VPC and the same subnet according to an exemplary embodiment.
图4是根据一示例性实施例示出的同VPC不同子网下的东西向流量的示意图。Fig. 4 is a schematic diagram of east-west traffic under different subnets of the same VPC according to an exemplary embodiment.
图5是根据一示例性实施例示出的访问互联网时的南北向流量的示意图。Fig. 5 is a schematic diagram of north-south traffic when accessing the Internet according to an exemplary embodiment.
图6是根据一示例性实施例示出的现有的VPC网络实现模型的示意图。Fig. 6 is a schematic diagram showing an existing VPC network implementation model according to an exemplary embodiment.
图7是根据一示例性实施例示出的改进后的VPC对等连接网络模型的示意图。Fig. 7 is a schematic diagram of an improved VPC peer-to-peer connection network model according to an exemplary embodiment.
图8是根据一示例性实施例示出的跨VPC的流量转发方法的方法流程图。Fig. 8 is a flow chart of a method for cross-VPC traffic forwarding according to an exemplary embodiment.
图9是根据一示例性实施例示出的VPC对等网关集群中的网关节点采取分组形式的示意图。Fig. 9 is a schematic diagram showing gateway nodes in a VPC peer-to-peer gateway cluster in a group form according to an exemplary embodiment.
图10是根据一示例性实施例示出的网关节点的网络模型的示意图。Fig. 10 is a schematic diagram showing a network model of a gateway node according to an exemplary embodiment.
图11是根据一示例性实施例示出的跨VPC的流量转发方法的方法流程图。Fig. 11 is a flow chart of a cross-VPC traffic forwarding method according to an exemplary embodiment.
图12是根据一示例性实施例示出的在br-tun中进行流表匹配的示意图。Fig. 12 is a schematic diagram showing flow table matching in br-tun according to an exemplary embodiment.
图13是根据一示例性实施例示出的在br-south中进行流表匹配的示意图。Fig. 13 is a schematic diagram showing flow table matching in br-south according to an exemplary embodiment.
图14是根据一示例性实施例示出的在br-conjoin中进行流表匹配的示意图。Fig. 14 is a schematic diagram showing flow table matching in br-conjoin according to an exemplary embodiment.
图15是根据一示例性实施例示出的跨VPC的流量转发过程的示意图。Fig. 15 is a schematic diagram showing a traffic forwarding process across VPCs according to an exemplary embodiment.
图16是根据一示例性实施例示出的一种跨VPC的流量转发装置的结构方框图。Fig. 16 is a structural block diagram of a cross-VPC traffic forwarding device according to an exemplary embodiment.
图17是根据一示例性实施例示出的一种跨VPC的流量转发装置的结构方框图。Fig. 17 is a structural block diagram of a cross-VPC traffic forwarding device according to an exemplary embodiment.
图18是根据一示例性实施例示出的一种跨VPC的流量转发装置的结构方框图。Fig. 18 is a structural block diagram of a cross-VPC traffic forwarding device according to an exemplary embodiment.
图19是根据本申请一示例性实施例提供的一种计算机设备示意图。Fig. 19 is a schematic diagram of a computer device provided according to an exemplary embodiment of the present application.
具体实施方式detailed description
下面将结合附图对本申请的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Apparently, the described embodiments are some of the embodiments of the present application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
应理解,在本申请的实施例中提到的“指示”可以是直接指示,也可以是间接指示,还可以是表示具有关联关系。举例说明,A指示B,可以表示A直接指示B,例如B可以通过A获取;也可以表示A间接指示B,例如A指示C,B可以通过C获取;还可以表示A和B之间具有关联关系。It should be understood that the "indication" mentioned in the embodiments of the present application may be a direct indication, may also be an indirect indication, and may also mean that there is an association relationship. For example, A indicates B, which can mean that A directly indicates B, for example, B can be obtained through A; it can also indicate that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also indicate that there is an association between A and B relation.
在本申请实施例的描述中,术语“对应”可表示两者之间具有直接对应或间接对应的关系,也可以表示两者之间具有关联关系,也可以是指示与被指示、配置与被配置等关系。In the description of the embodiments of the present application, the term "corresponding" may indicate that there is a direct or indirect correspondence between the two, or that there is an association between the two, or that it indicates and is indicated, configuration and is configuration etc.
本申请实施例中,“预定义”可以通过在设备(例如,包括终端设备和网络设备)中预先保存相应的代码、表格或其他可用于指示相关信息的方式来实现,本申请对于其具体的实现方式不做限定。In the embodiment of this application, "predefinition" can be realized by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in devices (for example, including terminal devices and network devices). The implementation method is not limited.
在对本申请所示的各个实施例进行说明之前,首先对本申请涉及到的概念进行介绍。Before describing the various embodiments shown in the application, the concepts involved in the application are firstly introduced.
虚拟私有云(Virtual Private Cloud,VPC)Virtual Private Cloud (VPC)
从计算节点和网络节点这两个角度来介绍VPC。VPC is introduced from the perspectives of computing nodes and network nodes.
图1示出了计算节点内部的虚拟网络的情况,主要包含如下元素:Figure 1 shows the situation of the virtual network inside the computing node, which mainly includes the following elements:
·VM:即虚拟机(Virtual Machine),包含云桌面、云主机以及一些虚拟网络功能(Virtual Network Feature,VNF)网元(如vFW、虚拟专用网络(Virtual Private Network,VPN)、vCPE等)。VM: Virtual Machine (Virtual Machine), including cloud desktops, cloud hosts, and some virtual network function (Virtual Network Feature, VNF) network elements (such as vFW, virtual private network (Virtual Private Network, VPN), vCPE, etc.).
·qbrxxx:LinuxBridge,用于为VM提供安全组功能。qbrxxx: LinuxBridge, used to provide security group functions for VMs.
·DHCP:即动态主机配置协议(Dynamic Host Configuration Protocol),通常一个VPC会对应多个DHCP实例(集群),为VM自动分配IP地址、DNS等地址以提供网络服务。DHCP会由控制节点按照一定的调度策略均匀地分散到每个计算节点上。·DHCP: Dynamic Host Configuration Protocol (Dynamic Host Configuration Protocol), usually a VPC will correspond to multiple DHCP instances (clusters), and automatically assign IP addresses, DNS and other addresses to VMs to provide network services. DHCP will be evenly distributed to each computing node by the control node according to a certain scheduling strategy.
·DVR:即分布式虚拟路由器(Distributed Virtual Router),一个VPC会对应一个DVR。当某个计算节点上存在此VPC的VM实例时,则相应地会在该计算节点创建DVR。DVR为VM私有网络的默认网关,涉及VM跨网段访问的流量(含东西向和南北向流量)都需要经过DVR进行三层转发。同时,DVR还提供了灵活的、可自定义的路由规则接口,便于实现不同业务流量的牵引,具体将在下文中进行介绍。·DVR: Distributed Virtual Router (Distributed Virtual Router), a VPC will correspond to a DVR. When a VM instance of this VPC exists on a computing node, a DVR will be created on the computing node accordingly. The DVR is the default gateway of the VM private network, and traffic involving cross-segment VM access (including east-west and north-south traffic) needs to be forwarded through the DVR at Layer 3. At the same time, DVR also provides a flexible and customizable routing rule interface, which facilitates the traction of different service traffic, which will be introduced in the following sections.
·FIP:即文件传输协议(File Transfer Protocol),可看做是本地网关,一个计算节点只会存在一个,为本节点上的所有租户共享,主要用于支撑本计算节点上的VM直接从本节点访问外网(含互联网)。例如,本计算节点上的某个VM单独绑定了弹性IP的场景。· FIP: File Transfer Protocol (File Transfer Protocol), which can be regarded as a local gateway. There will only be one computing node, which is shared by all tenants on this node. It is mainly used to support the direct transfer of VMs on this computing node Nodes access the external network (including the Internet). For example, a VM on the local computing node is individually bound to an elastic IP.
·br-int:OpenVswitch,通过内部虚拟局域网(Virtual Local Area Network,VLAN)做到节点内不同VPC之间的逻辑隔离,通过流表实现二层转发。·br-int: OpenVswitch, through the internal virtual local area network (Virtual Local Area Network, VLAN) to achieve logical isolation between different VPCs in the node, and realize layer-2 forwarding through the flow table.
·br-tun:OpenVswitch,主要用于实现局部VLAN和全局虚拟扩展局域网(VirtualeXtensible Local Area Network,VXLAN)之间的转换。VXLAN逻辑子接口绑定到br-tun网桥上,与其他计算节点、网络节点以及虚拟网关节点之间建立VXLAN隧道,通过流表实现跨节点的VPC网络互访。·br-tun: OpenVswitch, mainly used to realize the conversion between local VLAN and global Virtual Extended Local Area Network (VirtualeXtensible Local Area Network, VXLAN). The VXLAN logical sub-interface is bound to the br-tun bridge, and VXLAN tunnels are established with other computing nodes, network nodes, and virtual gateway nodes, and cross-node VPC network access is realized through the flow table.
·br-ex:OpenVswitch,绑定一个VLAN逻辑子接口,为本节点的VM访问外部网络提供通道。·br-ex: OpenVswitch, bind a VLAN logical sub-interface to provide a channel for the VM of this node to access the external network.
·业务网卡:2个10G网卡做逻辑捆绑,为租户网络跨节点的互访提供underlay承载。·Service network card: Two 10G network cards are logically bundled to provide underlay bearer for cross-node mutual access of tenant networks.
图2示出了网络节点内部的虚拟网络的情况,包含的元素除网络地址转换(Network Address Translation,NAT)网关之外,其余的元素都和计算节点所述的一致:Figure 2 shows the situation of the virtual network inside the network node, and the elements included are consistent with those described by the computing node except for the network address translation (Network Address Translation, NAT) gateway:
·NAT网关:一个VPC会对应一个NAT实例,考虑到高可用,会部署主备两个实例,分别落在不同的网络节点。当主节点故障,则将备节点切换为主节点继续承载流量。NAT网关主要提供源网络地址转换(Source Network Address Translation,SNAT)和目的网络地址转换(Destination Network Address Translation,DNAT)两种业务形态,主要为VM访问互联网或被互联网访问提供地址转换的网络服务。· NAT gateway: A VPC corresponds to a NAT instance. Considering high availability, two instances, active and standby, will be deployed on different network nodes. When the primary node fails, the standby node is switched to the primary node to continue carrying traffic. The NAT gateway mainly provides two business forms, Source Network Address Translation (SNAT) and Destination Network Address Translation (DNAT), and mainly provides address translation network services for VMs to access the Internet or be accessed by the Internet.
业务流量的牵引Traction of business traffic
主要从东西向流量和南北向流量进行阐述,且仅介绍跨节点的场景。It is mainly described from east-west traffic and north-south traffic, and only cross-node scenarios are introduced.
·东西向流量·East-west flow
在同VPC同子网的情况下,如图3所示,不涉及三层转发,通过VXLAN隧道送到目标计算节点。In the case of the same VPC and the same subnet, as shown in Figure 3, no Layer 3 forwarding is involved, and the data is sent to the target computing node through the VXLAN tunnel.
在同VPC不同子网的情况下,如图4所示,涉及三层转发,因此需要经过DVR,在DVR上匹配路由规则,转发至另外一个子网,再通过VXLAN隧道送至目标计算节点。In the case of different subnets of the same VPC, as shown in Figure 4, it involves three-layer forwarding, so it needs to go through the DVR, match the routing rules on the DVR, forward to another subnet, and then send it to the target computing node through the VXLAN tunnel.
·南北向流量·North-south flow
在访问互联网时,实现此种业务流量存在多种方式,主要有:NAT网关方式、vFW方式、专线方式、Ipsec VPN方式、vCPE方式。而实现这些主要是靠DVR所提供的自定义策略路由框架。VM访问互联网的流量首先递送到DVR,再由DVR的策略路由决定采用何种方式进行。图5示出了NAT网关的方式,其他的方式也是类似的。When accessing the Internet, there are many ways to realize this kind of business traffic, mainly including: NAT gateway way, vFW way, leased line way, IPsec VPN way, vCPE way. The realization of these mainly depends on the self-defined policy routing framework provided by DVR. The traffic of the VM accessing the Internet is first delivered to the DVR, and then the policy routing of the DVR decides which method to use. Fig. 5 shows the manner of the NAT gateway, and other manners are similar.
在访问客户侧内网时,实现此种业务流量同样存在多种方式,主要有:专线方式、Ipsec VPN方式、vCPE方式。而实现这些主要是靠DVR所提供的自定义策略路由框架。VM访问客户侧内网的流量首先递送到DVR,再由DVR的策略路由决定采用何种方式进行。When accessing the intranet on the client side, there are also many ways to realize this kind of business traffic, mainly including: leased line mode, IPsec VPN mode, and vCPE mode. The realization of these mainly depends on the self-defined policy routing framework provided by DVR. The traffic of the VM accessing the intranet on the client side is first delivered to the DVR, and then the policy routing of the DVR decides which method to use.
相关技术中,尚不支持跨VPC之间的互通。结合参考图6,现有的VPC网络实现模型如上图6所示。其中,一些技术细节如下:In related technologies, intercommunication across VPCs is not yet supported. With reference to FIG. 6 , the existing VPC network implementation model is shown in FIG. 6 above. Among them, some technical details are as follows:
·DVR实例里只有直连路由规则及下一跳为NAT网关的默认路由规则。·In the DVR instance, there are only direct routing rules and default routing rules whose next hop is NAT gateway.
·VPC内,同子网互通之间二层转发即可,跨子网互通则经过DVR匹配路由执行三层转发。·In the VPC,
·VPC内,对于南北向流量(例如:访问公网、访问客户侧),经过DVR匹配下一跳为NAT网关的默认路由规则或自定义的下一跳为VPN或虚拟网关的路由规则。·In the VPC, for north-south traffic (for example: access to the public network, access to the client side), the DVR matches the default routing rule with the next hop as the NAT gateway or the custom routing rule with the next hop as the VPN or virtual gateway.
为了支持跨VPC的互通,本申请提供了一种跨VPC的流量转发方法,为第一VPC、第二VPC之间的VPC对等连接引入了VPC对等网关集群,第一VPC可以对在生成对等连接流量之后,对该对等连接流量的MAC地址进行修改,由第三MAC地址信息修改为第一MAC地址信息,以基于修改后的第一MAC地址,将对等连接流量发送给VPC对等网关集群,VPC对等网关集群在接收对等连接流量之后,将对等连接流量的MAC地址信息由与第一VPC相关的第一MAC地址信息修改为与第二VPC相关的第二MAC地址信息,以基于修改后的第二MAC地址信息,向第二VPC发送对等连接流量,第二VPC在接收对等连接流量之后,将对等连接流量的MAC地址进行修改,由第二MAC地址信息修改为第四MAC地址信息,以将该对等连接流量发送到目的VM,从而实现跨VPC的流量转发。In order to support cross-VPC intercommunication, this application provides a cross-VPC traffic forwarding method, which introduces a VPC peer-to-peer gateway cluster for the VPC peer-to-peer connection between the first VPC and the second VPC, and the first VPC can generate After peering connection traffic, modify the MAC address of the peering connection traffic from the third MAC address information to the first MAC address information, so as to send the peering connection traffic to the VPC based on the modified first MAC address Peer-to-peer gateway cluster, after receiving the peer-to-peer connection traffic, the VPC peer-to-peer gateway cluster modifies the MAC address information of the peer-to-peer connection traffic from the first MAC address information related to the first VPC to the second MAC address information related to the second VPC The address information is used to send the peer-to-peer connection flow to the second VPC based on the modified second MAC address information, and the second VPC modifies the MAC address of the peer-to-peer connection flow after receiving the peer-to-peer connection flow, and the second MAC The address information is modified to the fourth MAC address information, so as to send the peer-to-peer connection traffic to the destination VM, so as to realize cross-VPC traffic forwarding.
例如,结合参考图7,VPC1和VPC2通过VPC对等网关集群实现对等连接,VPC1中的VM可以向VPC2中的VM发送流量。For example, with reference to FIG. 7 , VPC1 and VPC2 implement a peer-to-peer connection through a VPC peer-to-peer gateway cluster, and a VM in VPC1 can send traffic to a VM in VPC2.
下面,结合如下几个实施例对本申请提供的技术方案进行说明。In the following, the technical solution provided by the present application will be described in conjunction with the following several embodiments.
图8是根据一示例性实施例示出的跨VPC的流量转发方法的方法流程图。该方法应用于VPC对等连接网络中,该VPC对等连接网络包括:第一VPC、VPC对等网关集群、第二VPC。如图8所示,该跨VPC的流量转发方法可以包括如下步骤:Fig. 8 is a flow chart of a method for cross-VPC traffic forwarding according to an exemplary embodiment. The method is applied in a VPC peer-to-peer connection network, and the VPC peer-to-peer connection network includes: a first VPC, a VPC peer-to-peer gateway cluster, and a second VPC. As shown in Figure 8, the cross-VPC traffic forwarding method may include the following steps:
步骤801:第一VPC生成对等连接流量,对等连接流量的MAC地址信息为第三MAC地址信息,第三MAC地址信息与第一VPC中的第一DVR的MAC地址、第一VPC中的第一VM的MAC地址相关。Step 801: The first VPC generates peer-to-peer connection traffic, the MAC address information of the peer-to-peer connection traffic is the third MAC address information, and the third MAC address information is the same as the MAC address of the first DVR in the first VPC, the MAC address of the first VPC in the first VPC The MAC address of the first VM is related.
其中,对等连接流量是跨VPC的流量。在本申请实施例中,对等连接流量由第一VPC中的第一VM生成,期望到达第二VPC中的第二VM。Among them, peering connection traffic is cross-VPC traffic. In this embodiment of the present application, the peering connection traffic is generated by the first VM in the first VPC and is expected to reach the second VM in the second VPC.
在进行跨VPC的流量转发时,涉及三层转发,需要经过VPC内的DVR。因此,对等连接流量在生成时对应第三MAC地址信息,在第三MAC地址信息中,指示该对等连接流量的源MAC地址为第一VPC中的第一VM的MAC地址,该对等连接流量的目的MAC地址为第一VPC中的第一DVR的MAC地址。When forwarding traffic across VPCs, it involves layer-3 forwarding and needs to go through the DVR in the VPC. Therefore, when the peer-to-peer connection traffic is generated, it corresponds to the third MAC address information. In the third MAC address information, it indicates that the source MAC address of the peer-to-peer connection traffic is the MAC address of the first VM in the first VPC. The destination MAC address of the connection traffic is the MAC address of the first DVR in the first VPC.
步骤802:第一VPC将对等连接流量的MAC地址信息由第三MAC地址信息修改为第一MAC地址信息,第一MAC地址信息与第一VPC中的第一DVR的MAC地址、第一VPC中的第一子网所预留的第一对等端口的MAC地址相关。Step 802: The first VPC modifies the MAC address information of the peer-to-peer connection traffic from the third MAC address information to the first MAC address information, and the first MAC address information is consistent with the MAC address of the first DVR in the first VPC, the first VPC related to the MAC address of the first peer port reserved by the first subnet in .
在本申请实施例中,为每个子网创建对应的对等端口,该对等端口对应有一对IP/MAC地址。在基于初始的第三MAC地址信息完成对等连接流量在第一VPC内的转发,到达第一VPC中的第一DVR后,第一DVR将对等连接流量的MAC地址信息由第三MAC地址信息修改为第一MAC地址信息,以实现流量的下一步转发。In the embodiment of the present application, a corresponding peer port is created for each subnet, and the peer port corresponds to a pair of IP/MAC addresses. After completing the forwarding of the peering connection traffic in the first VPC based on the initial third MAC address information and reaching the first DVR in the first VPC, the first DVR converts the MAC address information of the peering connection traffic from the third MAC address The information is modified to the first MAC address information, so as to realize the next step of traffic forwarding.
其中,在第一MAC地址信息中,指示该对等连接流量的源MAC地址为第一VPC中的第一DVR的MAC地址,该对等连接流量的目的MAC地址为第一VPC中的第一子网所预留的第一对等端口的MAC地址。Wherein, in the first MAC address information, it indicates that the source MAC address of the peer-to-peer connection traffic is the MAC address of the first DVR in the first VPC, and the destination MAC address of the peer-to-peer connection traffic is the first DVR in the first VPC. MAC address of the first peer port reserved by the subnet.
步骤803:第一VPC将地址信息修改后的对等连接流量发送至VPC对等网关集群。Step 803: the first VPC sends the peer-to-peer connection traffic after the address information is modified to the VPC peer-to-peer gateway cluster.
相应的,VPC对等网关集群接收第一VPC发送的对等连接流量,且对等连接流量的MAC地址信息为第一MAC地址信息,第一MAC地址信息与第一VPC中的第一DVR的MAC地址、第一VPC中的第一子网所预留的第一对等端口的MAC地址相关。Correspondingly, the VPC peer-to-peer gateway cluster receives the peer-to-peer connection traffic sent by the first VPC, and the MAC address information of the peer-to-peer connection traffic is the first MAC address information, and the first MAC address information and the first DVR in the first VPC The MAC address is related to the MAC address of the first peer port reserved by the first subnet in the first VPC.
由于第一VPC中的第一DVR将对等连接流量的MAC地址信息由第三MAC地址信息修改为第一MAC地址信息,第一VPC可以后续基于第一MAC地址信息,将对等连接流量引向至VPC对等网关集群。Since the first DVR in the first VPC modifies the MAC address information of the peer-to-peer connection traffic from the third MAC address information to the first MAC address information, the first VPC can subsequently redirect the peer-to-peer connection traffic based on the first MAC address information. to the VPC peering gateway cluster.
步骤804:VPC对等网关集群将对等连接流量的MAC地址信息由第一MAC地址信息修改为第二MAC地址信息,第二MAC地址信息与第二VPC中的第二DVR的MAC地址、第二VPC中的第二子网所预留的第二对等端口的MAC地址相关。Step 804: The VPC peer-to-peer gateway cluster modifies the MAC address information of the peer-to-peer connection traffic from the first MAC address information to the second MAC address information, and the second MAC address information is consistent with the MAC address of the second DVR in the second VPC, the second The MAC address of the second peer port reserved by the second subnet in the two VPCs is related.
为了将对等连接流量发送到第二VPC,VPC对等网关集群对对等对接流量的MAC地址信息进行修改,从与第一VPC相关的第一MAC地址信息修改为与第二VPC相关的第二MAC信息。In order to send the peering connection traffic to the second VPC, the VPC peering gateway cluster modifies the MAC address information of the peering traffic from the first MAC address information related to the first VPC to the first MAC address information related to the second VPC. Two MAC information.
其中,在第二MAC地址信息中,指示该对等连接流量的源MAC地址为第二VPC中的第二子网所预留的第二对等端口的MAC地址,该对等连接流量的目的MAC地址为第二VPC中的第二DVR的MAC地址。Wherein, in the second MAC address information, it indicates that the source MAC address of the peer-to-peer connection traffic is the MAC address of the second peer-to-peer port reserved by the second subnet in the second VPC, and the purpose of the peer-to-peer connection traffic is The MAC address is the MAC address of the second DVR in the second VPC.
步骤805:VPC对等网关集群将地址信息修改后的对等连接流量发送至第二VPC。Step 805: The VPC peer-to-peer gateway cluster sends the peer-to-peer connection traffic with the address information modified to the second VPC.
相应的,第二VPC接收VPC对等网关集群发送的对等连接流量,且对等连接流量的MAC地址信息为第二MAC地址信息,第二MAC地址信息与第二VPC中的第二DVR的MAC地址、第二VPC中的第二子网所预留的第二对等端口的MAC地址相关。Correspondingly, the second VPC receives the peer-to-peer connection traffic sent by the VPC peer-to-peer gateway cluster, and the MAC address information of the peer-to-peer connection traffic is the second MAC address information, and the second MAC address information is the same as that of the second DVR in the second VPC. The MAC address is related to the MAC address of the second peer port reserved by the second subnet in the second VPC.
步骤806:第二VPC将对等连接流量的MAC地址信息由第二MAC地址信息修改为第四MAC地址信息,第四MAC地址信息与第二VPC中的第二DVR的MAC地址、第二VPC中的第二VM的MAC地址相关。Step 806: The second VPC modifies the MAC address information of the peer-to-peer connection traffic from the second MAC address information to the fourth MAC address information, and the fourth MAC address information is the same as the MAC address of the second DVR in the second VPC, the second VPC related to the MAC address of the second VM in the
在对等连接流量到达第二VPC中的第二DVR后,第二DVR将对等连接流量的MAC地址信息由第二MAC地址信息修改为第四MAC地址信息,以实现流量的下一步转发。After the peer-to-peer connection traffic reaches the second DVR in the second VPC, the second DVR modifies the MAC address information of the peer-to-peer connection traffic from the second MAC address information to the fourth MAC address information, so as to realize the next step forwarding of the traffic.
其中,在第四MAC地址信息中,指示该对等连接流量的源MAC地址为第二VPC中的第二DVR的MAC地址,该对等连接流量的目的MAC地址为第二VPC中的第二VM的MAC地址。Wherein, in the fourth MAC address information, it indicates that the source MAC address of the peer-to-peer connection traffic is the MAC address of the second DVR in the second VPC, and the destination MAC address of the peer-to-peer connection traffic is the second DVR in the second VPC. The MAC address of the VM.
步骤807:第二VPC将地址信息修改后的对等连接流量发送至第二VM。Step 807: the second VPC sends the peer-to-peer connection traffic with the address information modified to the second VM.
综上所述,本实施例提供的跨VPC的流量转发方法,为第一VPC、第二VPC之间的VPC对等连接引入了VPC对等网关集群,第一VPC可以对在生成对等连接流量之后,对该对等连接流量的MAC地址进行修改,由第三MAC地址信息修改为第一MAC地址信息,以基于修改后的第一MAC地址,将对等连接流量发送给VPC对等网关集群,VPC对等网关集群在接收对等连接流量之后,将对等连接流量的MAC地址信息由与第一VPC相关的第一MAC地址信息修改为与第二VPC相关的第二MAC地址信息,以基于修改后的第二MAC地址信息,向第二VPC发送对等连接流量,第二VPC在接收对等连接流量之后,将对等连接流量的MAC地址进行修改,由第二MAC地址信息修改为第四MAC地址信息,以将该对等连接流量发送到目的VM,从而实现跨VPC的流量转发。To sum up, the cross-VPC traffic forwarding method provided in this embodiment introduces a VPC peer-to-peer gateway cluster for the VPC peer-to-peer connection between the first VPC and the second VPC, and the first VPC can generate a peer-to-peer connection After the traffic flow, modify the MAC address of the peering connection traffic from the third MAC address information to the first MAC address information, so as to send the peering connection traffic to the VPC peering gateway based on the modified first MAC address After the cluster, the VPC peer-to-peer gateway cluster receives the peer-to-peer connection traffic, it modifies the MAC address information of the peer-to-peer connection traffic from the first MAC address information related to the first VPC to the second MAC address information related to the second VPC, Based on the modified second MAC address information, the peer-to-peer connection traffic is sent to the second VPC, and the second VPC modifies the MAC address of the peer-to-peer connection traffic after receiving the peer-to-peer connection traffic, and the second MAC address information modifies It is the fourth MAC address information, so as to send the peering connection traffic to the destination VM, so as to realize cross-VPC traffic forwarding.
下面,对上文的对等端口进行进一步说明。In the following, the peer-to-peer port above will be further explained.
在一种可能的实现方式中,第一对等端口的MAC地址、第二对等端口的MAC地址对应于预设MAC地址前缀,预设MAC地址前缀用于在流量的流表匹配过程中,标识流量属于跨VPC转发的流量。In a possible implementation manner, the MAC address of the first peer port and the MAC address of the second peer port correspond to a preset MAC address prefix, and the preset MAC address prefix is used in the flow table matching process of the traffic, Indicates that the traffic belongs to the traffic forwarded across VPCs.
对于建立对等连接的VPC,从每一个子网下创建一个Neutron Port,其device_owner设计为“network:peering”,简称对等端口(Peering Port)。修改原生Neutron Port分配MAC的机制,对于对等端口而言(通过匹配device_owner为“network:peering”),定制如以fa:17:02:00:00:00为固定的预设MAC地址前缀。For the VPC that establishes a peering connection, a Neutron Port is created under each subnet, and its device_owner is designed as "network:peering", referred to as a Peering Port (Peering Port). Modify the mechanism of assigning MAC to the native Neutron Port. For peer ports (by matching device_owner to "network:peering"), customize the fixed preset MAC address prefix such as fa:17:02:00:00:00.
其中,对等端口有如下几个作用:Among them, the peer port has the following functions:
·对等端口会分配一个IP地址,会用于在DVR实例里配置对等连接路由规则,其下一跳即为这个预留的IP。·The peer-to-peer port will be assigned an IP address, which will be used to configure peer-to-peer connection routing rules in the DVR instance, and its next hop is the reserved IP.
·对等端口会分配一个MAC地址,如以fa:17:02:00:00:00为固定的预设MAC地址前缀,其目的就是为了在ovs网桥上通过编排流表的方式,匹配此预设MAC地址前缀,实现对等连接流量的精确识别。同时,采用固定的预设MAC地址前缀进行流表匹配,还能够大量减少流表的配置数量。The peer port will assign a MAC address, such as fa:17:02:00:00:00 as the fixed preset MAC address prefix, the purpose of which is to match this MAC address by arranging the flow table on the ovs bridge Preset MAC address prefix to realize accurate identification of peer-to-peer connection traffic. At the same time, using a fixed preset MAC address prefix for flow table matching can also greatly reduce the number of flow table configurations.
下面,对上文所述的VPC对等网关集群进行进一步说明。Next, the VPC peer-to-peer gateway cluster described above will be further described.
在一种可能的实现方式中,VPC对等网关集群中的网关节点采取了分组形式,VPC对等网关集群包括至少一组网关节点组,每组网关节点组中包括至少一个网关节点,第一VPC与第二VPC之间的对等连接由至少一组网关节点组中的目标网关节点组承载。In a possible implementation, the gateway nodes in the VPC peer-to-peer gateway cluster are grouped, and the VPC peer-to-peer gateway cluster includes at least one gateway node group, each gateway node group includes at least one gateway node, the first The peer-to-peer connection between the VPC and the second VPC is carried by a target gateway node group in at least one set of gateway node groups.
示例性的,结合参考图9,VPC对等网关集群包括3个网关节点组:Group1、Groop2和Group3。其中,Group1中包括1个网关节点,Group2中包括2个网关节点,Group3中包括3个网关节点。Exemplarily, with reference to FIG. 9 , the VPC peer-to-peer gateway cluster includes three gateway node groups: Group1, Groop2 and Group3. Wherein, Group1 includes 1 gateway node, Group2 includes 2 gateway nodes, and Group3 includes 3 gateway nodes.
其中,1组网关节点组可以承载多条对等连接。在创建对等连接时,会选择最空闲(即:承载对等连接数最少)的组为这条对等连接的网关节点组。网关节点组及其承载的对等连接数量会记录在数据库中。Wherein, one group of gateway node groups can carry multiple peer-to-peer connections. When creating a peer-to-peer connection, the group that is the most idle (that is, carries the least number of peer-to-peer connections) will be selected as the gateway node group for this peer-to-peer connection. The gateway node group and the number of peer connections it hosts are recorded in the database.
其中,可以根据业务量的变化灵活扩缩容每个网关节点组内的网关节点。Wherein, the gateway nodes in each gateway node group can be flexibly scaled up and down according to the change of business volume.
其中,通过监控网关节点组内的网关成员的工作状态,若发现某成员出现故障时,可自动将之置为“禁用”状态。于此同时,管理员也可以通过命令行方式强制将组内某成员置为“禁用”状态。处于“禁用”状态的成员将不再参与对等连接流量的转发,待恢复为“可用”状态后,又继续承载流量转发。Among them, by monitoring the working status of the gateway members in the gateway node group, if a member is found to be faulty, it can be automatically set to the "disabled" state. At the same time, the administrator can also force a member of the group to be in the "disabled" state through the command line. Members in the "Disabled" state will no longer participate in the forwarding of peer-to-peer connection traffic, and will continue to carry traffic forwarding after returning to the "Available" state.
其中,网关节点组本身也有一个状态,默认创建的时候为“可用”,处于“可用”状态的组会参与分配与调度。管理员可通过命令行的方式将之置为“禁用””状态,处于“禁用”状态的组将不会参与分配与调度。Among them, the gateway node group itself also has a state, which is "available" when it is created by default, and the group in the "available" state will participate in allocation and scheduling. The administrator can set it to the "disabled" state through the command line, and the group in the "disabled" state will not participate in the allocation and scheduling.
其中,可以将某条对等连接以组的粒度从一个组迁移到另外一个组。Among them, a certain peering connection can be migrated from one group to another group at the granularity of the group.
在一种可能的实现方式中,VPC对等网关集群中的网关节点包括:br-conjoin、br-south,br-south上创建有与VPC通信的接口,且br-conjoin和br-south之间为每一个VPC建立有Veth Pair。In a possible implementation, the gateway nodes in the VPC peer-to-peer gateway cluster include: br-conjoin, br-south, br-south has an interface for communicating with the VPC, and the connection between br-conjoin and br-south A Veth Pair is established for each VPC.
结合参考图10,其示出了网关节点里抽象的虚拟网络模型,分为几个部分:Combined with reference to Figure 10, it shows the abstract virtual network model in the gateway node, which is divided into several parts:
·两个OVS网桥,分别为br-conjoin、br-south。Two OVS bridges, namely br-conjoin and br-south.
·br-south上会创建VXLAN子接口,与VM所在的计算节点建立VXLAN隧道。A VXLAN sub-interface will be created on br-south to establish a VXLAN tunnel with the computing node where the VM resides.
·br-south和br-conjoin之间会为对等连接的每一个VPC建立Veth Pair,分别桥接于两个OVS网桥。·Between br-south and br-conjoin, a Veth Pair will be established for each VPC of the peer-to-peer connection, and bridged to two OVS bridges respectively.
其中,上述虚拟网络模型的设计基于如下几点考虑:Among them, the design of the above virtual network model is based on the following considerations:
·采用2个OVS网桥而非只用1个OVS网桥的原因:避免出现流量从某个VXLAN子接口进入,经流表处理后再从相同的VXLAN子接口出去,即:源端口进源端口出,最终导致OVS丢包问题。The reason for using 2 OVS bridges instead of only 1 OVS bridge: to avoid traffic entering from a certain VXLAN sub-interface, and then go out from the same VXLAN sub-interface after the flow table processing, that is: the source port enters the source The port is out, which eventually leads to OVS packet loss.
·2个OVS网桥之间为每一个VPC建立Veth Pair的原因:在br-south网桥接收到对等连接流量时,能够提取出VXLAN隧道ID值,进而通过匹配VXLAN隧道ID值实现不同VPC对等连接流量的区分。然而VXLAN隧道ID并不会继续传递到br-conjoin网桥,即br-conjoin网桥无法看到VXLAN隧道ID值。因此,通过建立Veth Pair,直接匹配对应的输入端口(IN_PORT)来实现不同VPC对等连接流量的区分。The reason why Veth Pair is established for each VPC between two OVS bridges: When the br-south bridge receives the peer-to-peer connection traffic, it can extract the VXLAN tunnel ID value, and then realize different VPCs by matching the VXLAN tunnel ID value Differentiation of peer-to-peer traffic. However, the VXLAN tunnel ID will not continue to be passed to the br-conjoin bridge, that is, the br-conjoin bridge cannot see the VXLAN tunnel ID value. Therefore, by establishing a Veth Pair, directly match the corresponding input port (IN_PORT) to realize the distinction of different VPC peering connection traffic.
下面,对上文所述的DVR进行进一步说明。Next, the above-mentioned DVR will be further described.
在一种可能的实现方式中,在DVR实例里,在已有的策略路由表中增加对等连接路由规则,其中下一跳为预留的对等端口的IP地址。In a possible implementation manner, in the DVR instance, a peer-to-peer connection routing rule is added to an existing policy routing table, where the next hop is the IP address of the reserved peer-to-peer port.
示例性的,结合参考下表,表中所列举的为当前DVR实例里包含的策略路由表及其各表包含的路由规则。为了实现对等连接,在本地子网表这个策略路由表里,配置对等连接路由规则,其下一跳为该子网对应预留的对等端口的IP地址。根据配置的对等连接路由规则,实现VM在本地计算节点即可完成对等连接流量的三层路由转发。Exemplarily, refer to the following table, which lists the policy routing tables contained in the current DVR instance and the routing rules contained in each table. In order to realize the peer-to-peer connection, configure the peer-to-peer connection routing rule in the policy routing table of the local subnet table, and its next hop is the IP address of the peer-to-peer port corresponding to the subnet. According to the configured peer-to-peer connection routing rules, the VM can complete the Layer 3 routing and forwarding of the peer-to-peer connection traffic on the local computing node.
图11是根据一示例性实施例示出的跨VPC的流量转发方法的方法流程图。该方法应用于VPC对等连接网络中,该VPC对等连接网络包括:第一VPC、VPC对等网关集群、第二VPC。如图11所示,该跨VPC的流量转发方法可以包括如下步骤:Fig. 11 is a flow chart of a cross-VPC traffic forwarding method according to an exemplary embodiment. The method is applied in a VPC peer-to-peer connection network, and the VPC peer-to-peer connection network includes: a first VPC, a VPC peer-to-peer gateway cluster, and a second VPC. As shown in Figure 11, the cross-VPC traffic forwarding method may include the following steps:
步骤1101:第一VPC中的第一VM生成对等连接流量,对等连接流量的源MAC地址为第一VPC中的第一VM的MAC地址,对等连接流量的目的MAC地址为第一VPC中的第一DVR的MAC地址。Step 1101: The first VM in the first VPC generates peering connection traffic, the source MAC address of the peering connection traffic is the MAC address of the first VM in the first VPC, and the destination MAC address of the peering connection traffic is the first VPC in the MAC address of the first DVR.
步骤1102:第一VPC中的第一VM将对等连接流量发送至第一VPC中的第一DVR。Step 1102: the first VM in the first VPC sends peering connection traffic to the first DVR in the first VPC.
相应的,第一VPC中的第一DVR接收第一VPC中的第一VM发送的对等连接流量,对等连接流量的源MAC地址为第一VPC中的第一VM的MAC地址,对等连接流量的目的MAC地址为第一VPC中的第一DVR的MAC地址。Correspondingly, the first DVR in the first VPC receives the peer-to-peer connection traffic sent by the first VM in the first VPC, and the source MAC address of the peer-to-peer connection traffic is the MAC address of the first VM in the first VPC. The destination MAC address of the connection traffic is the MAC address of the first DVR in the first VPC.
步骤1103:第一VPC中的第一DVR基于对等连接路由规则,将对等连接流量的源MAC地址由第一VPC中的第一VM的MAC地址修改为第一VPC中的第一DVR的MAC地址,将对等连接流量的目的MAC地址由第一VPC中的第一DVR的MAC地址修改为第一VPC中的第一子网所预留的第一对等端口的MAC地址。Step 1103: The first DVR in the first VPC modifies the source MAC address of the peer-to-peer connection traffic from the MAC address of the first VM in the first VPC to the MAC address of the first DVR in the first VPC based on the peer-to-peer connection routing rule. MAC address, changing the destination MAC address of the peer-to-peer connection traffic from the MAC address of the first DVR in the first VPC to the MAC address of the first peer-to-peer port reserved by the first subnet in the first VPC.
其中,第一VPC中的第一DVR中包括对等连接路由规则,对等连接路由规则包括:在流量的目的IP地址属于其他VPC的目的网段时,下一跳为流量来自的子网所预留的对等端口的IP地址。Wherein, the first DVR in the first VPC includes peer-to-peer connection routing rules, and the peer-to-peer connection routing rules include: when the destination IP address of the traffic belongs to the destination network segment of another VPC, the next hop is the subnet where the traffic comes from The IP address of the reserved peer port.
步骤1104:第一VPC中的第一DVR将地址信息修改后的对等连接流量发送至VPC对等网关集群中的目标网关。Step 1104: the first DVR in the first VPC sends the peer-to-peer connection traffic with the address information modified to the target gateway in the VPC peer-to-peer gateway cluster.
相应的,VPC对等网关集群中的目标网关接收第一VPC中的第一DVR发送的对等连接流量,且对等连接流量的源MAC地址为第一VPC中的第一DVR的MAC地址、对等连接流量的目的MAC地址为第一VPC中的第一子网所预留的第一对等端口的MAC地址。Correspondingly, the target gateway in the VPC peer-to-peer gateway cluster receives the peer-to-peer connection traffic sent by the first DVR in the first VPC, and the source MAC address of the peer-to-peer connection traffic is the MAC address of the first DVR in the first VPC, The destination MAC address of the peer-to-peer connection traffic is the MAC address of the first peer-to-peer port reserved by the first subnet in the first VPC.
在一种可能的实现方式中,VPC对等网关集群包括至少一组网关节点组,每组网关节点组中包括至少一个网关节点,第一VPC与第二VPC之间的对等连接由至少一组网关节点组中的目标网关节点组承载;第一DVR将地址信息修改后的对等连接流量发送至第一VPC中的br-tun,br-tun中包括目标网关节点组对应的网关节点选择组流表,网关节点选择组流表用于对目标网关节点组中的网关节点进行负载均衡选择;br-tun使用网关节点选择组流表选中目标网关节点组中的目标网关节点;br-tun将地址信息修改后的对等连接流量发送至目标网关节点。In a possible implementation, the VPC peer-to-peer gateway cluster includes at least one set of gateway node groups, each set of gateway node groups includes at least one gateway node, and the peer-to-peer connection between the first VPC and the second VPC is controlled by at least one The target gateway node group in the group gateway node group bears the weight; the first DVR sends the peer-to-peer connection traffic after the address information is modified to the br-tun in the first VPC, and the br-tun includes the gateway node selection corresponding to the target gateway node group Group flow table, gateway node selection group flow table is used to select the gateway node in the target gateway node group for load balancing; br-tun uses the gateway node selection group flow table to select the target gateway node in the target gateway node group; br-tun Send the peer-to-peer connection traffic with the address information modified to the target gateway node.
也即,在VM所在计算节点的br-tun网桥增加精确识别对等连接流量的网关节点选择组流表,将对等连接流量以负载均衡的方式引向VPC对等网关集群。That is, add a gateway node selection group flow table that accurately identifies the peering connection traffic to the br-tun bridge of the computing node where the VM resides, and direct the peering connection traffic to the VPC peering gateway cluster in a load-balanced manner.
示例性的,结合参考图12,对等连接流量经过DVR路由匹配后转发至br-tun进行处理。为了将对等连接流量牵引到所关联的网关节点,在table=20增加了对等连接流量的精确识别:通过匹配对等端口(图中的Peering Port)的MAC前缀及其对等路由的目标网段,命中后,转到此对等连接所关联的目标网关节点组。在目标网关节点组对应的Group流表中,可以通过计算报文的Hash值随机选中目标网关节点组中的某个网关节点,并将流量转发给它(通过VXLAN隧道)。Exemplarily, with reference to FIG. 12 , the peer-to-peer connection traffic is forwarded to the br-tun for processing after being matched by the DVR route. In order to pull the peering connection traffic to the associated gateway node, the precise identification of the peering connection traffic is added in table=20: by matching the MAC prefix of the peer port (Peering Port in the figure) and the target of the peering route Network segment, when hit, go to the target gateway node group associated with this peer connection. In the Group flow table corresponding to the target gateway node group, a gateway node in the target gateway node group can be randomly selected by calculating the hash value of the packet, and the traffic is forwarded to it (through the VXLAN tunnel).
可以理解的是,在网关节点组扩缩容时,这里会更新对应的Group流表,及时做到生效。网关节点组中的网关节点成员故障不可用或被管理员禁用,同样更新对应的Group流表,及时做到生效。对等连接从一个组迁移到另外一个组时,只需要修改这里的转向的Group流表,及时做到生效。It is understandable that when the gateway node group expands or shrinks, the corresponding Group flow table will be updated here to take effect in time. If a gateway node member in the gateway node group fails or is disabled by the administrator, the corresponding Group flow table is also updated to take effect in time. When a peer-to-peer connection is migrated from one group to another, you only need to modify the diverted Group flow table here to take effect in time.
步骤1105:目标网关中的br-south在接收到第一VPC发送的对等连接流量之后,将对等连接流量从第一VPC对应的第一Veth Pair送出,发送至目标网关中的br-conjoin。Step 1105: After receiving the peer-to-peer connection traffic sent by the first VPC, br-south in the target gateway sends the peer-to-peer connection traffic from the first Veth Pair corresponding to the first VPC to br-conjoin in the target gateway .
相应的,目标网关中的br-conjoin通过第一Veth Pair,接收目标网关中的br-south发送的对等连接流量,且对等连接流量的源MAC地址为第一VPC中的第一DVR的MAC地址、对等连接流量的目的MAC地址为第一VPC中的第一子网所预留的第一对等端口的MAC地址。Correspondingly, br-conjoin in the target gateway receives the peer-to-peer connection traffic sent by br-south in the target gateway through the first Veth Pair, and the source MAC address of the peer-to-peer traffic is the first DVR in the first VPC The MAC address and the destination MAC address of the peering connection traffic are the MAC addresses of the first peering port reserved by the first subnet in the first VPC.
示例性的,结合参考图13,对等连接流量从vxlan子接口进入,因此转到table=4,继续匹配流表,由于该对等连接流量的目的MAC地址命中对等端口的MAC前缀,因此将流量从生成流量的VPC1的veth pair口送到br-conjoin网桥。Exemplarily, with reference to FIG. 13, the peering connection traffic enters from the vxlan sub-interface, so it goes to table=4, and continues to match the flow table. Since the destination MAC address of the peering connection traffic hits the MAC prefix of the peer port, therefore Send traffic from the veth pair port of VPC1 that generates traffic to the br-conjoin bridge.
步骤1106:目标网关中的br-conjoin将对等连接流量的源MAC地址由第一VPC中的第一DVR的MAC地址修改为第二VPC中的第二子网所预留的第二对等端口的MAC地址,将对等连接流量的目的MAC地址由第一VPC中的第一子网所预留的第一对等端口的MAC地址修改为第二VPC中的第二DVR的MAC地址。Step 1106: br-conjoin in the target gateway modifies the source MAC address of the peer-to-peer connection traffic from the MAC address of the first DVR in the first VPC to the second peer reserved by the second subnet in the second VPC For the MAC address of the port, the destination MAC address of the peering connection traffic is changed from the MAC address of the first peering port reserved by the first subnet in the first VPC to the MAC address of the second DVR in the second VPC.
在一种可能的实现方式中,br-conjoin中包括第二VPC对应的子网选择组流表,子网选择组流表用于对第二VPC中的子网进行负载均衡选择;在br-conjoin将对等连接流量的源MAC地址由第一VPC中的第一DVR的MAC地址修改为第二VPC中的第二子网所预留的第二对等端口的MAC地址之前,br-conjoin使用子网选择组流表选中第二VPC中的第二子网。In a possible implementation, br-conjoin includes a subnet selection group flow table corresponding to the second VPC, and the subnet selection group flow table is used for load balancing selection of subnets in the second VPC; in br- Before conjoin changes the source MAC address of the peering connection traffic from the MAC address of the first DVR in the first VPC to the MAC address of the second peer port reserved by the second subnet in the second VPC, br-conjoin Use the subnet selection group flow table to select the second subnet in the second VPC.
也即,在br-conjoin中增加子网选择组流表,将对等连接流量以负载均衡的方式引向对端的第二VPC中的一个子网。That is, add a subnet selection group flow table in br-conjoin, and direct the peering connection traffic to a subnet in the second VPC at the opposite end in a load-balanced manner.
示例性的,结合参考图14,对等连接流量从veth pair口进入,对等连接流量的目的MAC地址命中对等端口的MAC前缀,因此转到table=1,匹配veth pair口以及匹配目的网段,精确识别该对等连接流量是属于哪条对等连接中的哪个VPC发送的流量。table=1处理完之后,转向识别出的对端VPC对应的Group流表,其中,该Group流表的Group ID为对端VPC的VXLAN隧道ID值。在Group流表中,对端VPC有多少个子网,则会对应有相同数量的bucket,在具体的bucket中会执行MAC地址的转换和VXLAN隧道ID值的转换(更换出口)。修改MAC地址时,将目的MAC地址修改为对端VPC中的DVR的MAC地址,这样做的目的是将流量牵引至DVR实例里去处理。Exemplarily, with reference to Figure 14, the peer-to-peer connection traffic enters from the veth pair port, and the destination MAC address of the peer-to-peer connection traffic matches the MAC prefix of the peer port, so it goes to table=1, matches the veth pair port and matches the destination network Segment, accurately identify which peering connection traffic is sent by which VPC in which peering connection. After table=1 is processed, turn to the Group flow table corresponding to the identified peer VPC, where the Group ID of the Group flow table is the VXLAN tunnel ID value of the peer VPC. In the Group flow table, the number of subnets in the peer VPC will correspond to the same number of buckets. In the specific buckets, the conversion of the MAC address and the conversion of the VXLAN tunnel ID value (replacing the egress) will be performed. When modifying the MAC address, modify the destination MAC address to the MAC address of the DVR in the peer VPC. The purpose of this is to divert the traffic to the DVR instance for processing.
步骤1107:目标网关中的br-conjoin将地址信息修改后的对等连接流量从第二VPC对应的第二Veth Pair送出,发送至目标网关中的br-south。Step 1107: br-conjoin in the target gateway sends the peer-to-peer connection traffic after address information modification from the second Veth Pair corresponding to the second VPC to br-south in the target gateway.
相应的,目标网关中的br-south通过第二Veth Pair,接收目标网关中的br-conjoin发送的对等连接流量,且对等连接流量的源MAC地址为第二VPC中的第二子网所预留的第二对等端口的MAC地址、对等连接流量的目的MAC地址为第二VPC中的第二DVR的MAC地址。Correspondingly, br-south in the target gateway receives the peer-to-peer connection traffic sent by br-conjoin in the target gateway through the second Veth Pair, and the source MAC address of the peer-to-peer connection traffic is the second subnet in the second VPC The reserved MAC address of the second peer-to-peer port and the destination MAC address of the peer-to-peer connection traffic are the MAC addresses of the second DVR in the second VPC.
步骤1108:目标网关中的br-south将地址信息修改后的对等连接流量发送至第二VPC中的第二DVR。Step 1108: br-south in the target gateway sends the peer-to-peer connection traffic after address information modification to the second DVR in the second VPC.
相应的,第二VPC中的第二DVR接收目标网关中的br-south发送的对等连接流量,且对等连接流量的源MAC地址为第二VPC中的第二子网所预留的第二对等端口的MAC地址、对等连接流量的目的MAC地址为第二VPC中的第二DVR的MAC地址。Correspondingly, the second DVR in the second VPC receives the peer-to-peer connection traffic sent by br-south in the target gateway, and the source MAC address of the peer-to-peer connection traffic is the second subnet reserved in the second VPC. The MAC addresses of the two peering ports and the destination MAC address of the peering connection traffic are the MAC addresses of the second DVR in the second VPC.
在一种可能的实现方式中,br-south中包括第二DVR对应的DVR实例选择组流表,DVR实例选择组流表用于对第二DVR的DVR实例进行负载均衡选择;br-south使用DVR实例选择组流表选中第二DVR的目标DVR实例;br-south将地址信息修改后的对等连接流量发送至第二DVR的目标DVR实例。In a possible implementation, br-south includes a DVR instance selection group flow table corresponding to the second DVR, and the DVR instance selection group flow table is used for load balancing selection of the DVR instance of the second DVR; br-south uses The DVR instance selection group flow table selects the target DVR instance of the second DVR; br-south sends the peer-to-peer connection traffic after the address information is modified to the target DVR instance of the second DVR.
也即,在br-south中增加DVR实例选择组流表,将对等连接流量以负载均衡的方式引向对端的第二VPC的一个DVR实例,从而提升吞吐量,避免单点故障。That is, add a DVR instance selection group flow table in br-south, and direct the peer-to-peer connection traffic to a DVR instance of the second VPC at the opposite end in a load-balanced manner, thereby improving throughput and avoiding a single point of failure.
示例性的,结合参考图13,匹配VXLAN隧道ID值(即图中的vni)、目的MAC=DVRMAC,则转向Group流表,其Group ID为对应VPC的VXLAN隧道ID值。在Group流表来中,会根据此VPC的DVR分散的计算节点情况实际计算配置。例如:VPC的DVR分散在2台计算节点上,则会配置2个bucket,出口为与这2台计算节点建立的vxlan子接口。这样实现的目的是能够充分利用VPC DVR分布式集群的优势,将流量以负载均衡的方式发送给这些分布式实例,提升吞吐量,同时避免单点故障Exemplarily, with reference to FIG. 13 , match the VXLAN tunnel ID value (that is, vni in the figure), destination MAC=DVRMAC, then turn to the Group flow table, whose Group ID is the VXLAN tunnel ID value of the corresponding VPC. In the Group flow table, the configuration will be actually calculated according to the distributed computing nodes of the DVR of this VPC. For example, if the DVRs of the VPC are scattered on two computing nodes, two buckets will be configured, and the egress is the vxlan sub-interface established with the two computing nodes. The purpose of this is to make full use of the advantages of VPC DVR distributed clusters, send traffic to these distributed instances in a load-balanced manner, improve throughput, and avoid single point of failure
步骤1109:第二DVR在接收到VPC对等网关集群发送的对等连接流量之后,基于直连路由规则,将对等连接流量的源MAC地址由第二VPC中的第二子网所预留的第二对等端口的MAC地址修改为第二VPC中的第二DVR的MAC地址,将对等连接流量的目的MAC地址由第二VPC中的第二DVR的MAC地址修改为第二VPC中的第二VM的MAC地址。Step 1109: After the second DVR receives the peering connection traffic sent by the VPC peering gateway cluster, based on the direct routing rules, the source MAC address of the peering connection traffic is reserved by the second subnet in the second VPC Change the MAC address of the second peer port in the second VPC to the MAC address of the second DVR in the second VPC, and change the destination MAC address of the peer-to-peer connection traffic from the MAC address of the second DVR in the second VPC to the MAC address of the second DVR in the second VPC The MAC address of the second VM.
其中,第二VPC中的第二DVR中包括直连路由规则,直连路由规则包括:在流量的目的IP地址属于第二VPC的目的网段时,下一跳为第二VM所属的子网对应的直连网卡。Wherein, the second DVR in the second VPC includes direct routing rules, and the direct routing rules include: when the destination IP address of the traffic belongs to the destination network segment of the second VPC, the next hop is the subnet to which the second VM belongs Corresponding direct network card.
步骤1110:第二DVR将地址信息修改后的对等连接流量发送至第二VM。Step 1110: the second DVR sends the peer-to-peer connection traffic after the address information is modified to the second VM.
综上所述,本实施例提供的跨VPC的流量转发方法,在预留子网对应的对等端口时,定制其MAC地址前缀为预设MAC地址前缀,能够大幅度减少用于识别对等连接流量的流表配置数量。To sum up, the cross-VPC traffic forwarding method provided in this embodiment, when reserving the peer port corresponding to the subnet, customizes its MAC address prefix to the preset MAC address prefix, which can greatly reduce the number of The number of flow table configurations for connection traffic.
同时,在DVR的子网策略路由表增加对等连接路由规则,实现VM在本地计算节点即可完成对等连接流量的三层路由转发。At the same time, the peer-to-peer connection routing rules are added to the subnet policy routing table of the DVR, so that the VM can complete the layer-3 routing and forwarding of the peer-to-peer connection traffic at the local computing node.
同时,将多个网关节点划分为一个网关节点组,并以“组”为粒度为对等连接分配网关节点,以“组”为粒度实施对等连接的迁移,同时可灵活地根据业务量扩缩容网关节点。At the same time, multiple gateway nodes are divided into a gateway node group, and gateway nodes are allocated for peer-to-peer connections at the granularity of "group", and the migration of peer-to-peer connections is implemented at the granularity of "group". At the same time, it can be flexibly expanded according to the business volume. Scale down the gateway node.
同时,以组为粒度关联对等连接后,此对等连接的流量会以负载均衡的方式引向该组内的所有网关节点,当扩缩容网关节点、开启或禁用网关节点时,只需单独更新对应的组流表,做到快速地生效。At the same time, after the peer-to-peer connection is associated with the group as the granularity, the traffic of this peer-to-peer connection will be directed to all gateway nodes in the group in a load-balanced manner. Individually update the corresponding group flow table to take effect quickly.
同时,在进行网关节点的网络模型的设计时,创建两个OVS网桥,避免VXLAN流量源口进源口出的问题,同时为每个VPC创建Veth Pair并桥接于这两个OVS网桥,通过匹配VethPair口实现对不同VPC的对等连接流量的区分。At the same time, when designing the network model of the gateway node, create two OVS bridges to avoid the problem of VXLAN traffic source import and export. At the same time, create a Veth Pair for each VPC and bridge the two OVS bridges. The peering connection traffic of different VPCs can be distinguished by matching the VethPair port.
同时,在网关节点上,会使用组流表将对等连接流量的目的MAC地址更改为对端VPC的DVR的MAC地址,同样使用组表流表以负载均衡的方式将对等连接流量引向对端VPC的多个DVR实例,从而提升吞吐量,避免单点故障。At the same time, on the gateway node, the group flow table will be used to change the destination MAC address of the peer-to-peer connection traffic to the MAC address of the DVR of the peer VPC, and the group flow table will also be used to guide the peer-to-peer connection traffic to Multiple DVR instances of the peer VPC to improve throughput and avoid single point of failure.
下面,结合一个示例,对本申请提供的跨VPC的流量转发方法进行示例性的说明。In the following, an example is used to illustrate the cross-VPC traffic forwarding method provided by this application.
如图15所示,存在两个VPC需要互通,建立对等连接之后,VPC1中的VM1和VPC2中的VM2即可实现网络互通。为了方便描述细节,图中给出了具体的IP和MAC地址,具体如下表所示:As shown in Figure 15, there are two VPCs that need to communicate with each other. After the peer-to-peer connection is established, VM1 in VPC1 and VM2 in VPC2 can realize network communication. For the convenience of describing the details, the specific IP and MAC addresses are given in the figure, as shown in the following table:
下面分12个步骤具体描述数据流的转发细节,如下:The following is a detailed description of the forwarding details of the data flow in 12 steps, as follows:
1)VM1发出流量。1) VM1 sends traffic.
其中,该流量的报文信息如下:源IP=10.10.1.10,源MAC=fa:16:3e:11:22:33(即VM1的MAC地址),目的IP=10.10.2.10,目的MAC=fa:16:3e:00:01:01(即DVR1的MAC地址)。Among them, the message information of this flow is as follows: source IP=10.10.1.10, source MAC=fa:16:3e:11:22:33 (ie the MAC address of VM1), destination IP=10.10.2.10, destination MAC=fa :16:3e:00:01:01 (that is, the MAC address of DVR1).
2)流量送至ovs网桥br-int,匹配流表,命中流表后,将流量送至DVR1。2) The traffic is sent to the ovs bridge br-int, matches the flow table, and after hitting the flow table, sends the traffic to DVR1.
在br-int处匹配流表可以参照现有技术的实现,在此不详细阐述其细节,且后文涉及到此网桥均不做详细阐述。The matching of the flow table at br-int can refer to the implementation of the prior art, the details of which will not be elaborated here, and will not be elaborated in detail when the bridge is involved in the following.
3)流量进入DVR1后,匹配对等连接路由规则,并转发该流量。3) After the traffic enters DVR1, it matches the peer-to-peer connection routing rules and forwards the traffic.
DVR1中的对等连接路由规则:目的=10.10.2.0/24,下一跳=10.10.1.100。Peering connection routing rules in DVR1: destination = 10.10.2.0/24, next hop = 10.10.1.100.
VM1所属子网所预留的对等端口的IP地址=10.10.1.100,其MAC地址为=fa:16:3d:a0:a0:01(对等端口的MAC前缀为fa:16:3d:00:00:00/ff:ff:ff:00:00:00)。The IP address of the peer port reserved by the subnet to which VM1 belongs = 10.10.1.100, and its MAC address is = fa:16:3d:a0:a0:01 (the MAC prefix of the peer port is fa:16:3d:00 :00:00/ff:ff:ff:00:00:00).
此时,由于流量匹配对等连接路由规则,则DVR1继续转发流量,此时该流量的报文信息为:源IP=10.10.1.10,源MAC=fa:16:3e:00:01:01(即DVR1的MAC地址),目的IP=10.10.2.10,目的MAC=fa:16:3d:a0:a0:01(即VPC1子网所预留的对等端口的MAC地址),即在DVR1更改了源/目的MAC。Now, because the flow matches the peer-to-peer connection routing rules, DVR1 continues to forward the flow. At this time, the message information of the flow is: source IP=10.10.1.10, source MAC=fa:16:3e:00:01:01( That is, the MAC address of DVR1), the destination IP=10.10.2.10, the destination MAC=fa:16:3d:a0:a0:01 (that is, the MAC address of the peer port reserved in the VPC1 subnet), that is, the DVR1 changed Source/destination MAC address.
4)流量从DVR1出来到达ovs网桥br-int,继续匹配流表,命中流表后,将流量转发至ovs网桥br-tun。4) The traffic comes out from DVR1 and reaches the ovs bridge br-int, and continues to match the flow table. After hitting the flow table, the traffic is forwarded to the ovs bridge br-tun.
5)流量到达ovs网桥br-tun,匹配流表,再转至group流表,group流表主要是对多个对等网关做负载均衡,选取其中一个对等网关,将流量送给该对等网关。5) The traffic reaches the ovs bridge br-tun, matches the flow table, and then transfers to the group flow table. The group flow table mainly performs load balancing for multiple peer gateways, selects one of the peer gateways, and sends the traffic to the pair Wait for the gateway.
结合参考图12,匹配流程如下:首先匹配table=0的流表命中后,转至table=1,在table=1命中后,转至table=2,由于该流量是单播报文,因此继续流转到table=20,在table=20,精确匹配对等连接流表:通过匹配对等端口的MAC前缀(即:fa:17:02:00:00:00)及其对等路由的目标网段,命中后,转至group流表。With reference to Figure 12, the matching process is as follows: firstly, after the flow table matching table=0 hits, go to table=1, after table=1 hits, go to table=2, because the traffic is a unicast packet, so continue to flow To table=20, at table=20, exactly match the peer connection flow table: by matching the MAC prefix of the peer port (ie: fa:17:02:00:00:00) and the target network segment of the peer route , after hit, go to the group flow table.
此group流表主要是对多个对等网关做负载均衡,最终会选取其中一个对等网关,将流量送给该对等网关。This group flow table is mainly used for load balancing of multiple peer gateways, and eventually one of the peer gateways will be selected to send traffic to the peer gateway.
流量封装VXLAN报文从业务网卡1发出,此时报文信息为:源IP=192.168.1.11(即业务网卡1的IP地址),源MAC=0a:16:3f:00:00:01(即业务网卡1的MAC地址),目的IP=192.168.1.13(即业务网卡2的IP地址),目的MAC=0a:16:3f:00:00:03(即业务网卡2的MAC地址)。此时,由于封装了VXLAN报文,VM的内层报文信息被隐藏。The traffic-encapsulated VXLAN packet is sent from
6)VXLAN报文从业务网卡1送到对等网关的业务网卡3,由br-south解除VXLAN报文的封装,接着匹配br-south流表,将流量从vpcveth pair口送到br-conjoin网桥。6) The VXLAN message is sent from the
其中,解除封装后的报文信息为:源IP=10.10.1.10,源MAC=fa:16:3e:00:01:01,目的IP=10.10.2.10,目的MAC=fa:16:3d:a0:a0:01。Wherein, the packet information after decapsulation is: source IP=10.10.1.10, source MAC=fa:16:3e:00:01:01, destination IP=10.10.2.10, destination MAC=fa:16:3d:a0 :a0:01.
结合参考图13,匹配br-south流表的流程如下:首先在table=0匹配流表,因为从vxlan子接口进入,因此转到table=4,继续匹配流表,由于目的MAC为fa:16:3d:a0:a0:01,命中对等端口的MAC前缀,因此将流量从VPC1的veth pair口送到br-conjoin网桥。With reference to Figure 13, the process of matching the br-south flow table is as follows: first, match the flow table at table=0, because it enters from the vxlan sub-interface, so go to table=4, and continue to match the flow table, because the destination MAC is fa:16 :3d:a0:a0:01, hit the MAC prefix of the peer port, so the traffic is sent from the veth pair port of VPC1 to the br-conjoin bridge.
7)流量到达br-conjoin网桥后,继续匹配流表,再转至group流表,group流表主要是对对端的VPC2的多个子网做负载均衡,选取其中一个子网,随之修改源/目的MAC地址,并将流量从VPC2的veth pair口送回br-south网桥。7) After the traffic reaches the br-conjoin bridge, continue to match the flow table, and then transfer to the group flow table. The group flow table mainly performs load balancing on multiple subnets of the peer VPC2, selects one of the subnets, and then modifies the source /destination MAC address, and send traffic back to the br-south bridge from the veth pair port of VPC2.
结合参考图14,匹配流程如下:首先在table=0匹配流表,转至table=1,匹配流表,转至group流表(建立对等连接的VPC均对应有一个group流表,这里命中的group流表是对端VPC对应的)。此group流表主要用于对对端VPC的多个子网进行随机选择,选中某个子网后,修改源MAC及目的MAC地址。With reference to Figure 14, the matching process is as follows: first, match the flow table at table=0, go to table=1, match the flow table, and go to the group flow table (the VPC that establishes a peer-to-peer connection corresponds to a group flow table, here hit The group flow table corresponds to the peer VPC). This group flow table is mainly used to randomly select multiple subnets of the peer VPC. After selecting a subnet, modify the source MAC address and destination MAC address.
在本示例中,只涉及一个子网,因此执行完成后,报文信息为:源IP=10.10.1.10,源MAC=fa:16:3d:a0:a0:02(即VPC2子网所预留对等端口的MAC地址),目的IP=10.10.2.10,目的MAC=fa:16:3e:00:02:01(即DVR2的MAC地址)。报文处理完后,从对端VPC的veth pair口送回br-south网桥。In this example, only one subnet is involved, so after the execution is completed, the message information is: source IP=10.10.1.10, source MAC=fa:16:3d:a0:a0:02 (that is, reserved by the VPC2 subnet MAC address of peer port), destination IP=10.10.2.10, destination MAC=fa:16:3e:00:02:01 (namely the MAC address of DVR2). After the packet is processed, it is sent back to the br-south bridge through the veth pair port of the peer VPC.
8)在br-south网桥继续匹配流表,再转至group流表,group流表主要是对多个DVR实例做负载均衡,选取其中一个DVR实例,将流量送给该DVR示例所在的计算节点中。8) Continue to match the flow table on the br-south bridge, and then go to the group flow table. The group flow table is mainly used to balance the load of multiple DVR instances, select one of the DVR instances, and send the traffic to the calculation where the DVR instance is located. in the node.
结合参考图13,匹配流程如下:首先在table=0匹配流表,从vpc网桥的veth pair口进入,因此转到table=1,由于此时目的MAC为DVR MAC,因此转至group流表。With reference to Figure 13, the matching process is as follows: first match the flow table at table=0, enter from the veth pair port of the vpc bridge, so go to table=1, because the destination MAC is DVR MAC at this time, so go to the group flow table .
此group流表主要用于对VPC的多个DVR实例进行负载均衡调度,最终会选择其中某个计算节点的DVR实例,将流量封装VXLAN报文送到目标计算节点。This group flow table is mainly used for load balancing and scheduling of multiple DVR instances of the VPC. Finally, the DVR instance of one of the computing nodes will be selected, and the traffic encapsulated VXLAN packets will be sent to the target computing node.
此时从业务网卡3出来的VXLAN报文为:源IP=192.168.1.13,源MAC=0a:16:3f:00:00:03,目的IP=192.168.1.12,目的MAC=0a:16:3f:00:00:02。同样,因为VXLAN的封装,VM的内层报文信息被隐藏。At this time, the VXLAN message from the service network card 3 is: source IP=192.168.1.13, source MAC=0a:16:3f:00:00:03, destination IP=192.168.1.12, destination MAC=0a:16:3f :00:00:02. Similarly, because of the VXLAN encapsulation, the inner message information of the VM is hidden.
9)VXLAN报文从业务网卡3送到目标计算节点的业务网卡2,在br-tun网桥解除vxlan报文的封装,匹配流表,命中流表后,将流量送至br-int网桥。9) The VXLAN message is sent from the service network card 3 to the
其中,解除封装后的报文信息为:源IP=10.10.1.10,源MAC=fa:16:3d:a0:a0:02(即VPC2子网所预留对等端口的MAC地址),目的IP=10.10.2.10,目的MAC=fa:16:3e:00:02:01(即DVR2的MAC地址)。Among them, the message information after decapsulation is: source IP=10.10.1.10, source MAC=fa:16:3d:a0:a0:02 (that is, the MAC address of the peer port reserved in the VPC2 subnet), destination IP =10.10.2.10, destination MAC=fa:16:3e:00:02:01 (that is, the MAC address of DVR2).
结合参考图12,匹配流程如下:首先在table=0匹配流表,从VXLAN口进入,因此转到table=4,继续匹配流表,最终将流量从patch-int口发出,送到br-int网桥。With reference to Figure 12, the matching process is as follows: first match the flow table at table=0, and enter from the VXLAN port, so go to table=4, continue to match the flow table, and finally send the traffic from the patch-int port to br-int bridge.
10)在br-int网桥继续匹配流表,将流量送至DVR2实例。10) Continue to match the flow table on the br-int bridge, and send the traffic to the DVR2 instance.
11)在DVR2里,匹配直连路由规则,并转发该流量。11) In DVR2, match the direct routing rules and forward the traffic.
DVR2收到的报文信息为:源IP=10.10.1.10,源MAC=fa:16:3d:a0:a0:02(即VPC2子网所预留对等端口的MAC地址),目的IP=10.10.2.10,目的MAC=fa:16:3e:00:02:01(即DVR2的MAC地址)。The message information received by DVR2 is: source IP=10.10.1.10, source MAC=fa:16:3d:a0:a0:02 (that is, the MAC address of the peer port reserved in the VPC2 subnet), destination IP=10.10 .2.10, destination MAC=fa:16:3e:00:02:01 (that is, the MAC address of DVR2).
DVR2中的直连路由规则:目的=10.10.2.0/24,下一跳=直连网卡。Directly connected routing rules in DVR2: destination = 10.10.2.0/24, next hop = directly connected network card.
此时,由于流量匹配直连路由规则,因此,在DVR2里执行三层转发,此时报文信息为:源IP=10.10.1.10,源MAC=fa:16:3e:00:02:01(即DVR2的MAC地址),目的IP=10.10.2.10,目的MAC=fa:16:3e:44:55:66(即VM2的MAC地址)。At this time, because the traffic matches the direct routing rule, therefore, three-layer forwarding is performed in DVR2, and the packet information at this time is: source IP=10.10.1.10, source MAC=fa:16:3e:00:02:01 (ie MAC address of DVR2), destination IP=10.10.2.10, destination MAC=fa:16:3e:44:55:66 (that is, the MAC address of VM2).
12)流量送至br-int网桥,匹配流表,最终转发到VM2。12) The traffic is sent to the br-int bridge, matched with the flow table, and finally forwarded to VM2.
反向的流量转发过程类似,这里不再赘述。The process of reverse traffic forwarding is similar and will not be repeated here.
需要说明的是,上述方法实施例可以单独实施例,也可以组合实施,本申请对此不加以限制。It should be noted that the foregoing method embodiments may be implemented individually or in combination, which is not limited in the present application.
图16是根据一示例性实施例示出的一种跨VPC的流量转发装置的结构方框图。所述装置由VPC对等连接网络中的VPC对等网关集群执行,所述VPC对等连接网络还包括第一VPC、第二VPC,所述装置包括:流量接收模块1601、地址信息修改模块1602和流量发送模块1603;Fig. 16 is a structural block diagram of a cross-VPC traffic forwarding device according to an exemplary embodiment. The device is executed by a VPC peer-to-peer gateway cluster in the VPC peer-to-peer connection network, and the VPC peer-to-peer connection network also includes a first VPC and a second VPC, and the device includes: a
所述流量接收模块1601,用于接收所述第一VPC发送的对等连接流量,所述对等连接流量的媒体接入控制MAC地址信息为第一MAC地址信息,所述第一MAC地址信息与所述第一VPC中的第一分布式虚拟路由DVR的MAC地址、所述第一VPC中的第一子网所预留的第一对等端口的MAC地址相关;The
所述地址信息修改模块1602,用于将所述对等连接流量的MAC地址信息由所述第一MAC地址信息修改为第二MAC地址信息,所述第二MAC地址信息与所述第二VPC中的第二DVR的MAC地址、所述第二VPC中的第二子网所预留的第二对等端口的MAC地址相关;The address
所述流量发送模块1603,用于将地址信息修改后的所述对等连接流量发送至所述第二VPC。The
在一种可能的实现方式中,所述VPC对等网关集群中的网关节点包括:br-conjoin、br-south,所述br-south上创建有与VPC通信的接口,且所述br-conjoin和所述br-south之间为每一个VPC建立有Veth Pair;In a possible implementation manner, the gateway nodes in the VPC peer-to-peer gateway cluster include: br-conjoin and br-south, an interface for communicating with the VPC is created on the br-south, and the br-conjoin A Veth Pair is established for each VPC with the br-south;
所述地址信息修改模块1602,用于:The address
所述br-south在接收到所述第一VPC发送的所述对等连接流量之后,将所述对等连接流量从所述第一VPC对应的第一Veth Pair送出,发送至所述br-conjoin;After receiving the peer-to-peer connection traffic sent by the first VPC, the br-south sends the peer-to-peer connection traffic from the first Veth Pair corresponding to the first VPC to the br-south conjoin;
所述br-conjoin将所述对等连接流量的源MAC地址由所述第一VPC中的第一DVR的MAC地址修改为所述第二VPC中的第二子网所预留的第二对等端口的MAC地址,将所述对等连接流量的目的MAC地址由所述第一VPC中的第一子网所预留的第一对等端口的MAC地址修改为所述第二VPC中的第二DVR的MAC地址;The br-conjoin modifies the source MAC address of the peer-to-peer connection traffic from the MAC address of the first DVR in the first VPC to the second pair reserved by the second subnet in the second VPC. The MAC address of the peer port, modify the destination MAC address of the peer connection traffic from the MAC address of the first peer port reserved by the first subnet in the first VPC to the MAC address of the peer port in the second VPC MAC address of the second DVR;
所述流量发送模块1603,用于:The
所述br-conjoin将地址信息修改后的所述对等连接流量从所述第二VPC对应的第二Veth Pair送出,发送至所述br-south;The br-conjoin sends the peer-to-peer connection traffic after the address information is modified from the second Veth Pair corresponding to the second VPC, and sends it to the br-south;
所述br-south将地址信息修改后的所述对等连接流量发送至所述第二VPC。The br-south sends the peer-to-peer connection traffic with the address information modified to the second VPC.
在一种可能的实现方式中,所述br-conjoin中包括所述第二VPC对应的子网选择组流表,所述子网选择组流表用于对所述第二VPC中的子网进行负载均衡选择;In a possible implementation manner, the br-conjoin includes a subnet selection group flow table corresponding to the second VPC, and the subnet selection group flow table is used for subnet selection in the second VPC Make load balancing selection;
所述地址信息修改模块1602,用于在所述br-conjoin将所述对等连接流量的源MAC地址由所述第一VPC中的第一DVR的MAC地址修改为所述第二VPC中的第二子网所预留的第二对等端口的MAC地址之前,所述br-conjoin使用所述子网选择组流表选中所述第二VPC中的第二子网。The address
在一种可能的实现方式中,所述br-south中包括所述第二DVR对应的DVR实例选择组流表,所述DVR实例选择组流表用于对所述第二DVR的DVR实例进行负载均衡选择;In a possible implementation manner, the br-south includes a DVR instance selection group flow table corresponding to the second DVR, and the DVR instance selection group flow table is used to perform load balancing options;
所述流量发送模块1603,用于:The
所述br-south使用所述DVR实例选择组流表选中所述第二DVR的目标DVR实例;The br-south uses the DVR instance selection group flow table to select the target DVR instance of the second DVR;
所述br-south将地址信息修改后的所述对等连接流量发送至所述第二DVR的目标DVR实例。The br-south sends the peer-to-peer connection traffic with the address information modified to the target DVR instance of the second DVR.
在一种可能的实现方式中,所述第一对等端口的MAC地址、所述第二对等端口的MAC地址对应于预设MAC地址前缀,所述预设MAC地址前缀用于在流量的流表匹配过程中,标识所述流量属于跨VPC转发的流量。In a possible implementation manner, the MAC address of the first peer port and the MAC address of the second peer port correspond to a preset MAC address prefix, and the preset MAC address prefix is used in traffic During the flow table matching process, it is identified that the traffic belongs to cross-VPC forwarded traffic.
图17是根据一示例性实施例示出的一种跨VPC的流量转发装置的结构方框图。所述装置由VPC对等连接网络中的第一VPC执行,所述VPC对等连接网络还包括VPC对等网关集群、第二VPC,所述装置包括:流量生成模块1701、地址信息修改模块1702和流量发送模块1703;Fig. 17 is a structural block diagram of a cross-VPC traffic forwarding device according to an exemplary embodiment. The device is executed by the first VPC in the VPC peer-to-peer connection network. The VPC peer-to-peer connection network also includes a VPC peer-to-peer gateway cluster and a second VPC. The device includes: a
所述流量生成模块1701,用于生成对等连接流量,所述对等连接流量的媒体接入控制MAC地址信息为第三MAC地址信息,所述第三MAC地址信息与所述第一VPC中的第一分布式虚拟路由DVR的MAC地址、所述第一VPC中的第一虚拟机VM的MAC地址相关;The
所述地址信息修改模块1702,用于将所述对等连接流量的MAC地址信息由所述第三MAC地址信息修改为第一MAC地址信息,所述第一MAC地址信息与所述第一VPC中的第一DVR的MAC地址、所述第一VPC中的第一子网所预留的第一对等端口的MAC地址相关;The address
所述流量发送模块1703,用于将地址信息修改后的所述对等连接流量发送至所述VPC对等网关集群,以使得所述VPC对等网关集群将所述对等连接流量转发给所述第二VPC。The
在一种可能的实现方式中,所述第一VPC中的第一DVR中包括对等连接路由规则,所述对等连接路由规则包括:在流量的目的IP地址属于其他VPC的目的网段时,下一跳为所述流量来自的子网所预留的对等端口的IP地址;In a possible implementation manner, the first DVR in the first VPC includes a peer-to-peer connection routing rule, and the peer-to-peer connection routing rule includes: when the destination IP address of the traffic belongs to the destination network segment of another VPC , the next hop is the IP address of the peer port reserved for the subnet from which the traffic comes;
所述地址信息修改模块1702,用于:The address
所述第一DVR在接收到所述第一VM发送的所述对等连接流量之后,基于所述对等连接路由规则,将所述对等连接流量的源MAC地址由所述第一VPC中的第一VM的MAC地址修改为所述第一VPC中的第一DVR的MAC地址,将所述对等连接流量的目的MAC地址由所述第一VPC中的第一DVR的MAC地址修改为所述第一VPC中的第一子网所预留的第一对等端口的MAC地址。After the first DVR receives the peer-to-peer connection traffic sent by the first VM, based on the peer-to-peer connection routing rule, the source MAC address of the peer-to-peer connection traffic is transferred from the first VPC to Modify the MAC address of the first VM in the first VPC to the MAC address of the first DVR in the first VPC, and modify the destination MAC address of the peer-to-peer connection traffic from the MAC address of the first DVR in the first VPC to The MAC address of the first peer port reserved by the first subnet in the first VPC.
在一种可能的实现方式中,所述VPC对等网关集群包括至少一组网关节点组,每组所述网关节点组中包括至少一个网关节点,所述第一VPC与所述第二VPC之间的对等连接由所述至少一组网关节点组中的目标网关节点组承载;In a possible implementation manner, the VPC peer-to-peer gateway cluster includes at least one set of gateway node groups, each set of gateway node groups includes at least one gateway node, and the connection between the first VPC and the second VPC The peer-to-peer connection between is carried by the target gateway node group in the at least one set of gateway node groups;
所述流量发送模块1703,用于:The
所述第一DVR将地址信息修改后的所述对等连接流量发送至所述第一VPC中的br-tun,所述br-tun中包括所述目标网关节点组对应的网关节点选择组流表,所述网关节点选择组流表用于对所述目标网关节点组中的网关节点进行负载均衡选择;The first DVR sends the peer-to-peer connection flow after the address information is modified to the br-tun in the first VPC, and the br-tun includes the gateway node selection group flow corresponding to the target gateway node group Table, the gateway node selection group flow table is used for load balancing selection of gateway nodes in the target gateway node group;
所述br-tun使用所述网关节点选择组流表选中所述目标网关节点组中的目标网关节点;The br-tun uses the gateway node selection group flow table to select the target gateway node in the target gateway node group;
所述br-tun将地址信息修改后的所述对等连接流量发送至所述目标网关节点。The br-tun sends the peer-to-peer connection traffic with the address information modified to the target gateway node.
在一种可能的实现方式中,所述第一对等端口的MAC地址对应于预设MAC地址前缀,所述预设MAC地址前缀用于在流量的流表匹配过程中,标识所述流量属于跨VPC转发的流量。In a possible implementation manner, the MAC address of the first peer port corresponds to a preset MAC address prefix, and the preset MAC address prefix is used to identify that the traffic belongs to Traffic forwarded across VPCs.
图18是根据一示例性实施例示出的一种跨VPC的流量转发装置的结构方框图。所述装置由VPC对等连接网络中的第二VPC执行,所述VPC对等连接网络还包括VPC对等网关集群、第一VPC,所述装置包括:流量接收模块1801、地址信息修改模块1802和流量发送模块1803;Fig. 18 is a structural block diagram of a cross-VPC traffic forwarding device according to an exemplary embodiment. The device is executed by the second VPC in the VPC peer-to-peer connection network, and the VPC peer-to-peer connection network also includes a VPC peer-to-peer gateway cluster and the first VPC, and the device includes: a
所述流量接收模块1801,用于接收所述VPC对等网关集群发送的对等连接流量,所述对等连接流量是所述VPC对等网关集群从所述第一VPC处接收的,所述对等连接流量的媒体接入控制MAC地址信息为第二MAC地址信息,所述第二MAC地址信息与所述第二VPC中的第二分布式虚拟路由DVR的MAC地址、所述第二VPC中的第二子网所预留的第二对等端口的MAC地址相关;The
所述地址信息修改模块1802,用于将所述对等连接流量的MAC地址信息由所述第二MAC地址信息修改为第四MAC地址信息,所述第四MAC地址信息与所述第二VPC中的第二DVR的MAC地址、所述第二VPC中的第二虚拟机VM的MAC地址相关;The address
所述流量发送模块1803,用于将地址信息修改后的所述对等连接流量发送至所述第二VM。The
在一种可能的实现方式中,所述第二VPC中的第二DVR中包括直连路由规则,所述直连路由规则包括:在流量的目的IP地址属于所述第二VPC的目的网段时,下一跳为所述第二VM所属的子网对应的直连网卡;In a possible implementation manner, the second DVR in the second VPC includes a direct routing rule, and the direct routing rule includes: the destination IP address of the traffic belongs to the destination network segment of the second VPC , the next hop is the directly connected network card corresponding to the subnet to which the second VM belongs;
所述地址信息修改模块1802,用于:The address
所述第二DVR在接收到所述VPC对等网关集群发送的所述对等连接流量之后,基于所述直连路由规则,将所述对等连接流量的源MAC地址由所述第二VPC中的第二子网所预留的第二对等端口的MAC地址修改为所述第二VPC中的第二DVR的MAC地址,将所述对等连接流量的目的MAC地址由所述第二VPC中的第二DVR的MAC地址修改为所述第二VPC中的第二VM的MAC地址。After receiving the peer-to-peer connection traffic sent by the VPC peer-to-peer gateway cluster, the second DVR transfers the source MAC address of the peer-to-peer connection traffic from the second VPC based on the direct routing rule. Modify the MAC address of the second peer-to-peer port reserved in the second subnet in the second VPC to the MAC address of the second DVR in the second VPC, and change the destination MAC address of the peer-to-peer connection traffic from the second The MAC address of the second DVR in the VPC is changed to the MAC address of the second VM in the second VPC.
在一种可能的实现方式中,所述第二对等端口的MAC地址对应于预设MAC地址前缀,所述预设MAC地址前缀用于在流量的流表匹配过程中,标识所述流量属于跨VPC转发的流量。In a possible implementation manner, the MAC address of the second peer port corresponds to a preset MAC address prefix, and the preset MAC address prefix is used to identify that the traffic belongs to the Traffic forwarded across VPCs.
需要说明的是:上述实施例提供的跨VPC的流量转发装置,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: the cross-VPC traffic forwarding device provided by the above embodiment is only illustrated by the division of the above functional modules. In practical applications, the above function distribution can be completed by different functional modules according to the needs. The internal structure of the system is divided into different functional modules to complete all or part of the functions described above. In addition, the device and the method embodiment provided by the above embodiment belong to the same idea, and the specific implementation process thereof is detailed in the method embodiment, and will not be repeated here.
请参阅图19,其是根据本申请一示例性实施例提供的一种计算机设备示意图,所述计算机设备包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现上述的跨VPC的流量转发方法。Please refer to FIG. 19 , which is a schematic diagram of a computer device provided according to an exemplary embodiment of the present application, the computer device includes a memory and a processor, the memory is used to store a computer program, and the computer program is processed by the When the controller is executed, the above-mentioned cross-VPC traffic forwarding method is implemented.
其中,处理器可以为中央处理器(Central Processing Unit,CPU)。处理器还可以为其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等芯片,或者上述各类芯片的组合。Wherein, the processor may be a central processing unit (Central Processing Unit, CPU). The processor can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate array (Field-Programmable Gate Array, FPGA) or other Chips such as programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above-mentioned types of chips.
存储器作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序、非暂态计算机可执行程序以及模块,如本发明实施方式中的方法对应的程序指令/模块。处理器通过运行存储在存储器中的非暂态软件程序、指令以及模块,从而执行处理器的各种功能应用以及数据处理,即实现上述方法实施方式中的方法。As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer-executable programs and modules, such as program instructions/modules corresponding to the methods in the embodiments of the present invention. The processor executes various functional applications and data processing of the processor by running non-transitory software programs, instructions, and modules stored in the memory, that is, implements the methods in the above method implementation manners.
存储器可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储处理器所创建的数据等。此外,存储器可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至处理器。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created by the processor, and the like. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include memory located remotely from the processor, and such remote memory may be connected to the processor through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
在一示例性实施例中,还提供了一种计算机可读存储介质,用于存储有至少一条计算机程序,所述至少一条计算机程序由处理器加载并执行以实现上述方法中的全部或部分步骤。例如,该计算机可读存储介质可以是只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a computer-readable storage medium for storing at least one computer program, and the at least one computer program is loaded and executed by a processor to implement all or part of the steps in the above method . For example, the computer-readable storage medium may be a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a read-only optical disc (Compact Disc Read-Only Memory, CD-ROM), Magnetic tapes, floppy disks, and optical data storage devices, etc.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求指出。Other embodiments of the present application will be readily 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 modification, use or adaptation of the application, these modifications, uses or adaptations follow the general principles of the application and include common knowledge or conventional technical means in the technical field not disclosed in the application . The specification and examples are to be considered exemplary only, with a true scope and spirit of the application indicated by the following claims.
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。It should be understood that the present application is not limited to the precise constructions which have been described above and shown in the accompanying drawings, and 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.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210911121.6A CN115499434B (en) | 2022-07-29 | 2022-07-29 | Traffic forwarding across VPCs |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210911121.6A CN115499434B (en) | 2022-07-29 | 2022-07-29 | Traffic forwarding across VPCs |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115499434A true CN115499434A (en) | 2022-12-20 |
| CN115499434B CN115499434B (en) | 2024-10-01 |
Family
ID=84466443
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210911121.6A Active CN115499434B (en) | 2022-07-29 | 2022-07-29 | Traffic forwarding across VPCs |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115499434B (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117014371A (en) * | 2023-07-05 | 2023-11-07 | 曙光云计算集团有限公司 | Network traffic processing method and device, electronic equipment and storage medium |
| WO2024230820A1 (en) * | 2023-05-11 | 2024-11-14 | 阿里云计算有限公司 | Network system based on virtual extensible local area network, node, and communication method |
| WO2024239586A1 (en) * | 2023-05-22 | 2024-11-28 | 华为云计算技术有限公司 | Cloud system based on public cloud service, packet processing method, and related device |
| CN119697196A (en) * | 2024-11-26 | 2025-03-25 | 天翼云科技有限公司 | A method, device, electronic device and storage medium for data interaction between clusters |
| CN119892399A (en) * | 2024-12-06 | 2025-04-25 | 天翼云科技有限公司 | Private network NAT (network Address translation) cross-virtual private cloud interconnection access method and device |
| US12425326B2 (en) | 2023-10-11 | 2025-09-23 | International Business Machines Corporation | Distributed transit gateway |
Citations (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20160149751A1 (en) * | 2014-11-21 | 2016-05-26 | Cisco Technology, Inc. | Recovering from virtual port channel peer failure |
| CN107070691A (en) * | 2017-01-12 | 2017-08-18 | 阿里巴巴集团控股有限公司 | Docker containers across host communication method and system |
| CN108429680A (en) * | 2018-03-07 | 2018-08-21 | 北京优帆科技有限公司 | A virtual private cloud-based routing configuration method, system, medium and equipment |
| CN109361764A (en) * | 2018-11-29 | 2019-02-19 | 杭州数梦工场科技有限公司 | The interior service access method across VPC, device, equipment and readable storage medium storing program for executing |
| CN109450905A (en) * | 2018-11-20 | 2019-03-08 | 郑州云海信息技术有限公司 | Transmit the method and apparatus and system of data |
| WO2020041074A1 (en) * | 2018-08-24 | 2020-02-27 | Vmware, Inc. | Intelligent use of peering in public cloud |
| CN111030912A (en) * | 2018-10-09 | 2020-04-17 | 华为技术有限公司 | Methods of Interworking Between Virtual Private Clouds and VPCs |
| CN111510367A (en) * | 2020-04-17 | 2020-08-07 | 上海思询信息科技有限公司 | VPC network cross-cluster intercommunication realization method and system based on VX L AN tunnel |
| CN111917649A (en) * | 2019-05-10 | 2020-11-10 | 华为技术有限公司 | Virtual private cloud communication and configuration method and related device |
| CN113132201A (en) * | 2019-12-30 | 2021-07-16 | 华为技术有限公司 | Communication method and device between VPCs |
| CN113783781A (en) * | 2021-08-13 | 2021-12-10 | 济南浪潮数据技术有限公司 | Method and device for interworking between virtual private clouds |
-
2022
- 2022-07-29 CN CN202210911121.6A patent/CN115499434B/en active Active
Patent Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20160149751A1 (en) * | 2014-11-21 | 2016-05-26 | Cisco Technology, Inc. | Recovering from virtual port channel peer failure |
| CN107070691A (en) * | 2017-01-12 | 2017-08-18 | 阿里巴巴集团控股有限公司 | Docker containers across host communication method and system |
| CN108429680A (en) * | 2018-03-07 | 2018-08-21 | 北京优帆科技有限公司 | A virtual private cloud-based routing configuration method, system, medium and equipment |
| WO2020041074A1 (en) * | 2018-08-24 | 2020-02-27 | Vmware, Inc. | Intelligent use of peering in public cloud |
| CN112640369A (en) * | 2018-08-24 | 2021-04-09 | Vm维尔股份有限公司 | Intelligently using peers in a public cloud |
| CN111030912A (en) * | 2018-10-09 | 2020-04-17 | 华为技术有限公司 | Methods of Interworking Between Virtual Private Clouds and VPCs |
| CN109450905A (en) * | 2018-11-20 | 2019-03-08 | 郑州云海信息技术有限公司 | Transmit the method and apparatus and system of data |
| CN109361764A (en) * | 2018-11-29 | 2019-02-19 | 杭州数梦工场科技有限公司 | The interior service access method across VPC, device, equipment and readable storage medium storing program for executing |
| CN111917649A (en) * | 2019-05-10 | 2020-11-10 | 华为技术有限公司 | Virtual private cloud communication and configuration method and related device |
| CN113132201A (en) * | 2019-12-30 | 2021-07-16 | 华为技术有限公司 | Communication method and device between VPCs |
| CN111510367A (en) * | 2020-04-17 | 2020-08-07 | 上海思询信息科技有限公司 | VPC network cross-cluster intercommunication realization method and system based on VX L AN tunnel |
| CN113783781A (en) * | 2021-08-13 | 2021-12-10 | 济南浪潮数据技术有限公司 | Method and device for interworking between virtual private clouds |
Non-Patent Citations (2)
| Title |
|---|
| RUI ZHU: "Optimal multicast in virtualized datacenter networks with software switches", IEEE INFOCOM 2017 - IEEE CONFERENCE ON COMPUTER COMMUNICATIONS, 5 October 2017 (2017-10-05) * |
| 崔双红: "基于OpenStack Neutron的VPC互通机制的设计与实现", CNKI优秀硕士学位论文全文库, 15 June 2022 (2022-06-15) * |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2024230820A1 (en) * | 2023-05-11 | 2024-11-14 | 阿里云计算有限公司 | Network system based on virtual extensible local area network, node, and communication method |
| WO2024239586A1 (en) * | 2023-05-22 | 2024-11-28 | 华为云计算技术有限公司 | Cloud system based on public cloud service, packet processing method, and related device |
| CN117014371A (en) * | 2023-07-05 | 2023-11-07 | 曙光云计算集团有限公司 | Network traffic processing method and device, electronic equipment and storage medium |
| US12425326B2 (en) | 2023-10-11 | 2025-09-23 | International Business Machines Corporation | Distributed transit gateway |
| CN119697196A (en) * | 2024-11-26 | 2025-03-25 | 天翼云科技有限公司 | A method, device, electronic device and storage medium for data interaction between clusters |
| CN119892399A (en) * | 2024-12-06 | 2025-04-25 | 天翼云科技有限公司 | Private network NAT (network Address translation) cross-virtual private cloud interconnection access method and device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115499434B (en) | 2024-10-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN115499434B (en) | Traffic forwarding across VPCs | |
| US11375005B1 (en) | High availability solutions for a secure access service edge application | |
| US12267364B2 (en) | Network management services in a virtual network | |
| US20230025586A1 (en) | Network management services in a secure access service edge application | |
| US20230026330A1 (en) | Network management services in a point-of-presence | |
| EP2829031B1 (en) | Virtual router terminating an overlay tunnel in a storage area network | |
| US10116559B2 (en) | Operations, administration and management (OAM) in overlay data center environments | |
| CN103200069B (en) | A kind of method and apparatus of Message processing | |
| CN106936777B (en) | Cloud computing distributed network implementation method and system based on OpenFlow | |
| CN108347493B (en) | Hybrid cloud management method, apparatus and computing device | |
| KR102054338B1 (en) | Routing vlan tagged packets to far end addresses of virtual forwarding instances using separate administrations | |
| EP4282141A1 (en) | Network management services in a point-of-presence | |
| WO2020041074A1 (en) | Intelligent use of peering in public cloud | |
| CN106101023B (en) | A kind of VPLS message processing method and equipment | |
| CN107770062A (en) | A kind of data packet sending method, device and the network architecture | |
| EP3937436B1 (en) | Packet forwarding method and apparatus | |
| WO2019184653A1 (en) | Link configuration method and controller | |
| CN112769584B (en) | Method, device and storage medium for sharing upper link by network slice | |
| WO2022053007A1 (en) | Network reachability verification method and apparatus, and computer storage medium | |
| CN107995110B (en) | Traffic forwarding method and device | |
| CN117880097A (en) | Cloud tenant EIP migration method, device, computer equipment and storage medium | |
| CN115913819A (en) | Communication method and related device | |
| CN114500171A (en) | Network system and message transmission method | |
| CN118353837A (en) | A gateway configuration method, system and medium | |
| CN115604056A (en) | Efficient storage implementation of downstream VXLAN identifiers |
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 |