CN115865801A - Message transmission method, electronic device and storage medium - Google Patents

Message transmission method, electronic device and storage medium Download PDF

Info

Publication number
CN115865801A
CN115865801A CN202211531201.5A CN202211531201A CN115865801A CN 115865801 A CN115865801 A CN 115865801A CN 202211531201 A CN202211531201 A CN 202211531201A CN 115865801 A CN115865801 A CN 115865801A
Authority
CN
China
Prior art keywords
address
target
reachable path
tunnel
virtual node
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.)
Pending
Application number
CN202211531201.5A
Other languages
Chinese (zh)
Inventor
林宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN202211531201.5A priority Critical patent/CN115865801A/en
Publication of CN115865801A publication Critical patent/CN115865801A/en
Priority to PCT/CN2023/125019 priority patent/WO2024114138A1/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a message transmission method, electronic equipment and a storage medium, wherein the method comprises the following steps: determining a target virtual node corresponding to a target Internet Protocol (IP) address under the condition that the target IP address of a message to be transmitted cannot be reached through a local route, wherein a first corresponding relation is preset between the target virtual node and reachable path information of the target IP address, and the reachable path information comprises an outlet next hop address of a reachable path of the target IP address; and forwarding the packet to be transmitted to the outlet next hop address through the target virtual node based on the first corresponding relation. The embodiment solves the problem that the destination address of the policy routing in the related art is only a local exit and cannot point to a remote exit.

Description

Message transmission method, electronic device and storage medium
Technical Field
The present application belongs to the field of communication technologies, and in particular, to a message transmission method, an electronic device, and a storage medium.
Background
The policy routing is to configure a series of Access Control Lists (ACLs) to match rules and forwarding actions of the routing, and bind the ACL to a port or a Virtual Local Area Network (VLAN), so that a message hitting the ACL can modify a forwarding path of an original message according to the forwarding actions of the policy routing.
The policy routing in the related art can only configure and match a local IP address, but cannot match and search a remote IP address which cannot be found locally and needs to be reached through a tunnel, that is, a destination address of the policy routing in the related art is only a local exit, and cannot point to the remote exit.
Disclosure of Invention
Embodiments of the present application provide a message transmission method, an electronic device, and a storage medium, so as to solve a problem that a destination address of a policy routing in the related art is only a local egress and cannot point to a remote egress.
In a first aspect, an embodiment of the present application provides a packet transmission method, including:
determining a target virtual node corresponding to a target Internet Protocol (IP) address under the condition that the target IP address of a message to be transmitted cannot be reached through a local route, wherein a first corresponding relation is preset between the target virtual node and reachable path information of the target IP address, and the reachable path information comprises an outlet next hop address of a reachable path of the target IP address;
and forwarding the message to be transmitted to the outlet next hop address through the target virtual node based on the first corresponding relation.
In a second aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or an instruction stored on the memory and executable on the processor, and when the program or the instruction is executed by the processor, the steps of the message transmission method according to the first aspect are implemented.
In a third aspect, an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and the program or the instruction, when executed by a processor, implements the steps of the message transmission method according to the first aspect.
According to the technical scheme, under the condition that a target IP address of a message to be transmitted cannot be reached through a local route, a target virtual node corresponding to the target IP address is determined, wherein a first corresponding relation is preset between the target virtual node and reachable path information of the target IP address, the reachable path information comprises an exit next hop address of a reachable path of the target IP address, and the message to be transmitted is forwarded to the exit next hop address through the target virtual node on the basis of the first corresponding relation; therefore, the target virtual node corresponds to the target IP address, and the target virtual node corresponds to the reachable path information of the target IP address, so that the message to be transmitted can be forwarded to the next hop address of the outlet of the reachable path through the target virtual node, and at the moment, the target IP address can reach through the reachable path, namely, the message to be transmitted can be transmitted to the target IP address through the next hop address of the outlet of the reachable path, so that when the target IP address is the remote IP address which can not be reached by the local route, the pointing setting of the strategy route to the remote IP address can be completed, the message to be transmitted can be transmitted to the target IP address, and the problem that the target address of the strategy route in the related technology is only the local outlet and can not point to the remote outlet is solved.
Drawings
Fig. 1 is a schematic flowchart illustrating steps of a message transmission method in an embodiment of the present application;
fig. 2 is a schematic diagram of information search when a target virtual node is a virtual port in the embodiment of the present application;
fig. 3 is a schematic diagram of information search when a target virtual node is a loopback port in the embodiment of the present application;
fig. 4 is a schematic structural diagram of a message transmission apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one.
Specifically, in the related art, the operation mode of the policy routing under the general condition is as follows: configuring ACL matching entries and configuring a redirected forwarding path thereof, wherein the path is generally a local forwarding outlet Internet Protocol (IP) address; and generating an ACL rule from the ACL matching entries and binding a port or VLAN, wherein a message received by the port or the VLAN is matched with the ACL rule, and if the matched entry is hit, forwarding the matched entry according to a redirection forwarding path of the matched entry. The operation mode of the policy routing can only configure and match local IP addresses, but can not match and search for remote IP addresses which cannot be found locally and can be reached through a tunnel.
For the above defects, in this embodiment, when a target IP address of a packet to be transmitted is unreachable through a local route, a target virtual node corresponding to the target IP address is determined, where a first correspondence relationship is preset between the target virtual node and reachable path information of the target IP address, the reachable path information includes an egress next hop address of a reachable path of the target IP address, and the packet to be transmitted is forwarded to the egress next hop address through the target virtual node based on the first correspondence relationship; therefore, the target virtual node corresponds to the target IP address, and the target virtual node corresponds to the reachable path information of the target IP address, so that the message to be transmitted can be forwarded to the next hop address of the outlet of the reachable path through the target virtual node, and at the moment, the target IP address can reach through the reachable path, namely, the message to be transmitted can be transmitted to the target IP address through the next hop address of the outlet of the reachable path, so that when the target IP address is the unreachable remote IP address of the local route, the pointing setting of the policy route to the remote IP address can be completed, the message to be transmitted can be transmitted to the target IP address, and the target address of the policy route can be pointed to the remote outlet.
The following describes in detail a message transmission method provided in the embodiments of the present application with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Fig. 1 shows the flow steps of a message transmission method provided by an embodiment of the present invention, where the method may be executed by an electronic device, and the electronic device may include: a server and/or a terminal device. In other words, the method may be performed by software or hardware installed in the electronic device, the method comprising the steps of:
step 101: and under the condition that the target IP address of the message to be transmitted cannot be reached through the local route, determining a target virtual node corresponding to the target IP address.
A first correspondence relationship is preset between the target virtual node and reachable path information of the target IP address, where the reachable path information includes an exit next hop address of a reachable path of the target IP address.
Specifically, in this embodiment, when the target IP address of the packet to be transmitted is unreachable through the local route, the reachable path of the target IP address may be determined first, and a first corresponding relationship between the target virtual node and reachable path information of the target IP address is established, so as to implement binding between the target virtual node and reachable path information of the target IP address; in addition, the target virtual node has a corresponding relationship with the target IP address as well.
Therefore, when the IP address of the message to be transmitted is determined to be the target IP address, the target virtual node corresponding to the target IP address can be determined, and at the moment, because the first corresponding relation exists between the target virtual node and the reachable path information of the target IP address, the reachable path information comprises the next hop address of the outlet of the reachable path of the target IP address, the message to be transmitted can be forwarded to the next hop address of the outlet through the target virtual node when the message to be transmitted points to the target virtual node, and the accurate forwarding process of the message to be transmitted through the target virtual node is realized.
Step 102: and forwarding the packet to be transmitted to the outlet next hop address through the target virtual node based on the first corresponding relation.
The first corresponding relation is preset between the target virtual node and the reachable path information of the target IP address, so that the message to be transmitted can be forwarded to the next hop address of the outlet of the reachable path of the target IP address through the target virtual node based on the first corresponding relation, at the moment, the message to be transmitted can be continuously transmitted to the target IP address after being forwarded to the next hop address of the outlet of the reachable path because the reachable path can reach the target IP address, and the target IP address of the message to be transmitted can be pointed to the target IP address under the condition that the target IP address of the message to be transmitted cannot be reached through a local route.
Specifically, in an embodiment, before determining the target virtual node corresponding to the target IP address, the method further includes the following steps:
determining a reachable path to the IP address based on the IP address and a preset routing table, wherein the reachable path pointing to the IP address is stored in the routing table;
and establishing a second corresponding relation between the IP address and reachable path information of the reachable path, wherein the IP address comprises the target IP address.
Specifically, the routing table stores reachable paths pointing to the IP addresses, so that the reachable paths to the IP addresses can be determined by querying the routing table based on the IP addresses, and a second correspondence between the IP addresses and reachable path information of the reachable paths is established.
In addition, in an embodiment, before determining a target virtual node corresponding to a target IP address, the exit of the reachable path may be set as the virtual node, and a corresponding relationship between reachable path information of the IP address and the virtual node may be established.
Specifically, by setting the outlet of the reachable path as a virtual node, and because the IP address includes the target IP address, that is, the outlet of the reachable path of the target IP address is the target virtual node, the target virtual node corresponding to the target IP address can be determined according to the target IP address and the reachable path information corresponding to the target IP address, so that if the local route of the configured IP address is found to be unreachable when the policy route is configured, the policy route can be directed to the virtual node corresponding to the IP address, and the direction setting of the policy route to the IP address can be completed. In addition, by establishing the corresponding relationship between the reachable path information of the IP address and the virtual node, since the IP address includes the target IP address, that is, the corresponding relationship includes the first corresponding relationship between the reachable path information of the target IP address and the target virtual node corresponding to the target IP address, the first corresponding relationship between the reachable path information of the target IP address and the target virtual node corresponding to the target IP address is obtained through the corresponding relationship, so that the packet to be transmitted can be forwarded to the next hop address of the outlet of the reachable path of the target IP address.
In addition, the reachable path of the IP address may be changed, and in one embodiment, when the reachable path of the target IP address is changed, the first corresponding relationship may be updated to a third corresponding relationship between the target virtual node and reachable path information of the reachable path after the change.
It should be noted that the change of the reachable path may include deletion, addition, reconstruction, and the like of the path, so that the first corresponding relationship is updated to the third corresponding relationship between the target virtual node and the reachable path information of the reachable path after the change when the reachable path of the target IP address is changed, thereby implementing a process of maintaining real-time update of the reachable path information corresponding to the target virtual node, and ensuring that the pointing path of the target virtual node is correct.
Furthermore, an exit next hop address of the reachable path of the IP address may change, and in an embodiment, when the exit next hop address of the reachable path changes, the exit next hop address included in the reachable path information in the first corresponding relationship may be modified to the changed exit next hop address.
Specifically, if the reachable path is not changed, but only the egress next hop address of the reachable path is changed, the egress next hop address included in the reachable path information in the first corresponding relationship may be modified into the changed egress next hop address, so that the target virtual node does not need to perform any action, and the egress information of the target virtual node can be directly changed along with the change of the egress information of the reachable path.
In addition, the target virtual node may be a virtual port or a loopback port, the reachable path may be a tunnel, the reachable path information further includes tunnel information, and the packet to be transmitted may be forwarded to the egress next hop address by the target virtual node based on the first correspondence in different manners for different target virtual nodes. This will be explained below.
In an embodiment, when the target virtual node is a virtual port and the reachable path is a tunnel, the reachable path information further includes tunnel information, and forwarding, by the target virtual node, the packet to be transmitted to the egress next hop address based on the first correspondence may include the following steps:
and based on the first corresponding relation, encapsulating the tunnel information and the message to be transmitted, and transmitting the encapsulated message to the tunnel through the virtual port and directly reaching the next hop address of the outlet corresponding to the tunnel.
Specifically, if the device chip supports the virtual port function, the virtual port may be directly used as a target virtual node, that is, the reachable path information of the virtual port and the target IP address is bound, and when the outlet issued by the policy routing is the target IP address, a virtual port is first allocated to the policy routing, the policy routing is directly directed to the virtual port, and the relationship between the virtual port and the target IP address is recorded. Meanwhile, the reachable path is searched in the device, and after the reachable path is found, the next hop address of the reachable path is directly written into the virtual port table of the virtual port, namely, the virtual port directly points to the outlet which can reach the target IP address. Thus, after the message to be transmitted hits the policy route, the message to be transmitted is directed to the virtual port for forwarding, and the virtual port directly directs the message to be transmitted to the real next hop outlet capable of transmitting the target IP address.
In addition, since the virtual port supports direct encapsulation of tunnel information, when the packet to be transmitted is forwarded to the exit next hop address through the target virtual node, the tunnel information and the packet to be transmitted can be encapsulated, and the encapsulated packet is transmitted to the tunnel through the virtual port and reaches the exit next hop address corresponding to the tunnel.
In an embodiment, when determining the exit next hop address of the tunnel, the exit next hop address of the tunnel may be determined based on a preset tunnel table, where the exit next hop address of the tunnel is stored in the tunnel table.
This case is explained below by a specific example. Referring to the information query diagram shown in fig. 2, in one embodiment, it is assumed that 10.10.10.1 is redirected to 1.1.1.1, the target IP address is 1.1.1.1, and the target IP address 1.1.1 needs to be reachable through a Multi-Protocol Label Switching (MPLS) tunnel 1.
Assuming that the target virtual node is a virtual port, the message forwarding can be performed through the following processes:
step 21, the policy routing issues 10.10.10.1 redirection to target IP address 1.1.1.1.
And step 22, the device searches for 1.1.1.1 in the routing table, and if the device is found to be unreachable, the iterative search process is started.
And step 23, the device searches for the reachable path of 1.1.1.1 through the routing table in an iterative manner, and finds that the MPLS tunnel1 is reachable.
Step 24, a virtual port (VP 1) is allocated to the target IP address 1.1.1.1, and the policy route 10.10.10.1 is redirected to VP1.
Step 25, looking up the next hop address of the exit of the MPLS tunnel1 through the tunnel table, and finding out that the exit in the chip is the next hop nexthop1001.
Step 26, directing the outlet of VP1 to the outlet nexthop1001 of MPLS tunnel1, that is, establishing a corresponding relationship between the virtual port and reachable path information, which may also be referred to as a virtual port table; in addition, a next hop (nexthop) table can be established, and the table contains specific exit information, tunnel information and the like of the tunnel.
And 27, recording the corresponding relation between the VP1 and the 1.1.1.1, and refreshing the new nexthop pointing relation of the VP1 if the tunnel deletion addition or reconstruction of the 1.1.1.1 is reached.
Through the above steps, all actions of the whole policy routing to the target IP address 1.1.1.1 are completed, and it can be seen from the above operation that the exit of the tunnel1 of MPLS is the chip exit nexthop1001, and at the same time, the exit of VP1 also points to this nexthop1001, so if the tunnel exit information of MPLS changes (not the deletion or addition of the tunnel itself), there is no need to process VP1, and the exit information of VP1 automatically changes with the change of nexthop1001. If the tunnel reaching the target IP address 1.1.1.1 changes (adds, deletes, and rebuilds), the tunnel pointing information of VP1 needs to be refreshed according to the correspondence between 1.1.1.1 and VP1.
In another embodiment, when the target virtual node is a loopback port and the reachable path is a tunnel, the reachable path information further includes tunnel information, and forwarding, based on the first correspondence, the packet to be transmitted to the egress next hop address through the target virtual node includes:
based on the first corresponding relation, transmitting the message to be transmitted to the tunnel through the loopback port; and encapsulating the tunnel information and the message to be transmitted, and sending the tunnel information and the message to be transmitted to the next hop address of the outlet.
Specifically, if the device chip does not support forwarding of the policy routing and encapsulation of the tunnel at one time, that is, iteration of tunnel encapsulation cannot be supported (some chips consider that forwarding of the policy routing is a primary forwarding behavior, encapsulation of the tunnel is another primary forwarding behavior, and the chip cannot perform two behaviors in one-time forwarding), at this time, the loopback port can be used as the target virtual node. If the tunnel information corresponding to the target IP address is found, the tunnel information can be processed separately, that is, firstly, the policy routing outlet with the target IP address as the target IP address points to a loopback port, and the related information of the tunnel is configured on the loopback port, so that after the message to be transmitted is matched with the policy routing with the target IP address as the target IP address for the first time, the message to be transmitted is transmitted to the loopback port to finish the forwarding action of the first policy routing, then the message to be transmitted enters the tunnel from the loopback port in a loopback mode, the tunnel information is encapsulated, the message is transmitted from the real outlet of the tunnel found by the target IP address, and the forwarding action of the second tunnel encapsulation is finished.
This case is explained below by a specific example. Referring to the information query diagram shown in fig. 3, in one embodiment, assume that 10.10.10.1 is redirected to 1.1.1.1, the destination IP address is 1.1.1.1, and the destination IP address 1.1.1.1 needs to be reachable through MPLS tunnel 1.
Assuming that the target virtual node is a loopback port, the message can be forwarded through the following processes:
step 31, the policy routing issues 10.10.10.1 redirection to the target IP address 1.1.1.1.
Step 32, the device searches for 1.1.1.1 in the routing table, and if the device is found to be unreachable, the iterative search process is started.
And step 33, the equipment iteratively searches for the reachable path of 1.1.1.1 through the routing table, and finds that the MPLS tunnel1 is reachable.
And step 34, allocating a loopback port loopback1 for 1.1.1.1, and redirecting the policy route 10.10.10.1 to loopback1.
Step 35, finding the exit next hop address of the MPLS tunnel1, and finding that the exit in the chip is the next hop nexthop1001.
Step 36, setting the loopback1 port to access the MPLS tunnel1, and at this time, an access table may be established, that is, only the message entering from the loopback port loopback1 will directly enter the MPLS tunnel1 for tunnel encapsulation, and is sent from the nexthop1001 at the exit of the tunnel 1.
And step 37, recording the corresponding relation between the loopback1 and 1.1.1.1, and refreshing the port access relation of the new MPLS tunnel of the loopback1 if the tunnel deletion addition or reconstruction of 1.1.1.1 is reached.
All actions of pointing the whole policy route to the target IP address 1.1.1.1 are completed, and it can be seen from the above operations that when the chip does not support the completion of policy route forwarding and tunnel encapsulation at one time, the policy route pointing can be completed by means of loop back of the loopback1, and the process of pointing the message to the exit nexthop1001 of the MPLS tunnel1 is completed by using the tunnel1 of which the loopback1 accesses the MPLS, and since the loop back1 is pointed to the MPLS tunnel1 itself, the change of the exit of the tunnel1 can be directly reflected to the policy route pointing. If the tunnel reaching the target IP address 1.1.1.1 changes (adds, deletes, and rebuilds), the tunnel pointing information of the loopback1 needs to be refreshed according to the corresponding relationship between 1.1.1.1 and loopback1.
In this way, in this embodiment and related technologies, when the outlets to which the policy routing points are all local reachable IP addresses but cannot point to remote IP addresses, the reachable tunnel information of the target IP address can be directly searched through iteration, the information is bound with the virtual node, and then the policy routing points to the virtual node, so that the pointing setting of the policy routing to the remote target IP address can be completed. Meanwhile, the relation between the virtual node and the far-end target IP address is maintained, so that when the tunnel pointing to the far-end target IP changes, the policy routing does not need to adjust the configuration (always points to the far-end target IP address), and the pointing direction of the policy routing can automatically change. The embodiment expands the use range of the policy routing.
Fig. 4 is a schematic structural diagram of a message transmission apparatus according to an embodiment of the present invention. As shown in fig. 4, the apparatus includes:
a determining module 401, configured to determine a target virtual node corresponding to a target internet protocol IP address of a packet to be transmitted, when the target IP address is unreachable through a local route, where a first correspondence is preset between the target virtual node and reachable path information of the target IP address, where the reachable path information includes an exit next hop address of a reachable path of the target IP address;
a forwarding module 402, configured to forward, by using the target virtual node, the packet to be transmitted to the egress next hop address based on the first corresponding relationship.
In one embodiment, the determining module 401 is configured to determine a reachable path to an IP address based on the IP address and a preset routing table, where the reachable path pointing to the IP address is stored in the routing table; and establishing a second corresponding relation between the IP address and reachable path information of the reachable path, wherein the IP address comprises the target IP address.
In an embodiment, the determining module 401 is configured to set an exit of the reachable path as the virtual node, and establish a correspondence between reachable path information of the IP address and the virtual node.
In an embodiment, when the target virtual node is a virtual port and the reachable path is a tunnel, the reachable path information further includes tunnel information, and the forwarding module 402 is configured to encapsulate the tunnel information and the packet to be transmitted based on the first correspondence, and transmit the encapsulated packet to the tunnel through the virtual port and reach the next hop address of the outlet corresponding to the tunnel.
In an embodiment, when the target virtual node is a loopback port and the reachable path is a tunnel, the reachable path information further includes tunnel information, and the forwarding module 402 is configured to transmit the packet to be transmitted to the tunnel through the loopback port based on the first corresponding relationship; and encapsulating the tunnel information and the message to be transmitted, and sending the tunnel information and the message to be transmitted to the next hop address of the outlet.
The device provided in the embodiment of the present application can implement each process implemented in the method embodiment of fig. 1 to 3, and is not described here again to avoid repetition.
It should be noted that the embodiment of the message transmission apparatus in this specification and the embodiment of the message transmission method in this specification are based on the same inventive concept, and therefore, for specific implementation of the embodiment of the message transmission apparatus, reference may be made to the implementation of the foregoing corresponding embodiment of the message transmission method, and repeated details are not repeated.
The message transmission device in the embodiment of the present application may be a device, and may also be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The message transmission device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
Based on the same technical concept, an embodiment of the present application further provides an electronic device, where the electronic device is configured to execute the foregoing message transmission method, and fig. 5 is a schematic structural diagram of an electronic device implementing various embodiments of the present application. Electronic devices may have a large difference due to different configurations or performances, and may include a processor (processor) 510, a communication Interface (Communications Interface) 520, a memory (memory) 530 and a communication bus 540, where the processor 510, the communication Interface 520 and the memory 530 complete communication with each other through the communication bus 540. Processor 510 may invoke a computer program stored on memory 530 and executable on processor 510 to perform the following steps:
determining a target virtual node corresponding to a target Internet Protocol (IP) address under the condition that the target IP address of a message to be transmitted cannot be reached through a local route, wherein a first corresponding relation is preset between the target virtual node and reachable path information of the target IP address, and the reachable path information comprises an outlet next hop address of a reachable path of the target IP address;
and forwarding the packet to be transmitted to the outlet next hop address through the target virtual node based on the first corresponding relation.
In one embodiment, before determining the target virtual node corresponding to the target IP address, the method further includes: determining a reachable path to the IP address based on the IP address and a preset routing table, wherein the reachable path pointing to the IP address is stored in the routing table; and establishing a second corresponding relation between the IP address and reachable path information of the reachable path, wherein the IP address comprises the target IP address.
In one embodiment, before determining the target virtual node corresponding to the target IP address, the method further includes: and setting the outlet of the reachable path as the virtual node, and establishing the corresponding relation between the reachable path information of the IP address and the virtual node.
In one embodiment, when the target virtual node is a virtual port and the reachable path is a tunnel, the reachable path information further includes tunnel information, and forwarding, based on the first correspondence, the packet to be transmitted to the egress next hop address through the target virtual node includes: and based on the first corresponding relation, encapsulating the tunnel information and the message to be transmitted, and transmitting the encapsulated message to the tunnel through the virtual port and directly reaching the next hop address of the outlet corresponding to the tunnel.
In one embodiment, when the target virtual node is a loopback port and the reachable path is a tunnel, the reachable path information further includes tunnel information, and forwarding, based on the first correspondence, the packet to be transmitted to the egress next hop address through the target virtual node includes: based on the first corresponding relation, transmitting the message to be transmitted to the tunnel through the loopback port; and encapsulating the tunnel information and the message to be transmitted, and sending the tunnel information and the message to be transmitted to the next hop address of the outlet.
In one embodiment, the packet transmission method further includes: and determining the exit next hop address of the tunnel based on a preset tunnel table, wherein the exit next hop address of the tunnel is stored in the tunnel table.
In one embodiment, when the reachable path of the target IP address is changed, the first corresponding relationship is updated to a third corresponding relationship between the target virtual node and reachable path information of the reachable path after the change.
In an embodiment, when the egress next hop address of the reachable path is changed, the egress next hop address included in the reachable path information in the first corresponding relationship is modified to the changed egress next hop address.
The specific execution steps may refer to each step of the above message transmission method embodiment, and the same technical effect can be achieved, and for avoiding repetition, details are not described here again.
It should be noted that the electronic device in the embodiment of the present application includes: a server, a terminal, or other device besides a terminal.
The above electronic device structure does not constitute a limitation of the electronic device, the electronic device may include more or less components than those shown in the drawings, or some components may be combined, or different component arrangements, for example, the input Unit may include a Graphics Processing Unit (GPU) and a microphone, and the display Unit may configure the display panel in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit includes at least one of a touch panel and other input devices. The touch panel is also referred to as a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
The memory may be used to store software programs as well as various data. The memory may mainly include a first storage area storing a program or an instruction and a second storage area storing data, wherein the first storage area may store an operating system, an application program or an instruction (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory may include volatile memory or nonvolatile memory, or the memory may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. The volatile Memory may be a Random Access Memory (RAM), a Static Random Access Memory (Static RAM, SRAM), a Dynamic Random Access Memory (Dynamic RAM, DRAM), a Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), a Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, ddr SDRAM), an Enhanced Synchronous SDRAM (ESDRAM), a Synchronous Link DRAM (SLDRAM), and a Direct Memory bus RAM (DRRAM).
A processor may include one or more processing units; optionally, the processor integrates an application processor, which mainly handles operations related to the operating system, user interface, application programs, etc., and a modem processor, which mainly handles wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the foregoing message transmission method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the foregoing method embodiments, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as a system-on-chip, or a system-on-chip.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method for packet transmission, comprising:
determining a target virtual node corresponding to a target Internet Protocol (IP) address under the condition that the target IP address of a message to be transmitted cannot be reached through a local route, wherein a first corresponding relation is preset between the target virtual node and reachable path information of the target IP address, and the reachable path information comprises an outlet next hop address of a reachable path of the target IP address;
and forwarding the packet to be transmitted to the outlet next hop address through the target virtual node based on the first corresponding relation.
2. The message transmission method according to claim 1, wherein before determining the target virtual node corresponding to the target IP address, the method further comprises:
determining a reachable path to the IP address based on the IP address and a preset routing table, wherein the reachable path pointing to the IP address is stored in the routing table;
and establishing a second corresponding relation between the IP address and reachable path information of the reachable path, wherein the IP address comprises the target IP address.
3. The message transmission method according to claim 2, wherein before determining the target virtual node corresponding to the target IP address, the method further comprises:
and setting the outlet of the reachable path as the virtual node, and establishing the corresponding relation between the reachable path information of the IP address and the virtual node.
4. The packet transmission method according to claim 1, wherein, when the target virtual node is a virtual port and the reachable path is a tunnel, the reachable path information further includes tunnel information, and forwarding, based on the first correspondence, the packet to be transmitted to the egress next hop address through the target virtual node includes:
and encapsulating the tunnel information and the message to be transmitted based on the first corresponding relation, and transmitting the encapsulated message to the tunnel through the virtual port and directly to an outlet next hop address corresponding to the tunnel.
5. The packet transmission method according to claim 1, wherein, when the target virtual node is a loopback port and the reachable path is a tunnel, the reachable path information further includes tunnel information, and forwarding, based on the first correspondence, the packet to be transmitted to the egress next hop address through the target virtual node includes:
based on the first corresponding relation, transmitting the message to be transmitted to the tunnel through the loopback port;
and encapsulating the tunnel information and the message to be transmitted, and sending the tunnel information and the message to be transmitted to the next hop address of the outlet.
6. The message transmission method according to claim 4 or 5, characterized in that the message transmission method further comprises:
and determining the exit next hop address of the tunnel based on a preset tunnel table, wherein the exit next hop address of the tunnel is stored in the tunnel table.
7. The message transmission method according to claim 1 or 2, wherein the message transmission method further comprises:
and under the condition that the reachable path of the target IP address is changed, updating the first corresponding relation into a third corresponding relation between the target virtual node and reachable path information of the reachable path after the change.
8. The message transmission method according to claim 1 or 2, wherein the message transmission method further comprises:
and under the condition that the exit next hop address of the reachable path is changed, modifying the exit next hop address included in the reachable path information in the first corresponding relationship into the changed exit next hop address.
9. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the message transmission method according to any of claims 1-8.
10. A readable storage medium, characterized in that it stores thereon a program or instructions which, when executed by a processor, implement the steps of the message transmission method according to any of claims 1-8.
CN202211531201.5A 2022-12-01 2022-12-01 Message transmission method, electronic device and storage medium Pending CN115865801A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211531201.5A CN115865801A (en) 2022-12-01 2022-12-01 Message transmission method, electronic device and storage medium
PCT/CN2023/125019 WO2024114138A1 (en) 2022-12-01 2023-10-17 Message transmission method, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211531201.5A CN115865801A (en) 2022-12-01 2022-12-01 Message transmission method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN115865801A true CN115865801A (en) 2023-03-28

Family

ID=85669000

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211531201.5A Pending CN115865801A (en) 2022-12-01 2022-12-01 Message transmission method, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN115865801A (en)
WO (1) WO2024114138A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9344359B1 (en) * 2013-09-10 2016-05-17 Juniper Networks, Inc. Ingress protection for multipoint label switched paths
CN107529196A (en) * 2017-08-24 2017-12-29 深圳市盛路物联通讯技术有限公司 A kind of method and system of the data transmission of internet of things based on dummy node
CN108965137A (en) * 2018-07-20 2018-12-07 新华三技术有限公司 A kind of message processing method and device
CN109412949A (en) * 2018-09-21 2019-03-01 新华三技术有限公司 A kind of data message transmission method and device
CN114760243A (en) * 2020-12-25 2022-07-15 华为技术有限公司 Message transmission method, device and system
CN114760165A (en) * 2020-12-25 2022-07-15 华为技术有限公司 Message transmission method, device and system
CN115037679A (en) * 2022-05-31 2022-09-09 新华三技术有限公司 Message forwarding method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102130826A (en) * 2010-11-25 2011-07-20 华为技术有限公司 Message transmitting method and device
US10459638B2 (en) * 2016-02-22 2019-10-29 Hitachi Ltd. Computer system that generates group information and redundant code based on user data and changes the group information and redundant code based on transmission data, control method for computer system, and recording medium
CN106506367A (en) * 2016-11-30 2017-03-15 杭州华三通信技术有限公司 A kind of next-hop determines method and device
CN110519406B (en) * 2019-08-16 2022-05-17 济南浪潮数据技术有限公司 Virtual address allocation method and device, CTDB cluster and storage medium
CN113472645A (en) * 2020-03-30 2021-10-01 华为技术有限公司 Method, device and equipment for sending route and processing route
CN111614536A (en) * 2020-04-20 2020-09-01 视联动力信息技术股份有限公司 Data forwarding method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9344359B1 (en) * 2013-09-10 2016-05-17 Juniper Networks, Inc. Ingress protection for multipoint label switched paths
CN107529196A (en) * 2017-08-24 2017-12-29 深圳市盛路物联通讯技术有限公司 A kind of method and system of the data transmission of internet of things based on dummy node
CN108965137A (en) * 2018-07-20 2018-12-07 新华三技术有限公司 A kind of message processing method and device
CN109412949A (en) * 2018-09-21 2019-03-01 新华三技术有限公司 A kind of data message transmission method and device
CN114760243A (en) * 2020-12-25 2022-07-15 华为技术有限公司 Message transmission method, device and system
CN114760165A (en) * 2020-12-25 2022-07-15 华为技术有限公司 Message transmission method, device and system
CN115037679A (en) * 2022-05-31 2022-09-09 新华三技术有限公司 Message forwarding method and device

Also Published As

Publication number Publication date
WO2024114138A1 (en) 2024-06-06

Similar Documents

Publication Publication Date Title
CN107547242B (en) The acquisition methods and device of VM configuration information
CN107404470A (en) Connection control method and device
CN111682996A (en) Method, network node and network system for forwarding message in network
CN110808857B (en) Network intercommunication method, device, equipment and storage medium for realizing Kubernetes cluster
US11184281B2 (en) Packet processing method and apparatus
US8855113B2 (en) Link state identifier collision handling
US11451466B2 (en) Controlling route
CN107645431A (en) Message forwarding method and device
CN109147022A (en) VR data rendering method and system, computer equipment, computer storage medium
EP3616369A1 (en) Communications network node
CN112491789A (en) OpenStack framework-based virtual firewall construction method and storage medium
CN115865654A (en) Method for communicating with server, electronic device and storage medium
US10917334B1 (en) Network route expansion
CN107147581A (en) The maintaining method and device of route table items
CN105959226A (en) Method and device for establishing forwarding table item
CN108512737B (en) Data center IP layer interconnection method and SDN controller
CN115865801A (en) Message transmission method, electronic device and storage medium
CN115529270B (en) Physical and virtual network fusion method and device, computer equipment and storage medium
CN114374641B (en) Three-layer message forwarding method and device
CN112737850B (en) Mutually exclusive access method and device
CN108156066A (en) Message forwarding method and device
US10585725B2 (en) System and method of hitless reconfiguration of a data processing pipeline
CN114205279A (en) Path selection strategy configuration method, path selection method, device and storage medium
US20190349419A1 (en) Systems and methods for terminal emulation and terminal emulators
JP2016192178A (en) Display method, display program, and information processing device

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