Message transmission method, device and system and storage medium
By determining the target AFTR device in the B4 device and encapsulating the packet, the delay problem of DS-Lite technology when dealing with large amounts of IPv4 traffic is solved, and load balancing of AFTR devices and isolation of user bearers is achieved.
Patent Information
- Application Number
- CN202411573564.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-18
AI Technical Summary
When DS-Lite technology processes a large amount of IPv4 traffic, it leads to an increase in processing delays, affecting overall network performance.
The B4 device receives the packets and network information sent by the user, and determines the target device from multiple AFTR devices based on this information to realize load balancing, and encapsulate and send messages.
It realizes load balancing of AFTR equipment, reduces the pressure of a single AFTR equipment, allocates messages from different users to different AFTR equipment, and realizes isolation of users' carrying and accurate traceability of messages.
Smart Images

Figure CN119484468A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a message transmission method, device, system and storage medium. Background Art
[0002] DS-Lite technology is a technology for transitioning from IPv4 to IPv6. It requires encapsulating IPv4 traffic in IPv6 packets for transmission through gateway basic bridging broadband unit (Base Bridging Broad Band, B4) devices and address family transition router (Address Family Transition Router, AFTR) devices.
[0003] Currently, IPv4 traffic from multiple B4 devices can only be transmitted through a single AFTR device. As a result, when processing large amounts of IPv4 traffic through DS-Lite technology, processing delays increase, affecting overall network performance. Summary of the invention
[0004] The present application provides a message transmission method, device, system and storage medium, which are used to solve the problem of affecting the overall network performance when DS-Lite technology processes a large amount of IPv4 traffic.
[0005] In order to achieve the above objectives, this application adopts the following technical solutions:
[0006] In a first aspect, the present application provides a message transmission method, which is applied to a B4 device, and the B4 device is connected to multiple AFTR devices. In the method, a message sent by a user terminal and network information carried by the message are received. Based on the network information, a target device is determined from multiple AFTR devices. The message is encapsulated and the encapsulated message is sent to the target device.
[0007] Based on the above technical solution, the B4 device receives the message sent by the user end and the network information carried by the message. After that, the B4 device determines the target device from multiple AFTR devices based on the network information. In this way, multiple AFTR devices can achieve load balancing and reduce the pressure of a single AFTR device. Then, the B4 device encapsulates the message and sends the encapsulated message to the target device. In this way, messages from different user ends can be allocated to different AFTR devices, realizing the isolation of user loads and accurate traceability of messages.
[0008] In one possible design, the network information includes: a device identification. If the device identification satisfies the access control rule, a target device corresponding to the device identification is determined from a plurality of AFTR devices.
[0009] In one possible design, the network information includes: a network type. If the network type of the message is a first network type and the device identifier satisfies the access control rule, a target device corresponding to the device identifier is determined from multiple AFTR devices.
[0010] In a possible design, a plurality of connection instances are configured in the B4 device, and the connection instance is used to establish a connection with the AFTR device. One connection instance corresponds to one AFTR device, and one connection instance is configured with a preset AFTR device address. From the plurality of connection instances, a target instance corresponding to the target device is determined. The message is encapsulated through the target instance, and the encapsulated message is sent to the target device. The encapsulated message carries the address of the B4 device in the target instance and the address of the target device.
[0011] In a second aspect, the present application provides a message transmission method, which is applied to an AFTR device, wherein the AFTR device includes multiple public network address pools for IPv4 public-private network conversion. In the method, an encapsulated message sent from a B4 device is received, and the encapsulated message carries the address of the B4 device and the address of the AFTR device. Based on the address of the B4 device and the address of the AFTR device, a target address pool is determined from multiple public network address pools. Based on the target address pool, a message is sent to a destination segment.
[0012] In one possible design, multiple connection instances are configured in the AFTR device, and one connection instance is configured with a public network address pool. One connection instance is configured with a preset B4 device address and a preset AFTR device address. Based on the address of the B4 device and the address of the AFTR device, a target instance is determined from multiple connection instances. Based on the target instance, a target address pool is determined from multiple public network address pools.
[0013] In a third aspect, the present application provides a method for transmitting a message, which is applied to a message transmission system. The message transmission system includes: a B4 device and an AFTR device. In the method, the B4 device receives a message sent by a user terminal and network information carried by the message. The B4 device determines a target device from multiple AFTR devices based on the network information. The B4 device encapsulates the message and sends the encapsulated message to the target device. The target device receives the encapsulated message sent from the B4 device, and the encapsulated message carries the address of the B4 device and the address of the AFTR device. The target device determines a target address pool from multiple public network address pools based on the address of the B4 device and the address of the AFTR device. The target device sends a message to the destination segment based on the target address pool.
[0014] In a fourth aspect, the present application provides a message transmission system, which includes: a B4 device and an AFTR device. The B4 device is used to receive messages sent by a user terminal and network information carried by the messages. The B4 device is also used to determine a target device from multiple AFTR devices based on network information. The B4 device is also used to encapsulate messages and send the encapsulated messages to the target device. The target device is used to receive an encapsulated message sent from the B4 device, and the encapsulated message carries the address of the B4 device and the address of the AFTR device. The target device is also used to determine a target address pool from multiple public network address pools based on the address of the B4 device and the address of the AFTR device. The target device is also used to send messages to the destination segment based on the target address pool.
[0015] In a fifth aspect, the present application provides a message transmission device, which is applied to a B4 device, and the device includes an acquisition module and a processing module.
[0016] The acquisition module is used to receive the message sent by the user end and the network information carried by the message. The processing module is used to determine the target device from multiple AFTR devices based on the network information. The processing module is also used to encapsulate the message and send the encapsulated message to the target device.
[0017] In one possible design, the network information includes: a device identification. The processing module is further configured to determine a target device corresponding to the device identification from a plurality of AFTR devices if the device identification satisfies an access control rule.
[0018] In one possible design, the network information includes: a network type. The processing module is further configured to determine a target device corresponding to the device identifier from a plurality of AFTR devices if the network type of the message is a first network type and the device identifier satisfies the access control rule.
[0019] In a possible design, a plurality of connection instances are configured in the B4 device, and the connection instance is used to establish a connection with the AFTR device, one connection instance corresponds to one AFTR device, and one connection instance is configured with a preset AFTR device address. The processing module is also used to determine the target instance corresponding to the target device from the plurality of connection instances. The processing module is also used to encapsulate the message through the target instance and send the encapsulated message to the target device, and the encapsulated message carries the address of the B4 device in the target instance and the address of the target device.
[0020] In a sixth aspect, the present application provides a message transmission device, which is applied to an AFTR device. The AFTR device includes multiple public network address pools for IPv4 public-private network conversion. The device includes an acquisition module and a processing module.
[0021] The acquisition module is used to receive the encapsulated message sent from the B4 device, and the encapsulated message carries the address of the B4 device and the address of the AFTR device. The processing module is used to determine the target address pool from multiple public network address pools based on the address of the B4 device and the address of the AFTR device. The processing module is also used to send a message to the destination segment based on the target address pool.
[0022] In a possible design, multiple connection instances are configured in the AFTR device, one connection instance is configured with a public network address pool; one connection instance is configured with a preset B4 device address and a preset AFTR device address. Based on the address of the B4 device and the address of the AFTR device, a target instance is determined from multiple connection instances. Based on the target instance, a target address pool is determined from multiple public network address pools.
[0023] In the seventh aspect, the present application provides a message transmission device, the device comprising: a processor and a memory; the processor and the memory are coupled; the memory is used to store one or more programs, the one or more programs including computer execution instructions, when the message transmission device is running, the processor executes the computer execution instructions stored in the memory to implement the method described in any possible implementation of the first aspect and the second aspect.
[0024] In an eighth aspect, the present application provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the method described in any possible implementation of the first and second aspects above.
[0025] In a ninth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run a computer program or instructions to implement a method as described in any possible implementation of the first aspect and the second aspect.
[0026] In a tenth aspect, the present application provides a computer program product comprising instructions, which, when executed by a computer, enables the computer to execute the method described in any possible implementation of the first and second aspects above.
[0027] In the above scheme, the technical problems that can be solved and the technical effects achieved by the message transmission device, computer equipment, computer storage medium, chip or computer program product can be referred to the technical problems and technical effects solved by the first and second aspects above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A system architecture diagram of a message transmission system provided in an embodiment of the present application;
[0029] Figure 2 A schematic diagram of a flow chart of a message transmission method provided in an embodiment of the present application;
[0030] Figure 3 A schematic diagram of a flow chart of another message transmission method provided in an embodiment of the present application;
[0031] Figure 4 A schematic diagram of a flow chart of another message transmission method provided in an embodiment of the present application;
[0032] Figure 5 A schematic diagram of a flow chart of another message transmission method provided in an embodiment of the present application;
[0033] Figure 6 A schematic diagram of an example of a message transmission method provided in an embodiment of the present application;
[0034] Figure 7 A schematic diagram of a flow chart of another message transmission method provided in an embodiment of the present application;
[0035] Figure 8 A schematic diagram of a flow chart of another message transmission method provided in an embodiment of the present application;
[0036] Fig. 9 A schematic diagram of the structure of a message transmission device provided in an embodiment of the present application;
[0037] Fig.10 A schematic diagram of the structure of another message transmission device provided in an embodiment of the present application;
[0038] Fig.11 A schematic diagram of the structure of another message transmission device provided in an embodiment of the present application;
[0039] Fig.12 A conceptual partial view of a computer program product provided for an embodiment of the present application. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0041] The terms “first” and “second” in the description and claims of the present application are used to distinguish different objects rather than to describe a specific order of the objects.
[0042] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not limited to the listed steps or modules, but may optionally include other steps or modules that are not listed, or may optionally include other steps or modules that are inherent to these processes, methods, products or devices.
[0043] In addition, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present concepts in a specific way.
[0044] With the rapid development of the Internet, the problem of IPv4 address exhaustion is becoming increasingly serious. As the next-generation protocol, IPv6 not only effectively solves the problem of address shortage, but also introduces innovative technologies such as SRv6 and APN6. Therefore, the transition from IPv4 to IPv6 has become a key technology. Therefore, the interoperability of IPv4 and IPv6 networks has become an important challenge.
[0045] DS-Lite (Dual-Stack Lite) is a technology for transitioning from IPv4 to IPv6. By carrying IPv4 traffic in an IPv6 network, it can support a smooth transition between IPv4 and IPv6 networks. DS-Lite requires the B4 device and AFTR device to encapsulate IPv4 traffic in IPv6 packets for transmission. The B4 device can establish an IPv6 tunnel with the AFTR, encapsulate IPv4 traffic in IPv6 packets and forward them; the AFTR device can decapsulate the tunnel, manage the public IPv4 address pool, and implement the IPv4 to IPv4 network address translation (network address translation for ipv4 toipv4, NAT44) function.
[0046] Currently, a B4 device can only establish a DS-Lite instance with one AFTR device, and all IPv4 traffic flowing to the B4 device needs to be processed through a single instance. As a result, a failure or attack on the AFTR device may cause IPv6 traffic to fail to be correctly converted to IPv4, thus affecting network availability and performance. In addition, all IPv4 traffic needs to pass through a single DS-Lite instance, which may cause throughput to reach its limit and increase processing delays, thereby affecting overall network performance. Moreover, all IPv4 traffic is converted through the same DS-Lite instance, and different types of traffic cannot be processed differently. In addition, the AFTR device only supports the configuration of a single IPv4 public network address pool. All B4 devices share one address pool, and it is impossible to achieve fine division of IPv4 address resources for different B4 devices.
[0047] In order to solve the above technical problems, an embodiment of the present application provides a method for transmitting a message. In this method, a B4 device receives a message sent by a user terminal and the network information carried by the message. Afterwards, the B4 device determines a target device from multiple AFTR devices based on the network information. In this way, multiple AFTR devices can achieve load balancing and reduce the pressure on a single AFTR device. Then, the B4 device encapsulates the message and sends the encapsulated message to the target device. In this way, messages from different user terminals can be allocated to different AFTR devices, achieving isolation of user loads and accurate tracing of messages.
[0048] The implementation environment of the embodiments of the present application is introduced below.
[0049] like Figure 1 , which is a system architecture diagram of a message transmission system provided by an embodiment of the present application, the system includes: multiple B4 devices 101 and multiple AFTR devices 102. Among them, one B4 device 101 is wirelessly connected to multiple AFTR devices 102.
[0050] The B4 device 101 is used to receive a message and network information carried in the message. Furthermore, the B4 device 101 is also used to determine one AFTR device 102 from multiple AFTR devices 102. Furthermore, the B4 device 101 is also used to send a message to the AFTR device 102.
[0051] In a possible design, a plurality of connection instances are configured in the B4 device, and the connection instances are used to establish a connection with the AFTR device. One connection instance is configured with a preset AFTR device address.
[0052] In one possible design, a connection instance is also configured with a preset B4 device address.
[0053] Exemplarily, the connection instance is a DS-Lite instance.
[0054] In a possible design, the B4 device 101 is configured with bidirectional forwarding detection (BFD) and access control rules. The B4 device 101 can detect whether a connection instance fails through BFD and switch the failed connection instance to a normal connection instance.
[0055] It should be noted that the B4 device 101 is configured with a VPP framework. Based on VPP, a pool of DS-Lite instances is maintained to manage the addition and deletion of DS-Lite instances. In this way, the B4 device 101 can be supported to configure multiple connection instances.
[0056] The AFTR device 102 is used to receive the message sent by the B4 device 101. In addition, the AFTR device 102 is also used to allocate a public network address to the message and send the message to the destination segment based on the public network address.
[0057] In one possible design, multiple connection instances are configured in the AFTR device 102. The connection instances are used to establish a connection with the B4 device, and one connection instance corresponds to one B4 device.
[0058] In one possible design, the AFTR device 102 is configured with multiple public network address pools, and one connection instance is configured with one public network address pool. One connection instance is configured with one preset B4 device address and one preset AFTR device address. The AFTR device 102 can determine one public network address pool from multiple public network address pools.
[0059] It should be noted that a vector packet processing (VPP) framework is configured in the AFTR device 102. All address pools can be managed through the address pool array of the VPP, and the connection instance records the index of the corresponding address pool in the address pool array. The AFTR device 102 can determine the address pool corresponding to the connection instance according to the index of the address pool corresponding to the connection instance.
[0060] In some embodiments, the system further includes a user device 103 , and the user device 103 is configured to send a message to the B4 device 102 .
[0061] Exemplarily, the user device 103 in the embodiment of the present application can be a tablet computer, a mobile phone, a desktop, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) / virtual reality (VR) device, a vehicle-mounted device, etc. The embodiment of the present application does not impose any special restrictions on the specific form of the user device 103.
[0062] In some embodiments, the system further includes a server 104. The server 104 is configured to receive the message sent by the AFTR device 102.
[0063] It should be noted that the server 104 in the embodiment of the present application may be a physical server or a cloud server. The server may be a single server, or may be a server cluster consisting of multiple servers. In some implementations, the server cluster may also be a distributed cluster. The present disclosure does not limit the specific implementation of the server 104.
[0064] The embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0065] like Figure 2 As shown, a message transmission method provided in an embodiment of the present application is applied to a B4 device, and the method includes:
[0066] S201, the B4 device receives a message sent by a user terminal and the network information carried in the message.
[0067] The messages include first network type messages and second network type messages.
[0068] Exemplarily, the first network type may be IPv4, and the second network type may be IPv6.
[0069] In one possible design, the network information may include at least one of the following: network type, device identification, etc.
[0070] In one possible design, the device identifier includes at least one of the following: a source address, a destination address, a port number, and an internet protocol (IP) protocol for interconnecting networks.
[0071] S202, B4 device determines the target device from multiple AFTR devices based on network information.
[0072] The target device is one AFTR device among the multiple AFTR devices.
[0073] In a possible implementation, the B4 device matches the device identification of the message with the access control rule. If the device identification satisfies the access control rule, the B4 device determines a target device corresponding to the device identification from multiple AFTR devices.
[0074] Exemplarily, the access control rule is an access control list (ACL) rule.
[0075] It should be noted that the present application does not limit the number of target devices, which can be one or more.
[0076] In one possible design, one AFTR device corresponds to one preset device identifier. The B4 device determines the network type of the message sent by the user terminal. If the network type of the message is the first network type and the device identifier satisfies the access control rule, a target device corresponding to the device identifier is determined from multiple AFTR devices.
[0077] In some embodiments, the B4 device determines the network type of the message sent by the user terminal. If the network type of the message is the second network type, the B4 device searches the second network type routing table based on the device identifier and forwards the message.
[0078] Exemplarily, the second network type routing table may be an IPv6 routing table.
[0079] In a possible design, the B4 device pre-stores the correspondence between the access control rules and the connection instances, and one access control rule corresponds to at least one connection instance. The B4 device matches the device identification of the message with the access control rule. If the device identification satisfies the access control rule, the B4 device determines the target instance corresponding to the access control rule from multiple connection instances based on the access control rule. Based on the target instance, the B4 device determines the target device corresponding to the target instance from multiple AFTR devices.
[0080] It should be noted that after receiving the message sent by the user end, the B4 device can extract the feature values of each dimension of the message. The feature values include: source IP, destination IP, source port and protocol. After that, the access control rules pre-set for different connection instances are matched, and the corresponding access control rule index is determined. Finally, the connection instance corresponding to the message is obtained through the corresponding access control rule index.
[0081] In some embodiments, the B4 device matches the access control rule based on the device identification of the message. If the device identification does not satisfy the access control rule, the B4 device searches the first network type routing table based on the device identification and forwards the message.
[0082] Exemplarily, the first network type routing table may be an IPv4 routing table.
[0083] S203, the B4 device encapsulates the message and sends the encapsulated message to the target device.
[0084] In a possible implementation, the B4 device determines the target instance corresponding to the target device from multiple connection instances. The B4 device encapsulates the message through the target instance and sends the encapsulated message to the target device. The encapsulated message carries the address of the B4 device in the target instance and the address of the target device.
[0085] In one possible design, the B4 device encapsulates the message based on the address of the B4 device in the target instance and the address of the target device to obtain an encapsulated message, and sends the encapsulated message to the target device.
[0086] Exemplarily, the message is an IPv4 message. Based on the address of the B4 device and the address of the target device, the B4 device encapsulates the IPv4 message in an IPv6 message to obtain an IPv6 message carrying the address of the B4 device in the target instance and the address of the target device. The B4 device sends the IPv6 message to the target device through the target instance.
[0087] Based on the above technical solution, the B4 device receives the message sent by the user end and the network information carried by the message. After that, the B4 device determines the target device from multiple AFTR devices based on the network information. In this way, multiple AFTR devices can achieve load balancing and reduce the pressure of a single AFTR device. Then, the B4 device encapsulates the message and sends the encapsulated message to the target device. In this way, messages from different user ends can be allocated to different AFTR devices, realizing the isolation of user loads and accurate traceability of messages.
[0088] like Figure 3 As shown, a message transmission method provided by an embodiment of the present application is applied to an AFTR device, and the AFTR device includes multiple public network address pools for IPv4 public-private network conversion. The method includes:
[0089] S301. The AFTR device receives the encapsulated message sent from the B4 device.
[0090] The encapsulated message carries the address of the B4 device and the address of the AFTR device.
[0091] Exemplarily, the encapsulated message is an IPv6 message.
[0092] S302: The AFTR device determines a target address pool from multiple public network address pools based on the address of the B4 device and the address of the AFTR device.
[0093] In a possible design, the public network address pool is an IPv4 public network address pool. The AFTR device pre-stores addresses of multiple B4 devices and the address of the AFTR device.
[0094] In a possible implementation, the AFTR device pre-stores the correspondence between the address of the B4 device and the address of the AFTR device and the public network address pool. The address of a B4 device and the address of the AFTR device correspond to a public network address pool for IPv4 public-private network conversion. The AFTR device matches the address of a B4 device and the address of the AFTR device carried in the message based on the pre-stored address of the B4 device and the address of the AFTR device. If the address of the B4 device and the address of the AFTR device carried in the message are stored in the AFTR device, the target address pool used for source network address translation (SNAT) conversion of the message is determined from multiple public network address pools.
[0095] In another possible implementation, the AFTR device determines a target instance corresponding to the message from multiple connection instances based on an address of a B4 device and an address of the AFTR device, and determines a target address pool used for performing IPv4 public-private network SNAT conversion for the message from multiple public network address pools based on the target instance.
[0096] In a possible design, the AFTR device obtains a connection instance corresponding to the address of the B4 device carried in the encapsulated message and the address of the AFTR device based on the address of a B4 device carried in the encapsulated message and the address of the AFTR device. The AFTR device matches the connection instance carried in the message based on the pre-stored connection instance. If the AFTR device stores the connection instance carried in the message, the target instance is determined from multiple connection instances. The AFTR device determines the address pool used for SNAT conversion of the message from multiple public network address pools based on the target instance.
[0097] In some embodiments, the AFTR device matches the connection instance configured by the AFTR device based on the address of the B4 device and the address of the AFTR device. If the connection instance carried by the message is not stored in the AFTR device, the AFTR device searches the second network type routing table and forwards the message.
[0098] In one possible design, the AFTR device determines the network type of the received message. If the network type of the message is the second network type, and the AFTR device stores a connection instance carried by the message, the AFTR device determines the target address pool from multiple public network address pools based on the target instance.
[0099] In some embodiments, the AFTR device determines the network type of the received message. If the network type of the message is the first network type, the AFTR device searches the first network type routing table based on the network information and forwards the message.
[0100] S303. The AFTR device sends a message to the destination segment based on the target address pool.
[0101] The destination segment is the destination address carried by the message.
[0102] In a possible implementation, the AFTR device decapsulates the message. Based on the target address pool, the AFTR device performs SNAT conversion on the decapsulated message, converts it into a public network address in the target address pool, and sends the converted message to the destination segment.
[0103] In a possible design, the AFTR device strips the data header of the message to obtain the decapsulated message. Then, the AFTR device converts the decapsulated message through SNAT based on the public network address. Then, the AFTR device searches for a matching routing entry in the routing table based on the destination address of the message and sends the converted message to the destination segment.
[0104] Exemplarily, the AFTR device strips the IPv6 datagram header of the message to obtain the corresponding IPv4 message. The AFTR device replaces the source address of the IPv4 message with the assigned public network address to complete the SNAT conversion. Afterwards, the AFTR device searches for a matching routing entry in the routing table based on the destination address of the message and sends the converted message to the destination segment.
[0105] It should be noted that after the decapsulated message is converted through SNAT, the source address of the message is a public network address in the target address pool, and the destination address is the destination address carried by the message before the B4 device encapsulates the message.
[0106] Based on the above technical solution, the AFTR device receives the encapsulated message sent from the B4 device, and the encapsulated message carries the address of the B4 device and the address of the AFTR device. Afterwards, the AFTR device determines the target address pool corresponding to the connection instance from multiple public network address pools based on the connection instance determined by the address of the B4 device and the address of the AFTR device. By binding each public network address pool to the connection instance determined by the address of the B4 device and the address of the AFTR device, refined management of public network address resources is achieved. Finally, the AFTR device sends a message to the destination segment based on the target address pool. In this way, network resources can be used more effectively and the scalability and flexibility of the network can be improved.
[0107] like Figure 4 As shown, a message transmission method provided in an embodiment of the present application is applied to a message transmission system, and the method includes:
[0108] S401, the B4 device receives a message sent by a user terminal and the network information carried in the message.
[0109] S402, the B4 device determines the target device from multiple AFTR devices based on the network information.
[0110] S403, the B4 device encapsulates the message and sends the encapsulated message to the target device.
[0111] S404: The target device receives the encapsulated message sent from the B4 device. The encapsulated message carries the address of the B4 device and the address of the AFTR device.
[0112] S405: The target device determines a target address pool from multiple public network address pools based on the address of the B4 device and the address of the AFTR device.
[0113] S406: The target device sends a message to the destination segment based on the target address pool.
[0114] It should be noted that, for the specific description of S401, S402, S403, S404, S405 and S406, reference may be made to the introduction of S201, S202, S203, S301, S302 and S303 in the above embodiments, which will not be repeated here.
[0115] It can be understood that the B4 device receives the message sent by the user end and the network information carried by the message. After that, the B4 device determines the target device from multiple AFTR devices based on the network information. In this way, multiple AFTR devices can achieve load balancing and reduce the pressure of a single AFTR device. Then, the B4 device encapsulates the message and sends the encapsulated message to the target device. In this way, messages from different user ends can be allocated to different AFTR devices, realizing the isolation of user bearers and the accurate traceability of messages. The AFTR device receives the encapsulated message sent from the B4 device, and the encapsulated message carries the address of the B4 device and the address of the AFTR device. After that, the AFTR device determines the target address pool from multiple public network address pools based on the connection instance determined by the address of the B4 device and the address of the AFTR device. By binding each public network address pool to the connection instance determined by the address of the B4 device and the address of the AFTR device, the refined management of public network address resources is realized. Finally, the AFTR device sends the message to the destination segment based on the target address pool. In this way, network resources can be used more effectively and the scalability and flexibility of the network can be improved.
[0116] In some embodiments, a message may be bound to multiple connection instances. If one of the connection instances fails, the B4 device switches the message to a normal connection instance.
[0117] It should be noted that the connection instance failure means that the B4 device cannot establish a connection with the AFTR device corresponding to the connection instance. For example, the AFTR device fails. Another example is that the connection instance operates abnormally.
[0118] In the embodiment of the present application, a preset device identifier may correspond to at least one AFTR device. The B4 device may determine at least one target device corresponding to the device identifier and a target instance corresponding to each target device from multiple AFTR devices based on the device identifier.
[0119] In a possible implementation, the multiple target instances include a first instance and a second instance. When the B4 device sends a message to a target device corresponding to the first instance through the first instance, if the first instance fails, the message can be sent to the target device corresponding to the second instance through the second instance.
[0120] It should be noted that when a target instance is selected from multiple target instances, the selection may be made based on the operating status of a target device corresponding to the target instance, for example, the load of the target device and whether it is in a normal operating status.
[0121] For example, Figure 5As shown, it is a flow chart of another message transmission method provided by an embodiment of the present application. The B4 device detects a connection instance failure through BFD, which can trigger a fault switching mechanism and switch the traffic from the failed connection instance to the normal connection instance. After that, the B4 device encapsulates the message, searches the routing table, and forwards the encapsulated message.
[0122] like Figure 6 As shown, the embodiments of the present application are introduced below in combination with specific examples (Example 1 and Example 2).
[0123] Example 1: Multiple B4 devices are configured with multiple DS-Lite instances, and multiple AFTR devices are configured with multiple DS-Lite instances. Multiple B4 devices receive user messages from multiple user terminals and determine the network type of the messages sent by the user terminals. The B41 device receives messages from user terminal 1 with an IP of 192.168.1.1 and user terminal 2 with an IP of 192.168.1.2, and determines that the network type of the messages sent by user terminal 1 and user terminal 2 are both IPv4; the B42 device receives messages from user terminal 3 with an IP of 192.168.2.1 and user terminal 4 with an IP of 192.168.2.2, and determines that the network type of the messages sent by user terminal 3 and user terminal 4 are both IPv4.
[0124] The B4 device is pre-configured with ACL rules. For example, if the ACL rule is that the source address is 192.168.2.1 or belongs to the 192.168.1.0 / 24 network segment, the B4 device determines the target instance corresponding to the message from multiple connection instances. According to the ACL rules, the IPv4 message is matched. If the message identifier of user terminal 4 does not meet the ACL rules, the IPv4 routing table is searched and the message is forwarded. If user terminal 1, user terminal 2, and user terminal 3 all meet the ACL rules, the B4 device address and AFTR device address of the corresponding target instance are determined, and the IPv4 message is encapsulated. It can be understood that the IPv4 messages of user terminals 1, 2, and 3 meet different ACL rules and therefore correspond to different target instances. Therefore, the source address of the IPv4 packet encapsulation of user end 1 is the IPv6 address 2001:db8:0:1::1 of the B41 device, and the destination address is the IPv6 address 2001:db8::1 of the AFTR1 device; the source address of the IPv4 packet encapsulation of user end 2 is the IPv6 address 2001:db8:0:1::1 of the B41 device, and the destination address is the IPv6 address AFTR2 device address 2001:db8::2 of the AFTR2 device; the source address of the IPv4 packet encapsulation of user end 3 is the IPv6 address 2001:db8:0:2::1 of the B42 device, and the destination address is the IPv6 address AFTR2 device address 2001:db8::2 of the AFTR2 device. Afterwards, the B4 device searches the routing table and forwards the encapsulated IPv6 data packet to the corresponding AFTR device.
[0125] The AFTR device receives the message encapsulated by the B4 device: the AFTR1 device receives the message sent by the user terminal 1, and determines the network type of the message sent by the user terminal 1, and determines that the network type of the message sent by the user terminal 1 is IPv6; the AFTR2 device receives the message sent by the user terminal 2 and the user terminal 3, and determines that the network type of the message sent by the user terminal 2 and the user terminal 3 is both IPv6. After that, the AFTR1 device and the AFTR2 device determine whether the source address and destination address of the received message are the same as the B4 device address and the AFTR device address of the self-configured connection instance. If the source address and the destination address of the message received by the AFTR1 device and the AFTR2 device are the same as the B4 device address and the AFTR device address of the self-configured connection instance, the AFTR1 device and the AFTR2 device decapsulate the received IPv6 message respectively and convert the message into the corresponding IPv4 data packet. Then, the AFTR device allocates an IPv4 public network address to the decapsulated IPv4 message for SNAT conversion. The public network address is the public network address pool corresponding to the target instance matched by the IPv4 message, where the public network address pool corresponding to target instance 1 is 1.1.1.0 / 24, the public network address pool corresponding to target instance 2 is 2.2.2.0 / 24, and the public network address pool corresponding to target instance 3 is 3.3.3.0 / 24: AFTR1 device allocates public network address 1.1.1.2 to the IPv4 message of user end 1; AFTR2 device allocates public network address 2.2.2.2 to the IPv4 message of user end 2; AFTR2 device allocates public network address 3.3.3.2 to the IPv4 message of user end 3. After that, the AFTR device searches the routing table and sends the IPv4 data packet after SNAT conversion to the destination segment.
[0126] Example 2: Assuming that the AFTR1 device fails, the service traffic from the B41 device to the AFTR1 device needs to be switched to the AFTR2 device. The B41 device detects through BFD that the AFTR1 device is unreachable, so it triggers the failover process and switches the traffic originally carried by the target instance 1 to the destination instance 2. After that, the B41 device re-encapsulates the IPv4 message of the user end 1, with the source address being the IPv6 address 2001:db8:0:1::1 of the B41 device, and the destination address being the AFTR2 device address 2001:db8::2. Then, the B41 device forwards the encapsulated IPv6 data packet to the AFTR2 device. The AFTR2 device receives the message from the user end 1, and determines the network type of the message sent by the user end 1, and determines that the network type of the message sent by the user end 1 is IPv6. After that, the AFTR2 device determines that the source address and destination address of the received message are the same as the B4 device address and the AFTR device address of the connection instance configured by itself. After that, the AFTR2 device decapsulates the received IPv6 message and converts the message into the corresponding IPv4 data packet. Then, the AFTR2 device selects the IPv4 public network address 2.2.2.4 from the address pool corresponding to the connection instance corresponding to the message to perform SNAT conversion on the decapsulated IPv4 message. Finally, the AFTR2 device searches the routing table and forwards the IPv4 data packet after SNAT conversion.
[0127] The following is an introduction to the embodiments of the present application with reference to specific examples. Figure 7 As shown, it is a flow chart of another message transmission method provided by an embodiment of the present application. The B4 device is pre-configured with multiple connection instances, ACL rules and BFD detection. The B4 device receives the message sent by the user end and determines the network type of the message. If the network type of the message sent by the user end is IPv6, the IPv6 routing table is searched for forwarding; if the network type of the message sent by the user end is IPv4, the B4 device matches the access control rule based on the message device identifier. If the device identifier of the message does not meet the access control rule, the IPv4 routing table is searched for forwarding; if the device identifier of the message meets the access control rule, the B4 device determines the target instance corresponding to the message from multiple connection instances. Based on the target instance, the B4 device determines the target device corresponding to the target instance from multiple AFTR devices. Afterwards, the B4 device encapsulates the message based on the target instance, and searches the routing table for forwarding.
[0128] The following is an introduction to the embodiments of the present application with reference to specific examples. Figure 8As shown, it is a flow chart of another message transmission method provided by an embodiment of the present application. The AFTR device is configured with multiple connection instances and multiple public network address pools, and one connection instance corresponds to one public network address pool. The AFTR device receives the encapsulated message sent from the B4 device and determines the network type of the received message. Among them, the encapsulated message carries the address of the B4 device and the address of the AFTR device. If the network type of the message is the second network type, the AFTR device matches the address of a B4 device and the address of the AFTR device carried by the message based on the pre-stored address of the B4 device and the address of the AFTR device. If the address of the B4 device and the address of the AFTR device carried by the message are not stored in the AFTR device, the AFTR device searches the IPv6 routing table for forwarding; if the address of the B4 device and the address of the AFTR device carried by the message are stored in the AFTR device, the AFTR device determines the target address pool used for IPv4 public-private network SNAT conversion for the message from multiple public network address pools based on the target instance. Afterwards, the AFTR device decapsulates the message. Based on the target address pool, the AFTR device performs SNAT conversion on the decapsulated message and converts it to a public network address in the target address pool. After that, the AFTR device searches the routing table based on the destination address of the message and sends the converted message to the destination segment.
[0129] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. It is understandable that, in order to realize the above functions, the transmission device of the message includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the steps of the transmission method of the message of each example described in the embodiment disclosed in the present application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0130] The embodiment of the present application further provides a message transmission device, which can be a server, a CPU in the server, a module in the server for transmitting messages, or a client in the server for transmitting messages.
[0131] The embodiment of the present application can divide the transmission device of the message into functional modules or functional units according to the above method example. For example, each functional module or functional unit can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules or functional units. Among them, the division of modules or units in the embodiment of the present application is schematic, which is only a logical function division, and there may be other division methods in actual implementation.
[0132] The present application embodiment provides a message transmission device, which is applied to a B4 device. Fig. 9 As shown, the message transmission device may include: an acquisition module 901 and a processing module 902.
[0133] The acquisition module 901 is used to receive the message sent by the user end and the network information carried by the message. The processing module 902 is used to determine the target device from multiple AFTR devices based on the network information. The processing module 902 is also used to encapsulate the message and send the encapsulated message to the target device.
[0134] The present application embodiment provides a message transmission device, which is applied to an AFTR device. Fig.10 As shown, the message transmission device may include: an acquisition module 1001 and a processing module 1002.
[0135] The acquisition module 1001 is used to receive the encapsulated message sent from the B4 device, and the encapsulated message carries the address of the B4 device and the address of the AFTR device. The processing module 1002 is used to determine the target address pool from multiple public network address pools based on the address of the B4 device and the address of the AFTR device. The processing module 1002 is also used to send a message to the destination segment based on the target address pool.
[0136] Fig.11 1 is a schematic diagram of another message transmission device according to an exemplary embodiment. The message transmission device may include a processor 1102, and the processor 1102 is used to execute application code to implement the message transmission method in the present application.
[0137] The processor 1102 may be a central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
[0138] like Fig.11As shown, the message transmission device may further include a memory 1103. The memory 1103 is used to store application program codes for executing the solution of the present application, and the execution is controlled by the processor 1102.
[0139] The memory 1103 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1103 may exist independently and be connected to the processor 1102 via the bus 1104. The memory 1103 may also be integrated with the processor 1102.
[0140] like Fig.11 As shown, the message transmission device may further include a communication interface 1101, wherein the communication interface 1101, the processor 1102, and the memory 1103 may be coupled to each other, for example, via a bus 1104. The communication interface 1101 is used to perform information interaction with other devices, for example, to support information interaction between the message transmission device and other devices.
[0141] It should be pointed out that Fig.11 The device structure shown in the figure does not constitute a limitation on the transmission device of the message, except Fig.11 In addition to the components shown, the message transmission device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0142] In actual implementation, the functions implemented by the processing unit can be Fig.11 The processor 1102 shown calls the program code in the memory 1103 to implement.
[0143] The present application also provides a computer-readable storage medium, on which instructions are stored, and when the instructions in the computer-readable storage medium are executed by a processor of a computer device, the computer can execute the message transmission method provided in the above-mentioned embodiment. For example, the computer-readable storage medium may be a memory 1103 including instructions, and the above instructions may be executed by a processor 1102 of a computer device to complete the above method. Optionally, the computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, a non-temporary computer-readable storage medium may be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
[0144] Fig.12 A conceptual partial view of a computer program product provided by an embodiment of the present application is schematically shown, where the computer program product includes a computer program for executing a computer process on a computing device.
[0145] In one embodiment, the computer program product is provided using a signal bearing medium 1200. The signal bearing medium 1200 may include one or more program instructions that, when executed by one or more processors, may provide the above-described Figure 2 , Figure 3 Thus, for example, reference to Figure 2 In the embodiment shown in , one or more features of S201 to S203 may be undertaken by one or more instructions associated with the signal bearing medium 1200. In addition, Fig.12 The program instructions in also describe example instructions.
[0146] In some examples, the signal bearing medium 1200 may include a computer readable medium 1201, such as, but not limited to, a hard drive, a compact disk (CD), a digital video disk (DVD), a digital tape, a memory, a read-only memory (ROM) or a random access memory (RAM), and the like.
[0147] In some implementations, the signal bearing medium 1200 may include a computer recordable medium 1202 such as, but not limited to, a memory, a read / write (R / W) CD, a R / W DVD, or the like.
[0148] In some implementations, signal bearing medium 1200 may include communication medium 1203 such as, but not limited to, digital and / or analog communication media (eg, fiber optic cables, waveguides, wired communication links, wireless communication links, etc.).
[0149] The signal bearing medium 1200 may be communicated by a wireless form of communication medium 1203. The one or more program instructions may be, for example, computer executable instructions or logic implemented instructions.
[0150] In some examples, the message transmission device can be configured to provide various operations, functions, or actions in response to one or more program instructions in computer-readable medium 1201, computer-recordable medium 1202, and / or communication medium 1203.
[0151] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0152] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0153] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0154] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0155] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the full classification part or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute the full classification part or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes various media that can store program codes, such as-U disk, mobile hard disk, ROM, RAM, disk or CD.
[0156] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A message transmission method, characterized in that: Applied to a gateway basic bridging broadband unit B4 device, the B4 device is connected to multiple AFTR devices; the method comprises: Receiving a message sent by a user terminal and network information carried in the message; determining a target device from among the plurality of AFTR devices based on the network information; The message is encapsulated and the encapsulated message is sent to the target device.
2. The method according to claim 1, characterized in that The network information includes: a device identification, and determining a target device from the plurality of AFTR devices based on the network information includes: If the device identification satisfies the access control rule, the target device corresponding to the device identification is determined from the multiple AFTR devices.
3. The method according to claim 2, characterized in that The network information includes: a network type; if the device identifier satisfies the access control rule, determining the target device corresponding to the device identifier from the multiple AFTR devices, including: If the network type of the message is the first network type and the device identifier satisfies the access control rule, the target device corresponding to the device identifier is determined from the multiple AFTR devices.
4. The method according to claim 1, characterized in that: The B4 device is configured with a plurality of connection instances, the connection instances are used to establish a connection with an AFTR device, one connection instance corresponds to one AFTR device, and one connection instance is configured with a preset AFTR device address; The encapsulating the message and sending the encapsulated message to the target device includes: Determine a target instance corresponding to the target device from the multiple connection instances; The message is encapsulated by the target instance, and the encapsulated message is sent to the target device, wherein the encapsulated message carries the address of the B4 device in the target instance and the address of the target device.
5. A message transmission method, characterized in that: Applied to an AFTR device, the AFTR device includes a plurality of public network address pools for IPv4 public-private network conversion, the method includes: receiving an encapsulated message sent from a B4 device, wherein the encapsulated message carries an address of the B4 device and an address of the AFTR device; Determine a target address pool from the plurality of public network address pools based on the address of the B4 device and the address of the AFTR device; Based on the target address pool, the message is sent to a destination segment.
6. The method according to claim 5, characterized in that The AFTR device is configured with multiple connection instances, one of which is configured with a public network address pool; one of which is configured with a preset B4 device address and a preset AFTR device address; The determining a target address pool from the plurality of public network address pools based on the address of the B4 device and the address of the AFTR device comprises: determining a target instance from the plurality of connection instances based on the address of the B4 device and the address of the AFTR device; Based on the target instance, a target address pool is determined from the multiple public network address pools.
7. A message transmission method, characterized in that: A transmission system for a message, the system comprising: a user terminal, a B4 device and an AFTR device; the method comprising: The B4 device receives a message sent by a user terminal and network information carried in the message; The B4 device determines a target device from a plurality of AFTR devices based on the network information; The B4 device encapsulates the message and sends the encapsulated message to the target device; The target device receives an encapsulated message sent from the B4 device, wherein the encapsulated message carries an address of the B4 device and an address of the AFTR device; The target device determines a target address pool from the multiple public network address pools based on the address of the B4 device and the address of the AFTR device; The target device sends the message to the destination segment based on the target address pool.
8. A message transmission system, characterized in that: The message transmission system includes: B4 equipment and AFTR equipment; The B4 device receives a message sent by a user terminal and network information carried in the message; The B4 device determines a target device from a plurality of AFTR devices based on the network information; The B4 device encapsulates the message and sends the encapsulated message to the target device; The target device receives an encapsulated message sent from the B4 device, wherein the encapsulated message carries an address of the B4 device and an address of the AFTR device; The target device determines a target address pool from the multiple public network address pools based on the address of the B4 device and the address of the AFTR device; The target device sends the message to the destination segment based on the target address pool.
9. A message transmission device, characterized in that: Applied to B4 equipment, the device includes an acquisition module and a processing module: The acquisition module is used to receive the message sent by the user terminal and the network information carried by the message; The processing module is used to determine a target device from a plurality of AFTR devices based on the network information; The processing module is further used to encapsulate the message and send the encapsulated message to the target device.
10. A message transmission device, characterized in that: Applied to AFTR equipment, the device includes an acquisition module and a processing module: The acquisition module is used to receive an encapsulated message sent from a B4 device, wherein the encapsulated message carries an address of the B4 device and an address of the AFTR device; The processing module is used to determine a target address pool from a plurality of public network address pools based on the address of the B4 device and the address of the AFTR device; The processing module is further configured to send the message to the destination segment based on the target address pool.
11. A message transmission device, characterized in that: include: Processor and memory; The processor is coupled to the memory; The memory is used to store one or more programs, and one or more of the programs include computer execution instructions. When the message transmission device is running, the processor executes the computer execution instructions stored in the memory to enable the message transmission device to perform the method as described in any one of claims 1-7.
12. A computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, characterized in that: When a computer executes the instruction, the computer performs the method according to any one of claims 1 to 7.
13. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device, the computing device is caused to perform the method according to any one of claims 1 to 7.