Method, apparatus, gateway and computer-readable medium for routing packets

By designing a gateway that can automatically switch working modes, the problem that IPv4 devices cannot route IPv4 packets caused by DS-Lite tunnel failure is solved, and the IPv4 routing service is quickly restored, improving network service performance and user experience.

CN114205334BActive Publication Date: 2025-02-28ARRIS ENTERPRISES LLC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010909379.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-02
Publication Date
2025-02-28
Estimated Expiration
2040-09-02

AI Technical Summary

Technical Problem

DS-Lite tunnel failure causes IPv4 devices to be unable to route IPv4 packets in the IPv6 network, resulting in users being disconnected from the network. The existing technology requires manual intervention, which takes time and affects network service performance and user experience.

Method used

Design a gateway that can automatically switch the working mode when the DS-Lite tunnel is unavailable, switch from IPv6+DS-Lite mode to dual-stack mode, request the IPv4 public network address from the network side, route IPv4 packets to the IPv4 user equipment, and switch back to the original mode when the DS-Lite tunnel is restored, releasing the IPv4 public network address.

Benefits of technology

It realizes automatic switching of working mode when DS-Lite tunnel failure, quickly restores IPv4 routing services, reduces user outage time, improves network service performance and user experience, and saves IPv4 address space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114205334B_ABST
    Figure CN114205334B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, apparatus, gateway and computer-readable medium for routing packets. The method includes: establishing a DS-Lite tunnel with an AFTR device by a gateway to operate in a first mode, wherein the gateway is capable of operating in an operating mode including a first mode and a second mode, wherein in the first mode, the gateway uses the DS-Lite tunnel to route IPv4 packets for an IPv4 user device, and in the second mode, the gateway uses its IPv4 public network address to route IPv4 packets for an IPv4 user device; and in response to determining that the DS-Lite tunnel is unavailable, the gateway switches the operating mode from the first mode to the second mode. By switching the operating mode, network services can continue to be provided to IPv4 user devices without manual assistance, quickly alleviating the problem of being unable to route IPv4 packets caused by DS-Lite tunnel failure, thereby improving network service performance and user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication networks, and more particularly, to a method, an apparatus, a gateway, and a computer-readable medium for routing packets in the field of communication networks. Background Art

[0002] With the development of the Internet, IPv4 (Internet Protocol Version 4) public network addresses are gradually being exhausted, making it difficult to deploy new routing devices, servers and other network devices in IP networks, which seriously restricts the development of IP (Internet Protocol) networks. In order to overcome the problem of insufficient IPv4 public network addresses, technicians are studying IPv6 (Internet Protocol Version 6) technology. IPv6 technology uses a longer network address than IPv4 addresses, so it can assign unique network addresses to almost all objects on the earth.

[0003] IPv4 and IPv6 are two different types of protocols, corresponding to different protocol stacks. Devices that support one cannot communicate under the other protocol. Most of the existing IP networks are IPv4 networks, and there are a large number of devices that support the IPv4 protocol. Although IPv6 technology has made great progress in recent years, with the emergence of IPv6 networks and corresponding IPv6 devices with faster transmission speeds and better network service quality, IPv4 networks and IPv6 networks, as well as IPv4 devices and IPv6 devices, will coexist for a long time.

[0004] In this article, the user equipment / server / device that only supports IPv4 protocol will be referred to as IPv4 user equipment / server / device, the user equipment / server / device that only supports IPv6 protocol will be referred to as IPv6 user equipment / server / device, and the user equipment / server / device that both supports IPv6 protocol and supports IPv4 protocol will be referred to as dual stack user equipment / server / device. Supporting the same network layer protocol can communicate with each other, but supporting the same network layer protocol The equipment may be separated by the network with different network layer protocols, making them difficult to communicate across different networks. For example, when there is also at least one IPv6 network between two IPv4 devices, the IPv4 packet that needs to be transmitted between these two IPv4 devices is difficult to transmit across the IPv6 network.

[0005] In order to enable an IPv4 device to communicate with another IPv4 device across an IPv6 network, DS-Lite (DualStack Lite) technology was introduced. DS-Lite technology can route IPv4 packets on an IPv6 network by utilizing a DS-Lite tunnel established between a gateway on the user device side and an AFTR (Address Family Transition Router) device on the network side, thereby enabling an IPv4 device to access a remote IPv4 device across an IPv6 network.

[0006] Due to the introduction of DS-Lite technology, a gateway with a LAN (Local Area Network) interface on the user device side can usually work in one of three modes. These three modes include IPv4-only mode, IPv6+DS-Lite mode and dual stack mode. In IPv4-only mode, the interface on the external network side of the gateway (for example, WAN (Wide Area Network) interface) has an IPv4 public network address, and can directly route IPv4 packets on the IPv4 network. In dual stack mode, the WAN interface of the gateway has an IPv4 public network address and an IPv6 public network address, so that IPv4 packets can be routed on the IPv4 network and IPv6 packets can be routed on the IPv6 network. In IPv6+DS-Lite mode, the WAN interface of the gateway has only an IPv6 public network address, and a DS-Lite tunnel is established with the AFTR device in the IPv6 network. Through the DS-Lite tunnel, IPv4 packets can be routed in the IPv6 network, thereby realizing the communication of IPv4 devices across IPv6 networks. The gateway and AFTR devices at both ends of the DS-Lite tunnel can realize the transmission of IPv4 packets in the IPv6 network by adding IPv6 headers to IPv4 packets and removing IPv6 headers from IPv6 packets. Since in the IPv6+DS-Lite mode, the gateway only has an IPv6 public network address, it can save IPv4 addresses and alleviate the problem of IPv4 address shortage.

[0007] However, the DS-Lite tunnel may fail due to various reasons, making it difficult to route any IPv4 packets in the IPv6 network, thereby making it impossible for IPv4 user devices connected to the gateway to receive Internet services. In the case of a DS-Lite tunnel failure, the usual practice is to seek help from network maintenance personnel and ask them to manually resolve the DS-Lite tunnel failure, which will take a lot of time and cause users to be disconnected from the Internet for too long, greatly reducing network service performance and user experience.

[0008] Therefore, it is hoped that a method can be provided to automatically solve the above problems caused by DS-Lite tunnel failures. Summary of the invention

[0009] Some aspects of the present disclosure relate to a gateway for routing packets. The gateway may include: a memory storing instructions; and a processor configured to execute the instructions stored in the memory to cause the gateway to perform the following operations. The operations include: establishing a DS-Lite tunnel with an AFTR device to operate in a first mode, wherein the gateway is capable of operating in an operating mode including a first mode and a second mode, in which the gateway uses the DS-Lite tunnel to route IPv4 packets for an IPv4 user device, and in which the gateway uses the IPv4 public network address of the gateway to route IPv4 packets for an IPv4 user device; and in response to determining that the DS-Lite tunnel is unavailable, switching the operating mode from the first mode to the second mode.

[0010] In some embodiments, in the process of switching the working mode from the first mode to the second mode, the gateway may request an IPv4 public network address from the network side, and use the IPv4 public network address allocated by the network side to route IPv4 packets for the IPv4 user equipment.

[0011] In some embodiments, the gateway may periodically detect whether the unavailable DS-Lite tunnel is restored to be available, and switch the working mode from the second mode to the first mode if the DS-Lite tunnel is restored to be available.

[0012] In some embodiments, the gateway may release the IPv4 public network address used in the second mode after switching the working mode from the second mode to the first mode.

[0013] In some embodiments, the gateway may determine that the DS-Lite tunnel is unavailable based on determining that establishment of the DS-Lite tunnel has failed.

[0014] In some embodiments, the gateway may determine that the DS-Lite tunnel is unavailable based on not receiving a packet from the AFTR device within a predetermined time.

[0015] Other aspects of the present disclosure relate to a method, an apparatus, and a non-transitory computer-readable medium for routing packets, all of which can implement the operations executable by the above-mentioned gateway. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to better understand the present disclosure and to show how it may be implemented, it will now be described by way of example with reference to the accompanying drawings, in which:

[0017] Figure 1 is a schematic diagram of a network implementing DS-Lite technology according to an embodiment of the present disclosure.

[0018] Figure 2 According to the embodiment of the present disclosure Figure 1 An exemplary configuration block diagram of a gateway in FIG.

[0019] Figure 3 is a flowchart of a method for routing packets according to an embodiment of the present disclosure.

[0020] Figure 4 is a flow chart of another method for routing packets according to an embodiment of the present disclosure.

[0021] Figure 5 is a flowchart of a method for routing packets when a DS-Lite tunnel establishment fails according to an embodiment of the present disclosure.

[0022] Figure 6 The present invention is a flowchart of a method for routing packets when a DS-Lite tunnel fails during use according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] The following detailed description is made with reference to the accompanying drawings, and the following detailed description is provided to assist in a comprehensive understanding of the various exemplary embodiments of the present disclosure. The following description includes various details to assist in understanding, but these details are considered to be examples only and not to limit the present disclosure, which is defined by the appended claims and their equivalents. The words and phrases used in the following description are only used to enable a clear and consistent understanding of the present disclosure. In addition, for the sake of clarity and brevity, descriptions of well-known structures, functions, and configurations may be omitted. Those of ordinary skill in the art will recognize that various changes and modifications may be made to the examples described herein without departing from the spirit and scope of the present disclosure.

[0024] First, refer to Figure 1 A schematic diagram of a network 100 using DS-Lite technology according to an embodiment of the present disclosure is described.

[0025] In the network 100, an IPv4 user device 110 can be connected to a gateway 130 on the user device side through an IPv4 private network 120. The IPv4 user device 110 can be a desktop computer, a laptop computer, a tablet computer, a smart phone, a smart home appliance, or other Internet-enabled information processing device. The gateway 130 can be an access point, a router, a B4 (Basic Bridging Broadband) device, or other Internet access device supporting DS-Lite technology.

[0026] exist Figure 2FIG. 4 is a block diagram showing an exemplary configuration of the gateway 130 according to an embodiment of the present disclosure.

[0027] Although referred to herein as a gateway, gateway 130 may be, for example, a hardware electronic device that may combine the functionality of a modem, an access point, and / or a router. The present disclosure also contemplates that gateway 130 may include, but is not limited to, the functionality of a smart media device (SMD) or IP / QAM set-top box (STB) that is capable of decoding audio / video content and playing content provided by OTT or MSO.

[0028] like Figure 2 As shown, the gateway 130 includes a user interface 20, a network interface (e.g., a LAN interface) 21, a power supply 22, a WAN interface 23, a memory 24, and a controller 26. The user interface 20 may include, but is not limited to, a push button, a keyboard, a keypad, an LCD, a CRT, a TFT, an LED, a HD, or other similar display device, including a display device with a touch screen capability, to allow interaction between the user and the gateway 130. The network interface 21 may include various network cards and circuits implemented in software and / or hardware to enable communication with a wireless extender device and a user device using one or more wireless protocols, such as any IEEE 802.11 Wi-Fi protocol, a Bluetooth protocol, Bluetooth Low Energy (BLE), or any short-range protocol that works according to a wireless technology standard to exchange data over a short distance using any licensed or unlicensed frequency band, RF4CE protocol, ZigBee protocol, Z-wave protocol, or IEEE802.15.4 protocol, such as a Citizens Broadband Radio Service (CBRS) band, a 2.4 GHz band, a 5 GHz band, or a 6 GHz band.

[0029] The power supply 22 supplies power to the internal components of the gateway 130 via the internal bus 27. The power supply 22 may be a stand-alone power supply, such as a battery pack, having an interface for powering by an electrical charger connected to an outlet (e.g., directly or through another device). The power supply 22 may also include a rechargeable battery that is removable to allow replacement, such as a NiCd, NiMH, Li-ion, or Li-polymer battery. If the gateway 130 is a modem or gateway device, it may include a WAN interface 23, which may include various network cards and circuits implemented in software and / or hardware to enable communication between the gateway device and an Internet service provider or multiple system operators (MSO).

[0030] The memory 24 includes a single memory or one or more memories or memory locations, including but not limited to random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), read-only memory (ROM), EPROM, EEPROM, ROM, flash memory, logic blocks of FPGA, hard disk, or any other layers of the memory hierarchy. The memory 24 can be used to store any type of instructions, software, or algorithm, including software 25 for controlling the general functions and operations of the gateway 130.

[0031] The controller 26 controls the general operation of the gateway 130 and performs management functions related to other devices in the network, such as extenders and user devices. The controller 26 may include, but is not limited to, a CPU, a hardware microprocessor, a hardware processor, a multi-core processor, a single-core processor, a microcontroller, an application-specific integrated circuit (ASIC), a DSP, or other similar processing devices capable of executing any type of instructions, algorithms, or software for controlling the operation and functions of the AP 110 according to the embodiments described in the present disclosure. The processor 26 may include various implementations of digital circuits, analog circuits, or mixed signal (a combination of analog and digital) circuits that perform functions in a computing system. The controller 26 may include, for example, circuits such as integrated circuits (ICs), portions or circuits of a single processor core, an entire processor core, a single processor, a programmable hardware device such as a field programmable gate array (FPGA), and / or a system including multiple processors.

[0032] An internal bus 27 may be used to establish communications between components of the gateway 130 (eg, 20 - 22 , 24 , and 26 ).

[0033] return Figure 1 The gateway 130 is connected to the IPv6 network through a WAN interface having an IPv6 address, and a DS-Lite tunnel 140 (also referred to as an IPv4 over IPv6 tunnel) is established on the IPv6 network with the AFTR device 150. After receiving the IPv4 packet sent by the IPv4 user device from its LAN interface, the gateway 130 performs existing operations such as adding an IPv6 header and address mapping on the IPv4 packet, and can convert the IPv4 packet into an IPv6 packet that can be sent to the AFTR device 150 via the IPv6 network, and transmits it from the WAN interface of the gateway 130 to the AFTR device 150 via the DS-Lite tunnel 140. The AFTR device 150 can obtain an IPv4 packet by performing existing operations such as decapsulation and address mapping on the IPv6 packet, and transmits the IPv4 packet to the IPv4 server 170 that the IPv4 user device 110 wants to access through the IPv4 network 160.

[0034] Conversely, the IPv4 packet that the IPv4 server 170 attempts to send to the IPv4 user device 110 first reaches the AFTR device 150 via the IPv4 network 160. The AFTR device 150 can convert the IPv4 packet into an IPv6 packet that is sent to the gateway 130 via the IPv6 network by performing existing operations such as adding an IPv6 header and address mapping on the IPv4 packet, and send it to the gateway 130 through the DS-Lite tunnel 140. The gateway 130 performs existing operations such as decapsulation and address mapping on the received IPv6 packet, and can obtain the IPv4 packet that is sent to the IPv4 user device 110, thereby sending it to the IPv4 user device 110 through the IPv4 private network 120.

[0035] The LAN interface of the gateway 130 connected to the IPv4 private network 120 may have an IPv4 private address, so that it can communicate with the IPv4 user equipment 110 with a different IPv4 private address on the IPv4 private network. The external WAN interface of the gateway 130 may have an IPv6 public network address, so that IPv6 packets can be transmitted via the IPv6 network, and IPv4 packets can be transmitted on the IPv6 network with the help of a DS-Lite tunnel. Since the gateway 130 can route IPv4 packets through the DS-Lite tunnel without having an IPv4 public network address, the IPv4 public network address is not necessary for the gateway 130, so that the IPv4 address space can be saved.

[0036] Although not in Figure 1 Although not shown in FIG. 1 , those skilled in the art will appreciate that the gateway 130 may also be connected to an IPv6 local area network through other LAN interfaces to provide Internet services for IPv6 user devices. The IPv6 packets received by the gateway 130 from the IPv6 user devices may be directly sent to the IPv6 network through the WAN interface of the gateway 130 to access the IPv6 devices without passing through the AFTR device 150.

[0037] When the DS-Lite tunnel 140 fails and becomes unavailable, the gateway 130 will be unable to route IPv4 packets on the IPv6 network for the IPv4 user device 110, so that the IPv4 user device 110 cannot receive Internet services.

[0038] To automatically resolve this issue and avoid degradation of network service performance and user experience, you can execute Figure 3 The method 300 for routing packets according to an embodiment of the present disclosure is shown. In the description of the method 300, reference will be made to Figure 1 The network 100 shown will be described in detail.

[0039] In S310, a DS-Lite tunnel is established with the AFTR device by the gateway to operate in a first mode. The gateway has multiple operating modes including a first mode and a second mode. In the first mode, the gateway uses the DS-Lite tunnel to route IPv4 packets for the IPv4 user device, and in the second mode, the gateway uses the IPv4 public network address of the gateway to route IPv4 packets for the IPv4 user device.

[0040] For example, the gateway 130 may attempt to operate in a first mode such as an IPv6+DS-Lite mode by using the existing DS-Lite technology to establish a DS-Lite tunnel 140 with the AFTR device 150. In the first mode, the gateway 130 may not have an IPv4 public network address but only an IPv6 address, so that IPv4 packets can be routed through the DS-Lite tunnel 140, IPv4 address space can be saved, and services for IPv6 user devices are not affected.

[0041] In S320 , in response to determining in S310 that the DS-Lite tunnel is unavailable, the gateway switches the working mode from the first mode to the second mode.

[0042] According to an embodiment of the present disclosure, the gateway 130 may find that the DS-Lite tunnel is not successfully established during the process of establishing the DS-Lite tunnel, thereby determining that the DS-Lite tunnel is unavailable. For example, the gateway 130 may use the domain name of the AFTR server 150 to query the DNS (Domain Name Server) server for the IPv6 address of the AFTR server 150. However, due to timeout, packet loss, etc., the gateway 130 may not receive the IPv6 address of the AFTR server 150 from the DNS server, thereby failing to establish the DS-Lite tunnel. Alternatively, during the process of the gateway 130 starting itself, the DS-Lite tunnel establishment process may fail to proceed due to timing errors in the DS-Lite tunnel establishment process and other processes, and then errors occur in parameters related to the DS-Lite tunnel, thereby determining that the DS-Lite tunnel establishment fails.

[0043] According to an embodiment of the present disclosure, the gateway 130 may also determine that the DS-Lite tunnel is unavailable based on the fact that no message is received from the AFTR device 150 within a predetermined time. For example, the gateway 130 may send a packet to the AFTR device 150 that requires its response, but does not receive a packet returned by the AFTR device 140 in response to the packet within a predetermined time (e.g., 1 minute, 3 minutes, 5 minutes, 10 minutes, etc.), thereby determining that the DS-Lite tunnel is faulty. Alternatively, there is data transmission between the gateway 130 and the AFTR device 150, but no new packet has been received after a predetermined time (e.g., 10 minutes, 20 minutes, etc.) has passed since the last packet was received from the AFTR device 150, then it is determined that the DS-Lite tunnel is faulty, which may be caused by reasons such as the AFTR device 150 failing and failing to work properly.

[0044] When the DS-Lite tunnel fails and cannot be used, in order to continue to provide routing services to the IPv4 user equipment 110, the gateway 130 may switch from a first mode such as the IPv6+DS-Lite mode to a second mode such as the dual stack mode.

[0045] For example, the gateway 130 may request an IPv4 public network address from the network side. After the gateway 130 receives the IPv4 public network address assigned by the network side, the IPv4 packet may be routed for the IPv4 user device through the IPv4 public network address. For example, when the gateway 130 is a cable modem, its corresponding local end device is a CMTS (Cable Modem Terminal System). In response to the message sent by the cable modem requesting the assignment of an IPv4 public network address, the CMTS may select an address from the free IPv4 public network address space and assign it to the gateway 130, so that the gateway 130 can directly route the IPv4 packet through the WAN interface having the address.

[0046] In the second mode, the gateway 130 may not only have an IPv4 public network address to route IPv4 packets, but may also have an IPv6 public network address to route IPv6 packets. Routing of these packets does not need to pass through the DS-Lite tunnel 140.

[0047] According to the above technical solution, when the gateway determines that the DS-Lite tunnel is unavailable, the gateway can automatically switch from the current first mode of using the DS-Lite tunnel to route IPv4 packets to the second mode of using the gateway's own IPv4 public network address to route IPv4 packets. By switching the working mode, it is possible to continue to provide network services to IPv4 user devices without manual assistance, quickly alleviating the problem of being unable to route IPv4 packets caused by DS-Lite tunnel failure, thereby improving network service performance and user experience.

[0048] Compared with the traditional technology that requires a lot of time to manually handle tunnel failure problems and continue to provide routing services for IPv4 packets, the method of the embodiment of the present invention, with the help of automatic switching of the working mode of the gateway 130, can quickly restore the routing of IPv4 packets in only about 2 minutes, which greatly avoids the adverse effects of tunnel failures on the network services of IPv4 user devices.

[0049] exist Figure 4 4 shows a flow chart of another method 400 for routing packets according to the present disclosure. S410 and S420 in method 400 are substantially the same as S310 and S320 in method 300, and are not described in detail here. The difference between method 400 and method 300 is that gateway 130 further detects whether the unavailable DS-Lite tunnel is restored to be available, and takes further actions if it is restored to be available. In the description of method 400, reference is still made to S410 and S420 in method 400. Figure 1 The schematic diagram is explained in detail.

[0050] In S430 , the gateway 130 periodically detects whether the unavailable DS-Lite tunnel 140 is restored to be available.

[0051] For example, the gateway 130 may periodically send a message to the AFTR device 150 via the DS-Lite tunnel 140 to request a response from the AFTR device 150, and after receiving a response from the AFTR device 150, determine that the failed DS-Lite tunnel 140 is restored to be available. This may be caused by the gateway 130 periodically restarting the DS-Lite tunnel establishment process and successfully establishing the DS-Lite tunnel, or it may be caused by the AFTR device 150 resuming normal operation, and so on.

[0052] In S440 , when the gateway 130 determines that the DS-Lite tunnel 140 is restored to be available, the gateway 130 switches the working mode from the second mode to the first mode.

[0053] When DS-Lite tunnel 140 is restored to be available, gateway 130 can route IPv4 packets through DS-Lite technology to provide routing services for IPv4 user equipment. Then, gateway 130 can switch from a second mode such as dual stack mode to a first mode such as IPv6+DS-Lite mode.

[0054] In S450 , the gateway 130 releases the IPv4 public network address used in the second mode.

[0055] In the case where the gateway 130 in the first mode is able to route IPv4 packets through the DS-Lite tunnel, the IPv4 public network address is no longer necessary for the gateway 130. Therefore, in order to save the limited IPv4 address space, the gateway 130 can send a message to the network side to indicate that the IPv4 public network address it used in the second mode is no longer needed, so that the network side can be instructed to allocate it to other devices when needed. Alternatively, the network side can detect that the IPv4 public network address allocated to the gateway 130 has not been used within a predetermined time, so as to determine that the gateway 130 has released the address, so that the address can be allocated to other devices.

[0056] By allocating and releasing IPv4 public network addresses, the utilization efficiency of IPv4 public network addresses can be increased, so that the problem of being unable to route IPv4 packets due to DS-Lite tunnel failure can be handled by using IPv4 public network addresses, and the invalid occupation of IPv4 public network addresses can be avoided.

[0057] exist Figure 5 In the flowchart of the method 500 for routing packets according to an embodiment of the present disclosure, an example of a DS-Lite tunnel establishment failure is described.

[0058] In S510, the gateway 130 is started in a first mode such as an IPv6+DS-lite mode. The startup of this mode can be achieved by the system operator setting the mode adopted at startup in a configuration file. In the first mode, the gateway 130 can route IPv6 packets through its own IPv6 public network address and route IPv4 packets through a DS-Lite tunnel without an IPv4 public network address.

[0059] In S520 , the gateway 130 determines that the DS-Lite tunnel function is enabled.

[0060] In S530 , the gateway 130 sends a DNS query message carrying the domain name of the AFTR device 150 to the DNS server 505 to request the IPv6 public network address of the AFTR device 150 .

[0061] In S540 , the gateway 130 receives the DNS response message sent by the DNS server 505 , which carries the IPv6 public network address of the AFTR device 150 .

[0062] In S550 , the gateway 130 establishes a DS-Lite tunnel with the AFTR device 150 based on the IPv6 public network address of the AFTR device 150 .

[0063] In the process of establishing the DS-Lite tunnel, the DS-Lite tunnel may not be successfully established due to the timing problem of the execution of the process of the gateway 130 itself, or the AFTR device may not correctly respond to the establishment request, etc. It is also possible that in S540, due to timeout, packet loss, etc., the gateway 130 does not receive the DNS response message from the DNS server 505, and thus cannot know the IPv6 public network address of the AFTR device 150, so that S550 is not executed, which also leads to the failure of DS-Lite tunnel establishment.

[0064] In S560, the gateway 130 determines whether the DS-Lite tunnel is successfully established. For example, the gateway can determine whether the DS-Lite tunnel is successfully established by querying a process parameter related to the DS-Lite tunnel status. For example, when the parameter Device.DSLite.Enable related to enabling the DS-Lite tunnel function is true and the parameter Device.DSLite.InterfacesSettings.1.Status related to the DS-lite tunnel status is false, it is determined that the DS-Lite tunnel establishment fails.

[0065] When the DS-Lite tunnel is successfully established, the gateway 130 operates in the first mode.

[0066] On the contrary, when the DS-Lite tunnel is not successfully established, the gateway 130 switches from the first mode to the second mode such as the dual stack mode, thereby routing IPv4 packets through the IPv4 public network address obtained from the network side and routing IPv6 packets through its own IPv6 public network address.

[0067] Afterwards, the gateway 130 can detect whether the DS-Lite tunnel is restored to be available. When the DS-Lite tunnel is restored to be available, the gateway 130 can switch from the second mode back to the first mode and release the IPv4 public network address, thereby saving IPv4 address space.

[0068] exist Figure 6 In the flowchart of the method 600 for routing packets according to an embodiment of the present disclosure, a DS-Lite tunnel failure is described in conjunction with an example in which the DS-Lite tunnel fails during use.

[0069] In S610, the gateway 130 operates in a first mode such as an IPv6+DS-lite mode. At this time, the gateway only has an IPv6 public network address and routes IPv4 packets through the DS-Lite tunnel 140 with the AFTR device 150. The IPv4 user device 110 can communicate with the IPv4 server 170 across the IPv6 network through the DS-Lite tunnel 140 between the gateway 130 and the AFTR device 150.

[0070] In S620, the gateway 130 sends a message requesting a response to the AFTR device 150 via the DS-Lite tunnel 140. For example, the gateway 130 may attach a flag requesting the AFTR device 150 to respond to the IPv6 header encapsulated with the IPv4 packet. When the AFTR device 150 detects the flag, it transmits a response message to the gateway 130.

[0071] In S630 , the gateway 130 determines that no response message is received from the AFTR device 150 , thereby determining that the DS-Lite tunnel 140 fails.

[0072] In S640 , the gateway 130 switches the working mode from the first mode to the second mode such as the dual stack mode.

[0073] In S650 , the gateway 130 requests an IPv4 public network address from the CMTS 605 , which is a central office device of the network service provider network.

[0074] In S660 , the gateway 130 receives the IPv4 public network address sent by the CMTS 605 .

[0075] In S670 , the gateway 130 routes the IPv4 packets using the IPv4 public network address, thereby still providing IPv4 routing services when the DS-Lite tunnel is unavailable.

[0076] In S680, the gateway 130 periodically detects whether the DS-Lite tunnel is restored to be available. For example, the gateway 130 may periodically restart the process of establishing the DS-Lite tunnel with the AFTR device 150. Alternatively, the gateway 130 may periodically send a message to the AFTR device 150 requesting its response.

[0077] In S690 , the gateway 130 determines that the DS-Lite tunnel is restored to be available, and then switches the working mode from the second mode back to the first mode.

[0078] In S695, the gateway 130 releases the IPv4 public network address used in the second mode. For example, the gateway 130 may send a message to the CMTS 605 to inform that it will no longer use the IPv4 public network address allocated to it.

[0079] By executing the above method, whenever a DS-Lite tunnel failure occurs, the gateway can continue to provide network services to IPv4 user devices without manual assistance by switching the working mode, quickly alleviating the problem of being unable to route IPv4 packets caused by the DS-Lite tunnel failure, thereby improving network service performance and user experience. When the DS-Lite tunnel is restored to be available, the gateway can release the IPv4 public network address by further switching the working mode, thereby saving IPv4 address space and improving the efficiency of using IPv4 public network addresses.

[0080] The present disclosure may be implemented as any combination of an apparatus, a system, an integrated circuit, and a computer program on a non-transitory computer-readable medium. One or more processors may be implemented as an integrated circuit (IC), an application specific integrated circuit (ASIC), or a large scale integrated circuit (LSI), a system LSI, a super LSI, or a super LSI component that performs some or all of the functions described in the present disclosure.

[0081] The present disclosure includes the use of software, applications, computer programs or algorithms. The software, applications, computer programs or algorithms can be stored on a non-transitory computer-readable medium to enable a computer such as one or more processors to perform the above steps and the steps described in the accompanying drawings. For example, one or more memories store the software or algorithm in executable instructions, and one or more processors can associate a set of instructions to execute the software or algorithm to avoid the problem of being unable to route IPv4 packets due to DS-Lite tunnel failures in any number of wireless networks according to the embodiments described in the present disclosure.

[0082] Software and computer programs (which may also be referred to as programs, software applications, applications, components or code) include machine instructions for a programmable processor and may be implemented in a high-level procedural language, an object-oriented programming language, a functional programming language, a logic programming language, or an assembly language or a machine language. The term "computer-readable medium" refers to any computer program product, apparatus or device for providing machine instructions or data to a programmable data processor, such as magnetic disks, optical disks, solid-state storage devices, memories and programmable logic devices (PLDs), including computer-readable media that receive machine instructions as computer-readable signals.

[0083] For example, computer readable media may include dynamic random access memory (DRAM), random access memory (RAM), read-only memory (ROM), electrically erasable read-only memory (EEPROM), compact disk read-only memory (CD-ROM) or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, or any other medium that can be used to carry or store the desired computer readable program code in the form of instructions or data structures and can be accessed by a general or special purpose computer or a general or special purpose processor. As used herein, disk or disc includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while discs reproduce data optically by laser. Combinations of the above are also included in the scope of computer readable media.

[0084] In one or more embodiments, the use of the words "can," "capable of," "operable as," or "configured to" refers to some device, logic, hardware, and / or element that is designed to be used in a specified manner. The subject matter of the present disclosure is provided as an example of devices, systems, methods, and programs for performing the features described in the present disclosure. However, in addition to the above-mentioned features, other features or variations are also expected. It is expected that the implementation of the components and functions of the present disclosure may be accomplished with any emerging technology that may replace any of the above-mentioned implementation technologies.

[0085] In addition, the above description provides examples without limiting the scope, applicability or configuration set forth in the claims. Without departing from the spirit and scope of the present disclosure, the functions and arrangements of the elements discussed may be changed. Various embodiments may appropriately omit, replace or add various processes or components. For example, features described with respect to certain embodiments may be combined in other embodiments.

[0086] Similarly, while operations are depicted in a particular order in the drawings, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed to achieve desired results. In certain circumstances, multitasking and parallel processing can be advantageous.

Claims

1. A gateway for routing packets, comprising: A memory storing instructions; as well as A processor is configured to execute instructions stored in the memory to cause the gateway to perform the following operations: establishing a DS-Lite tunnel with an AFTR device to operate in a first mode, wherein the gateway is capable of operating in an operating mode including a first mode and a second mode, wherein the gateway uses the DS-Lite tunnel to route IPv4 packets for an IPv4 user device, and wherein the gateway uses an IPv4 public network address of the gateway to route IPv4 packets for an IPv4 user device; In response to determining that the DS-Lite tunnel is unavailable, switching the working mode from the first mode to the second mode; Periodically detecting whether the unavailable DS-Lite tunnel is restored to availability; When the DS-Lite tunnel is restored to be available, switching the working mode from the second mode to the first mode; and After the working mode is switched from the second mode to the first mode, the IPv4 public network address used in the second mode is released.

2. The gateway according to claim 1, wherein: The processor is further configured to execute instructions stored in the memory to cause the gateway to perform the following operations: Request an IPv4 public address from the network side; and Use the IPv4 public network address assigned by the network side to route IPv4 packets for IPv4 user devices.

3. The gateway according to claim 1, wherein: In each of the first mode and the second mode, the gateway routes IPv6 packets for the IPv6 user equipment using the IPv6 public network address.

4. The gateway according to claim 1, wherein: The processor is further configured to execute instructions stored in the memory to cause the gateway to perform the following operations: Based on determining that establishment of the DS-Lite tunnel fails, it is determined that the DS-Lite tunnel is unavailable.

5. The gateway according to claim 1, wherein: The processor is further configured to execute instructions stored in the memory to cause the gateway to perform the following operations: Based on not receiving a packet from the AFTR device within a predetermined time, it is determined that the DS-Lite tunnel is unavailable.

6. A method for routing a packet, comprising: Establishing, by the gateway, a DS-Lite tunnel with the AFTR device to operate in a first mode, wherein the gateway is capable of operating in an operating mode including a first mode and a second mode, wherein in the first mode, the gateway uses the DS-Lite tunnel to route IPv4 packets for the IPv4 user device, and in the second mode, the gateway uses the IPv4 public network address of the gateway to route IPv4 packets for the IPv4 user device; In response to determining that the DS-Lite tunnel is unavailable, the gateway switches the working mode from the first mode to the second mode; The gateway periodically detects whether the unavailable DS-Lite tunnel is restored to be available; When the DS-Lite tunnel is restored to be available, the gateway switches the working mode from the second mode to the first mode; and After the working mode is switched from the second mode to the first mode, the gateway releases the IPv4 public network address used in the second mode.

7. The method according to claim 6, wherein: Switching the working mode from the first mode to the second mode by the gateway includes: The gateway requests an IPv4 public network address from the network side; and The gateway routes IPv4 packets for IPv4 user equipment using the IPv4 public network address allocated by the network side.

8. The method according to claim 6, wherein: In each of the first mode and the second mode, the gateway routes IPv6 packets for the IPv6 user equipment using the IPv6 public network address.

9. The method according to claim 6, wherein: Determining that the DS-Lite tunnel is unavailable includes: Based on determining that establishment of the DS-Lite tunnel fails, the gateway determines that the DS-Lite tunnel is unavailable.

10. The method according to claim 6, wherein: Determining that the DS-Lite tunnel is unavailable includes: The DS-Lite tunnel is determined to be unavailable by the gateway based on not receiving a packet from the AFTR device within a predetermined time.

11. A non-transitory computer readable medium storing instructions, which when executed by a processor cause the processor to perform operations including: A DS-Lite tunnel is established with the AFTR device to operate in a first mode, wherein: The gateway is capable of operating in an operating mode including a first mode and a second mode, wherein the gateway uses the DS-Lite tunnel to route IPv4 packets for the IPv4 user equipment, and in the second mode, the gateway uses the IPv4 public network address of the gateway to route IPv4 packets for the IPv4 user equipment; In response to determining that the DS-Lite tunnel is unavailable, switching the working mode from the first mode to the second mode; Periodically detecting whether the unavailable DS-Lite tunnel is restored to availability; When the DS-Lite tunnel is restored to be available, switching the working mode from the second mode to the first mode; as well as After the working mode is switched from the second mode to the first mode, the IPv4 public network address used in the second mode is released.

12. The non-transitory computer readable medium of claim 11, wherein: When the instructions are executed by the processor, the processor further performs the following operations: Request an IPv4 public address from the network side; and Use the IPv4 public network address assigned by the network side to route IPv4 packets for IPv4 user devices.

13. The non-transitory computer readable medium of claim 11, wherein: When the instructions are executed by the processor, the processor further performs the following operations: Determining that the DS-Lite tunnel is unavailable based on determining that establishment of the DS-Lite tunnel fails; and / or Based on not receiving a packet from the AFTR device within a predetermined time, it is determined that the DS-Lite tunnel is unavailable.

14. An apparatus for routing packets, comprising means for performing the steps of the method according to any one of claims 6 to 10.

Citation Information

Patent Citations

  • DS-Lite with BFD Support

    US20130229922A1