CN116137585B - Message forwarding method, device, computer equipment and storage medium - Google Patents
Message forwarding method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN116137585B CN116137585B CN202310424904.6A CN202310424904A CN116137585B CN 116137585 B CN116137585 B CN 116137585B CN 202310424904 A CN202310424904 A CN 202310424904A CN 116137585 B CN116137585 B CN 116137585B
- Authority
- CN
- China
- Prior art keywords
- header
- encapsulated
- message
- packet
- identifier
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 51
- 238000005538 encapsulation Methods 0.000 claims abstract description 48
- 238000006243 chemical reaction Methods 0.000 claims abstract description 27
- 238000004590 computer program Methods 0.000 claims description 7
- 230000006854 communication Effects 0.000 claims description 6
- 238000004891 communication Methods 0.000 claims description 6
- 238000004458 analytical method Methods 0.000 claims description 2
- 230000006870 function Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 5
- 238000013519 translation Methods 0.000 description 4
- 238000007726 management method Methods 0.000 description 3
- 230000007175 bidirectional communication Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000005641 tunneling Effects 0.000 description 1
Classifications
-
- 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
- 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
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本申请涉及通信技术领域,具体涉及一种报文转发方法、装置、计算机设备及存储介质。The present application relates to the technical field of communications, and in particular to a message forwarding method, device, computer equipment, and storage medium.
背景技术Background technique
虚拟交换机(Virtual Switch,vSwitch)又称虚拟网络交换机,是指工作在二层数据网络,通过软件方式实现物理交换机的二层(和部分三层)网络功能,与传统物理交换机相比,虚拟交换机具备配置灵活、扩展性强、成本低、性能高的优点。然而,现有虚拟交换机在接收到报文后,通常是将报文进行逐层解包封包后再转发,转发效率低。A virtual switch (Virtual Switch, vSwitch), also known as a virtual network switch, refers to a layer 2 (and part of layer 3) network function of a physical switch that works on a layer 2 data network. Compared with a traditional physical switch, a virtual switch It has the advantages of flexible configuration, strong scalability, low cost, and high performance. However, after receiving a message, the existing virtual switch usually depackets the message layer by layer before forwarding it, and the forwarding efficiency is low.
发明内容Contents of the invention
本申请实施例提供一种报文转发方法、装置、计算机设备及存储介质,对报文进行转发时,无需对报文进行逐层解包封包,能够提高报文的转发速度,降低报文的转发成本。The embodiment of the present application provides a message forwarding method, device, computer equipment, and storage medium. When forwarding a message, it is not necessary to depacketize the message layer by layer, which can increase the forwarding speed of the message and reduce the cost of the message. Forwarding costs.
一方面,本申请提供一种报文转发方法,所述报文转发方法应用于报文转发装置,所述报文转发装置与用户终端和外网服务器分别通信连接,所述报文转发方法包括:On the one hand, the present application provides a message forwarding method, the message forwarding method is applied to a message forwarding device, and the message forwarding device communicates with a user terminal and an external network server respectively, and the message forwarding method includes :
获取所述用户终端发送的隧道封装后的第一报文,所述第一报文包括第一外层隧道头和第一内层头;Obtaining a tunnel-encapsulated first packet sent by the user terminal, where the first packet includes a first outer tunnel header and a first inner header;
对所述第一外层隧道头进行解析得到第一虚拟网络标识,以及对所述第一内层头进行解析得到第一双层VLAN标识;Analyzing the first outer layer tunnel header to obtain a first virtual network identifier, and analyzing the first inner layer header to obtain a first double-layer VLAN identifier;
基于所述第一虚拟网络标识和所述第一双层VLAN标识,获取第一预封装报文信息、第二虚拟网络标识、公网IP地址及公网端口;Based on the first virtual network identifier and the first double-layer VLAN identifier, obtain first pre-encapsulated message information, a second virtual network identifier, a public network IP address, and a public network port;
基于所述第一预封装报文信息和所述第一报文,确定所述第一报文的第一封装报文;determining a first encapsulated packet of the first packet based on the first pre-encapsulated packet information and the first packet;
基于所述公网IP地址和所述公网端口对所述第一封装报文进行NAT转换,以将所述第一封装报文的源IP地址转换为所述公网IP地址,以及将所述第一封装报文的源端口转换为所述公网端口;Perform NAT conversion on the first encapsulated packet based on the public network IP address and the public network port, so as to convert the source IP address of the first encapsulated packet into the public network IP address, and convert the source IP address of the first encapsulated packet to the public network IP address, and Converting the source port of the first encapsulated message into the public network port;
基于所述第二虚拟网络标识将NAT转换后的第一封装报文发送至所述外网服务器。Sending the NAT-translated first encapsulated packet to the external network server based on the second virtual network identifier.
在本申请一些实施方案中,所述报文转发方法还包括:In some embodiments of the present application, the message forwarding method further includes:
获取所述外网服务器发送的隧道封装后的第二报文,所述第二报文包括第二外层隧道头和第二内层头;Obtaining a tunnel-encapsulated second message sent by the external network server, where the second message includes a second outer tunnel header and a second inner layer header;
对所述第二外层隧道头进行解析得到所述第二虚拟网络标识,以及对所述第二内层头进行解析得到第二双层VLAN标识;Analyzing the second outer layer tunnel header to obtain the second virtual network identifier, and analyzing the second inner layer header to obtain a second double-layer VLAN identifier;
基于所述第二虚拟网络标识和所述第二双层VLAN标识,获取第二预封装报文信息、所述第一虚拟网络标识、私网IP地址及私网端口;Based on the second virtual network identifier and the second double-layer VLAN identifier, obtain second pre-encapsulated packet information, the first virtual network identifier, private network IP address and private network port;
基于所述第二预封装报文信息和所述第二报文,确定所述第二报文的第二封装报文;determining a second encapsulated packet of the second packet based on the second pre-encapsulated packet information and the second packet;
基于所述私网IP地址和所述私网端口对所述第二封装报文进行NAT转换,以将所述第二封装报文的目的IP地址转换为所述私网IP地址,以及将所述第二封装报文的目的端口转换为所述私网端口;Perform NAT conversion on the second encapsulated message based on the private network IP address and the private network port, so as to convert the destination IP address of the second encapsulated message into the private network IP address, and convert the second encapsulated message to the private network IP address, Converting the destination port of the second encapsulated message into the private network port;
基于所述第一虚拟网络标识将NAT转换后的第二封装报文发送至所述用户终端。Sending the NAT-translated second encapsulated packet to the user terminal based on the first virtual network identifier.
在本申请一些实施方案中,所述基于所述第一虚拟网络标识和所述第一双层VLAN标识,获取第一预封装报文信息,包括:In some implementations of the present application, the acquiring first pre-encapsulated message information based on the first virtual network identifier and the first double-layer VLAN identifier includes:
基于所述第一虚拟网络标识和所述第一双层VLAN标识,确定第一账号信息;Determine first account information based on the first virtual network identifier and the first double-layer VLAN identifier;
基于所述第一账号信息,获取第一预封装报文信息。Based on the first account information, first pre-encapsulated packet information is acquired.
在本申请一些实施方案中,所述第一报文还包括IP头、TCP头及报文数据,所述第一预封装报文信息包括预封装外层隧道头和预封装内层头,所述基于所述第一预封装报文信息和所述第一报文,确定所述第一报文的第一封装报文,包括:In some embodiments of the present application, the first packet further includes an IP header, a TCP header, and packet data, and the first pre-encapsulated packet information includes a pre-encapsulated outer layer tunnel header and a pre-encapsulated inner layer header, so Determining the first encapsulated message of the first message based on the first pre-encapsulated message information and the first message includes:
从所述第一报文中获取IP头、TCP头及报文数据;Obtaining an IP header, a TCP header, and packet data from the first packet;
将所述预封装外层隧道头、所述预封装内层头、所述IP头、所述TCP头及所述报文数据进行拼接,以得到所述第一报文的第一封装报文。Splicing the pre-encapsulated outer tunnel header, the pre-encapsulated inner layer header, the IP header, the TCP header, and the packet data to obtain a first encapsulated packet of the first packet .
在本申请一些实施方案中,所述基于所述第一虚拟网络标识和所述第一双层VLAN标识,获取第一预封装报文信息之前,所述方法还包括:In some embodiments of the present application, before obtaining the first pre-encapsulated packet information based on the first virtual network identifier and the first double-layer VLAN identifier, the method further includes:
获取所述第一外层隧道头和所述第一内层头;Acquiring the first outer tunnel header and the first inner tunnel header;
获取所述第一账号信息,所述第一账号信息包括WAN侧隧道标识、源MAC地址、第一目的MAC地址、第一VLAN信息及拨号标识符;Obtain the first account information, where the first account information includes a WAN side tunnel identifier, a source MAC address, a first destination MAC address, first VLAN information, and a dial-up identifier;
基于所述WAN侧隧道标识对所述第一外层隧道头进行封装,得到预封装外层隧道头;Encapsulating the first outer tunnel header based on the WAN side tunnel identifier to obtain a pre-encapsulated outer tunnel header;
基于所述源MAC地址、所述第一目的MAC地址、所述第一VLAN信息及所述拨号标识符对所述第一内层头进行封装,得到预封装内层头。Encapsulating the first inner header based on the source MAC address, the first destination MAC address, the first VLAN information and the dialing identifier to obtain a pre-encapsulated inner header.
在本申请一些实施方案中,当所述第一报文为VXLAN隧道封装后的报文时,所述第一外层隧道头包括外层ETH头、外层VLAN头、外层IP头、UDP头及VXLAN头,所述对所述第一外层隧道头进行解析得到第一虚拟网络标识,包括:In some embodiments of the present application, when the first message is a message encapsulated by a VXLAN tunnel, the first outer tunnel header includes an outer ETH header, an outer VLAN header, an outer IP header, a UDP header and VXLAN header, the first virtual network identifier is obtained by parsing the first outer layer tunnel header, including:
从所述第一外层隧道头中获取VXLAN头;Obtain a VXLAN header from the first outer tunnel header;
对所述VXLAN头进行解析,得到第一虚拟网络标识;Analyzing the VXLAN header to obtain a first virtual network identifier;
当所述第一报文为SRv6隧道封装后的报文时,所述第一外层隧道头包括外层ETH头、外层VLAN头及SRv6头,所述对所述第一外层隧道头进行解析得到第一虚拟网络标识,包括:When the first message is a message encapsulated by an SRv6 tunnel, the first outer tunnel header includes an outer ETH header, an outer VLAN header, and an SRv6 header, and the pair of the first outer tunnel header Perform analysis to obtain the first virtual network identifier, including:
从所述第一外层隧道头中获取SRv6头;Obtain an SRv6 header from the first outer tunnel header;
对所述SRv6头进行解析,得到第一虚拟网络标识。The SRv6 header is parsed to obtain the first virtual network identifier.
在本申请一些实施方案中,所述第一内层头包括内层ETH头和内层双层VLAN头,所述对所述第一内层头进行解析得到第一双层VLAN标识,包括:In some embodiments of the present application, the first inner layer header includes an inner layer ETH header and an inner layer double-layer VLAN header, and analyzing the first inner layer header to obtain a first double-layer VLAN identifier includes:
从所述第一内层头中获取内层双层VLAN头;Obtain an inner layer double-layer VLAN header from the first inner layer header;
对所述内层双层VLAN头进行解析,得到第一双层VLAN标识。The inner double-layer VLAN header is analyzed to obtain the first double-layer VLAN identifier.
另一方面,本申请提供一种报文转发装置,所述报文转发装置与用户终端和外网服务器分别通信连接,所述报文转发装置包括:On the other hand, the present application provides a message forwarding device, the message forwarding device communicates with a user terminal and an external network server respectively, and the message forwarding device includes:
报文获取单元,用于获取所述用户终端发送的隧道封装后的第一报文,所述第一报文包括第一外层隧道头和第一内层头;A message obtaining unit, configured to obtain a tunnel-encapsulated first message sent by the user terminal, where the first message includes a first outer tunnel header and a first inner layer header;
报文解析单元,用于对所述第一外层隧道头进行解析得到第一虚拟网络标识,以及对所述第一内层头进行解析得到第一双层VLAN标识;A message parsing unit, configured to parse the first outer tunnel header to obtain a first virtual network identifier, and parse the first inner header to obtain a first double-layer VLAN identifier;
信息获取单元,用于基于所述第一虚拟网络标识和所述第一双层VLAN标识,获取第一预封装报文信息、第二虚拟网络标识、公网IP地址及公网端口;An information acquiring unit, configured to acquire first pre-encapsulated message information, a second virtual network identifier, a public network IP address, and a public network port based on the first virtual network identifier and the first double-layer VLAN identifier;
报文封装单元,用于基于所述第一预封装报文信息和所述第一报文,确定所述第一报文的第一封装报文;A packet encapsulation unit, configured to determine a first encapsulated packet of the first packet based on the first pre-encapsulated packet information and the first packet;
第一转换单元,用于基于所述公网IP地址和所述公网端口对所述第一封装报文进行NAT转换,以将所述第一封装报文的源IP地址转换为所述公网IP地址,以及将所述第一封装报文的源端口转换为所述公网端口;A first conversion unit, configured to perform NAT conversion on the first encapsulated message based on the public network IP address and the public network port, so as to convert the source IP address of the first encapsulated message into the public network port network IP address, and converting the source port of the first encapsulated message to the public network port;
第一转发单元,用于基于所述第二虚拟网络标识将NAT转换后的第一封装报文发送至所述外网服务器。The first forwarding unit is configured to send the NAT-translated first encapsulated packet to the external network server based on the second virtual network identifier.
在本申请一些实施方案中,当所述第一报文为VXLAN隧道封装后的报文时,所述第一外层隧道头包括外层ETH头、外层VLAN头、外层IP头、UDP头及VXLAN头,所述报文解析单元具体用于:In some embodiments of the present application, when the first message is a message encapsulated by a VXLAN tunnel, the first outer tunnel header includes an outer ETH header, an outer VLAN header, an outer IP header, a UDP header and VXLAN header, the message parsing unit is specifically used for:
从所述第一外层隧道头中获取VXLAN头;Obtain a VXLAN header from the first outer tunnel header;
对所述VXLAN头进行解析,得到第一虚拟网络标识。The VXLAN header is parsed to obtain the first virtual network identifier.
在本申请一些实施方案中,当所述第一报文为SRv6隧道封装后的报文时,所述第一外层隧道头包括外层ETH头、外层VLAN头及SRv6头,所述报文解析单元具体用于:In some implementations of the present application, when the first packet is a packet encapsulated by an SRv6 tunnel, the first outer tunnel header includes an outer ETH header, an outer VLAN header, and an SRv6 header, and the packet The text parsing unit is specifically used for:
从所述第一外层隧道头中获取SRv6头;Obtain an SRv6 header from the first outer tunnel header;
对所述SRv6头进行解析,得到第一虚拟网络标识。The SRv6 header is parsed to obtain the first virtual network identifier.
在本申请一些实施方案中,所述第一内层头包括内层ETH头和内层双层VLAN头,所述报文解析单元具体还用于:In some embodiments of the present application, the first inner layer header includes an inner layer ETH header and an inner layer double-layer VLAN header, and the message parsing unit is also specifically used for:
从所述第一内层头中获取内层双层VLAN头;Obtain an inner layer double-layer VLAN header from the first inner layer header;
对所述内层双层VLAN头进行解析,得到第一双层VLAN标识。The inner double-layer VLAN header is analyzed to obtain the first double-layer VLAN identifier.
在本申请一些实施方案中,所述信息获取单元具体用于:In some embodiments of the present application, the information acquisition unit is specifically used for:
基于所述第一虚拟网络标识和所述第一双层VLAN标识,确定第一账号信息;Determine first account information based on the first virtual network identifier and the first double-layer VLAN identifier;
基于所述第一账号信息,获取第一预封装报文信息。Based on the first account information, first pre-encapsulated packet information is acquired.
在本申请一些实施例中,所述第一报文还包括IP头、TCP头及报文数据,所述第一预封装报文信息包括预封装外层隧道头和预封装内层头,所述报文封装单元具体用于:In some embodiments of the present application, the first packet further includes an IP header, a TCP header, and packet data, and the first pre-encapsulated packet information includes a pre-encapsulated outer tunnel header and a pre-encapsulated inner layer header, so The message encapsulation unit is specifically used for:
从所述第一报文中获取IP头、TCP头及报文数据;Obtaining an IP header, a TCP header, and packet data from the first packet;
将所述预封装外层隧道头、所述预封装内层头、所述IP头、所述TCP头及所述报文数据进行拼接,以得到所述第一报文的第一封装报文。Splicing the pre-encapsulated outer tunnel header, the pre-encapsulated inner layer header, the IP header, the TCP header, and the packet data to obtain a first encapsulated packet of the first packet .
在本申请一些实施例中,所述报文转发装置还包括:In some embodiments of the present application, the message forwarding device further includes:
第一获取单元,用于获取所述第一外层隧道头和所述第一内层头;a first acquiring unit, configured to acquire the first outer tunnel header and the first inner header;
第二获取单元,用于获取所述第一账号信息,所述第一账号信息包括WAN侧隧道标识、源MAC地址、第一目的MAC地址、第一VLAN信息及拨号标识符;A second acquiring unit, configured to acquire the first account information, where the first account information includes a WAN side tunnel identifier, a source MAC address, a first destination MAC address, first VLAN information, and a dial-up identifier;
第一封装单元,用于基于所述WAN侧隧道标识对所述第一外层隧道头进行封装,得到预封装外层隧道头;A first encapsulation unit, configured to encapsulate the first outer tunnel header based on the WAN-side tunnel identifier to obtain a pre-encapsulated outer tunnel header;
第二封装单元,用于基于所述源MAC地址、所述第一目的MAC地址、所述第一VLAN信息及所述拨号标识符对所述第一内层头进行封装,得到预封装内层头。A second encapsulation unit, configured to encapsulate the first inner layer header based on the source MAC address, the first destination MAC address, the first VLAN information and the dial identifier, to obtain a pre-encapsulated inner layer head.
在本申请一些实施例中,所述报文转发装置还包括:In some embodiments of the present application, the message forwarding device further includes:
第三获取单元,用于获取所述外网服务器发送的隧道封装后的第二报文,所述第二报文包括第二外层隧道头和第二内层头;A third obtaining unit, configured to obtain a tunnel-encapsulated second message sent by the external network server, where the second message includes a second outer tunnel header and a second inner layer header;
信息解析单元,用于对所述第二外层隧道头进行解析得到所述第二虚拟网络标识,以及对所述第二内层头进行解析得到第二双层VLAN标识;An information parsing unit, configured to parse the second outer tunnel header to obtain the second virtual network identifier, and parse the second inner header to obtain a second double-layer VLAN identifier;
第四获取单元,用于基于所述第二虚拟网络标识和所述第二双层VLAN标识,获取第二预封装报文信息、所述第一虚拟网络标识、私网IP地址及私网端口;A fourth acquiring unit, configured to acquire second pre-encapsulated message information, the first virtual network identifier, private network IP address and private network port based on the second virtual network identifier and the second double-layer VLAN identifier ;
报文确定单元,用于基于所述第二预封装报文信息和所述第二报文,确定所述第二报文的第二封装报文;A message determining unit, configured to determine a second encapsulated message of the second message based on the second pre-encapsulated message information and the second message;
第二转换单元,用于基于所述私网IP地址和所述私网端口对所述第二封装报文进行NAT转换,以将所述第二封装报文的目的IP地址转换为所述私网IP地址,以及将所述第二封装报文的目的端口转换为所述私网端口;The second conversion unit is configured to perform NAT conversion on the second encapsulated message based on the private network IP address and the private network port, so as to convert the destination IP address of the second encapsulated message into the private network network IP address, and converting the destination port of the second encapsulated message into the private network port;
第二转发单元,用于基于所述第一虚拟网络标识将NAT转换后的第二封装报文发送至所述用户终端。The second forwarding unit is configured to send the NAT-translated second encapsulated packet to the user terminal based on the first virtual network identifier.
另一方面,本申请还提供一种计算机设备,所述计算机设备包括:On the other hand, the present application also provides a kind of computer equipment, and described computer equipment comprises:
一个或多个处理器;one or more processors;
存储器;以及storage; and
一个或多个应用程序,其中所述一个或多个应用程序被存储于所述存储器中,并配置为由所述处理器执行以实现第一方面中任一项所述的报文转发方法。One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the packet forwarding method described in any one of the first aspect.
第四方面,本申请还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器进行加载,以执行第一方面任一项所述的报文转发方法中的步骤。In a fourth aspect, the present application also provides a computer-readable storage medium, on which a computer program is stored, and the computer program is loaded by a processor to execute the message forwarding method described in any one of the first aspect. step.
本申请对第一报文的第一外层隧道头和第一内层头进行预封装,在获取到第一报文后,从第一报文中解析出第一虚拟网络标识和第一双层VLAN标识,再基于第一虚拟网络标识和第一双层VLAN标识获取第一预封装报文信息,基于第一预封装报文信息可以直接确定第一报文的第一封装报文,无需对报文进行逐层解封封包,提高了报文的转发速度,降低了报文的转发成本。This application pre-encapsulates the first outer layer tunnel header and the first inner layer header of the first message, and after obtaining the first message, parses out the first virtual network identifier and the first double tunnel header from the first message. layer VLAN identifier, and then obtain the first pre-encapsulated packet information based on the first virtual network identifier and the first double-layer VLAN identifier, and can directly determine the first encapsulated packet of the first packet based on the first pre-encapsulated packet information, without Packets are decapsulated layer by layer to increase the speed of message forwarding and reduce the cost of message forwarding.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1是本申请实施例提供的报文转发系统的场景示意图;FIG. 1 is a schematic diagram of a scenario of a message forwarding system provided in an embodiment of the present application;
图2是本申请实施例中提供的报文转发方法的一个实施例流程示意图;Fig. 2 is a schematic flow chart of an embodiment of the message forwarding method provided in the embodiment of the present application;
图3是本申请实施例中提供的VXLAN隧道封装报文的报文结构图;Fig. 3 is a message structure diagram of the VXLAN tunnel encapsulation message provided in the embodiment of the present application;
图4是本申请实施例中提供的SRv6隧道封装报文的报文结构图;Fig. 4 is a message structure diagram of the SRv6 tunnel encapsulation message provided in the embodiment of the present application;
图5是本申请实施例中提供的报文转发方法的具体实施例流程示意图;Fig. 5 is a schematic flow chart of a specific embodiment of the message forwarding method provided in the embodiment of the present application;
图6是本申请实施例中提供的报文转发装置的一个实施例结构示意图;FIG. 6 is a schematic structural diagram of an embodiment of a message forwarding device provided in an embodiment of the present application;
图7是本申请实施例中提供的计算机设备的一个实施例结构示意图。Fig. 7 is a schematic structural diagram of an embodiment of a computer device provided in the embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts belong to the scope of protection of this application.
在本申请的描述中,需要理解的是,术语“中心”、“纵向”、“横向”、“长度”、“宽度”、“厚度”、“上”、“下”、“前”、“后”、“左”、“右”、“竖直”、“水平”、“顶”、“底”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本申请和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制。此外,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”、“第三”的特征可以明示或者隐含地包括一个或者更多个所述特征。在本申请的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In the description of the present application, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", " The orientation or positional relationship indicated by "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. is based on the orientation shown in the drawings Or positional relationship is only for the convenience of describing the present application and simplifying the description, but does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present application. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined as "first", "second" and "third" may explicitly or implicitly include one or more of said features. In the description of the present application, "plurality" means two or more, unless otherwise specifically defined.
在本申请中,“示例性”一词用来表示“用作例子、例证或说明”。本申请中被描述为“示例性”的任何实施例不一定被解释为比其它实施例更优选或更具优势。为了使本领域任何技术人员能够实现和使用本申请,给出了以下描述。在以下描述中,为了解释的目的而列出了细节。应当明白的是,本领域普通技术人员可以认识到,在不使用这些特定细节的情况下也可以实现本申请。在其它实例中,不会对公知的结构和过程进行详细阐述,以避免不必要的细节使本申请的描述变得晦涩。因此,本申请并非旨在限于所示的实施例,而是与符合本申请所公开的原理和特征的最广范围相一致。In this application, the word "exemplary" is used to mean "serving as an example, illustration or illustration". Any embodiment described in this application as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is given to enable any person skilled in the art to make and use the application. In the following description, details are set forth for purposes of explanation. It should be understood that one of ordinary skill in the art would recognize that the present application may be practiced without these specific details. In other instances, well-known structures and processes are not described in detail to avoid obscuring the description of the present application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
需要说明的是,本申请实施例方法由于是在计算机设备中执行,各计算机设备的处理对象均以数据或信息的形式存在,例如时间,实质为时间信息,可以理解的是,后续实施例中若提及尺寸、数量、位置等,均为对应的数据存在,以便计算机设备进行处理,具体此处不作赘述。It should be noted that since the methods in the embodiments of the present application are executed in computer equipment, the processing objects of each computer equipment exist in the form of data or information, such as time, which is essentially time information. It can be understood that in the subsequent embodiments If the size, quantity, location, etc. are mentioned, there are corresponding data for processing by computer equipment, and the details will not be repeated here.
本申请实施例提供一种报文转发方法、装置、计算机设备及存储介质,以下分别进行详细说明。Embodiments of the present application provide a message forwarding method, device, computer equipment, and storage medium, which will be described in detail below.
请参阅图1,图1为本申请实施例所提供的报文转发系统的场景示意图,该报文转发系统可以包括计算机设备100、用户终端200及外网服务器300,计算机设备100与用户终端200和外网服务器300分别通信连接。计算机设备100中集成有报文转发装置,如图1中的计算机设备。Please refer to FIG. 1. FIG. 1 is a schematic diagram of a scenario of a message forwarding system provided by an embodiment of the present application. The message forwarding system may include a computer device 100, a user terminal 200 and an external network server 300, and the computer device 100 and the user terminal 200 Communicatively connect with the external network server 300 respectively. A message forwarding device is integrated in the computer equipment 100, such as the computer equipment in FIG. 1 .
本申请实施例中计算机设备100主要用于获取所述用户终端发送的隧道封装后的第一报文,所述第一报文包括第一外层隧道头和第一内层头;对所述第一外层隧道头进行解析得到第一虚拟网络标识,以及对所述第一内层头进行解析得到第一双层VLAN标识;基于所述第一虚拟网络标识和所述第一双层VLAN标识,获取第一预封装报文信息、第二虚拟网络标识、公网IP地址及公网端口;基于所述第一预封装报文信息和所述第一报文,确定所述第一报文的第一封装报文;基于所述公网IP地址和所述公网端口对所述第一封装报文进行NAT转换,以将所述第一封装报文的源IP地址转换为所述公网IP地址,以及将所述第一封装报文的源端口转换为所述公网端口;基于所述第二虚拟网络标识将NAT转换后的第一封装报文发送至所述外网服务器。In the embodiment of the present application, the computer device 100 is mainly used to obtain the tunnel-encapsulated first message sent by the user terminal, the first message includes the first outer tunnel header and the first inner layer header; The first outer layer tunnel header is analyzed to obtain a first virtual network identifier, and the first inner layer header is analyzed to obtain a first double-layer VLAN identifier; based on the first virtual network identifier and the first double-layer VLAN identification, to obtain the first pre-encapsulated message information, the second virtual network identification, the public network IP address and the public network port; based on the first pre-encapsulated message information and the first message, determine the first message The first encapsulated message of the text; NAT conversion is performed on the first encapsulated message based on the public network IP address and the public network port, so as to convert the source IP address of the first encapsulated message into the A public network IP address, and converting the source port of the first encapsulated message to the public network port; sending the NAT-converted first encapsulated message to the external network server based on the second virtual network identifier .
本申请实施例中,该计算机设备100可以是独立的服务器,也可以是服务器组成的服务器网络或服务器集群,例如,本申请实施例中所描述的计算机设备100,其包括但不限于计算机、网络主机、单个网络服务器、多个网络服务器集或多个服务器构成的云服务器。其中,云服务器由基于云计算(Cloud Computing)的大量计算机或网络服务器构成。In the embodiment of the present application, the computer device 100 can be an independent server, or a server network or server cluster composed of servers, for example, the computer device 100 described in the embodiment of the present application, which includes but not limited to computers, network A host, a single web server, a collection of multiple web servers, or a cloud server composed of multiple servers. Wherein, the cloud server is composed of a large number of computers or network servers based on cloud computing (Cloud Computing).
可以理解的是,本申请实施例中所使用的计算机设备100可以是既包括接收和发射硬件的设备,即具有能够在双向通信链路上,执行双向通信的接收和发射硬件的设备。这种设备可以包括:蜂窝或其他通信设备,其具有单线路显示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备。具体的计算机设备100具体可以是台式终端或移动终端,计算机设备100具体还可以是手机、平板电脑、笔记本电脑等中的一种。It can be understood that the computer device 100 used in the embodiment of the present application may be a device including both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. Such devices may include cellular or other communication devices having a single line display or a multi-line display or a cellular or other communication device without a multi-line display. Specifically, the computer device 100 may be a desktop terminal or a mobile terminal, and the computer device 100 may also be specifically one of a mobile phone, a tablet computer, a notebook computer, and the like.
本领域技术人员可以理解,图1中示出的应用环境,仅仅是与本申请方案一种应用场景,并不构成对本申请方案应用场景的限定,其他的应用环境还可以包括比图1中所示更多或更少的计算机设备,例如图1中仅示出1个计算机设备,可以理解的,该集群资源调度系统还可以包括一个或多个其他服务,具体此处不作限定。Those skilled in the art can understand that the application environment shown in Figure 1 is only an application scenario related to the solution of this application, and does not constitute a limitation on the application scenario of the solution of this application. More or fewer computer devices are shown, for example, only one computer device is shown in FIG. 1 , it can be understood that the cluster resource scheduling system may also include one or more other services, which are not specifically limited here.
本申请实施例中,用户终端200为位于私网(内网)的终端,用户终端200可以是一个通用计算机设备或者是一个专用计算机设备。在具体实现中用户终端200可以是台式机、便携式电脑、网络服务器、掌上电脑(Personal Digital Assistant,PDA)、移动手机、平板电脑、无线终端设备、通信设备、嵌入式设备等,本实施例不限定用户终端200的类型。In the embodiment of the present application, the user terminal 200 is a terminal located in a private network (intranet), and the user terminal 200 may be a general-purpose computer device or a dedicated computer device. In a specific implementation, the user terminal 200 may be a desktop computer, a portable computer, a network server, a PDA (Personal Digital Assistant, PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, an embedded device, etc., and the present embodiment does not The type of the user terminal 200 is defined.
本申请实施例中,外网服务器300为外网(公网)的服务器,外网服务器300可以是独立的服务器,也可以是多个服务器组成的服务器网络或服务器集群,例如,本发明实施例中所描述的外网服务器300,其包括但不限于计算机、网络主机、单个网络服务器、多个网络服务器集或多个服务器构成的云服务器。其中,云服务器由基于云计算(Cloud Computing)的大量计算机或网络服务器构成。In the embodiment of the present application, the external network server 300 is a server of the external network (public network), and the external network server 300 can be an independent server, or a server network or server cluster composed of multiple servers. For example, the embodiment of the present invention The extranet server 300 described in , includes but is not limited to a computer, a web host, a single web server, a set of multiple web servers, or a cloud server composed of multiple servers. Wherein, the cloud server is composed of a large number of computers or network servers based on cloud computing (Cloud Computing).
下面结合附图,通过对实施例的描述,对本申请内容作进一步说明。The content of the present application will be further described below by describing the embodiments in conjunction with the accompanying drawings.
本实施例提供一种报文转发方法,该报文转发方法应用于报文转发装置,该报文转发装置与用户终端和外网服务器分别通信连接,如图2中所示,方法包括:This embodiment provides a message forwarding method. The message forwarding method is applied to a message forwarding device, and the message forwarding device communicates with a user terminal and an external network server respectively, as shown in FIG. 2 . The method includes:
301、获取所述用户终端发送的隧道封装后的第一报文,所述第一报文包括第一外层隧道头和第一内层头。301. Acquire a tunnel-encapsulated first packet sent by the user terminal, where the first packet includes a first outer tunnel header and a first inner header.
第一报文为用户终端向外网服务器发送的报文,第一报文为采用现有的隧道技术进行隧道封装后的报文,如图3所示,当第一报文为VXLAN隧道封装后的报文时,第一报文的结构从外至内依次包括外层ETH头、外层VLAN头、外层IP头、UDP头、VXLAN头、内层ETH头、内层双层VLAN头、PPPOE头、内层IP头、TCP头及报文数据;如图4所示,当第一报文为SRv6隧道封装后的报文时,第一报文的结构从外至内依次包括外层ETH头、外层VLAN头、SRv6头、内层ETH头、内层双层VLAN头、内层IP头、TCP头及报文数据。The first message is the message sent by the user terminal to the external network server. The first message is a message after tunnel encapsulation using the existing tunnel technology. As shown in Figure 3, when the first message is VXLAN tunnel encapsulation For the last message, the structure of the first message includes the outer ETH header, the outer VLAN header, the outer IP header, the UDP header, the VXLAN header, the inner ETH header, and the inner double-layer VLAN header from outside to inside. , PPPOE header, inner layer IP header, TCP header, and packet data; as shown in Figure 4, when the first packet is a packet encapsulated by an SRv6 tunnel, the structure of the first packet includes the outer Layer ETH header, outer VLAN header, SRv6 header, inner ETH header, inner double VLAN header, inner IP header, TCP header and message data.
其中,当第一报文为VXLAN隧道封装后的报文时,第一外层隧道头包括第一报文的外层ETH头、外层VLAN头、外层IP头、UDP头及VXLAN头,第一内层头包括第一报文的内层ETH头、内层双层VLAN头及PPPOE头;当第一报文为SRv6隧道封装后的报文时,第一外层隧道头包括第一报文的外层ETH头、外层VLAN头、外层IP头、UDP头及VXLAN头,第一内层头包括第一报文的内层ETH头和内层双层VLAN头。Wherein, when the first message is a message encapsulated by a VXLAN tunnel, the first outer tunnel header includes an outer ETH header, an outer VLAN header, an outer IP header, a UDP header and a VXLAN header of the first message, The first inner layer header includes the inner layer ETH header of the first packet, the inner layer double-layer VLAN header, and the PPPOE header; when the first packet is an SRv6 tunnel-encapsulated packet, the first outer layer tunnel header includes the first The outer ETH header, the outer VLAN header, the outer IP header, the UDP header and the VXLAN header of the message, and the first inner header includes the inner ETH header and the inner double-layer VLAN header of the first message.
302、对所述第一外层隧道头进行解析得到第一虚拟网络标识,以及对所述第一内层头进行解析得到第一双层VLAN标识。302. Parse the first outer tunnel header to obtain a first virtual network identifier, and analyze the first inner tunnel header to obtain a first double-layer VLAN identifier.
第一虚拟网络标识为从第一外层隧道头中解析出的标识,第一双层VLAN标识为从第一内层头的内层双层VLAN头中解析出的标识,第一虚拟网络标识和第一双层VLAN标识可以对第一报文进行唯一标识。The first virtual network identifier is the identifier parsed from the first outer tunnel header, the first double-layer VLAN identifier is the identifier parsed from the inner double-layer VLAN header of the first inner header, and the first virtual network identifier is and the first double-layer VLAN identifier can uniquely identify the first packet.
其中,第一双层VLAN标识为QinQ标识,QinQ也称Stacked VLAN或Double VLAN,标准出自IEEE 802 .1ad,其将用户私网VLANTag封装在公网VLAN Tag中,使报文带着两层VLAN Tag穿越运营商的骨干网络(公网)。Among them, the first double-layer VLAN ID is QinQ ID. QinQ is also called Stacked VLAN or Double VLAN. The standard comes from IEEE 802.1ad, which encapsulates the user private network VLANTag in the public network VLAN Tag, so that the message carries two layers of VLAN Tags traverse the carrier's backbone network (public network).
第一虚拟网络标识随第一报文的隧道封装场景不同而变化,例如,当第一报文为VXLAN隧道封装后的报文时,第一虚拟网络标识为VNI,VNI (VxLAN Network Identifier,VxLAN网络标识)是用户侧设备对应的虚拟可扩展局域网标识(虚拟网络标识符);当第一报文为SRv6隧道封装后的报文时,第一虚拟网络标识为DIP6标识。The first virtual network identifier varies with the tunnel encapsulation scenarios of the first packet. For example, when the first packet is a packet encapsulated by a VXLAN tunnel, the first virtual network identifier is VNI, VNI (VxLAN Network Identifier, VxLAN The network identifier) is the virtual scalable local area network identifier (virtual network identifier) corresponding to the user-side device; when the first packet is a packet encapsulated by an SRv6 tunnel, the first virtual network identifier is a DIP6 identifier.
303、基于所述第一虚拟网络标识和所述第一双层VLAN标识,获取第一预封装报文信息、第二虚拟网络标识、公网IP地址及公网端口。303. Based on the first virtual network identifier and the first double-layer VLAN identifier, obtain first pre-encapsulated packet information, a second virtual network identifier, a public network IP address, and a public network port.
第一预封装报文信息包括预封装后的第一外层隧道头和预封装后的第一内层头,第二虚拟网络标识为用于转发第一报文的虚拟网络标识。公网IP地址为用户终端访问外网服务器时分配到的公网IP地址,公网端口为用户终端访问外网服务器时分配到的公网端口。The first pre-encapsulated packet information includes a pre-encapsulated first outer layer tunnel header and a pre-encapsulated first inner layer header, and the second virtual network identifier is a virtual network identifier for forwarding the first packet. The public network IP address is the public network IP address allocated when the user terminal accesses the external network server, and the public network port is the public network port allocated when the user terminal accesses the external network server.
本实施例从第一报文中解析出第一虚拟网络标识和第一双层VLAN标识后,可以基于第一虚拟网络标识和第一双层VLAN标识获取第一预封装报文信息、第二虚拟网络标识、公网IP地址及公网端口,以便后续步骤中基于第一预封装报文信息、第二虚拟网络标识、公网IP地址及公网端口进行报文转发。In this embodiment, after parsing the first virtual network identifier and the first double-layer VLAN identifier from the first message, the first pre-encapsulated message information, the second The virtual network identifier, the public network IP address and the public network port, so that in subsequent steps, the message can be forwarded based on the first pre-encapsulated message information, the second virtual network identifier, the public network IP address and the public network port.
304、基于所述第一预封装报文信息和所述第一报文,确定所述第一报文的第一封装报文。304. Determine a first encapsulated packet of the first packet based on the first pre-encapsulated packet information and the first packet.
第一封装报文为封装后的第一报文,由于第一预封装报文信息中包括预封装后的第一外层隧道头和预封装后的第一内层头,本实施例获取第一预封装报文信息后,可以直接基于第一预封装报文信息确定第一报文的封装报文,无需对报文进行逐层解包封包,报文转发速度快。The first encapsulated packet is the encapsulated first packet. Since the first pre-encapsulated packet information includes the pre-encapsulated first outer layer tunnel header and the pre-encapsulated first inner layer header, this embodiment obtains the first After the pre-encapsulated message information, the encapsulated message of the first message can be determined directly based on the first pre-encapsulated message information, without depacketizing the message layer by layer, and the message forwarding speed is fast.
305、基于所述公网IP地址和所述公网端口对所述第一封装报文进行NAT转换,以将所述第一封装报文的源IP地址转换为所述公网IP地址,以及将所述第一封装报文的源端口转换为所述公网端口。305. Perform NAT conversion on the first encapsulated packet based on the public network IP address and the public network port, so as to convert the source IP address of the first encapsulated packet into the public network IP address, and Converting the source port of the first encapsulated packet into the public network port.
NAT可分为PAT(Port Address Translation,带端口的地址转换)和NO-PAT(NotPort Address Translation,不带端口的地址转换)。其中,NO-PAT模式下,一个公网IP地址同一时间只能分给一个私网IP地址进行转换;而PAT模式下,一个公网IP地址可以同时分配给多个私网IP地址共用。本申请所出现的NAT指PAT模式。NAT can be divided into PAT (Port Address Translation, address translation with port) and NO-PAT (NotPort Address Translation, address translation without port). Among them, in NO-PAT mode, one public network IP address can only be allocated to one private network IP address for conversion at the same time; while in PAT mode, one public network IP address can be allocated to multiple private network IP addresses at the same time. The NAT in this application refers to the PAT mode.
本实施例确定第一报文的第一封装报文后,基于步骤S303中确定的公网IP地址和公网端口对第一封装报文进行NAT转换,将第一封装报文的源IP地址转换为公网IP地址,以及将第一封装报文的源端口转换为公网端口。In this embodiment, after determining the first encapsulated message of the first message, NAT conversion is performed on the first encapsulated message based on the public network IP address and the public network port determined in step S303, and the source IP address of the first encapsulated message is Converting to a public network IP address, and converting the source port of the first encapsulated packet to a public network port.
306、基于所述第二虚拟网络标识将NAT转换后的第一封装报文发送至所述外网服务器。306. Send the NAT-translated first encapsulated packet to the external network server based on the second virtual network identifier.
对第一封装报文进行NAT转换后,即可基于第二虚拟网络标识将NAT转换后的第一封装报文发送至外网服务器,由于报文转发过程中无需对报文进行逐层解包封包,报文转发速度快,报文转发成本低。After performing NAT conversion on the first encapsulated message, the first encapsulated message after NAT conversion can be sent to the external network server based on the second virtual network identifier, because there is no need to unpack the message layer by layer during the message forwarding process Packet, message forwarding speed is fast, message forwarding cost is low.
在一具体实施方式中,所述报文转发方法,还可以包括如下步骤307~312,具体如下:In a specific implementation manner, the message forwarding method may also include the following steps 307-312, specifically as follows:
307、获取所述外网服务器发送的隧道封装后的第二报文,所述第二报文包括第二外层隧道头和第二内层头;307. Obtain a tunnel-encapsulated second packet sent by the external network server, where the second packet includes a second outer tunnel header and a second inner layer header;
308、对所述第二外层隧道头进行解析得到所述第二虚拟网络标识,以及对所述第二内层头进行解析得到第二双层VLAN标识;308. Analyze the second outer tunnel header to obtain the second virtual network identifier, and analyze the second inner header to obtain a second double-layer VLAN identifier;
309、基于所述第二虚拟网络标识和所述第二双层VLAN标识,获取第二预封装报文信息、所述第一虚拟网络标识、私网IP地址及私网端口;309. Based on the second virtual network identifier and the second double-layer VLAN identifier, obtain second pre-encapsulated packet information, the first virtual network identifier, a private network IP address, and a private network port;
310、基于所述第二预封装报文信息和所述第二报文,确定所述第二报文的第二封装报文;310. Determine a second encapsulated packet of the second packet based on the second pre-encapsulated packet information and the second packet;
311、基于所述私网IP地址和所述私网端口对所述第二封装报文进行NAT转换,以将所述第二封装报文的目的IP地址转换为所述私网IP地址,以及将所述第二封装报文的目的端口转换为所述私网端口;311. Perform NAT conversion on the second encapsulated packet based on the private network IP address and the private network port, so as to convert the destination IP address of the second encapsulated packet into the private network IP address, and converting the destination port of the second encapsulated message into the private network port;
312、基于所述第一虚拟网络标识将NAT转换后的第二封装报文发送至所述用户终端。312. Send the NAT-translated second encapsulated packet to the user terminal based on the first virtual network identifier.
第二报文为外网服务器向用户终端发送的报文,第二报文为采用现有的隧道技术进行隧道封装后的报文,与第一报文类似,当第二报文为VXLAN隧道封装后的报文时,第二报文的结构从外至内依次包括外层ETH头、外层VLAN头、外层IP头、UDP头、VXLAN头、内层ETH头、内层双层VLAN头、PPPOE头、内层IP头、TCP头及报文数据;当第二报文为SRv6隧道封装后的报文时,第二报文的结构从外至内依次包括外层ETH头、外层VLAN头、SRv6头、内层ETH头、内层双层VLAN头、内层IP头、TCP头及报文数据。The second message is a message sent by the external network server to the user terminal. The second message is a message after tunnel encapsulation using the existing tunneling technology. It is similar to the first message. When the second message is a VXLAN tunnel For the encapsulated message, the structure of the second message includes the outer ETH header, outer VLAN header, outer IP header, UDP header, VXLAN header, inner ETH header, and inner double-layer VLAN from outside to inside. header, PPPOE header, inner IP header, TCP header, and packet data; when the second packet is a packet encapsulated by an SRv6 tunnel, the structure of the second packet includes the outer ETH header, outer Layer VLAN header, SRv6 header, inner ETH header, inner double VLAN header, inner IP header, TCP header and message data.
当第二报文为VXLAN隧道封装后的报文时,第二外层隧道头包括第二报文的外层ETH头、外层VLAN头、外层IP头、UDP头及VXLAN头,第二内层头包括第二报文的内层ETH头、内层双层VLAN头及PPPOE头;当第二报文为SRv6隧道封装后的报文时,第二外层隧道头包括第二报文的外层ETH头、外层VLAN头、外层IP头、UDP头及VXLAN头,第二内层头包括第二报文的内层ETH头和内层双层VLAN头。When the second packet is a packet encapsulated by a VXLAN tunnel, the second outer tunnel header includes the outer ETH header, outer VLAN header, outer IP header, UDP header, and VXLAN header of the second packet. The inner layer header includes the inner layer ETH header of the second packet, the inner layer double-layer VLAN header and the PPPOE header; when the second packet is a packet encapsulated by an SRv6 tunnel, the second outer layer tunnel header includes the second packet The outer ETH header, the outer VLAN header, the outer IP header, the UDP header and the VXLAN header, and the second inner header includes the inner ETH header and the inner double-layer VLAN header of the second message.
第二预封装报文信息包括预封装后的第二外层隧道头和预封装后的第二内层头,与用户终端向外网服务器发送第一报文的步骤类似,当外网服务器向用户终端发送第二报文时,报文转发装置获取外网服务器发送的隧道封装后的第二报文,对第二报文的第二外层隧道头进行解析得到第二虚拟网络标识,以及对第二报文的第二内层头进行解析得到第二双层VLAN标识,然后基于第二虚拟网络标识和第二双层VLAN标识,获取第二预封装报文信息、第一虚拟网络标识、私网IP地址及私网端口,并基于第二预封装报文信息和第二报文,确定第二报文的第二封装报文,接着基于私网IP地址和私网端口对第二封装报文进行NAT转换,将第二封装报文的目的IP地址转换为私网IP地址,以及将第二封装报文的目的端口转换为私网端口,最后基于第一虚拟网络标识将NAT转换后的第二封装报文发送至用户终端。The second pre-encapsulated message information includes the pre-encapsulated second outer layer tunnel header and the pre-encapsulated second inner layer header, which is similar to the steps of the user terminal sending the first message to the external network server. When the external network server sends When the user terminal sends the second message, the message forwarding device obtains the tunnel-encapsulated second message sent by the external network server, analyzes the second outer tunnel header of the second message to obtain the second virtual network identifier, and Analyzing the second inner layer header of the second message to obtain a second double-layer VLAN identifier, and then obtaining the second pre-encapsulated message information and the first virtual network identifier based on the second virtual network identifier and the second double-layer VLAN identifier , private network IP address and private network port, and based on the second pre-encapsulated message information and the second message, determine the second encapsulated message of the second message, and then based on the private network IP address and private network port for the second Perform NAT conversion on the encapsulated message, convert the destination IP address of the second encapsulated message into a private network IP address, and convert the destination port of the second encapsulated message into a private network port, and finally perform NAT conversion based on the first virtual network identifier The subsequent second encapsulated packet is sent to the user terminal.
其中,步骤307~312的细化步骤与步骤301~306的细化步骤相同,具体可以参照步骤301~306的细化步骤,本申请在此不再赘述。Wherein, the refinement steps in steps 307-312 are the same as the refinement steps in steps 301-306, for details, please refer to the refinement steps in steps 301-306, which will not be repeated in this application.
在一具体实施方式中,如图5所示,当所述第一报文为VXLAN隧道封装后的报文时,步骤302中所述对所述第一外层隧道头进行解析得到第一虚拟网络标识,可以包括如下步骤401~402,具体如下:In a specific implementation manner, as shown in FIG. 5, when the first packet is a packet encapsulated by a VXLAN tunnel, the first outer tunnel header is analyzed in step 302 to obtain the first virtual tunnel header. The network identification may include the following steps 401-402, specifically as follows:
401、从所述第一外层隧道头中获取VXLAN头;401. Obtain a VXLAN header from the first outer tunnel header;
402、对所述VXLAN头进行解析,得到第一虚拟网络标识。402. Analyze the VXLAN header to obtain a first virtual network identifier.
当第一报文为VXLAN隧道封装后的报文时,第一报文的报文结构如图3所示,第一外层隧道头包括外层ETH头、外层VLAN头、外层IP头、UDP头及VXLAN头,对第一外层隧道头进行解析时,首先从第一外层隧道头中获取VXLAN头,然后对VXLAN头进行解析,得到第一虚拟网络标识。When the first packet is a packet encapsulated by a VXLAN tunnel, the packet structure of the first packet is shown in Figure 3. The first outer tunnel header includes an outer ETH header, an outer VLAN header, and an outer IP header. , UDP header and VXLAN header, when parsing the first outer tunnel header, first obtain the VXLAN header from the first outer tunnel header, and then parse the VXLAN header to obtain the first virtual network identifier.
在一具体实施方式中,当所述第一报文为SRv6隧道封装后的报文时,步骤302中所述对所述第一外层隧道头进行解析得到第一虚拟网络标识,可以包括如下步骤403~404,具体如下:In a specific implementation manner, when the first message is a message encapsulated by an SRv6 tunnel, parsing the first outer tunnel header in step 302 to obtain a first virtual network identifier may include the following Steps 403-404 are as follows:
401、从所述第一外层隧道头中获取SRv6头;401. Obtain an SRv6 header from the first outer tunnel header;
402、对所述SRv6头进行解析,得到第一虚拟网络标识。402. Parse the SRv6 header to obtain a first virtual network identifier.
当第一报文为SRv6隧道封装后的报文时,第一报文的报文结构如图4所示,第一外层隧道头包括外层ETH头、外层VLAN头及SRv6头,对第一外层隧道头进行解析时,首先从第一外层隧道头中获取SRv6头,然后对SRv6头进行解析,得到第一虚拟网络标识。When the first packet is a packet encapsulated by an SRv6 tunnel, the packet structure of the first packet is shown in Figure 4. The first outer tunnel header includes an outer ETH header, an outer VLAN header, and an SRv6 header. When parsing the first outer tunnel header, first obtain the SRv6 header from the first outer tunnel header, and then parse the SRv6 header to obtain the first virtual network identifier.
在一具体实施方式中,所述第一内层头包括内层ETH头和内层双层VLAN头,继续参照图5所示,步骤302中所述对所述第一内层头进行解析得到第一双层VLAN标识,可以包括如下步骤405~406,具体如下:In a specific implementation manner, the first inner layer header includes an inner layer ETH header and an inner layer double-layer VLAN header, as shown in FIG. 5 , the first inner layer header is analyzed in step 302 to obtain The first double-layer VLAN identification may include the following steps 405-406, specifically as follows:
405、从所述第一内层头中获取内层双层VLAN头;405. Obtain an inner double-layer VLAN header from the first inner header;
406、对所述内层双层VLAN头进行解析,得到第一双层VLAN标识。406. Analyze the inner double-layer VLAN header to obtain a first double-layer VLAN identifier.
如图3和图4所示,第一内层头包括内层ETH头和内层双层VLAN头,第一双层VLAN标识为从第一内层头的内层双层VLAN头中解析出的标识。相应地,对第一内层头进行解析的步骤具体包括:从第一内层头中获取内层双层VLAN头,对内层双层VLAN头进行解析,得到第一双层VLAN标识。As shown in Figures 3 and 4, the first inner layer header includes an inner layer ETH header and an inner layer double-layer VLAN header, and the first double-layer VLAN tag is parsed from the inner double-layer VLAN header of the first inner layer header logo. Correspondingly, the step of parsing the first inner layer header specifically includes: obtaining the inner layer double-layer VLAN header from the first inner layer header, analyzing the inner layer double-layer VLAN header, and obtaining the first double-layer VLAN identifier.
在一具体实施方式中,步骤303中所述基于所述第一虚拟网络标识和所述第一双层VLAN标识,获取第一预封装报文信息,可以包括如下步骤407~408,具体如下:In a specific implementation manner, the acquisition of the first pre-encapsulated message information based on the first virtual network identifier and the first double-layer VLAN identifier in step 303 may include the following steps 407-408, specifically as follows:
407、基于所述第一虚拟网络标识和所述第一双层VLAN标识,确定第一账号信息;407. Determine first account information based on the first virtual network identifier and the first double-layer VLAN identifier;
408、基于所述第一账号信息,获取第一预封装报文信息。408. Acquire first pre-encapsulated packet information based on the first account information.
每个虚拟网络标识和双层VLAN标识具有对应的账号信息,第一账号信息为第一虚拟网络标识和第一双层VLAN标识对应的账号信息,而第一预封装报文信息与第一账号信息对应。本实施例基于第一虚拟网络标识和第一双层VLAN标识获取第一预封装报文信息时,首先基于第一虚拟网络标识和第一双层VLAN标识,确定第一账号信息,然后基于第一账号信息,获取第一预封装报文信息。Each virtual network identifier and double-layer VLAN identifier have corresponding account information, the first account information is the account information corresponding to the first virtual network identifier and the first double-layer VLAN identifier, and the first pre-encapsulated message information and the first account information Information correspondence. In this embodiment, when the first pre-encapsulated packet information is obtained based on the first virtual network identifier and the first double-layer VLAN identifier, the first account information is first determined based on the first virtual network identifier and the first double-layer VLAN identifier, and then based on the second Account information to obtain the first pre-encapsulated packet information.
在一具体实施方式中,所述第一报文还包括IP头、TCP头及报文数据,所述第一预封装报文信息包括预封装外层隧道头和预封装内层头,继续参照图5所示,步骤304中所述基于所述第一预封装报文信息和所述第一报文,确定所述第一报文的第一封装报文,可以包括如下步骤409~410,具体如下:In a specific implementation manner, the first message also includes an IP header, a TCP header and message data, and the first pre-encapsulated message information includes a pre-encapsulated outer layer tunnel header and a pre-encapsulated inner layer header. Continue referring to As shown in FIG. 5, determining the first encapsulated message of the first message based on the first pre-encapsulated message information and the first message in step 304 may include the following steps 409-410, details as follows:
409、从所述第一报文中获取IP头、TCP头及报文数据;409. Obtain an IP header, a TCP header, and packet data from the first packet;
410、将所述预封装外层隧道头、所述预封装内层头、所述IP头、所述TCP头及所述报文数据进行拼接,以得到所述第一报文的第一封装报文。410. Splice the pre-encapsulated outer tunnel header, the pre-encapsulated inner layer header, the IP header, the TCP header, and the packet data to obtain a first encapsulation of the first packet message.
继续参照图3和图4所示,第一报文除包括第一外层隧道头和第一内层头外,还包括IP头、TCP头及报文数据。第一预封装报文信息包括预封装外层隧道头和预封装内层头,预封装外层隧道头为预封装后的第一外层隧道头,预封装内层头为预封装后的第一内层头。Continuing to refer to FIG. 3 and FIG. 4 , in addition to the first outer layer tunnel header and the first inner layer header, the first packet also includes an IP header, a TCP header and packet data. The first pre-encapsulated packet information includes a pre-encapsulated outer layer tunnel header and a pre-encapsulated inner layer header, the pre-encapsulated outer layer tunnel header is the pre-encapsulated first outer layer tunnel header, and the pre-encapsulated inner layer header is the pre-encapsulated first An inner header.
本实施例基于第一预封装报文信息和第一报文确定第一封装报文时,首先从第一报文中获取IP头、TCP头及报文数据,然后将预封装外层隧道头、预封装内层头、IP头、TCP头及报文数据进行拼接,从而得到封装后的第一报文,即第一封装报文。When this embodiment determines the first encapsulated message based on the first pre-encapsulated message information and the first message, the IP header, TCP header and message data are first obtained from the first message, and then the pre-encapsulated outer layer tunnel header , pre-encapsulated inner layer header, IP header, TCP header and packet data are spliced to obtain the first encapsulated packet, that is, the first encapsulated packet.
在一具体实施方式中,步骤303中所述基于所述第一虚拟网络标识和所述第一双层VLAN标识,获取第一预封装报文信息之前,可以包括如下步骤411~414,具体如下:In a specific implementation manner, before obtaining the first pre-encapsulated packet information based on the first virtual network identifier and the first double-layer VLAN identifier in step 303, the following steps 411-414 may be included, specifically as follows :
411、获取所述第一外层隧道头和所述第一内层头;411. Acquire the first outer tunnel header and the first inner tunnel header;
412、获取所述第一账号信息,所述第一账号信息包括WAN侧隧道标识、源MAC地址、第一目的MAC地址、第一VLAN信息及拨号标识符;412. Acquire the first account information, where the first account information includes a WAN side tunnel identifier, a source MAC address, a first destination MAC address, first VLAN information, and a dialup identifier;
413、基于所述WAN侧隧道标识对所述第一外层隧道头进行封装,得到预封装外层隧道头;413. Encapsulate the first outer tunnel header based on the WAN-side tunnel identifier to obtain a pre-encapsulated outer tunnel header;
414、基于所述源MAC地址、所述第一目的MAC地址、所述第一VLAN信息及所述拨号标识符对所述第一内层头进行封装,得到预封装内层头。414. Encapsulate the first inner header based on the source MAC address, the first destination MAC address, the first VLAN information, and the dial identifier, to obtain a pre-encapsulated inner header.
在获取第一预封装报文信息前,需要对第一外层隧道头和第一内层头进行预封装。如表1所示,预封装第一外层隧道头需要WAN侧隧道标识(WAN侧隧道VNI),预封装第一内层头需要源MAC地址(vCPE设备WAN侧子接口的MAC地址)、目的MAC地址(pppoe拨号获取的WAN层网关MAC地址)、VLAN信息及拨号标识符(pppoe拨号获取的拨号唯一标识符pppoe_sid)。Before obtaining the first pre-encapsulated packet information, it is necessary to pre-encapsulate the first outer tunnel header and the first inner layer header. As shown in Table 1, the pre-encapsulation of the first outer tunnel header requires the WAN-side tunnel identifier (WAN-side tunnel VNI), and the pre-encapsulation of the first inner-layer header requires the source MAC address (the MAC address of the WAN-side sub-interface of the vCPE device), destination MAC address (WAN layer gateway MAC address obtained by pppoe dial-up), VLAN information and dial-up identifier (dial-up unique identifier pppoe_sid obtained by pppoe dial-up).
表1 封装外层隧道头和内层头所需的信息Table 1 Information required to encapsulate the outer tunnel header and the inner header
本实施例获取的第一账号信息包括WAN侧隧道标识、源MAC地址、第一目的MAC地址、第一VLAN信息及拨号标识符,对第一外层隧道头和第一内层头进行封装时,是基于WAN侧隧道标识对第一外层隧道头进行封装得到预封装外层隧道头,同时基于源MAC地址、第一目的MAC地址、第一VLAN信息及拨号标识符对第一内层头进行封装,得到预封装内层头。The first account information obtained in this embodiment includes the WAN side tunnel identifier, source MAC address, first destination MAC address, first VLAN information, and dial-up identifier, when encapsulating the first outer tunnel header and the first inner header , which is based on the WAN-side tunnel identifier to encapsulate the first outer tunnel header to obtain a pre-encapsulated outer tunnel header, and at the same time, based on the source MAC address, the first destination MAC address, the first VLAN information, and the dial identifier Encapsulation is performed to obtain a pre-encapsulated inner layer header.
继续参照表1所示,步骤S309中获取第二预封装报文信息前,需要获取第二账号信息,第二账号信息包括LAN侧隧道标识、源MAC地址、第二目的MAC地址(账号下终端设备的MAC地址)及第二VLAN信息,然后基于LAN侧隧道标识对第二外层隧道头进行封装得到预封装后的第二外层隧道头,同时基于源MAC地址、第二目的MAC地址及第二VLAN信息对第二内层头进行封装,得到预封装后的第二内层头。Continuing to refer to Table 1, before obtaining the second pre-encapsulated packet information in step S309, the second account information needs to be obtained, and the second account information includes the LAN side tunnel identifier, the source MAC address, and the second destination MAC address (the terminal under the account MAC address of the device) and the second VLAN information, and then based on the LAN side tunnel identifier, the second outer tunnel header is encapsulated to obtain the pre-encapsulated second outer tunnel header, and at the same time based on the source MAC address, the second destination MAC address and The second VLAN information encapsulates the second inner header to obtain the pre-encapsulated second inner header.
发明人经研究发现,在IPv4/VXLAN隧道场景下,使用本申请实施例的报文转发方法将报文由用户终端转发到外网服务器,在外层隧道头可以节省的封装时间为:(ETH头+2层VLAN头+IPv4头+UDP头+VXLAN头)= 14+8+20+20+8+8=58个字节的报文封装时间,在内层头可以节省的封装时间为:(ETH头+2层VLAN头+PPPOE头)=14+8+8=30个字节的报文封装时间。假设报文平均长度300个字节,提升封包速度=(58+30)÷300=29.33%。The inventor found through research that, in the IPv4/VXLAN tunnel scenario, using the message forwarding method of the embodiment of the present application to forward the message from the user terminal to the external network server, the encapsulation time that can be saved in the outer tunnel header is: (ETH header + Layer 2 VLAN header + IPv4 header + UDP header + VXLAN header) = 14+8+20+20+8+8=58 bytes of packet encapsulation time, the encapsulation time that can be saved by the inner layer header is: ( ETH header + Layer 2 VLAN header + PPPOE header) = 14+8+8=30 bytes of packet encapsulation time. Assuming that the average length of the message is 300 bytes, the packet speed is increased = (58+30)÷300=29.33%.
在IPv4/VXLAN隧道场景下,使用本申请实施例的报文转发方法将报文由外网服务器转发到用户终端,在外层隧道头可以节省的封装时间为:(ETH头+2层VLAN头+IPv4头+UDP头+VXLAN头)=14+8+20+20+8+8=58个字节的报文封装时间,在内层头可以节省的封装时间为:(ETH头+2层VLAN头)=14+8= 22个字节的报文封装时间。假设报文平均长度300个字节,提升封包速度=(58+22)÷300=26.67%。In the IPv4/VXLAN tunnel scenario, using the message forwarding method of the embodiment of the present application to forward the message from the external network server to the user terminal, the encapsulation time that can be saved in the outer tunnel header is: (ETH header + Layer 2 VLAN header + IPv4 header + UDP header + VXLAN header) = 14 + 8 + 20 + 20 + 8 + 8 = 58 bytes of packet encapsulation time, the encapsulation time that can be saved by the inner header is: (ETH header + 2-layer VLAN header)=14+8=22 bytes of packet encapsulation time. Assuming that the average length of the packet is 300 bytes, the packet speed is increased = (58+22)÷300=26.67%.
在IPv6/VXLAN隧道场景下,使用本申请实施例的报文转发方法将报文由用户终端转发到外网服务器,在外层隧道头可以节省的封装时间为:(ETH头+2层VLAN头+IPv6头+UDP头+VXLAN头)=14+8+40+20+8+8=78个字节的报文封装时间,在内层头可以节省的封装时间为:(ETH头+2层VLAN头+PPPOE头)=14+8+8=30个字节的报文封装时间。假设报文平均长度300个字节,提升封包速度=(78+30)÷300=36%。In the IPv6/VXLAN tunnel scenario, using the message forwarding method of the embodiment of this application to forward the message from the user terminal to the external network server, the encapsulation time that can be saved in the outer tunnel header is: (ETH header + Layer 2 VLAN header + IPv6 header + UDP header + VXLAN header) = 14 + 8 + 40 + 20 + 8 + 8 = 78 bytes of packet encapsulation time, the encapsulation time that can be saved by the inner header is: (ETH header + 2-layer VLAN header + PPPOE header) = 14+8+8=30 bytes of packet encapsulation time. Assuming that the average length of the message is 300 bytes, the packet speed is increased = (78+30)÷300=36%.
在IPv6/VXLAN隧道场景下,使用本申请实施例的报文转发方法将报文由外网服务器转发到用户终端,在外层隧道头可以节省的封装时间为:(ETH头+2层VLAN头+IPv6头+UDP头+VXLAN头)=14+8+40+20+8+8 =78个字节的报文封装时间,在内层头可以节省的封装时间为:(ETH头+2层VLAN头)=14+8 =22个字节的报文封装时间。假设报文平均长度300个字节,提升封包速度=(78+22)÷300=33.33%。In the IPv6/VXLAN tunnel scenario, using the message forwarding method of the embodiment of this application to forward the message from the external network server to the user terminal, the encapsulation time that can be saved in the outer tunnel header is: (ETH header + Layer 2 VLAN header + IPv6 header + UDP header + VXLAN header) = 14+8+40+20+8+8 = 78 bytes of packet encapsulation time, the encapsulation time that can be saved by the inner layer header is: (ETH header + 2-layer VLAN header) = 14+8 = 22 bytes of packet encapsulation time. Assuming that the average length of the message is 300 bytes, the packet speed is increased = (78+22)÷300=33.33%.
在SRv6隧道场景下,在外层隧道头可以节省的封装时间为:(ETH头+2层VLAN头+SRv6头)=14+8+40=62个字节的报文封装时间,在内层头可以节省的封装时间为:(ETH头+2层VLAN头)=14+8=22个字节的报文封装时间。假设报文平均长度300个字节,提升封包速度=(62+22)÷300=28%。In the SRv6 tunnel scenario, the encapsulation time that can be saved in the outer tunnel header is: (ETH header + Layer 2 VLAN header + SRv6 header) = 14 + 8 + 40 = 62 bytes of packet encapsulation time, the inner header The encapsulation time that can be saved is: (ETH header + Layer 2 VLAN header) = 14 + 8 = 22 bytes of packet encapsulation time. Assuming that the average length of the message is 300 bytes, the packet speed is increased = (62+22)÷300=28%.
为了更好实现本申请实施例中报文转发方法,在报文转发方法基础之上,本申请实施例中还提供一种报文转发装置,如图6所示,所述报文转发装置700包括:In order to better realize the message forwarding method in the embodiment of the present application, on the basis of the message forwarding method, a message forwarding device is also provided in the embodiment of the present application, as shown in FIG. 6 , the message forwarding device 700 include:
报文获取单元701,用于获取所述用户终端发送的隧道封装后的第一报文,所述第一报文包括第一外层隧道头和第一内层头;A message obtaining unit 701, configured to obtain a tunnel-encapsulated first message sent by the user terminal, where the first message includes a first outer tunnel header and a first inner layer header;
报文解析单元702,用于对所述第一外层隧道头进行解析得到第一虚拟网络标识,以及对所述第一内层头进行解析得到第一双层VLAN标识;A message parsing unit 702, configured to parse the first outer tunnel header to obtain a first virtual network identifier, and parse the first inner header to obtain a first double-layer VLAN identifier;
信息获取单元703,用于基于所述第一虚拟网络标识和所述第一双层VLAN标识,获取第一预封装报文信息、第二虚拟网络标识、公网IP地址及公网端口;An information acquiring unit 703, configured to acquire first pre-encapsulated packet information, a second virtual network identifier, a public network IP address, and a public network port based on the first virtual network identifier and the first double-layer VLAN identifier;
报文封装单元704,用于基于所述第一预封装报文信息和所述第一报文,确定所述第一报文的第一封装报文;A packet encapsulation unit 704, configured to determine a first encapsulated packet of the first packet based on the first pre-encapsulated packet information and the first packet;
第一转换单元705,用于基于所述公网IP地址和所述公网端口对所述第一封装报文进行NAT转换,以将所述第一封装报文的源IP地址转换为所述公网IP地址,以及将所述第一封装报文的源端口转换为所述公网端口;The first conversion unit 705 is configured to perform NAT conversion on the first encapsulated message based on the public network IP address and the public network port, so as to convert the source IP address of the first encapsulated message into the a public network IP address, and converting the source port of the first encapsulated message to the public network port;
第一转发单元706,用于基于所述第二虚拟网络标识将NAT转换后的第一封装报文发送至所述外网服务器。The first forwarding unit 706 is configured to send the NAT-translated first encapsulated packet to the external network server based on the second virtual network identifier.
本申请实施例中,对第一报文的第一外层隧道头和第一内层头进行预封装,在获取到第一报文后,从第一报文中解析出第一虚拟网络标识和第一双层VLAN标识,再基于第一虚拟网络标识和第一双层VLAN标识获取第一预封装报文信息,基于第一预封装报文信息可以直接确定第一报文的第一封装报文,无需对报文进行逐层解封封包,提高了报文的转发速度,降低了报文的转发成本。In the embodiment of the present application, the first outer layer tunnel header and the first inner layer header of the first message are pre-encapsulated, and after the first message is obtained, the first virtual network identifier is parsed from the first message and the first double-layer VLAN identifier, and then obtain the first pre-encapsulated packet information based on the first virtual network identifier and the first double-layer VLAN identifier, and can directly determine the first encapsulation of the first packet based on the first pre-encapsulated packet information There is no need to decapsulate the packet layer by layer, which improves the packet forwarding speed and reduces the packet forwarding cost.
在本申请一些实施方案中,当所述第一报文为VXLAN隧道封装后的报文时,所述第一外层隧道头包括外层ETH头、外层VLAN头、外层IP头、UDP头及VXLAN头,所述报文解析单元702具体用于:In some embodiments of the present application, when the first message is a message encapsulated by a VXLAN tunnel, the first outer tunnel header includes an outer ETH header, an outer VLAN header, an outer IP header, a UDP header and VXLAN header, the message parsing unit 702 is specifically used for:
从所述第一外层隧道头中获取VXLAN头;Obtain a VXLAN header from the first outer tunnel header;
对所述VXLAN头进行解析,得到第一虚拟网络标识。The VXLAN header is parsed to obtain the first virtual network identifier.
在本申请一些实施方案中,当所述第一报文为SRv6隧道封装后的报文时,所述第一外层隧道头包括外层ETH头、外层VLAN头及SRv6头,所述报文解析单元702具体用于:In some implementations of the present application, when the first packet is a packet encapsulated by an SRv6 tunnel, the first outer tunnel header includes an outer ETH header, an outer VLAN header, and an SRv6 header, and the packet The text parsing unit 702 is specifically used for:
从所述第一外层隧道头中获取VXLAN头;Obtain a VXLAN header from the first outer tunnel header;
对所述VXLAN头进行解析,得到第一虚拟网络标识。The VXLAN header is parsed to obtain the first virtual network identifier.
在本申请一些实施方案中,当所述第一报文为SRv6隧道封装后的报文时,所述第一外层隧道头包括外层ETH头、外层VLAN头及SRv6头,所述报文解析单元702具体用于:In some implementations of the present application, when the first packet is a packet encapsulated by an SRv6 tunnel, the first outer tunnel header includes an outer ETH header, an outer VLAN header, and an SRv6 header, and the packet The text parsing unit 702 is specifically used for:
从所述第一外层隧道头中获取SRv6头;Obtain an SRv6 header from the first outer tunnel header;
对所述SRv6头进行解析,得到第一虚拟网络标识。The SRv6 header is parsed to obtain the first virtual network identifier.
在本申请一些实施方案中,所述第一内层头包括内层ETH头和内层双层VLAN头,所述报文解析单元702具体还用于:In some implementations of the present application, the first inner header includes an inner ETH header and an inner double-layer VLAN header, and the message parsing unit 702 is specifically further configured to:
从所述第一内层头中获取内层双层VLAN头;Obtain an inner layer double-layer VLAN header from the first inner layer header;
对所述内层双层VLAN头进行解析,得到第一双层VLAN标识。The inner double-layer VLAN header is analyzed to obtain the first double-layer VLAN identifier.
在本申请一些实施方案中,所述信息获取单元703具体用于:In some embodiments of the present application, the information acquiring unit 703 is specifically used to:
基于所述第一虚拟网络标识和所述第一双层VLAN标识,确定第一账号信息;Determine first account information based on the first virtual network identifier and the first double-layer VLAN identifier;
基于所述第一账号信息,获取第一预封装报文信息。Based on the first account information, first pre-encapsulated packet information is acquired.
在本申请一些实施例中,所述第一报文还包括IP头、TCP头及报文数据,所述第一预封装报文信息包括预封装外层隧道头和预封装内层头,所述报文封装单元704具体用于:In some embodiments of the present application, the first packet further includes an IP header, a TCP header, and packet data, and the first pre-encapsulated packet information includes a pre-encapsulated outer tunnel header and a pre-encapsulated inner layer header, so The message encapsulation unit 704 is specifically used for:
从所述第一报文中获取IP头、TCP头及报文数据;Obtaining an IP header, a TCP header, and packet data from the first packet;
将所述预封装外层隧道头、所述预封装内层头、所述IP头、所述TCP头及所述报文数据进行拼接,以得到所述第一报文的第一封装报文。Splicing the pre-encapsulated outer tunnel header, the pre-encapsulated inner layer header, the IP header, the TCP header, and the packet data to obtain a first encapsulated packet of the first packet .
在本申请一些实施例中,所述报文转发装置700还包括:In some embodiments of the present application, the message forwarding device 700 further includes:
第一获取单元,用于获取所述第一外层隧道头和所述第一内层头;a first acquiring unit, configured to acquire the first outer tunnel header and the first inner header;
第二获取单元,用于获取所述第一账号信息,所述第一账号信息包括WAN侧隧道标识、源MAC地址、第一目的MAC地址、第一VLAN信息及拨号标识符;A second acquiring unit, configured to acquire the first account information, where the first account information includes a WAN side tunnel identifier, a source MAC address, a first destination MAC address, first VLAN information, and a dial-up identifier;
第一封装单元,用于基于所述WAN侧隧道标识对所述第一外层隧道头进行封装,得到预封装外层隧道头;A first encapsulation unit, configured to encapsulate the first outer tunnel header based on the WAN-side tunnel identifier to obtain a pre-encapsulated outer tunnel header;
第二封装单元,用于基于所述源MAC地址、所述第一目的MAC地址、所述第一VLAN信息及所述拨号标识符对所述第一内层头进行封装,得到预封装内层头。A second encapsulation unit, configured to encapsulate the first inner layer header based on the source MAC address, the first destination MAC address, the first VLAN information and the dial identifier, to obtain a pre-encapsulated inner layer head.
在本申请一些实施例中,所述报文转发装置700还包括:In some embodiments of the present application, the message forwarding device 700 further includes:
第三获取单元,用于获取所述外网服务器发送的隧道封装后的第二报文,所述第二报文包括第二外层隧道头和第二内层头;A third obtaining unit, configured to obtain a tunnel-encapsulated second message sent by the external network server, where the second message includes a second outer tunnel header and a second inner layer header;
信息解析单元,用于对所述第二外层隧道头进行解析得到所述第二虚拟网络标识,以及对所述第二内层头进行解析得到第二双层VLAN标识;An information parsing unit, configured to parse the second outer tunnel header to obtain the second virtual network identifier, and parse the second inner header to obtain a second double-layer VLAN identifier;
第四获取单元,用于基于所述第二虚拟网络标识和所述第二双层VLAN标识,获取第二预封装报文信息、所述第一虚拟网络标识、私网IP地址及私网端口;A fourth acquiring unit, configured to acquire second pre-encapsulated message information, the first virtual network identifier, private network IP address and private network port based on the second virtual network identifier and the second double-layer VLAN identifier ;
报文确定单元,用于基于所述第二预封装报文信息和所述第二报文,确定所述第二报文的第二封装报文;A message determining unit, configured to determine a second encapsulated message of the second message based on the second pre-encapsulated message information and the second message;
第二转换单元,用于基于所述私网IP地址和所述私网端口对所述第二封装报文进行NAT转换,以将所述第二封装报文的目的IP地址转换为所述私网IP地址,以及将所述第二封装报文的目的端口转换为所述私网端口;The second conversion unit is configured to perform NAT conversion on the second encapsulated message based on the private network IP address and the private network port, so as to convert the destination IP address of the second encapsulated message into the private network network IP address, and converting the destination port of the second encapsulated message into the private network port;
第二转发单元,用于基于所述第一虚拟网络标识将NAT转换后的第二封装报文发送至所述用户终端。The second forwarding unit is configured to send the NAT-translated second encapsulated packet to the user terminal based on the first virtual network identifier.
本申请实施例还提供一种计算机设备,其集成了本申请实施例所提供的任一种报文转发装置,所述计算机设备包括:The embodiment of the present application also provides a computer device, which integrates any message forwarding device provided in the embodiment of the present application, and the computer device includes:
一个或多个处理器;one or more processors;
存储器;以及storage; and
一个或多个应用程序,其中所述一个或多个应用程序被存储于所述存储器中,并配置为由所述处理器执行上述报文转发方法实施例中任一实施例中所述的报文转发方法中的步骤。One or more application programs, wherein the one or more application programs are stored in the memory, and are configured to be executed by the processor as described in any one of the above message forwarding method embodiments. steps in the text forwarding method.
本申请实施例还提供一种计算机设备,其集成了本申请实施例所提供的任一种报文转发装置。如图7所示,其示出了本申请实施例所涉及的计算机设备的结构示意图,具体来讲:The embodiment of the present application further provides a computer device, which integrates any message forwarding device provided in the embodiment of the present application. As shown in Figure 7, it shows a schematic structural diagram of the computer equipment involved in the embodiment of the present application, specifically:
该计算机设备可以包括一个或者一个以上处理核心的处理器801、一个或一个以上计算机可读存储介质的存储器802、电源803和输入单元804等部件。本领域技术人员可以理解,图7中示出的计算机设备结构并不构成对计算机设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:The computer device may include a processor 801 of one or more processing cores, a memory 802 of one or more computer-readable storage media, a power supply 803, an input unit 804 and other components. Those skilled in the art can understand that the structure of the computer device shown in FIG. 7 does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine some components, or arrange different components. in:
处理器801是该计算机设备的控制中心,利用各种接口和线路连接整个计算机设备的各个部分,通过运行或执行存储在存储器802内的软件程序和/或模块,以及调用存储在存储器802内的数据,执行计算机设备的各种功能和处理数据,从而对计算机设备进行整体监控。可选的,处理器801可包括一个或多个处理核心;优选的,处理器801可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器801中。The processor 801 is the control center of the computer equipment, connects various parts of the entire computer equipment with various interfaces and lines, runs or executes the software programs and/or modules stored in the memory 802, and calls the Data, perform various functions of computer equipment and process data, so as to monitor the computer equipment as a whole. Optionally, the processor 801 may include one or more processing cores; preferably, the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 801 .
存储器802可用于存储软件程序以及模块,处理器801通过运行存储在存储器802的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器802可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据计算机设备的使用所创建的数据等。此外,存储器802可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器802还可以包括存储器控制器,以提供处理器801对存储器802的访问。The memory 802 can be used to store software programs and modules, and the processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802 . The memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required by at least one function; Data created by the use of computer equipment, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 802 may further include a memory controller to provide the processor 801 with access to the memory 802 .
计算机设备还包括给各个部件供电的电源803,优选的,电源803可以通过电源管理系统与处理器801逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源803还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The computer device also includes a power supply 803 for supplying power to each component. Preferably, the power supply 803 can be logically connected to the processor 801 through the power management system, so that functions such as charging, discharging, and power consumption management can be realized through the power management system. The power supply 803 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
该计算机设备还可包括输入单元804,该输入单元804可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。The computer device can also include an input unit 804, which can be used to receive input numbers or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
尽管未示出,计算机设备还可以包括显示单元等,在此不再赘述。具体在本实施例中,计算机设备中的处理器801会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器802中,并由处理器801来运行存储在存储器802中的应用程序,从而实现各种功能,如下:Although not shown, the computer device may also include a display unit, etc., which will not be repeated here. Specifically, in this embodiment, the processor 801 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 802 according to the following instructions, and the processor 801 runs the executable file stored in the The application program in memory 802, thus realizes various functions, as follows:
获取所述用户终端发送的隧道封装后的第一报文,所述第一报文包括第一外层隧道头和第一内层头;Obtaining a tunnel-encapsulated first packet sent by the user terminal, where the first packet includes a first outer tunnel header and a first inner header;
对所述第一外层隧道头进行解析得到第一虚拟网络标识,以及对所述第一内层头进行解析得到第一双层VLAN标识;Analyzing the first outer layer tunnel header to obtain a first virtual network identifier, and analyzing the first inner layer header to obtain a first double-layer VLAN identifier;
基于所述第一虚拟网络标识和所述第一双层VLAN标识,获取第一预封装报文信息、第二虚拟网络标识、公网IP地址及公网端口;Based on the first virtual network identifier and the first double-layer VLAN identifier, obtain first pre-encapsulated message information, a second virtual network identifier, a public network IP address, and a public network port;
基于所述第一预封装报文信息和所述第一报文,确定所述第一报文的第一封装报文;determining a first encapsulated packet of the first packet based on the first pre-encapsulated packet information and the first packet;
基于所述公网IP地址和所述公网端口对所述第一封装报文进行NAT转换,以将所述第一封装报文的源IP地址转换为所述公网IP地址,以及将所述第一封装报文的源端口转换为所述公网端口;Perform NAT conversion on the first encapsulated packet based on the public network IP address and the public network port, so as to convert the source IP address of the first encapsulated packet into the public network IP address, and convert the source IP address of the first encapsulated packet to the public network IP address, and Converting the source port of the first encapsulated message into the public network port;
基于所述第二虚拟网络标识将NAT转换后的第一封装报文发送至所述外网服务器。Sending the NAT-translated first encapsulated packet to the external network server based on the second virtual network identifier.
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by instructions controlling related hardware, and the instructions can be stored in a computer-readable storage medium, and is loaded and executed by the processor.
为此,本申请实施例提供一种计算机可读存储介质,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。其上存储有计算机程序,所述计算机程序被处理器进行加载,以执行本申请实施例所提供的任一种报文转发方法中的步骤。例如,所述计算机程序被处理器进行加载可以执行如下步骤:To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, etc. . A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any one of the message forwarding methods provided in the embodiments of the present application. For example, the computer program being loaded by the processor may perform the following steps:
获取所述用户终端发送的隧道封装后的第一报文,所述第一报文包括第一外层隧道头和第一内层头;Obtaining a tunnel-encapsulated first packet sent by the user terminal, where the first packet includes a first outer tunnel header and a first inner header;
对所述第一外层隧道头进行解析得到第一虚拟网络标识,以及对所述第一内层头进行解析得到第一双层VLAN标识;Analyzing the first outer layer tunnel header to obtain a first virtual network identifier, and analyzing the first inner layer header to obtain a first double-layer VLAN identifier;
基于所述第一虚拟网络标识和所述第一双层VLAN标识,获取第一预封装报文信息、第二虚拟网络标识、公网IP地址及公网端口;Based on the first virtual network identifier and the first double-layer VLAN identifier, obtain first pre-encapsulated message information, a second virtual network identifier, a public network IP address, and a public network port;
基于所述第一预封装报文信息和所述第一报文,确定所述第一报文的第一封装报文;determining a first encapsulated packet of the first packet based on the first pre-encapsulated packet information and the first packet;
基于所述公网IP地址和所述公网端口对所述第一封装报文进行NAT转换,以将所述第一封装报文的源IP地址转换为所述公网IP地址,以及将所述第一封装报文的源端口转换为所述公网端口;Perform NAT conversion on the first encapsulated packet based on the public network IP address and the public network port, so as to convert the source IP address of the first encapsulated packet into the public network IP address, and convert the source IP address of the first encapsulated packet to the public network IP address, and Converting the source port of the first encapsulated message into the public network port;
基于所述第二虚拟网络标识将NAT转换后的第一封装报文发送至所述外网服务器。Sending the NAT-translated first encapsulated packet to the external network server based on the second virtual network identifier.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见上文针对其他实施例的详细描述,此处不再赘述。In the above-mentioned embodiments, the descriptions of each embodiment have their own emphases. For the part that is not described in detail in a certain embodiment, refer to the detailed description of other embodiments above, and will not be repeated here.
具体实施时,以上各个单元或结构可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元或结构的具体实施可参见前面的方法实施例,在此不再赘述。During specific implementation, each of the above units or structures can be implemented as an independent entity, or can be combined arbitrarily as the same or several entities. For the specific implementation of each of the above units or structures, please refer to the previous method embodiments, here No longer.
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。For the specific implementation of the above operations, reference may be made to the foregoing embodiments, and details are not repeated here.
以上对本申请实施例所提供的一种报文转发方法、装置、计算机设备及存储介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。A message forwarding method, device, computer equipment, and storage medium provided by the embodiments of the present application have been introduced in detail above. In this paper, specific examples are used to illustrate the principles and implementation methods of the present application. The description of the above embodiments It is only used to help understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation and application scope. In summary, this The content of the description should not be understood as limiting the application.
Claims (7)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310424904.6A CN116137585B (en) | 2023-04-20 | 2023-04-20 | Message forwarding method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310424904.6A CN116137585B (en) | 2023-04-20 | 2023-04-20 | Message forwarding method, device, computer equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN116137585A CN116137585A (en) | 2023-05-19 |
| CN116137585B true CN116137585B (en) | 2023-07-18 |
Family
ID=86333669
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310424904.6A Active CN116137585B (en) | 2023-04-20 | 2023-04-20 | Message forwarding method, device, computer equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116137585B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116846996A (en) * | 2023-05-26 | 2023-10-03 | 广东电网有限责任公司电力调度控制中心 | Network resource configuration method, device and electronic equipment for video surveillance system |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112702252A (en) * | 2019-10-23 | 2021-04-23 | 华为技术有限公司 | Message processing method, system and related equipment |
| WO2022116848A1 (en) * | 2020-12-01 | 2022-06-09 | 武汉绿色网络信息服务有限责任公司 | Packet transmission method and apparatus, computer device, and storage medium |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103841023B (en) * | 2012-11-22 | 2017-03-08 | 华为技术有限公司 | The method and apparatus of data forwarding |
| WO2022033034A1 (en) * | 2020-08-14 | 2022-02-17 | 华为技术有限公司 | Oam detection method, device, and system |
| CN115208888B (en) * | 2022-09-13 | 2022-12-27 | 杭州优云科技有限公司 | Communication method and device for cloud instance to cross available areas and electronic equipment |
| CN115987915B (en) * | 2022-12-29 | 2025-03-28 | 武汉绿色网络股份有限公司 | Message forwarding method and related equipment for virtual switch |
-
2023
- 2023-04-20 CN CN202310424904.6A patent/CN116137585B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112702252A (en) * | 2019-10-23 | 2021-04-23 | 华为技术有限公司 | Message processing method, system and related equipment |
| WO2022116848A1 (en) * | 2020-12-01 | 2022-06-09 | 武汉绿色网络信息服务有限责任公司 | Packet transmission method and apparatus, computer device, and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116137585A (en) | 2023-05-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11909551B2 (en) | Broadband remote access server (BRAS) system-based packet encapsulation | |
| CN104243265B (en) | A kind of gateway control method, apparatus and system based on virtual machine (vm) migration | |
| US20220255772A1 (en) | Packet sending method, apparatus, and system | |
| CN109302466B (en) | Data processing method, related device and computer storage medium | |
| CN105915427B (en) | Method and device for sending and receiving messages | |
| CN112333298B (en) | Message transmission method and device, computer equipment and storage medium | |
| CN103828332B (en) | Data processing method, device, storage controller and cabinet | |
| CN112040030B (en) | Message transmission method and device, computer equipment and storage medium | |
| WO2014101394A1 (en) | Method, device and system for transmitting message in virtual extensible local area network | |
| CN113132202B (en) | A message transmission method and related equipment | |
| CN108924274A (en) | domain name system DNS processing method, device, storage medium and electronic equipment | |
| CN113497767A (en) | Method and device for transmitting data, computing equipment and storage medium | |
| CN112040029A (en) | NAT translation method, device, computer equipment and storage medium | |
| CN116137585B (en) | Message forwarding method, device, computer equipment and storage medium | |
| CN111740908B (en) | Communication method and related equipment | |
| CN113630341B (en) | Data information processing method and server | |
| CN113596038B (en) | Data packet parsing method and server | |
| CN108934058B (en) | A communication method and device | |
| CN115987915A (en) | Message forwarding method and related equipment for virtual switch | |
| CN107770032A (en) | The communication system and its means of communication of distribution terminal | |
| CN113259220B (en) | Method and server for sharing private information in message | |
| CN113890789B (en) | UDP tunnel traffic shunting method and traffic forwarding method suitable for data center | |
| CN108809793A (en) | A kind of data transmission method, apparatus and system | |
| CN115695300A (en) | Message forwarding method and device | |
| CN117354394A (en) | Data forwarding method, device and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP03 | Change of name, title or address |
Address after: 430074 Wuhan East Lake New Technology Development Zone, Wuhan City, Hubei Province, China. Room 01, 4th floor, 5th floor, and 6th floor, Building 2, Phase 6, Optics Valley Software Park, No. 4 Software Park Middle Road Patentee after: Wuhan Green Network Co.,Ltd. Country or region after: China Address before: 430074 room 01, 4 / F, room 01, 5 / F, room 01, 6 / F, building 2, phase 6, optical valley software park, No. 4, Software Park Middle Road, Donghu New Technology Development Zone, Wuhan City, Hubei Province Patentee before: WUHAN GREENET INFORMATION SERVICE Co.,Ltd. Country or region before: China |
|
| CP03 | Change of name, title or address |