Message transmission method and apparatus

By carrying transmission direction label information in the message, the target transmission direction and path are determined, which solves the problem of traffic identification and distribution for different tenants in the edge cloud gateway scenario and realizes efficient transmission of multiple instances in the same communication tunnel.

CN119835217BActive Publication Date: 2026-07-03LENOVO (BEIJING) LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LENOVO (BEIJING) LTD
Filing Date
2024-12-31
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In edge cloud gateway scenarios, existing message transmission methods cannot support traffic identification and distribution for different tenants, and cannot meet the requirement of implementing multiple instances in the same communication tunnel.

Method used

By carrying transmission direction label information in the message, the virtual switch receives the message through its tunnel port and determines the target transmission direction and path based on the label information, thereby enabling traffic identification and distribution for different tenants.

Benefits of technology

It enables message transmission for multiple instances within the same communication tunnel, improving the accuracy and efficiency of the transmission path and meeting the traffic identification and distribution needs of different tenants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119835217B_ABST
    Figure CN119835217B_ABST
Patent Text Reader

Abstract

This application discloses a message transmission method and apparatus. The method includes: receiving a first message at the tunnel port of a virtual switch, wherein the tunnel port corresponds to at least one target tunnel, the target tunnel corresponds to multiple transmission paths, and the transmission paths connect a target client and a service agent module; determining the target transmission direction of the first message based on the transmission direction tag information carried by the first message; and determining a target transmission path among the transmission paths based on the target transmission direction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a message transmission method and apparatus. Background Technology

[0002] In edge cloud gateway scenarios, the metropolitan area network (MAN) and the cloud gateway can be connected via communication tunnels (such as SRv6 tunnels). A VPP (Vector Packet Processing) architecture can be used to enable different tenants to use corresponding service requests. In the VPP architecture, the access vswitch and the service agent connect via a memif port. The access vswitch receives service packets sent from Leaf devices in the MAN via a DPDK plugin. Different tenants under the same A-Leaf need to use the same communication tunnel. However, the current packet transmission method does not support traffic identification and distribution for different tenants, and cannot solve the requirement of implementing multiple instances within the same communication tunnel. Summary of the Invention

[0003] This application provides a message transmission method, including: receiving a first message at a tunnel port of a virtual switch, wherein the tunnel port corresponds to at least one target tunnel, the target tunnel corresponds to multiple transmission paths, and the transmission paths connect a target client and a service proxy module; determining the target transmission direction of the first message based on the transmission direction tag information carried by the first message; and determining a target transmission path among the transmission paths based on the target transmission direction.

[0004] In some embodiments, the target transmission direction includes an uplink direction from the target client to the service proxy module or a downlink direction from the service proxy module to the target client. Determining the target transmission path among the transmission paths based on the target transmission direction includes: when the target transmission direction is the uplink direction, determining the target transmission path from each of the transmission paths based on the virtual LAN tag information and destination IP address carried in the first packet; and when the target transmission direction is the downlink direction, determining the target transmission path from each of the transmission paths based on the destination IP address of the first packet.

[0005] In some embodiments, the transmission path includes a first interface corresponding to the tunnel entrance and a second interface corresponding to the service exit of the virtual switch. Determining the target transmission path from each of the transmission paths based on the VLAN tag information and destination IP address carried in the first packet includes: determining a target first interface from each of the first interfaces based on the VLAN tag information; determining a target second interface from each of the second interfaces based on the VLAN tag information; and determining the target transmission path based on a first path segment between the target first interface and the target second interface, and a second path segment between the target second interface and the destination IP address.

[0006] In some embodiments, determining the target transmission path from each of the transmission paths based on the destination IP address of the first message includes: determining a third segment path between the tunnel entrance and the destination IP address, and determining the target transmission path based on the third segment path.

[0007] In some embodiments, after determining the target transmission path among the transmission paths based on the target transmission direction, the method further includes: if the target transmission direction is the uplink direction, transmitting the first message using the target transmission path; if the target transmission direction is the downlink direction, encapsulating the first message according to the routing policy matched by the first message to obtain a second message; and transmitting the second message using the target transmission path.

[0008] In some embodiments, transmitting the second message using the target transmission path includes: transmitting the second message to the target client sequentially via a switch and a metropolitan area network using the target transmission path.

[0009] In some embodiments, the target tunnel adopts a segmented routing method, and the tunnel entrance includes a loopback interface. Determining the target transmission direction of the first packet based on the tag information of the transmission direction carried by the first packet includes: determining the tag value in the tag information by calling a first node processing function in the loopback interface; if the tag value is a first value, determining the target transmission direction as the uplink direction, and setting the first value to a second value by calling the first node processing function; if the tag value is the second value, determining the target transmission direction as the downlink direction.

[0010] In some embodiments, before determining the target transmission direction of the first message based on the tag information of the transmission direction carried by the first message, the method further includes: determining the target interface of the virtual switch, wherein the first message enters the virtual switch through the target interface, and the target interface is a service access point connecting to the metropolitan area network or a service exit point connecting to the service proxy module; if the target interface is the service access point, the tag value is set to the first value by calling the second node processing function in the loopback interface.

[0011] In some embodiments, before setting the tag value to the first value by calling the second node processing function in the loopback interface, the method further includes: decapsulating the target message entering the service access point by calling the second node processing function to obtain the first message; and sending the first message to the tunnel port.

[0012] This application also proposes a message transmission device, comprising: a receiving module for receiving a first message using a tunnel port of a virtual switch, wherein the tunnel port corresponds to at least one target tunnel, the target tunnel corresponds to multiple transmission paths, and the transmission paths connect a target client and a service proxy module; a first determining module for determining a target transmission direction of the first message based on the transmission direction tag information carried by the first message; and a second determining module for determining a target transmission path among the transmission paths based on the target transmission direction. Attached Figure Description

[0013] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 A flowchart of a message transmission method according to an embodiment of this application Figure 1 ;

[0015] Figure 2 The process for determining the target transmission path in this application embodiment Figure 1 ;

[0016] Figure 3 The process for determining the target transmission path in this application embodiment Figure 2 ;

[0017] Figure 4 A flowchart of a message transmission method according to an embodiment of this application Figure 2 ;

[0018] Figure 5 This is a flowchart illustrating the determination of the target transmission direction of the first message according to an embodiment of this application.

[0019] Figure 6 A flowchart of a message transmission method according to an embodiment of this application Figure 3 ;

[0020] Figure 7 A flowchart of a message transmission method according to an embodiment of this application Figure 4 ;

[0021] Figure 8 This is a schematic diagram illustrating the principle of a message transmission method according to an embodiment of this application;

[0022] Figure 9 This is a structural block diagram of a message transmission device according to an embodiment of this application. Detailed Implementation

[0023] Various embodiments and features of this application are described herein with reference to the accompanying drawings.

[0024] It should be understood that various modifications can be made to the embodiments described herein. Therefore, the above description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope and spirit of this application will be apparent to those skilled in the art.

[0025] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0026] These and other features of this application will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.

[0027] It should also be understood that although this application has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of this application.

[0028] The above and other aspects, features and advantages of this application will become more apparent when taken in conjunction with the accompanying drawings and in view of the following detailed description.

[0029] Specific embodiments of this application are described thereafter with reference to the accompanying drawings; however, it should be understood that the claimed embodiments are merely examples of this application, which can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure the application. Therefore, the specific structural and functional details claimed herein are not intended to be limiting, but merely serve as the basis and representative basis for the claims to teach those skilled in the art to use this application in a variety of substantially any suitable detailed structures.

[0030] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in other embodiments,” all of which may refer to one or more of the same or different embodiments according to this application.

[0031] One embodiment of this application provides a message transmission method that carries a transmission direction tag in the first message. After receiving the first message at the tunnel port of a virtual switch, the target transmission direction of the first message is determined based on the tag information. Then, based on the target transmission direction, a target transmission path is determined among multiple transmission paths corresponding to the tunnel port. This allows messages from different target clients to be transmitted in different target transmission paths, enabling traffic identification and traffic distribution for different tenants, thereby meeting the need for multiple instances to be implemented in the same communication tunnel.

[0032] like Figure 1 As shown, it includes the following steps:

[0033] In step S101, the tunnel port of the virtual switch receives the first message. The tunnel port corresponds to at least one target tunnel, and the target tunnel corresponds to multiple transmission paths. The transmission paths connect the target client and the service proxy module.

[0034] In this embodiment, the virtual switch can be a vswitch in a VPP architecture, the service proxy module can be a service agent in a VPP architecture, and the target client can correspond to a tenant using the target service. The target client can send messages to the service proxy module via the virtual switch to request the target service, and the service proxy module can also send messages to the target client via the virtual switch to provide the target service. There can be multiple service proxy modules, each corresponding to a different target service, such as gaming, cloud storage, or cloud computing services. The virtual switch operates in a Layer 2 data network, implementing the Layer 2 (and part of Layer 3) network functions of a physical switch through software.

[0035] A tunnel port is configured on the virtual switch, from which the first packet is received. Each tunnel port corresponds to at least one target tunnel, and each target tunnel corresponds to multiple transmission paths. Different transmission paths can correspond to different target clients. Each transmission path connects the target client and the service proxy module, enabling the target client to send packets to the service proxy module through its corresponding transmission path to request the target service, or enabling the target client to receive packets from the service proxy module through its corresponding transmission path to obtain the target service.

[0036] In some embodiments of this application, the target tunnel can be an SRv6 tunnel conforming to the End.DX2 SID, thereby enabling more efficient and accurate packet transmission. The End.DX2 type SID (Segment Identifier) ​​can be used to identify specific Layer 2 services or traffic and to guide packet forwarding and processing.

[0037] Step S102: Determine the target transmission direction of the first message based on the tag information of the transmission direction carried by the first message.

[0038] In this embodiment, the first message carries tag information indicating the transmission direction, and the target transmission direction of the first message can be determined based on this tag information. Optionally, the tag information can consist of a single field or multiple fields.

[0039] Step S103: Based on the target transmission direction, determine the target transmission path among the transmission paths.

[0040] In this embodiment, after determining the target transmission direction, the target transmission path is determined from the multiple transmission paths corresponding to the target tunnel based on the target transmission direction, and the first message can be transmitted using the target transmission path.

[0041] The message transmission method of this application embodiment includes: receiving a first message at the tunnel port of a virtual switch, wherein the tunnel port corresponds to at least one target tunnel, the target tunnel corresponds to multiple transmission paths, and the transmission paths connect a target client and a service proxy module; determining the target transmission direction of the first message based on the transmission direction tag information carried in the first message; and determining a target transmission path in each transmission path based on the target transmission direction. This allows messages from different target clients to be transmitted in different target transmission paths, enabling traffic identification and distribution for different tenants, thereby meeting the need for multiple instances to be implemented in the same communication tunnel.

[0042] In some embodiments of this application, the target transmission direction includes an uplink direction from the target client to the service proxy module or a downlink direction from the service proxy module to the target client. Based on the target transmission direction, a target transmission path is determined among the various transmission paths, such as... Figure 2 As shown, it includes the following steps:

[0043] Step S1031: If the target transmission direction is the uplink direction, determine the target transmission path from each of the transmission paths based on the virtual LAN tag information and destination IP address carried in the first message.

[0044] In this embodiment, the target transmission direction includes either an uplink direction from the target client to the service proxy module, or a downlink direction from the service proxy module to the target client. The first packet carries Virtual LAN tag information, which is a VLAN tag. Each target client corresponds to one type of VLAN tag information; therefore, the first packet is a QinQ packet. If the target transmission direction is uplink, the VLAN tag information and destination IP address carried in the first packet are determined. The transmission path corresponding to the VLAN tag information and destination IP address is determined from each transmission path and identified as the target transmission path.

[0045] Step S1032: If the target transmission direction is the downlink direction, determine the target transmission path from each of the transmission paths based on the destination IP address of the first message.

[0046] In this embodiment, if the target transmission direction is downlink, the destination IP address is determined from the first message, and the transmission path corresponding to the destination IP address is determined from each transmission path, and this path is determined as the target transmission path.

[0047] By determining the target transmission path based on VLAN tag information and destination IP address in the uplink scenario, and based on destination IP address in the downlink scenario, the system achieves efficient and accurate determination of the target transmission path.

[0048] In some embodiments of this application, the transmission path includes a first interface corresponding to the tunnel entrance and a second interface corresponding to the service exit of the virtual switch. The target transmission path is determined from each of the transmission paths based on the virtual LAN tag information and destination IP address carried in the first packet. Figure 3 As shown, it includes the following steps:

[0049] Step S10311: Determine the target first interface from each of the first interfaces based on the virtual LAN tag information.

[0050] In this embodiment, the virtual switch includes a service egress point connected to a service proxy module. The transmission path includes a first interface and a second interface. The first interface is located at the tunnel entrance, and the second interface is located at the service egress point. Each virtual LAN tag corresponds to a first interface in a tunnel entrance. The target first interface is determined from each first interface based on the virtual LAN tag information.

[0051] In some embodiments of this application, the service exit point may be memif (Memory Abstraction Interface).

[0052] Step S10312: Determine the target second interface from each of the second interfaces based on the virtual LAN tag information.

[0053] In this embodiment, each virtual LAN tag information corresponds to a second interface in a service outlet, and the target second interface is determined from each second interface based on the virtual LAN tag information.

[0054] Step S10313: Determine the target transmission path based on the first path segment between the target first interface and the target second interface, and the second path segment between the target second interface and the destination IP address.

[0055] In this embodiment, when the target transmission direction is uplink, the first path between the target first interface and the target second interface is determined, the second path between the target second interface and the destination IP address is determined, and the target transmission path is determined based on the first path and the second path.

[0056] In some embodiments of this application, the first path segment is a bridge in a virtual switch, i.e., a bridge-domain.

[0057] For example, such as Figure 8 As shown, the tunnel entrance is loop 10 in the access vswitch (i.e., virtual switch), the service exit is memif101 / 1, the VLAN tag information of tenant 1 is external 4000 internal 640, and the VLAN tag information of tenant 2 is external 4001 internal 641. When the first packet sent by tenant 1 arrives at loop 10, based on the VLAN tag information of tenant 1, 4000.640 in loop 10 is taken as the first target interface, 4000.640 in memif101 / 1 is taken as the second target interface, BD-11 is taken as the first path segment, and the area between 4000.640 in memif101 / 1 and the destination IP address is taken as the second path segment. Finally, the target transmission path is determined based on BD-11 and the second path segment.

[0058] After the first message sent by tenant 2 arrives at loop 10, based on the virtual LAN tag information of tenant 2, 4001.641 in loop 10 is taken as the first target interface, 4001.641 in memif101 / 1 is taken as the second target interface, BD-12 is taken as the first path segment, and the area between 4001.641 in memif101 / 1 and the destination IP address is taken as the second path segment. Finally, the target transmission path is determined based on BD-12 and the second path segment.

[0059] The target first interface and target second interface are determined by using virtual LAN tag information. The target transmission path is determined based on the first segment of the path between the target first interface and the target second interface, and the second segment of the path between the target second interface and the destination IP address. The target transmission path is matched with the virtual LAN tag information, thereby making the target transmission path correspond to the corresponding target client and improving the accuracy of the target transmission path.

[0060] In some embodiments of this application, determining the target transmission path from each of the transmission paths based on the destination IP address of the first message includes:

[0061] Determine the third path segment between the tunnel entrance and the destination IP address, and determine the target transmission path based on the third path segment.

[0062] In this embodiment, when the target transmission direction is downlink, the path between the tunnel entrance and the destination IP address is taken as the third path segment, and the target transmission path is determined based on the third path segment, thereby achieving efficient determination of the target transmission path.

[0063] For example, such as Figure 8 As shown, after the first message sent by the service agent (i.e. the service agent module) arrives at loop10 in the access vswitch, the path between loop10 and the destination IP address is taken as the third segment path, and the target transmission path is determined based on the third segment path.

[0064] In some embodiments of this application, when the target transmission direction is downlink, the first message arrives at the tunnel entrance via a fourth path. The process of determining the fourth path includes: determining the target second interface from each second interface based on the virtual LAN tag information; determining the target first interface from each first interface based on the virtual LAN tag information; and determining the fourth path based on the target second interface and the target first interface, so that the fourth path matches the virtual LAN tag information, thereby ensuring that the fourth path corresponds to the corresponding target client and achieving more accurate transmission of downlink messages.

[0065] For example, such as Figure 8As shown, the tunnel entrance is loop10 in the vswitch, the service exit is memif101 / 1, the VLAN tag information of tenant 1 is external 4000 internal 640, and the VLAN tag information of tenant 2 is external 4001 internal 641. The first message sent by the service agent to tenant 1 first arrives at memif101 / 1. According to the VLAN tag information of tenant 1, 4000.640 in memif101 / 1 is used as the target second interface, 4000.640 in loop10 is used as the target first interface, and BD-11 is used as the fourth path. The first message is then transmitted downlink to loop10 via BD-11.

[0066] The first message sent by the service agent to tenant 2 first arrives at memif101 / 1. Based on the virtual LAN tag information of tenant 2, 4001.641 in memif101 / 1 is used as the target second interface, 4001.641 in loop10 is used as the target first interface, and BD-12 is used as the fourth path segment. The first message is then transmitted downlink to loop10 via BD-12.

[0067] In some embodiments of this application, after determining the target transmission path among the various transmission paths based on the target transmission direction, such as Figure 4 As shown, it also includes the following steps:

[0068] Step S104: If the target transmission direction is the uplink direction, the first message is transmitted using the target transmission path.

[0069] In this embodiment, after determining the target transmission path, if the target transmission direction is uplink, the first message is transmitted to the service proxy module using the target transmission path.

[0070] Step S105: When the target transmission direction is the downlink direction, the first message is encapsulated according to the routing policy matched by the first message to obtain the second message; the second message is transmitted using the target transmission path.

[0071] In this embodiment, after determining the target transmission path, if the target transmission direction is downlink, the first packet needs to be encapsulated before transmission. Specifically, the first packet is first encapsulated according to the routing policy matched by the first packet to obtain the second packet, and then the second packet is transmitted to the target client using the target transmission path.

[0072] After determining the target transmission path, messages are transmitted in different ways according to different transmission directions, which improves the accuracy of message transmission.

[0073] In some embodiments of this application, the first message is encapsulated by calling a third-node processing function to obtain the second message. The third-node processing function can be sr-pl-rewrite-encaps-l2 in the VPP architecture.

[0074] In some embodiments of this application, transmitting the second message using the target transmission path includes:

[0075] The second message is transmitted to the target client via the target transmission path, sequentially through the switch and the metropolitan area network.

[0076] In this embodiment, a metropolitan area network (MAN) and a switch exist between the target client and the virtual switch. After receiving the second message, the second message is transmitted from the tunnel entrance to the switch, then through the switch to the MAN, and finally through the MAN to the target client. This ensures accurate transmission of the second message to the target client in the application scenario of virtual switch and MAN.

[0077] For example, such as Figure 8 As shown, after loop 10 obtains the second message corresponding to tenant 1, it transmits the second message through the eht0 interface of the vswitch to the XEG0 interface of the switch, then through the GE3 interface of the switch to the S-LEAF node of the metropolitan area network (MAN), and from the S-LEAF node through the SPINE node of the MAN to the A-LEAF node of the MAN. At the A-LEAF node, the second message is decapsulated and transmitted to tenant 1. The transmission process for the second message corresponding to tenant 2 is similar to that for tenant 1, and will not be described further here.

[0078] In some embodiments of this application, the target tunnel adopts a segmented routing method, and the tunnel entrance includes a loopback interface. The target transmission direction of the first packet is determined based on the transmission direction tag information carried in the first packet, such as... Figure 5 As shown, it includes the following steps:

[0079] Step S1021: In the loopback interface, the tag value in the tag information is determined by calling the first node processing function.

[0080] In this embodiment, the target tunnel adopts a segmented routing method, which can improve the efficiency and reliability of message transmission. The tunnel entrance includes a loopback interface. After the first message arrives at the loopback interface, the tag value in the tag information is determined by calling the first node processing function.

[0081] Step S1022: If the tag value is the first value, determine the target transmission direction as the uplink direction, and set the first value to the second value by calling the first node processing function.

[0082] In this embodiment, if the tag value is the first value, the target transmission direction is determined to be the uplink direction, and then the first value is set to the second value by calling the first node processing function.

[0083] Step S1023: If the tag value is the second value, determine the target transmission direction as the downlink direction.

[0084] In this embodiment, since the tag value has been changed from the first value to the second value during the uplink, and the tag value will not change during the message transmission process, if the tag value is the second value, the target transmission direction is determined to be the downlink direction.

[0085] For example, if the first value is 1 and the second value is 0, then with a tag value of 1, the target transmission direction is determined to be uplink, and the tag value is set to 0 by calling the first node's processing function. With a tag value of 0, the target transmission direction is determined to be downlink. Alternatively, if the first value is 0 and the second value is 1, then with a tag value of 0, the target transmission direction is determined to be uplink, and the tag value is set to 1 by calling the first node's processing function. With a tag value of 1, the target transmission direction is determined to be downlink.

[0086] In some embodiments of this application, the first node processing function can be the loopback-input in the VPP architecture, and the tag information is VNET_BUFFER_F_SRV6.

[0087] By determining the tag value in the tag information in the loopback interface and changing the tag value in the uplink case, the target transmission direction can be determined efficiently and accurately.

[0088] In some embodiments of this application, before determining the target transmission direction of the first message based on the transmission direction tag information carried by the first message, such as Figure 6 As shown, it also includes the following steps:

[0089] Step S201: Determine the target interface of the virtual switch. The first message enters the virtual switch through the target interface, which is either a service access point connecting to the metropolitan area network or a service exit point connecting to the service proxy module.

[0090] In this embodiment, in the uplink scenario, the first packet enters the virtual switch via the service access point connecting to the metropolitan area network. In the downlink scenario, the first packet enters the virtual switch via the service exit point connecting to the service proxy module. For example, as shown in Figure 8, the service access point is the eht0 interface of the vswitch, and the service exit point is memif101 / 1.

[0091] Step S202: If the target interface is the service access point, the tag value is set to the first value by calling the second node processing function in the loopback interface.

[0092] In this embodiment, when the target interface is a service access point, it means that the first packet enters the virtual switch through the service access point and needs to be transmitted uplink to the service proxy module. In this case, the target transmission direction can be determined to be uplink by calling the second node processing function in the loopback interface, and the tag value is set to the first value. This ensures that the target transmission direction is determined to be uplink based on the tag value as the first value, thus accurately determining the target transmission direction.

[0093] In some embodiments of this application, the second node processing function can be sr-localsid-d in the VPP architecture.

[0094] In some embodiments of this application, before setting the tag value to the first value by calling the third node processing function in the loopback interface, such as Figure 7 As shown, it also includes the following steps:

[0095] Step S301: Decapsulate the target message entering the service access point by calling the second node processing function to obtain the first message.

[0096] In this embodiment, when the target transmission direction is uplink, the first message is obtained by decapsulating the target message. Specifically, the target message entering the service access point is decapsulated by calling the second node processing function to obtain the first message.

[0097] Step S302: Send the first message to the tunnel entrance.

[0098] In this embodiment, the first message is sent to the tunnel entrance, and the first message is transmitted after the target transmission direction and target transmission path are determined.

[0099] By decapsulating the target message, the first message is obtained, ensuring accurate uplink transmission of the first message.

[0100] To further illustrate the technical concept of this application, the technical solution will now be explained in conjunction with specific application scenarios.

[0101] This application embodiment processes a message transmission method, such as... Figure 8As shown, the virtual switch is the access vswitch in the VPP architecture. The target clients include tenant 1 and tenant 2. The service agent module is the service agent in the VPP architecture, and the target tunnel is an SRv6 tunnel conforming to the End.DX2 SID. Loopback port loop10 is the tunnel port, eth0 is the service access point to the vswitch, and memif101 / 1 is the service exit point to the vswitch. On the LAN side, tenant 1 and tenant 2 are identified and distinguished by QinQ information (i.e., virtual LAN tag information). Each tenant corresponds to a bridge-domain on the LAN side (tenant 1 corresponds to BD-11, and tenant 2 corresponds to BD-12). The bridge-domain is connected to the QinQ sub-interfaces (4000.640 and 4001.641) of loop10 and the QinQ sub-interfaces (4000.640 and 4001.641) of memif101 / 1.

[0102] The following is a detailed process for implementing multiple instances of SRv6 tunnels on the tenant's LAN side:

[0103] (1) Uplink decapsulation direction:

[0104] VPP node processing flow:

[0105] The output path is: dpdk-input→ethernet-input→ip6-input→ip6-lookup→sr-localsid-d→interface-output→loop10-output→loop10-tx→loopback-input→ethernet-input→l2-input→l2-learn→l2-fwd→l2-output→memif101 / 1-output. Among these,

[0106] dpdk-input: This is the entry point for data packets, using the DPDK library for efficient packet capture and processing. DPDK provides a set of low-level libraries and drivers that allow for high-speed, low-latency packet processing of network devices.

[0107] ethernet-input: This stage processes Ethernet layer data packets, including parsing Ethernet frame headers and performing checksums.

[0108] ip6-input: This stage is dedicated to processing IPv6 packets, parsing the IPv6 header, and performing necessary checks and preprocessing.

[0109] IP6-lookup: In IPv6 networks, this step involves route lookup to determine how packets should be forwarded.

[0110] sr-localsid-d: Related to source routing or local SID (Service Identifier) ​​processing.

[0111] interface-output: This stage is responsible for outputting data packets to the specified network interface.

[0112] Loop10-output: Indicates the output stage of interface loop10.

[0113] Loop10-tx: This is the transmission (TX) phase of the data packet on loop 10, preparing the data packet to be sent to the physical or virtual link.

[0114] loopback-input: If a data packet is sent to a loopback interface, it will be received here. Loopback interfaces are typically used for network testing or local communication.

[0115] ethernet-input: The data packet re-enters the Ethernet input phase.

[0116] l2-input: This stage processes the input to the data link layer (Layer 2), involving MAC address learning, frame filtering, etc.

[0117] l2-learn: In this stage, the network device learns which port the source MAC address is associated with, for use in subsequent frame forwarding.

[0118] L2-FWD: In the data link layer forwarding phase, the next hop of the data packet is determined based on the learned MAC address information.

[0119] L2-output: The output stage of the data link layer, preparing to send data packets to the next network device.

[0120] Memif101 / 1-output: Finally, the data packet is output through the memif101 / 1 interface.

[0121] A brief description of the relevant Node.js implementation:

[0122] The `sr-localsid-d` function decapsulates the target packet received from `eth0`, obtaining the first packet. This first packet is then sent to loop10. In loop10, `sr-localsid-d` sets the tag information `VNET_BUFFER_F_SRV6` in the first packet to 1. Then, `loopback-input` is called. Based on `VNET_BUFFER_F_SRV6` being 1, the transmission direction of the first packet is determined to be uplink. `loopback-input` then sets `VNET_BUFFER_F_SRV6` to 0, specifying `ethernet-input` as the next node processing function. Next, `ethernet-input`, based on the qinq information of the first packet, forwards packets reported by different tenants to the corresponding loopback qinq sub-interfaces, then forwards them via the L2 bridge to the qinq sub-interface of `memif101 / 1`, and finally transmits them to the service agent via `memif101 / 1`.

[0123] Specifically, tenant 1's qinq information is external 4000 internal 640, and tenant 2's qinq information is external 4001 internal 641. When the first message from tenant 1 arrives at loop 10, based on tenant 1's qinq information, 4000.640 in loop 10 is used as the first target interface, and 4000.640 in memif101 / 1 is used as the second target interface. The first message is then transmitted to the service agent via BD-11. Similarly, when the first message from tenant 2 arrives at loop 10, based on tenant 2's qinq information, 4001.641 in loop 10 is used as the first target interface, and 4001.641 in memif101 / 1 is used as the second target interface. The first message is then transmitted to the service agent via BD-12.

[0124] (2) Downward packaging direction:

[0125] VPP node processing flow:

[0126] memif-input→ethernet-input→l2-input→l2-learn→l2-flood→l2-output→loop10-output→loop10-tx→loopback-l2input→sr-pl-rewrite-encaps-l2→ip6-lookup→ip6-load-balance→ip6-rewrite→eth1-output→eth1-tx. in,

[0127] memif-input: This is the entry point for data packets to enter the processing pipeline from a memory interface (memif). Memory interfaces are typically used to pass data packets between different network functions, virtual machines, or containers.

[0128] ethernet-input: This stage processes Ethernet layer data packets, including parsing Ethernet frame headers and performing checksums.

[0129] l2-input: This stage processes the input to the data link layer (Layer 2), involving MAC address learning, frame filtering, etc.

[0130] l2-learn: In this stage, the network device learns which port the source MAC address is associated with, for use in subsequent frame forwarding.

[0131] L2-flood: If the destination MAC address of a data packet is unknown or the network device decides to broadcast / multicast, it will be flooded to all relevant ports at this stage.

[0132] L2-output: The output stage of the data link layer, preparing to send data packets to the next network device.

[0133] Loop10-output: refers to the output stage of loop10.

[0134] Loop10-tx: This is the transmission (TX) phase of the data packet on the loop10 interface, preparing the data packet to be sent to the physical or virtual link.

[0135] loopback-l2input: If a packet is sent to a loopback interface and needs to be processed again at the data link layer, it will be received at loopback-l2input.

[0136] sr-pl-rewrite-encaps-l2: This stage is related to Segment Routing (SR) and involves encapsulating or rewriting packets at the data link layer, such as adding SR tags, modifying MAC addresses, or performing other SR-related operations.

[0137] IP6-lookup: In IPv6 networks, this step involves route lookup to determine how packets should be forwarded.

[0138] ip6-load-balance: This stage is used to load balance IPv6 packets across multiple available paths.

[0139] IP6-rewrite: During this stage, the header of the IPv6 packet is modified, such as changing the destination address, source address, or adding / removing extension headers.

[0140] eth1-output: This is the stage where packets are prepared to be output from the Ethernet interface named "eth1".

[0141] eth1-tx: This is the transmission (TX) phase of the data packet on the "eth1" interface, where the data packet is sent to the physical link.

[0142] A brief description of the relevant Node.js implementation:

[0143] The message sent by the service agent to the tenant is forwarded to the access vswitch via memif101 / 1 between the service agent and the access vswitch. Upon receiving the message, memif101 / 1 on the access vswitch forwards the message destined for different tenants to the corresponding memif101 / 1 qinq sub-interface based on the qinq information. Then, through the L2 bridge-domain (messages sent to tenant 1 go through BD-11, and messages sent to tenant 2 go through BD-12), the message is transmitted as the first message to the loop10 qinq sub-interface. After receiving the first message, the loop10 qinq sub-interface calls loopback-l2input. Based on the message's VNET_BUFFER_F_SRV6 being 0, it determines it is a downlink and forwards it to sr-pl-rewrite-encaps-l2. The node process calls sr-pl-rewrite-encaps-l2 to match the first packets of different tenants with the corresponding segmentation routing policies. After encapsulating the first packets with SRv6, the second packets are obtained and then transmitted to the corresponding tenants via the switch and the metropolitan area network.

[0144] By applying the above technical solutions, at the tunnel entrance of the SRv6 tunnel, the uplink and downlink of the packets are identified using the tag value of the tag information VNET_BUFFER_F_SRV6 carried in the packets. This enables packets from different tenants to be transmitted in different target transmission paths, thereby supporting traffic identification and distribution for different tenants and meeting the needs of multiple instances of the SRv6 tunnel.

[0145] This application also proposes a message transmission device, such as... Figure 9As shown, it includes: a receiving module, used to receive a first message using the tunnel port of a virtual switch, wherein the tunnel port corresponds to at least one target tunnel, the target tunnel corresponds to multiple transmission paths, and the transmission paths connect a target client and a service proxy module; a first determining module, used to determine the target transmission direction of the first message based on the tag information of the transmission direction carried by the first message; and a second determining module, used to determine a target transmission path among the transmission paths based on the target transmission direction.

[0146] The message transmission device of this application embodiment receives a first message at the tunnel port of a virtual switch via a receiving module. The tunnel port corresponds to at least one target tunnel, and each target tunnel corresponds to multiple transmission paths. These transmission paths connect the target client and the service proxy module. A first determining module determines the target transmission direction of the first message based on the transmission direction tag information carried in the first message. A second determining module determines the target transmission path within each transmission path based on the target transmission direction. This allows messages from different target clients to be transmitted in different target transmission paths, supporting traffic identification and distribution for different tenants, thereby meeting the requirement of multiple instances operating within the same communication tunnel.

[0147] In specific application scenarios, the target transmission direction includes an uplink direction from the target client to the service proxy module or a downlink direction from the service proxy module to the target client. The second determining module is specifically used to: determine the target transmission path from each of the transmission paths based on the virtual LAN tag information and destination IP address carried in the first message when the target transmission direction is the uplink direction; and determine the target transmission path from each of the transmission paths based on the destination IP address of the first message when the target transmission direction is the downlink direction.

[0148] In a specific application scenario, the transmission path includes a first interface corresponding to the tunnel entrance and a second interface corresponding to the service exit of the virtual switch. The second determining module is further configured to: determine a target first interface from each of the first interfaces based on the virtual LAN tag information; determine a target second interface from each of the second interfaces based on the virtual LAN tag information; and determine the target transmission path based on a first path segment between the target first interface and the target second interface, and a second path segment between the target second interface and the destination IP address.

[0149] In specific application scenarios, the second determining module is also specifically used to: determine a third path between the tunnel entrance and the destination IP address, and determine the target transmission path based on the third path.

[0150] In specific application scenarios, a transmission module is also included, which is used to: transmit the first message using the target transmission path when the target transmission direction is the uplink direction; encapsulate the first message according to the routing policy matched by the first message to obtain a second message when the target transmission direction is the downlink direction; and transmit the second message using the target transmission path.

[0151] In specific application scenarios, the transmission module is specifically used to: transmit the second message to the target client via the target transmission path through the switch and the metropolitan area network in sequence.

[0152] In a specific application scenario, the target tunnel adopts a segmented routing method, and the tunnel entrance includes a loopback interface and a first determination module, which is specifically used for: determining the tag value in the tag information by calling a first node processing function in the loopback interface; determining the target transmission direction as the uplink direction when the tag value is a first value, and setting the first value to a second value by calling the first node processing function; and determining the target transmission direction as the downlink direction when the tag value is the second value.

[0153] In specific application scenarios, a setting module is also included, used to: determine the target interface of the virtual switch, wherein the first packet enters the virtual switch through the target interface, and the target interface is a service access point connecting to the metropolitan area network or a service exit point connecting to the service proxy module; when the target interface is the service access point, the tag value is set to the first value by calling the second node processing function in the loopback interface.

[0154] In specific application scenarios, a decapsulation module is also included, which is used to: decapsulate the target message entering the service access point by calling the second node processing function to obtain the first message; and send the first message to the tunnel entrance.

[0155] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.

[0156] The above embodiments are merely exemplary embodiments of this application and are not intended to limit this application. The scope of protection of this application is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to this application within its substance and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of this application.

Claims

1. A message transmission method, applied in a network environment including SRv6 tunnels and VPP architecture, comprising: The tunnel port of the virtual switch receives the first packet. The tunnel port corresponds to at least one target tunnel. The target tunnel corresponds to multiple transmission paths. The transmission paths connect the target client and the service agent module. The virtual switch is a vswitch in the VPP architecture. The service agent module is a service agent in the VPP architecture. The target tunnel is an SRv6 tunnel. The target transmission direction of the first message is determined based on the transmission direction tag information carried in the first message. Based on the target transmission direction, a target transmission path is determined among each of the transmission paths; The target transmission direction includes an uplink direction from the target client to the service proxy module or a downlink direction from the service proxy module to the target client. Determining the target transmission path among the transmission paths based on the target transmission direction includes: When the target transmission direction is the uplink direction, the target transmission path is determined from each of the transmission paths based on the virtual local area network tag information and the destination IP address carried in the first message; When the target transmission direction is the downlink direction, the target transmission path is determined from each of the transmission paths based on the destination IP address of the first message.

2. The message transmission method as described in claim 1, wherein the transmission path includes a first interface corresponding to the tunnel entrance and a second interface corresponding to the service exit of the virtual switch, and the step of determining the target transmission path from each of the transmission paths based on the virtual LAN tag information and destination IP address carried in the first message includes: The target first interface is determined from each of the first interfaces based on the virtual LAN tag information; The target second interface is determined from each of the second interfaces based on the virtual LAN tag information; The target transmission path is determined based on the first path segment between the target first interface and the target second interface, and the second path segment between the target second interface and the destination IP address.

3. The message transmission method as described in claim 1, wherein determining the target transmission path from each of the transmission paths based on the destination IP address of the first message includes: Determine the third path segment between the tunnel entrance and the destination IP address, and determine the target transmission path based on the third path segment.

4. The message transmission method as described in claim 1, further comprising, after determining the target transmission path among the transmission paths based on the target transmission direction: When the target transmission direction is the uplink direction, the first message is transmitted using the target transmission path; When the target transmission direction is the downlink direction, the first message is encapsulated according to the routing policy matched by the first message to obtain the second message; The second message is transmitted using the target transmission path.

5. The message transmission method as described in claim 4, wherein transmitting the second message using the target transmission path comprises: The second message is transmitted to the target client via the target transmission path, sequentially through the switch and the metropolitan area network.

6. The message transmission method as described in claim 1, wherein the target tunnel adopts a segmented routing method, the tunnel entrance includes a loopback interface, and the target transmission direction of the first message is determined according to the transmission direction tag information carried by the first message, including: In the loopback interface, the tag value in the tag information is determined by calling the first node processing function; If the tag value is the first value, the target transmission direction is determined to be the uplink direction, and the first value is set to the second value by calling the first node processing function; If the tag value is the second value, the target transmission direction is determined to be the downlink direction.

7. The message transmission method as described in claim 6, further comprising, before determining the target transmission direction of the first message based on the transmission direction tag information carried in the first message: The target interface of the virtual switch is determined, and the first message enters the virtual switch through the target interface. The target interface is either a service access point connecting to the metropolitan area network or a service exit point connecting to the service proxy module. When the target interface is the service access point, the tag value is set to the first value by calling the second node processing function in the loopback interface.

8. The message transmission method as described in claim 7, further comprising, before setting the tag value to the first value by calling the second node processing function in the loopback interface: The first message is obtained by decapsulating the target message entering the service access point by calling the second node processing function; The first message is sent to the tunnel entrance.

9. A message transmission apparatus, applied in a network environment including SRv6 tunnels and VPP architecture, comprising: The receiving module is used to receive a first message using the tunnel port of the virtual switch. The tunnel port corresponds to at least one target tunnel, and the target tunnel corresponds to multiple transmission paths. The transmission paths connect the target client and the service agent module. The virtual switch is a vswitch in the VPP architecture, and the service agent module is a service agent in the VPP architecture. The target tunnel is an SRv6 tunnel. The first determining module is used to determine the target transmission direction of the first message based on the tag information of the transmission direction carried by the first message; The second determining module is used to determine the target transmission path among the transmission paths based on the target transmission direction; The target transmission direction includes an uplink direction from the target client to the service proxy module or a downlink direction from the service proxy module to the target client. The second determining module is specifically used to: determine the target transmission path from each of the transmission paths based on the virtual LAN tag information and the destination IP address carried in the first message when the target transmission direction is the uplink direction. When the target transmission direction is the downlink direction, the target transmission path is determined from each of the transmission paths based on the destination IP address of the first message.