WO2020132982A1 - Data transmission method and routing device - Google Patents

Data transmission method and routing device Download PDF

Info

Publication number
WO2020132982A1
WO2020132982A1 PCT/CN2018/124028 CN2018124028W WO2020132982A1 WO 2020132982 A1 WO2020132982 A1 WO 2020132982A1 CN 2018124028 W CN2018124028 W CN 2018124028W WO 2020132982 A1 WO2020132982 A1 WO 2020132982A1
Authority
WO
WIPO (PCT)
Prior art keywords
ipv4
ipv6
routing device
link
available
Prior art date
Application number
PCT/CN2018/124028
Other languages
French (fr)
Chinese (zh)
Inventor
毛方竹
代雯蕾
李成刚
任斌
胡海涛
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/124028 priority Critical patent/WO2020132982A1/en
Publication of WO2020132982A1 publication Critical patent/WO2020132982A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • This application relates to the field of communication technology, and in particular, to a data transmission method and a routing device.
  • IPv4-IPv6 dual stack means that the routing device forwards the data packets of the terminal device related to the IPv4 service through the IPv4 link, and forwards the data packets of the terminal device related to the IPv6 service through the IPv6 link.
  • DS-lite refers to the IPv4-in-IPv6 tunnel deployed in an IPv6 network to transmit data messages related to IPv4 services of terminal devices, while the data messages related to IPv6 services of terminal devices are the same as IPv4-IPv6 dual stack, direct Forwarding via IPv6 link.
  • the routing device on the user side usually only supports one of the data transmission methods.
  • the routing device needs to reconfigure the other data transmission method, which may cause The business of the terminal equipment is interrupted, so the flexibility of communication is poor.
  • the embodiments of the present application provide a data transmission method and a routing device to improve the flexibility of communication.
  • an embodiment of the present application provides a data transmission method, including: a first routing device detects whether an IPv4 link and an IPv6 link are available, and the first routing device supports IPv4 and IPv6 protocol stacks and is located at a lightweight A routing device at one end of an IPv4-in-IPv6 tunnel in a dual-stack DS-lite network; the first routing device uses the configured IPv4-IPv6 dual-stack network when both the IPv4 link and the IPv6 link are available
  • the terminal device transmits data, and when the IPv4 link is unavailable and the IPv6 link is available, the configured DS-lite network is used to transmit data for the terminal device.
  • the first routing device can flexibly select a feasible data transmission method from IPv4-IPv6 dual stack and DS-lite according to the availability of IPv4 links and IPv6 links to transmit data for the terminal device In order to make full use of network resources and improve the flexibility of communication.
  • the method further includes: the first routing device obtains its own IPv4 address, IPv6 address, and the second routing device's IPv6 address, the second routing device is a routing device located at the opposite end of the IPv4-in-IPv6 tunnel in the DS-lite network; the first routing device is based on the IPv4 address, the IPv6 address and the second The IP address of the routing device is configured with the IPv4-IPv6 dual-stack network and the DS-lite network.
  • the first routing device obtains its own IPv4 address, IPv6 address and other network configuration information before the availability of the IPv4 link and the IPv6 link, the two data transmissions of IPv4-IPv6 dual stack and DS-lite are transmitted in advance
  • the method is configured, so that when the subsequent first routing device detects that the availability of the IPv4 link and the IPv6 link changes, the first routing device can automatically switch between the IPv4-IPv6 dual stack and DS-lite.
  • the data transmission path can be reached without modifying the configuration, which can effectively improve the switching efficiency and the flexibility of communication.
  • the first routing device detects whether an IPv4 link and an IPv6 link are available, including: the first routing device uses the IPv4 link to the first server corresponding to the first set domain name Sending a first detection message, if the first response message returned by the first server is received, it is determined that the IPv4 link is available, otherwise it is not available; the first routing device uses the IPv6 link to send The second routing device or the server corresponding to the second set domain name sends a second detection message, and if a second response message returned by the second routing device or the second server is received, the IPv6 chain is determined Road is available, otherwise it is not available.
  • the method further includes: the first routing device detects that an IPv4 link is available, And when the packet-free delay in the IPv4 link is less than or equal to the first threshold, and the data flow of the terminal device within the set time period is less than or equal to the second threshold, the IPv4-IPv6 dual-stack network is switched to Transmitting data for the terminal device.
  • the first routing device considers the service continuity of the data transmission of the terminal device, and can choose to restart the DS-lite when the IPv4 link returns to normal and remains stable, and the service of the terminal device is idle. Switch to IPv4-IPv6 dual stack, so as to avoid the impact of the switching process on the services that affect the terminal equipment and effectively improve the user experience.
  • an embodiment of the present application provides a routing device having the function of implementing the first routing device in the first aspect or any possible design of the first aspect, which can be implemented by hardware, It can be implemented by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the structure of the routing device includes a processing module and a communication module, and the processing module is configured to support the routing device to perform the corresponding first aspect or any of the designs in the first aspect Features.
  • the communication module is used to support communication between the routing device and other communication devices (such as terminal devices).
  • the routing device may further include a storage module, which is coupled to the processing module, and stores necessary program instructions and data of the routing device.
  • the processing module may be a processor
  • the communication module may be a transceiver
  • the storage module may be a memory.
  • an embodiment of the present application provides a chip that is coupled to a memory and used to read and execute a software program stored in the memory to implement any of the possible designs in the first aspect above method.
  • an embodiment of the present application provides a computer-readable storage medium that stores computer-readable instructions, and when the computer reads and executes the computer-readable instructions, causes the computer to execute the first Any possible design approach in the aspect.
  • an embodiment of the present application provides a computer program product that, when the computer reads and executes the computer program product, causes the computer to execute any method in any possible design of the first aspect described above.
  • FIG. 1 is a schematic diagram of a network architecture of a communication system to which embodiments of the application are applicable;
  • FIG. 2 is a schematic diagram of data transmission under an IPv4-IPv6 dual stack in an embodiment of the present application
  • FIG. 3 is a schematic diagram of data transmission under DS-lite in an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a data transmission method according to an embodiment of the present application.
  • FIG. 5 is a schematic flow chart of a first routing device acquiring an IPv4 address, an IPv6 address, and an IP address of a second routing device in an embodiment of this application;
  • FIG. 6 is a schematic structural diagram of a routing device provided in an embodiment of this application.
  • FIG. 7 is another schematic structural diagram of a routing device provided in an embodiment of this application.
  • FIG. 1 exemplarily shows a network architecture of a communication system to which embodiments of the present application are applicable.
  • the communication system includes a terminal device 101, a first routing device 102, and a second routing device 103. Further, the communication system may further include a dynamic host configuration protocol (IPv4, DHCPv4) server under IPv4 for configuring the public network IPv4 address of the first routing device.
  • IPv4, DHCPv4 dynamic host configuration protocol
  • the terminal device 101 refers to various electronic devices that need to access the Internet (referring to connection to the IPv6 public network or the IPv4 public network), for example, it can be a computer, notebook computer, smart phone, tablet computer, smart wearable device, or other devices It is other household equipment.
  • the terminal device may be connected to the first routing device in a wired or wireless manner, and realize the communication with the IPv6 public network or the IPv4 public network through the routing forwarding function of the first routing device.
  • the transmitted data message may be an IPv4 message or an IPv6 message.
  • the communication system may include one or more terminal devices, and the embodiment of the present application does not specifically limit the number of terminal devices.
  • the first routing device 102 is a routing device supporting the IPv6 protocol stack and the IPv4 protocol stack. It includes a LAN port connected to the terminal device and a WAN port connected to the second routing device, and communicates with the terminal device through the LAN port accordingly To communicate with the second routing device through the WAN port.
  • the first routing device may be connected to each terminal device through different local area network ports.
  • the first routing device may be used to centrally manage the terminal device, and it has the functions of DHCPv4 and DHCPv6.
  • each terminal device connected to it can be assigned a corresponding internal network IPv4 address, also known as a private network IPv4 address.
  • the first routing device is configured to obtain its own public network IPv6 address and IPv6 prefix information prefix, it can allocate IPv6 addresses to each connected terminal device through stateless automatic configuration of DHCPv6 or IPv6.
  • the first routing device may serve as a server of the DHCPv6 protocol, provide DHCPv6 services, and allocate IPv6 addresses to the terminal device.
  • the terminal device is a client client in the DHCPv6 protocol.
  • the first routing device may allocate an IPv6 address prefix for stateless auto-configuration of IPv6 to the terminal device, so that the terminal device generates a random algorithm based on the IPv6 address prefix and its own interface information IPv6 address.
  • the first routing device may be various types of routing gateways located on the user side, such as customer premise equipment (CPE) or wireless access point (AP), Among them, CPE can also be called a home gateway.
  • CPE customer premise equipment
  • AP wireless access point
  • the first routing device may also be an optical network terminal (optical network) shown in FIGS. 2 and 3. terminal (ONT) or optical network unit (ONU).
  • ONT optical line terminal
  • ONT optical line terminal
  • the second routing device is a routing device located at the edge of the IPv4 and IPv6 backbone network. It has dynamic host configuration protocol under IPv6 (dynamic host configuration for IPv6, DHCPv6) and address family translation router (address family transition router, AFTR).
  • IPv6 dynamic host configuration for IPv6, DHCPv6
  • AFTR address family transition router
  • the second routing device has the DHCPv6 function means that the second routing device is equivalent to a DHCPv6 server and can allocate a public network IPv6 address to the first routing device.
  • the second routing device is a DHCPv6 protocol.
  • the first routing device is a client client in the DHCPv6 protocol.
  • the second routing device may be a broadband remote access server (broadband remote access server, BRAS) or an edge router (border router, BR).
  • the first routing device also has the function of routing and forwarding, which can work in the data transmission mode (also called working mode) of IPv4-IPv6 dual stack, and can also work in the DS-lite Under data transmission mode.
  • IPv4-IPv6 dual stack and the lightweight dual stack DS-lite involved in this application will be described in conjunction with FIGS. 2 and 3.
  • IPv4-IPv6 dual stack refers to enabling both IPv4 and IPv6 protocol stacks on one device.
  • This device can communicate with both IPv4 devices and IPv6 devices. Of course, this requires that the device is configured with IPv4 and IPv6 WAN ports.
  • the device communicates with the IPv4 device through the IPv4 WAN port and with the IPv6 device through the IPv6 WAN port.
  • a forwarding path may be that the first routing device receives the IPv4 packet sent by the terminal device, performs network address translation (NAT) on the IPv4 packet, and the IPv4 The original source IP address in the packet is the private network IPv4 address of the terminal device.
  • NAT translation refers to converting the source IP address of the IPv4 packet to the public network IPv4 address of the first routing device, and then sending the IPv4 packet.
  • Another forwarding path is that the first routing device receives the IPv6 packet sent by the terminal device, directly forwards the IPv6 packet to the second routing device, and then sends it to the IPv6 public network. This process does not require the IPv6 packet. NAT conversion. In the downstream direction, the forwarding of IPv4 and IPv6 packets is similar to the upstream direction, and will not be repeated here.
  • DS-lite is a kind of tunneling technology.
  • IPv4 packets can be sent to the IPv4 network through the IPv6 network, so that the terminal device can access the IPv4 public network through the IPv6 network, thereby realizing the IPv4 network. Interconnection.
  • the tunnel created in DS-lite is an IPv4in IPv6 tunnel, or it can also be called an IPv4over IPv6 tunnel.
  • the first routing device serves as a basic bridge bandwidth (B4) device in DS-lite, which is located at the end of the IPv4 in IPv6 tunnel near the user side, and the second routing device serves as DS-lite
  • B4 basic bridge bandwidth
  • the AFTR device located at the other end of the IPv4in IPv6 tunnel near the network side is used to terminate the IPv4in IPv6 tunnel.
  • the first routing device works under DS-lite, it indicates that the first routing device and the second routing device are IPv6 single-stack networks.
  • a forwarding path is that the first routing device receives the IPv6 packet sent by the terminal device, directly forwards the IPv6 packet to the second routing device through the IPv6 network, and the second routing device Send the IPv6 packet to the IPv6 public network. Similar to this in the downstream direction, both the first routing device and the second routing device perform direct forwarding without performing any NAT.
  • Another forwarding path is that, since IPv4 packets cannot be directly transmitted in the IPv6 network, the first routing device can use the DS-lite tunnel technology to create an IPv4in IPv6 tunnel in the IPv6 network. For the IPv4 packet received by the first routing device from the terminal device, the first routing device may encapsulate the IPv4 packet, and then send it to the second routing device through the created IPv4 in IPv6 tunnel.
  • the first routing device encapsulating the IPv4 packet specifically refers to: adding an IPv6 packet header to the IPv4 packet header, where the source IPv6 address in the IPv6 packet header is the first routing device (that is, B4 Device)'s public network IPv6 address, the destination IPv6 address is the IPv6 address of the second routing device (ie, AFTR device).
  • this message can be transmitted in the IPv6 network, thereby realizing the tunnel of "encapsulating IPv4 message in IPv6 message".
  • the second routing device may strip off the IPv6 packet header in the packet to obtain the original IPv4 packet, that is, the IPv4 packet originally sent by the terminal device to the first routing device.
  • the source IPv4 address in the header of the IPv4 packet is the IPv4 address of the terminal device itself, that is, the private network IPv4 address allocated by the first routing device to the terminal device, and the first routing device is forwarding the IPv4 report to the second routing device At the time of the text, the NAT of the private network IPv4 address is not converted.
  • the second routing device After receiving the IPv4 packet, the second routing device first converts the private network IPv4 address and converts the source IPv4 address of the IPv4 packet It is the public network IPv4 address of the first routing device, and then sent to the IPv4 public network, so that the server receiving the IPv4 packet can normally receive and process the packet. Similar to this in the downstream direction, the second routing device is responsible for private network IPv4 NAT conversion and IPv4 packet encapsulation, and the first routing device is responsible for decapsulation of IPv4 packets and forwarding to the terminal device.
  • FIG. 4 exemplarily shows a data transmission method provided by an embodiment of the present application. As shown in FIG. 4, the method includes:
  • Step S401 a first routing device detects whether an IPv4 link and an IPv6 link are available.
  • the first routing device is a routing device that supports IPv4 and IPv6 protocol stacks and is at the end of an IPv4in IPv6 tunnel of a lightweight dual-stack DS-lite.
  • Step S402 when both the IPv4 link and the IPv6 link are available, the first routing device uses the configured IPv4-IPv6 dual stack method to transmit data for the terminal device, and uses the configured when the IPv4 link is unavailable but the IPv6 link is available.
  • DS-lite mode transmits data for terminal equipment.
  • the first routing device may obtain its own IPv4 address, IPv6 address, and IPv6 address of the second routing device.
  • the IPv4 address and the IPv6 address of the first routing device refer to, The public network IPv4 address and the public network IPv6 address assigned by the first routing device.
  • the first routing device can configure the IPv4-IPv6 dual stack and DS-lite data transmission methods based on the obtained IPv4 address, IPv6 address, and the IPv6 address of the second routing device to establish IPv4-IPv6 dual stack and DS-lite.
  • Lite IPv4in IPv6 tunnel Lite IPv4in IPv6 tunnel.
  • the first routing device acquiring its own IPv4 address, IPv6 address, and the IPv6 address of the second routing device may be implemented through the method flow shown in FIG. 5:
  • Step S501 The first routing device sends a DHCPv4 discovery discover message. After the standard process of DHCPv4, the first routing device receives the public network IPv4 address assigned by the DHCPv4 server.
  • Step S502 The first routing device sends a routing request (router solicitation, RS) message to request the second routing device to allocate an IPv6 address for it, and the IPv6 address of the domain name resolution system (DNS) server and other network configurations information.
  • RS routing request
  • DNS domain name resolution system
  • Step S503 the first routing device receives a routing advertisement (RA) message sent by the second routing device, and triggers a standard DHCPv6 process to obtain an IPv6 address.
  • RA routing advertisement
  • Step S504 the first routing device sends a DHCPv6 request solicit message to the second routing device, and carries an option64 field in the DHCPv6solicit message (the option64 is an option corresponding to AFTR in the RA message) to request the second routing device Returns the IPv6 address assigned to it and the domain name of AFTR.
  • Step S505 the first routing device receives a DHCPv6 announcement advertisement message sent by the second routing device, the DHCPv6 advertise message includes the IPv6 address assigned by the second routing device, and the network configuration such as the DNS server IPv6 address and AFTR domain name information.
  • Step S506 After determining that the IPv6 address given in the DHCPv6advertise message is available, the first routing device sends a DHCPv6 request message to the second routing device to request the second routing device to assign the IPv6 address to itself .
  • the first routing device can monitor the response of other devices to the DHCPv6advertise message. If no other device responds to the message, it means that the IPv6 address given in the message is not assigned to other devices. That is, the IPv6 address is available.
  • Step S507 the first routing device receives the DHCPv6 reply reply message sent by the second routing device, confirms that the above IPv6 address is assigned to itself, and completes the configuration of IPv4- and IPv6 dual stack according to the obtained own IPv4 address and IPv6 address .
  • the first routing device may send the domain name of the AFTR to the DNS server, so that the DNS server performs DNS resolution on the domain name of the AFTR to obtain the IPv6 address of the AFTR.
  • the first routing device receives the IPv6 address of the AFTR sent by the DNS server, creates an IPv4-in-IPv6 tunnel to the second routing device (ie, AFTR) according to the AFTR's IPv6 address, and completes the DS-lite configuration.
  • the first routing device may simultaneously send the DHCPv4discover message and the RS message. If the first routing device successfully obtains the IPv4 address, IPv6 address, and AFTR IPv6 address, the first routing device configures IPv4-IPv6 dual stack and DS-lite, otherwise, if the first routing device fails to obtain the IPv4 address, only the IPv6 address is obtained Address, the first routing device is only configured with DS-lite.
  • the first routing device may send a detection message to the network side to Measure the connection and disconnection of IPv4 links and IPv6 links, that is, whether the link is normal and available.
  • the first routing device detecting whether the IPv4 link is available may be: the first routing device uses the IPv4 link to send the first detection message to the first server with the first set domain name in the IPv4 public network, when the set time When receiving the first response message returned by the first server within the interval, it is determined that the IPv4 link is available, otherwise it is determined that the IPv4 link is not available.
  • the unavailability of IPv4 links may include any of the following situations: 1) The IPv4 server fails; 2) During the evolution of the IPv4-IPv6 dual stack to a pure IPv6 network, the IPv4 server is deleted; 3 ) During the evolution of IPv4 single-stack networks to pure IPv6 networks, IPv4 servers were deleted.
  • the first routing device detecting whether an IPv6 link is available may be: the first routing device uses the IPv6 link to send a second detection message to the second routing device or a second server with a second set domain name in the IPv6 public network When the second response message sent by the second routing device or the second server with the second set domain name is received within the set time interval, it is determined that the IPv6 link is available, otherwise it is determined that the IPv6 link is not available.
  • the first routing device may use the same set time interval or may be different, and the first set domain name and the 2.
  • the set domain name may be the same set domain name or different set domain names, and this application does not make specific limitations.
  • the first detection message is used to detect whether the IPv4 link is normal, the source address of the first detection message is the IPv4 address of the first routing device, and the destination address is the first set domain name in the IPv4 public network
  • the IPv4 address of the corresponding first server can be a detection message based on the Internet Control Message Protocol (ICMP) protocol or an address resolution protocol (Address Resolution Protocol, ARP) protocol, such as an ICMP echo request message, corresponding, the first response
  • the message is an ICMP echo reply message.
  • the first detection message may be the first Internet packet explorer ping command or the first ARP ping command.
  • the second detection message is used to detect whether the IPv6 link is normal.
  • the source address of the second detection message is the IPv6 address of the first routing device, and the destination address is the IPv6 address of the second routing device or the second device in the IPv6 public network.
  • the IPv6 address of the second server corresponding to the given domain name. It can be based on the Internet Control Message Protocol (Internet Control Message Protocol for IPv6, ICMPv6) protocol under IPv6 or a probe message based on the Address Resolution Protocol (ARP) protocol, such as the ICMPv6 echo request message, corresponding
  • the second detection message is an ICMPv6 reply message.
  • the second detection message may be a second Internet packet explorer ping command or a second ARP ping command.
  • the first routing device can periodically detect whether the IPv4 link and the IPv6 link are available, and the detection period can be determined by those skilled in the art Flexible settings are made according to network requirements, and the embodiments of the present application are not specifically limited.
  • step S402 when the first routing device detects that an IPv4 link is available and an IPv6 link is also available, the IPv4-IPv6 dual-stack mode may be used to transmit data for the terminal device. That is to say, in this scenario, the first routing device can work under the IPv4-IPv6 dual stack, transmit IPv4 packets of the terminal device through the IPv4 link, and transmit IPv6 packets of the terminal device through the IPv6 link. In this way, the network resources of the IPv4 link and the IPv6 link can be effectively used to improve the data transmission efficiency.
  • the DS-lite mode may be used to transmit data for the terminal device. That is to say, in this scenario, the first routing device can work in the DS-lite mode, directly transmit IPv6 packets of the terminal device through the IPv6 link, and encapsulate and decapsulate IPv4 packets in the created IPv4in IPv4 packets of terminal equipment are transmitted in the IPv6 tunnel. In this way, when the IPv4 link is unavailable due to a fault or other reasons, the IPv4 service of the terminal device can be normally performed.
  • the first routing device can periodically detect the connection and disconnection of the IPv4 link and the IPv6 link, if the first routing device previously detects that both the IPv4 link and the IPv6 link are available, and Use IPv4 and IPv6 to transmit data for the terminal device. If the first routing device detects that the IPv4 link is unavailable, but the IPv6 link is still normal, the first routing device can switch from IPv4-IPv6 dual-stack to DS- In the lite mode, the IPv4 data of the terminal device is transmitted through the DS-lite tunnel to avoid the interruption of the IPv4 service of the terminal device.
  • the first routing device may choose to switch from the DS-lite mode to the IPv4-IPv6 dual stack mode. This is because the use of IPv6 links to transmit IPv4 packets requires encapsulation and decapsulation of IPv4, and the encapsulated packets are transmitted through the created IPv4in IPv6 tunnel. This processing process has additional time and packet overhead. And it has a certain impact on the bandwidth of IPv6 links.
  • the first routing device uses the IPv4 link and the IPv6 link to transmit the IPv4 packet and the IPv6 packet of the terminal device, respectively, which can improve the network resource utilization efficiency and data transmission efficiency.
  • the first routing device may also choose to continue to use the DS-lite method, which is not specifically limited in the embodiments of the present application.
  • the first routing device may set an anti-jitter mechanism for switching from DS-lite to IPv4-IPv6 to avoid switching to IPv4-IPv6 dual
  • the IPv4 link is unstable and cannot transmit data normally, and it needs to switch to DS-lite again.
  • the first routing device may choose to detect that an IPv4 link is available, and that the packet-free delay in the IPv4 link is less than or equal to the first threshold (such as 30ms), and the data traffic of the terminal device within the set duration is less than or equal to the first In the case of two thresholds (such as 100 kbps), the data transmission of the terminal device is switched to the IPv4-IPv6 dual stack.
  • the first threshold such as 30ms
  • the packet-free delay in the IPv4 link is less than or equal to the first threshold, indicating that the IPv4 link has returned to stability, and the data traffic of the terminal device within the set duration is less than or equal to the second threshold, indicating that the current service of the terminal device is in In the idle state, at this time, the first routing device disconnects the IPv4in IPv6 tunnel and switches the DS-lite to IPv4-IPv6 dual stack, which can avoid the impact of the switching process on the services that affect the terminal device and effectively improve the user experience.
  • the anti-shake mechanism may also be to set a certain anti-shake time, that is, the first routing device may choose to detect that an IPv4 link is available, and after the set anti-shake time, perform DS-lite to IPv4 -IPv6 dual stack switching.
  • the first routing device can flexibly select a feasible data transmission method from IPv4-IPv6 dual stack and DS-lite according to the availability of IPv4 links and IPv6 links to transmit data for the terminal device In order to make full use of network resources and improve the flexibility of data transmission.
  • the first routing device obtains its own IPv4 address, IPv6 address and other network configuration information before the availability of the IPv4 link and the IPv6 link, the two data transmissions of IPv4-IPv6 dual stack and DS-lite are transmitted in advance
  • the method is configured, so that when the subsequent first routing device detects that the availability of the IPv4 link and the IPv6 link changes, the first routing device can automatically switch between the IPv4-IPv6 dual stack and DS-lite.
  • the data transmission path can be reached without modifying the configuration, which can effectively improve the switching efficiency and the flexibility of communication.
  • FIG. 6 is a schematic structural diagram of a routing device provided by an embodiment of the present application. As shown in FIG. 6, the routing device includes: a processing module 610 and a communication module 620.
  • the processing module 610 is used to detect whether the IPv4 link and the IPv6 link are available, and when both the IPv4 link and the IPv6 link are available, the configured IPv4-IPv6 dual-stack mode is used to transmit data to the terminal device through the communication module 620. When the IPv4 link is unavailable but the IPv6 link is available, the configured DS-lite mode is used to transmit data for the terminal device through the communication module 620; the communication module 620 is used for transmitting data for the terminal device. It should be understood that the processing module 610 in this embodiment of the present invention may be implemented by a processor or a processor-related circuit component, and the communication module 620 may be implemented by a transceiver or a transceiver-related circuit component.
  • FIG. 7 is another schematic structural diagram of a routing device provided in an embodiment of the present application.
  • the routing device 700 includes a processor 710, a memory 720, and a communication interface 730.
  • the routing device 700 further includes an input device 740, an output device 750, and a bus 760.
  • the processor 710, the memory 720, the communication interface 730, the input device 740, and the output device 760 are connected to each other through a bus 750.
  • the memory 720 stores instructions or programs, and the processor 710 is used to execute the instructions or programs stored in the memory 720.
  • the processor 710 When the instruction or program stored in the memory 720 is executed, the processor 710 is used to perform the operation performed by the processing module 610 in the foregoing method embodiment, and the communication interface 730 is used to perform the operation performed by the communication module 620 in the foregoing embodiment.
  • routing device 600 or 700 provided in this embodiment of the present application may correspond to the first routing device in the data transmission methods S401 to S402 provided in this embodiment of the present invention, and the operations of each module in the routing device 600 or 700 And/or functions are respectively for implementing the corresponding processes of the methods shown in FIG. 4 to FIG. 5, and for the sake of brevity, they are not repeated here.
  • processors mentioned in the embodiments of the present application may be a central processing unit (central processing unit, CPU), and may also be other general-purpose processors, digital signal processors (DSPs), and application specific integrated circuits ( application, specific integrated circuit (ASIC), ready-made programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electronically Erase programmable EPROM (EEPROM) or flash memory.
  • the volatile memory may be a random access memory (random access memory, RAM), which is used as an external cache.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM double data rate synchronous dynamic random access memory
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous connection dynamic random access memory
  • direct RAMbus RAM direct RAMbus RAM, DR RAM
  • the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component
  • the memory storage module
  • the size of the sequence numbers of the above processes does not mean that the execution order is sequential, and the execution order of each process should be determined by its function and inherent logic, and should not correspond to the embodiments of the present invention.
  • the implementation process constitutes no limitation.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical, or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application essentially or part of the contribution to the existing technology or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .

Abstract

A data transmission method and a routing device. The method is applied to a first routing device that supports IPv4 and IPv6 protocol stacks and is located at one end of a lightweight dual-stack (DS-lite) IPv4-in-IPv6 tunnel. The method comprises: a first routing device detecting whether an IPv4 link and an IPv6 link are available; and the first routing device using the configured IPv4-IPv6 dual-stack method to transmit data for a terminal device when both the IPv4 link and the IPv6 link are available, and using the configured DS-lite method to transmit data for the terminal device when the IPv4 link is unavailable but the IPv6 link is available. Thus, the data transmission method is flexibly selected according to network connection and disconnection conditions, and the flexibility of communication is improved.

Description

一种数据传输方法及路由设备Data transmission method and routing equipment 技术领域Technical field
本申请涉及通信技术领域,特别涉及一种数据传输方法及路由设备。This application relates to the field of communication technology, and in particular, to a data transmission method and a routing device.
背景技术Background technique
目前,在互联网协议第4版(internet protocol version4,IPv4)向互联网协议第6版(internet protocol version6,IPv6)演进的过程中,IPv4网络与IPv6网络并存,路由设备使用IPv6链路转发数据报文可通过IPv4-IPv6双栈和轻量级双栈(dual-stack lite,DS-lite)两种方式。IPv4-IPv6双栈是指,路由设备通过IPv4链路转发终端设备有关IPv4业务的数据报文,通过IPv6链路转发终端设备有关IPv6业务的数据报文。DS-lite是指,在IPv6网络中部署的IPv4-in-IPv6隧道中传输终端设备有关IPv4业务的数据报文,而终端设备有关IPv6业务的数据报文则与IPv4-IPv6双栈相同,直接通过IPv6链路转发。Currently, during the evolution of the Internet Protocol version 4 (internet protocol version4, IPv4) to the Internet Protocol version 6 (internet protocol version6, IPv6), IPv4 networks coexist with IPv6 networks, and routing devices use IPv6 links to forward data packets Two methods are available: IPv4-IPv6 dual stack and lightweight dual-stack (dual-stack lite, DS-lite). IPv4-IPv6 dual stack means that the routing device forwards the data packets of the terminal device related to the IPv4 service through the IPv4 link, and forwards the data packets of the terminal device related to the IPv6 service through the IPv6 link. DS-lite refers to the IPv4-in-IPv6 tunnel deployed in an IPv6 network to transmit data messages related to IPv4 services of terminal devices, while the data messages related to IPv6 services of terminal devices are the same as IPv4-IPv6 dual stack, direct Forwarding via IPv6 link.
现有技术中,位于用户侧的路由设备通常只支持其中一种数据传输方式,当发现当前使用的数据传输方式不可用时,路由设备需对另一种数据传输方式进行重新配置,这可能会导致终端设备的业务中断,因此,通信的灵活性较差。In the prior art, the routing device on the user side usually only supports one of the data transmission methods. When the currently used data transmission method is found to be unavailable, the routing device needs to reconfigure the other data transmission method, which may cause The business of the terminal equipment is interrupted, so the flexibility of communication is poor.
发明内容Summary of the invention
本申请实施方式提供一种数据传输方法及路由设备,用以提高通信的灵活性。The embodiments of the present application provide a data transmission method and a routing device to improve the flexibility of communication.
第一方面,本申请实施例提供一种数据传输方法,包括:第一路由设备检测IPv4链路和IPv6链路是否可用,所述第一路由设备为支持IPv4和IPv6协议栈且位于轻量级双栈DS-lite网络中IPv4-in-IPv6隧道一端的路由设备;所述第一路由设备在所述IPv4链路和所述IPv6链路均可用时,使用配置的IPv4-IPv6双栈网络为终端设备传输数据,在所述IPv4链路不可用且所述IPv6链路可用时,使用配置的所述DS-lite网络为所述终端设备传输数据。In a first aspect, an embodiment of the present application provides a data transmission method, including: a first routing device detects whether an IPv4 link and an IPv6 link are available, and the first routing device supports IPv4 and IPv6 protocol stacks and is located at a lightweight A routing device at one end of an IPv4-in-IPv6 tunnel in a dual-stack DS-lite network; the first routing device uses the configured IPv4-IPv6 dual-stack network when both the IPv4 link and the IPv6 link are available The terminal device transmits data, and when the IPv4 link is unavailable and the IPv6 link is available, the configured DS-lite network is used to transmit data for the terminal device.
采用本申请实施例中的技术方案,第一路由设备可根据IPv4链路和IPv6链路的可用性,灵活地从IPv4-IPv6双栈和DS-lite中选择可行的数据传输方式为终端设备传输数据,从而充分利用网络资源,提高通信的灵活性。Using the technical solution in the embodiments of the present application, the first routing device can flexibly select a feasible data transmission method from IPv4-IPv6 dual stack and DS-lite according to the availability of IPv4 links and IPv6 links to transmit data for the terminal device In order to make full use of network resources and improve the flexibility of communication.
在一种可能的设计中,所述路由设备检测IPv4链路和IPv6链路是否可用之前,所述方法还包括:所述第一路由设备获取自身的IPv4地址、IPv6地址和第二路由设备的IPv6地址,所述第二路由设备为位于所述DS-lite网络中IPv4-in-IPv6隧道对端的路由设备;所述第一路由设备根据所述IPv4地址、所述IPv6地址和所述第二路由设备的IP地址,配置所述IPv4-IPv6双栈网络和所述DS-lite网络。In a possible design, before the routing device detects whether an IPv4 link and an IPv6 link are available, the method further includes: the first routing device obtains its own IPv4 address, IPv6 address, and the second routing device's IPv6 address, the second routing device is a routing device located at the opposite end of the IPv4-in-IPv6 tunnel in the DS-lite network; the first routing device is based on the IPv4 address, the IPv6 address and the second The IP address of the routing device is configured with the IPv4-IPv6 dual-stack network and the DS-lite network.
进一步地,由于第一路由设备在IPv4链路和IPv6链路的可用性之前,通过获取自身的IPv4地址、IPv6地址等网络配置信息,预先对IPv4-IPv6双栈和DS-lite这两种数据传输方法进行配置,因此,当后续第一路由设备检测到IPv4链路和IPv6链路的可用性发生变化时,第一路由设备可在IPv4-IPv6双栈和DS-lite之间进行自动切换,选择可达的数据传输路径,而不需要修改配置,可有效提高切换效率和通信的灵活性。Further, since the first routing device obtains its own IPv4 address, IPv6 address and other network configuration information before the availability of the IPv4 link and the IPv6 link, the two data transmissions of IPv4-IPv6 dual stack and DS-lite are transmitted in advance The method is configured, so that when the subsequent first routing device detects that the availability of the IPv4 link and the IPv6 link changes, the first routing device can automatically switch between the IPv4-IPv6 dual stack and DS-lite. The data transmission path can be reached without modifying the configuration, which can effectively improve the switching efficiency and the flexibility of communication.
在一种可能的设计中,所述第一路由设备检测IPv4链路和IPv6链路是否可用,包括: 所述第一路由设备使用所述IPv4链路向第一设定域名对应的第一服务器发送第一检测报文,若接收到所述第一服务器返回的第一响应报文,则确定所述IPv4链路可用,否则不可用;所述第一路由设备使用所述IPv6链路向所述第二路由设备或者第二设定域名对应的服务器发送第二检测报文,若接收到所述第二路由设备或者所述第二服务器返回的第二响应报文,则确定所述IPv6链路可用,否则不可用。In a possible design, the first routing device detects whether an IPv4 link and an IPv6 link are available, including: the first routing device uses the IPv4 link to the first server corresponding to the first set domain name Sending a first detection message, if the first response message returned by the first server is received, it is determined that the IPv4 link is available, otherwise it is not available; the first routing device uses the IPv6 link to send The second routing device or the server corresponding to the second set domain name sends a second detection message, and if a second response message returned by the second routing device or the second server is received, the IPv6 chain is determined Road is available, otherwise it is not available.
在一种可能的设计中,若所述第一路由设备使用配置的DS-lite网络为所述终端设备传输数据,所述方法还包括:所述第一路由设备在检测到IPv4链路可用,且所述IPv4链路中的无丢包时延小于等于第一阈值、所述终端设备在设定时长内的数据流量小于等于第二阈值时,切换到配置的所述IPv4-IPv6双栈网络为所述终端设备传输数据。In a possible design, if the first routing device uses the configured DS-lite network to transmit data for the terminal device, the method further includes: the first routing device detects that an IPv4 link is available, And when the packet-free delay in the IPv4 link is less than or equal to the first threshold, and the data flow of the terminal device within the set time period is less than or equal to the second threshold, the IPv4-IPv6 dual-stack network is switched to Transmitting data for the terminal device.
本申请实施例中,第一路由设备考虑到终端设备数据传输的业务连续性,可选择在IPv4链路恢复正常并保持稳定,且终端设备的业务处于闲置的状态下时,再将DS-lite切换到IPv4-IPv6双栈,从而免切换过程对影响终端设备的业务的影响,有效提高用户体验。In the embodiment of the present application, the first routing device considers the service continuity of the data transmission of the terminal device, and can choose to restart the DS-lite when the IPv4 link returns to normal and remains stable, and the service of the terminal device is idle. Switch to IPv4-IPv6 dual stack, so as to avoid the impact of the switching process on the services that affect the terminal equipment and effectively improve the user experience.
第二方面,本申请实施例提供一种路由设备,该路由设备具有实现上述第一方面或第一方面的任一种可能的设计中第一路由设备的功能,该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现,所述硬件或软件包括一个或多个与上述功能相对应的模块。In a second aspect, an embodiment of the present application provides a routing device having the function of implementing the first routing device in the first aspect or any possible design of the first aspect, which can be implemented by hardware, It can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
在一种可能的设计中,所述路由设备的结构中包括处理模块和通信模块,所述处理模块被配置为支持该路由设备执行上述第一方面或第一方面的任一种设计中相应的功能。所述通信模块用于支持该路由设备与其他通信设备(如终端设备)之间的通信。所述路由设备还可以包括存储模块,所述存储模块与处理模块耦合,其保存有路由设备必要的程序指令和数据。作为一种示例,处理模块可以为处理器,通信模块可以为收发器,存储模块可以为存储器。In a possible design, the structure of the routing device includes a processing module and a communication module, and the processing module is configured to support the routing device to perform the corresponding first aspect or any of the designs in the first aspect Features. The communication module is used to support communication between the routing device and other communication devices (such as terminal devices). The routing device may further include a storage module, which is coupled to the processing module, and stores necessary program instructions and data of the routing device. As an example, the processing module may be a processor, the communication module may be a transceiver, and the storage module may be a memory.
第三方面,本申请实施例提供一种芯片,所述芯片与存储器耦合,用于读取并执行所述存储器中存储的软件程序,以实现上述第一方面中任一种可能的设计中的方法。In a third aspect, an embodiment of the present application provides a chip that is coupled to a memory and used to read and execute a software program stored in the memory to implement any of the possible designs in the first aspect above method.
第四方面,本申请实施例提供一种计算机可读存储介质,所述计算机存储介质中存储有计算机可读指令,当计算机读取并执行所述计算机可读指令时,使得计算机执行上述第一方面中任一种可能的设计中的方法。According to a fourth aspect, an embodiment of the present application provides a computer-readable storage medium that stores computer-readable instructions, and when the computer reads and executes the computer-readable instructions, causes the computer to execute the first Any possible design approach in the aspect.
第五方面,本申请实施例提供一种计算机程序产品,当计算机读取并执行所述计算机程序产品时,使得计算机执行上述第一方面中任一种可能的设计中的方法。According to a fifth aspect, an embodiment of the present application provides a computer program product that, when the computer reads and executes the computer program product, causes the computer to execute any method in any possible design of the first aspect described above.
附图说明BRIEF DESCRIPTION
图1为本申请实施例适用的一种通信系统的网络架构示意图;FIG. 1 is a schematic diagram of a network architecture of a communication system to which embodiments of the application are applicable;
图2为本申请实施例中IPv4-IPv6双栈下的数据传输示意图;2 is a schematic diagram of data transmission under an IPv4-IPv6 dual stack in an embodiment of the present application;
图3为本申请实施例中DS-lite下的数据传输示意图;3 is a schematic diagram of data transmission under DS-lite in an embodiment of the present application;
图4为本申请实施例提供的一种数据传输方法的流程示意图;4 is a schematic flowchart of a data transmission method according to an embodiment of the present application;
图5为本申请实施例中第一路由设备获取IPv4地址、IPv6地址和第二路由设备的IP地址的流程示意图;FIG. 5 is a schematic flow chart of a first routing device acquiring an IPv4 address, an IPv6 address, and an IP address of a second routing device in an embodiment of this application;
图6为本申请实施例中提供的路由设备的结构示意图;6 is a schematic structural diagram of a routing device provided in an embodiment of this application;
图7为本申请实施例中提供的路由设备的另一结构示意图。7 is another schematic structural diagram of a routing device provided in an embodiment of this application.
具体实施方式detailed description
为了使本申请的目的、技术方案和优点更加清楚,下面结合说明书附图对本申请实施例进行具体描述。需要说明的是,本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。In order to make the purpose, technical solutions and advantages of the present application clearer, the following describes the embodiments of the present application in detail with reference to the accompanying drawings of the specification. It should be noted that the terms used in the implementation part of the present application are only used to explain specific examples of the present application, and are not intended to limit the present application.
在下文的描述中,除非有相反的说明,“第一”、“第二”等序数词,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。In the following description, unless otherwise stated, ordinal numbers such as “first” and “second” are only used to distinguish the description and cannot be understood as indicating or implying relative importance, or as indicating or Implied order.
图1示例性示出了本申请实施例适用的一种通信系统的网络架构。如图1所示,所述通信系统包括终端设备101、第一路由设备102和第二路由设备103。进一步地,该通信系统中还可包括IPv4下的动态主机配置协议(dynamic host configuration protocol for IPv4,DHCPv4)服务器,用于对第一路由设备的公网IPv4地址进行配置。FIG. 1 exemplarily shows a network architecture of a communication system to which embodiments of the present application are applicable. As shown in FIG. 1, the communication system includes a terminal device 101, a first routing device 102, and a second routing device 103. Further, the communication system may further include a dynamic host configuration protocol (IPv4, DHCPv4) server under IPv4 for configuring the public network IPv4 address of the first routing device.
终端设备101,是指各种需要上网(指连接到IPv6公网或IPv4公网)的电子设备,例如可以是计算机、笔记本型计算机、智能手机、平板电脑、智能穿戴设备等设备,或者也可以是其它家用设备。终端设备可通过有线或者无线的方式与第一路由设备相连接,通过第一路由设备的路由转发功能,实现与IPv6公网或IPv4公网之间的通信。一般来说,终端设备在与第一路由设备通信的过程中,传输的数据报文可能是IPv4报文,也可能是IPv6报文。需要说明的是,该通信系统中可包括一个或多个终端设备,本申请实施例对终端设备的数量不作具体限定。The terminal device 101 refers to various electronic devices that need to access the Internet (referring to connection to the IPv6 public network or the IPv4 public network), for example, it can be a computer, notebook computer, smart phone, tablet computer, smart wearable device, or other devices It is other household equipment. The terminal device may be connected to the first routing device in a wired or wireless manner, and realize the communication with the IPv6 public network or the IPv4 public network through the routing forwarding function of the first routing device. Generally speaking, during the communication between the terminal device and the first routing device, the transmitted data message may be an IPv4 message or an IPv6 message. It should be noted that the communication system may include one or more terminal devices, and the embodiment of the present application does not specifically limit the number of terminal devices.
第一路由设备102,为支持IPv6协议栈和IPv4协议栈的路由设备,它包括与终端设备连接的局域网端口,和与第二路由设备连接的广域网端口,并相应地通过局域网端口与终端设备通信,通过广域网端口与第二路由设备通信。当通信系统中包括多个终端设备时,第一路由设备可通过不同的局域网端口分别与各个终端设备连接。The first routing device 102 is a routing device supporting the IPv6 protocol stack and the IPv4 protocol stack. It includes a LAN port connected to the terminal device and a WAN port connected to the second routing device, and communicates with the terminal device through the LAN port accordingly To communicate with the second routing device through the WAN port. When multiple terminal devices are included in the communication system, the first routing device may be connected to each terminal device through different local area network ports.
本申请实施例中,第一路由设备可用于集中管理终端设备,它具有DHCPv4和DHCPv6的功能。例如,当第一路由设备经过配置得到自己的公网IPv4地址后,可为其连接的各个终端设备分配相应的内网IPv4地址,也称私网IPv4地址。再例如,当第一路由设备经过配置得到自己的公网IPv6地址和IPv6前缀信息prefix后,可通过DHCPv6或IPv6的无状态自动配置的方式为连接的各个终端设备分配IPv6地址。在一种可能的设计中,第一路由设备可以作为DHCPv6协议的服务端server,提供DHCPv6服务,为终端设备分配IPv6地址,此时,终端设备为DHCPv6协议中的客户端client。在另一种可能的设计中,第一路由设备可为终端设备分配用于进行IPv6的无状态自动配置的IPv6地址前缀,以便终端设备根据该IPv6地址前缀和自己的接口信息,利用随机算法生成IPv6地址。In the embodiment of the present application, the first routing device may be used to centrally manage the terminal device, and it has the functions of DHCPv4 and DHCPv6. For example, after the first routing device is configured to obtain its own public network IPv4 address, each terminal device connected to it can be assigned a corresponding internal network IPv4 address, also known as a private network IPv4 address. For another example, after the first routing device is configured to obtain its own public network IPv6 address and IPv6 prefix information prefix, it can allocate IPv6 addresses to each connected terminal device through stateless automatic configuration of DHCPv6 or IPv6. In a possible design, the first routing device may serve as a server of the DHCPv6 protocol, provide DHCPv6 services, and allocate IPv6 addresses to the terminal device. In this case, the terminal device is a client client in the DHCPv6 protocol. In another possible design, the first routing device may allocate an IPv6 address prefix for stateless auto-configuration of IPv6 to the terminal device, so that the terminal device generates a random algorithm based on the IPv6 address prefix and its own interface information IPv6 address.
在一种可能的设计中,第一路由设备可以是客户端前端设备(customer premise equipment,CPE)或无线接入点(wireless access point,AP)等位于用户侧的各种类型的路由型网关,其中,CPE也可称为家庭网关。在另一种可能的设计中,当图1中所示的通信系统具体为光接入网络时,该第一路由设备也可以是图2、图3中所示出的光网络终端(optical network terminal,ONT)或光网络单元(optical network unit,ONU)。以第一路由设备为ONT为例,在光接入网络中,ONT常与光线路终端(optical line terminal,OLT)配合使用,通过OLT连接到第二路由设备。In a possible design, the first routing device may be various types of routing gateways located on the user side, such as customer premise equipment (CPE) or wireless access point (AP), Among them, CPE can also be called a home gateway. In another possible design, when the communication system shown in FIG. 1 is specifically an optical access network, the first routing device may also be an optical network terminal (optical network) shown in FIGS. 2 and 3. terminal (ONT) or optical network unit (ONU). Taking the first routing device as an ONT for example, in an optical access network, the ONT is often used in conjunction with an optical line terminal (OLT) to connect to the second routing device through the OLT.
第二路由设备,为位于IPv4和IPv6骨干网边缘的路由设备,它具有IPv6下的动态主机配置协议(dynamic host configuration protocol for IPv6,DHCPv6)和地址族转换路由器(address family transition router,AFTR)的功能。本申请实施例中,第二路由设备具有DHCPv6功能是指,第二路由设备相当于一台DHCPv6服务器,能够为第一路由设备分配 公网IPv6地址,此时第二路由设备为DHCPv6协议中的服务端server,第一路由设备为DHCPv6协议中的客户端client。在一种可能的设计中,第二路由设备可以是宽带远程接入服务器(broadband remote access server,BRAS)或是边缘路由器(border router,BR)。The second routing device is a routing device located at the edge of the IPv4 and IPv6 backbone network. It has dynamic host configuration protocol under IPv6 (dynamic host configuration for IPv6, DHCPv6) and address family translation router (address family transition router, AFTR). Features. In the embodiment of the present application, that the second routing device has the DHCPv6 function means that the second routing device is equivalent to a DHCPv6 server and can allocate a public network IPv6 address to the first routing device. In this case, the second routing device is a DHCPv6 protocol. On the server side, the first routing device is a client client in the DHCPv6 protocol. In a possible design, the second routing device may be a broadband remote access server (broadband remote access server, BRAS) or an edge router (border router, BR).
本申请实施例中,第一路由设备还具有路由转发的功能,它可以工作在IPv4-IPv6双栈这一数据传输方式(也可以称作工作模式)下,也可以工作在DS-lite这一数据传输方式下。In the embodiment of the present application, the first routing device also has the function of routing and forwarding, which can work in the data transmission mode (also called working mode) of IPv4-IPv6 dual stack, and can also work in the DS-lite Under data transmission mode.
下面,为了便于理解,结合图2和图3对本申请中涉及到的IPv4-IPv6双栈和轻量级双栈DS-lite进行介绍。In the following, for ease of understanding, the IPv4-IPv6 dual stack and the lightweight dual stack DS-lite involved in this application will be described in conjunction with FIGS. 2 and 3.
IPv4-IPv6双栈,是指在一台设备上同时启用IPv4和IPv6协议栈,它这台设备既可以与IPv4设备通信,也可以与IPv6设备通信。当然这要求该设备配置有IPv4和IPv6的广域网端口,设备通过IPv4的广域网端口与IPv4设备通信,通过IPv6的广域网端口与IPv6设备通信。IPv4-IPv6 dual stack refers to enabling both IPv4 and IPv6 protocol stacks on one device. This device can communicate with both IPv4 devices and IPv6 devices. Of course, this requires that the device is configured with IPv4 and IPv6 WAN ports. The device communicates with the IPv4 device through the IPv4 WAN port and with the IPv6 device through the IPv6 WAN port.
当第一路由设备工作在IPv4-IPv6双栈下时,表示第一路由设备与第二路由设备之间是双栈网络,第一路由设备同时启用IPv4协议栈和IPv6协议栈。如图2所示,在上行方向上,一种转发路径可为,第一路由设备接收终端设备发送的IPv4报文,对该IPv4报文进行网络地址转换(network address translation,NAT),该IPv4报文中原来的源IP地址为终端设备的私网IPv4地址,NAT转换是指将该IPv4报文的源IP地址转换为第一路由设备的公网IPv4地址,然后再将该IPv4报文发送给第二路由设备,进而发送到IPv4公网。另一种转发路径为,第一路由设备接收终端设备发送的IPv6报文,将该IPv6报文直接转发给第二路由设备,进而发送到IPv6公网,这一过程中不需要对该IPv6报文进行NAT转换。下行方向上,IPv4和IPv6报文的转发与上行方向类似,此处不再赘述。When the first routing device works under the IPv4-IPv6 dual stack, it indicates that there is a dual-stack network between the first routing device and the second routing device, and the first routing device enables both the IPv4 protocol stack and the IPv6 protocol stack. As shown in FIG. 2, in the upstream direction, a forwarding path may be that the first routing device receives the IPv4 packet sent by the terminal device, performs network address translation (NAT) on the IPv4 packet, and the IPv4 The original source IP address in the packet is the private network IPv4 address of the terminal device. NAT translation refers to converting the source IP address of the IPv4 packet to the public network IPv4 address of the first routing device, and then sending the IPv4 packet. To the second routing device, and then sent to the IPv4 public network. Another forwarding path is that the first routing device receives the IPv6 packet sent by the terminal device, directly forwards the IPv6 packet to the second routing device, and then sends it to the IPv6 public network. This process does not require the IPv6 packet. NAT conversion. In the downstream direction, the forwarding of IPv4 and IPv6 packets is similar to the upstream direction, and will not be repeated here.
DS-lite,是隧道技术的一种,通过在IPv6网络中创建隧道,使得IPv4报文能够穿过IPv6网络发送到IPv4网络,这样终端设备能够通过IPv6网络访问IPv4公网,从而实现IPv4网络之间的互连。DS-lite is a kind of tunneling technology. By creating a tunnel in an IPv6 network, IPv4 packets can be sent to the IPv4 network through the IPv6 network, so that the terminal device can access the IPv4 public network through the IPv6 network, thereby realizing the IPv4 network. Interconnection.
在DS-lite中创建的隧道为IPv4in IPv6隧道,或者也可以称为IPv4over IPv6隧道。如图3中所示,第一路由设备作为DS-lite中的基础桥带宽(base bridging broadband element,B4)设备,位于该IPv4in IPv6隧道靠近用户侧的一端,第二路由设备作为DS-lite中的AFTR设备,位于该IPv4in IPv6隧道靠近网络侧的另一端,用于终结IPv4in IPv6隧道。The tunnel created in DS-lite is an IPv4in IPv6 tunnel, or it can also be called an IPv4over IPv6 tunnel. As shown in FIG. 3, the first routing device serves as a basic bridge bandwidth (B4) device in DS-lite, which is located at the end of the IPv4 in IPv6 tunnel near the user side, and the second routing device serves as DS-lite The AFTR device located at the other end of the IPv4in IPv6 tunnel near the network side is used to terminate the IPv4in IPv6 tunnel.
当第一路由设备工作在DS-lite下时,表示第一路由设备与第二路由设备之间是IPv6单栈网络。如图3所示,上行方向上,一种转发路径为,第一路由设备接收终端设备发送的IPv6报文,将该IPv6报文通过IPv6网络直接转发给第二路由设备,由第二路由设备将该IPv6报文发送到IPv6公网中。下行方向上与此类似,第一路由设备和第二路由设备都是执行直接转发,没有进行任何的NAT。When the first routing device works under DS-lite, it indicates that the first routing device and the second routing device are IPv6 single-stack networks. As shown in FIG. 3, in the upstream direction, a forwarding path is that the first routing device receives the IPv6 packet sent by the terminal device, directly forwards the IPv6 packet to the second routing device through the IPv6 network, and the second routing device Send the IPv6 packet to the IPv6 public network. Similar to this in the downstream direction, both the first routing device and the second routing device perform direct forwarding without performing any NAT.
另一种转发路径为,由于IPv4报文无法在IPv6网络中直接传输,第一路由设备可利用DS-lite隧道技术在IPv6网络中创建IPv4in IPv6隧道。对于第一路由设备从终端设备处接收到的IPv4报文,第一路由设备可对该IPv4报文进行封装,然后通过创建的IPv4in IPv6隧道发送给第二路由设备。这里,第一路由设备对该IPv4报文进行封装具体是指:在该IPv4报文头部添加一个IPv6报文头,其中,IPv6报文头中的源IPv6地址为第一路由设备(即B4设备)的公网IPv6地址,目的IPv6地址为第二路由设备(即AFTR设备)的IPv6地址。如此,经过封装后这个报文就可以在IPv6网络中传输,从而实现“将IPv4报文封装 在IPv6报文”中的隧道。随后,第二路由设备在接收到该报文后,可将该报文中的IPv6报文头剥离掉,得到原先的IPv4报文,即终端设备初始发送给第一路由设备的IPv4报文。该IPv4报文的报文头中的源IPv4地址为终端设备自身的IPv4地址,即第一路由设备为终端设备分配的私网IPv4地址,第一路由设备在向第二路由设备转发该IPv4报文时,并没有对该私网IPv4地址进行NAT转换,因此,当第二路由设备接收到该IPv4报文后,首先对该私网IPv4地址进行转换,将该IPv4报文的源IPv4地址转换为第一路由设备的公网IPv4地址,然后发送到IPv4公网中,这样接收该IPv4报文的服务器就能正常接收并处理这个报文。下行方向上与此类似,由第二路由设备负责私网IPv4的NAT转换和IPv4报文封装,第一路由设备负责IPv4报文的解封装并转发给终端设备。Another forwarding path is that, since IPv4 packets cannot be directly transmitted in the IPv6 network, the first routing device can use the DS-lite tunnel technology to create an IPv4in IPv6 tunnel in the IPv6 network. For the IPv4 packet received by the first routing device from the terminal device, the first routing device may encapsulate the IPv4 packet, and then send it to the second routing device through the created IPv4 in IPv6 tunnel. Here, the first routing device encapsulating the IPv4 packet specifically refers to: adding an IPv6 packet header to the IPv4 packet header, where the source IPv6 address in the IPv6 packet header is the first routing device (that is, B4 Device)'s public network IPv6 address, the destination IPv6 address is the IPv6 address of the second routing device (ie, AFTR device). In this way, after encapsulation, this message can be transmitted in the IPv6 network, thereby realizing the tunnel of "encapsulating IPv4 message in IPv6 message". Subsequently, after receiving the packet, the second routing device may strip off the IPv6 packet header in the packet to obtain the original IPv4 packet, that is, the IPv4 packet originally sent by the terminal device to the first routing device. The source IPv4 address in the header of the IPv4 packet is the IPv4 address of the terminal device itself, that is, the private network IPv4 address allocated by the first routing device to the terminal device, and the first routing device is forwarding the IPv4 report to the second routing device At the time of the text, the NAT of the private network IPv4 address is not converted. Therefore, after receiving the IPv4 packet, the second routing device first converts the private network IPv4 address and converts the source IPv4 address of the IPv4 packet It is the public network IPv4 address of the first routing device, and then sent to the IPv4 public network, so that the server receiving the IPv4 packet can normally receive and process the packet. Similar to this in the downstream direction, the second routing device is responsible for private network IPv4 NAT conversion and IPv4 packet encapsulation, and the first routing device is responsible for decapsulation of IPv4 packets and forwarding to the terminal device.
基于上述网络架构,图4示例性示出了本申请实施例提供的一种数据传输方法,如图4所示,该方法包括:Based on the above network architecture, FIG. 4 exemplarily shows a data transmission method provided by an embodiment of the present application. As shown in FIG. 4, the method includes:
步骤S401,第一路由设备检测IPv4链路和IPv6链路是否可用,该第一路由设备为支持IPv4和IPv6协议栈且处于轻量级双栈DS-lite的IPv4in IPv6隧道一端的路由设备。Step S401, a first routing device detects whether an IPv4 link and an IPv6 link are available. The first routing device is a routing device that supports IPv4 and IPv6 protocol stacks and is at the end of an IPv4in IPv6 tunnel of a lightweight dual-stack DS-lite.
步骤S402,第一路由设备在IPv4链路和IPv6链路均可用时,采用配置的IPv4-IPv6双栈方式为终端设备传输数据,在IPv4链路不可用但IPv6链路可用时,使用配置的DS-lite方式为终端设备传输数据。Step S402, when both the IPv4 link and the IPv6 link are available, the first routing device uses the configured IPv4-IPv6 dual stack method to transmit data for the terminal device, and uses the configured when the IPv4 link is unavailable but the IPv6 link is available. DS-lite mode transmits data for terminal equipment.
本申请实施例中,第一路由设备可在步骤S401之前,获取自身的IPv4地址、IPv6地址和第二路由设备的IPv6地址,此处,第一路由设备的IPv4地址和IPv6地址分别是指,第一路由设备被分配的公网IPv4地址和公网IPv6地址。随后,第一路由设备可根据获取到的IPv4地址、IPv6地址和第二路由设备的IPv6地址,配置IPv4-IPv6双栈和DS-lite两种数据传输方式,建立IPv4-IPv6双栈和DS-lite的IPv4in IPv6隧道。In the embodiment of the present application, before step S401, the first routing device may obtain its own IPv4 address, IPv6 address, and IPv6 address of the second routing device. Here, the IPv4 address and the IPv6 address of the first routing device refer to, The public network IPv4 address and the public network IPv6 address assigned by the first routing device. Subsequently, the first routing device can configure the IPv4-IPv6 dual stack and DS-lite data transmission methods based on the obtained IPv4 address, IPv6 address, and the IPv6 address of the second routing device to establish IPv4-IPv6 dual stack and DS-lite. Lite IPv4in IPv6 tunnel.
具体的,第一路由设备获取自身的IPv4地址、IPv6地址以及第二路由设备的IPv6地址可通过图5中所示的方法流程实现:Specifically, the first routing device acquiring its own IPv4 address, IPv6 address, and the IPv6 address of the second routing device may be implemented through the method flow shown in FIG. 5:
步骤S501:第一路由设备发送DHCPv4发现discover报文,经过DHCPv4的标准流程,第一路由设备接收DHCPv4服务器发送的为其分配的公网IPv4地址。Step S501: The first routing device sends a DHCPv4 discovery discover message. After the standard process of DHCPv4, the first routing device receives the public network IPv4 address assigned by the DHCPv4 server.
步骤S502:第一路由设备发送路由请求(router solicitation,RS)报文,以请求第二路由设备为其分配IPv6地址,以及域名解析系统(domain name system,DNS)服务器的IPv6地址等其它网络配置信息。Step S502: The first routing device sends a routing request (router solicitation, RS) message to request the second routing device to allocate an IPv6 address for it, and the IPv6 address of the domain name resolution system (DNS) server and other network configurations information.
步骤S503,第一路由设备接收第二路由设备发送的路由公告(router advertisement,RA)报文,并触发标准的DHCPv6过程,获取IPv6地址。Step S503, the first routing device receives a routing advertisement (RA) message sent by the second routing device, and triggers a standard DHCPv6 process to obtain an IPv6 address.
步骤S504,第一路由设备向第二路由设备发送DHCPv6要求solicit报文,并在该DHCPv6solicit报文中携带选项option64字段(该option64为RA报文中AFTR对应的option),以请求第二路由设备返回为其分配的IPv6地址,以及AFTR的域名。Step S504, the first routing device sends a DHCPv6 request solicit message to the second routing device, and carries an option64 field in the DHCPv6solicit message (the option64 is an option corresponding to AFTR in the RA message) to request the second routing device Returns the IPv6 address assigned to it and the domain name of AFTR.
步骤S505,第一路由设备接收第二路由设备发送的DHCPv6公告advertise报文,该DHCPv6advertise报文中包括第二路由设备为其分配的IPv6地址,以及DNS服务器的IPv6地址、AFTR的域名等网络配置信息。Step S505, the first routing device receives a DHCPv6 announcement advertisement message sent by the second routing device, the DHCPv6 advertise message includes the IPv6 address assigned by the second routing device, and the network configuration such as the DNS server IPv6 address and AFTR domain name information.
步骤S506,第一路由设备确定第二路由设备在DHCPv6advertise报文中给出的IPv6地址可用后,向第二路由设备发送DHCPv6请求request报文,以请求第二路由设备将该IPv6地址分配给自己。此处,第一路由设备接收DHCPv6advertise报文后,可监听其它设备对该DHCPv6advertise报文的响应,若没有其他设备响应该报文,说明报文中给出的IPv6 地址没有被分配给其它设备,即该IPv6地址可用。Step S506: After determining that the IPv6 address given in the DHCPv6advertise message is available, the first routing device sends a DHCPv6 request message to the second routing device to request the second routing device to assign the IPv6 address to itself . Here, after receiving the DHCPv6advertise message, the first routing device can monitor the response of other devices to the DHCPv6advertise message. If no other device responds to the message, it means that the IPv6 address given in the message is not assigned to other devices. That is, the IPv6 address is available.
步骤S507,第一路由设备接收第二路由设备发送的DHCPv6应答reply报文,确认上述IPv6地址被分配给了自己,根据得到的自己的IPv4地址和IPv6地址,完成IPv4-和IPv6双栈的配置。Step S507, the first routing device receives the DHCPv6 reply reply message sent by the second routing device, confirms that the above IPv6 address is assigned to itself, and completes the configuration of IPv4- and IPv6 dual stack according to the obtained own IPv4 address and IPv6 address .
后续,第一路由设备可将AFTR的域名发送给DNS服务器,以使DNS服务器对AFTR的域名进行DNS解析,得到AFTR的IPv6地址。第一路由设备接收DNS服务器发送的AFTR的IPv6地址,根据该AFTR的IPv6地址向第二路由设备(即AFTR)创建IPv4-in-IPv6的隧道,完成DS-lite的配置。Subsequently, the first routing device may send the domain name of the AFTR to the DNS server, so that the DNS server performs DNS resolution on the domain name of the AFTR to obtain the IPv6 address of the AFTR. The first routing device receives the IPv6 address of the AFTR sent by the DNS server, creates an IPv4-in-IPv6 tunnel to the second routing device (ie, AFTR) according to the AFTR's IPv6 address, and completes the DS-lite configuration.
需要说明的是,在上述步骤S501至步骤S509中,为了提高配置效率,第一路由设备可同时发送DHCPv4discover报文和RS报文。若第一路由设备成功获取到IPv4地址、IPv6地址以及AFTR的IPv6地址,第一路由设备配置IPv4-IPv6双栈和DS-lite,反之,若第一路由设备获取IPv4地址失败,只获取到IPv6地址,第一路由设备只配置DS-lite。It should be noted that, in the above steps S501 to S509, in order to improve the configuration efficiency, the first routing device may simultaneously send the DHCPv4discover message and the RS message. If the first routing device successfully obtains the IPv4 address, IPv6 address, and AFTR IPv6 address, the first routing device configures IPv4-IPv6 dual stack and DS-lite, otherwise, if the first routing device fails to obtain the IPv4 address, only the IPv6 address is obtained Address, the first routing device is only configured with DS-lite.
第一路由设备获取到IPv4地址和IPv6地址,并完成IPv4-IPv6双栈和/或DS-lite的配置后,在步骤S401中,第一路由设备可通过向网络侧发送检测报文的方式来衡量IPv4链路和IPv6链路的通断情况,即链路是否正常是否可用。其中,第一路由设备检测IPv4链路是否可用可以为:第一路由设备使用IPv4链路向IPv4公网中具有第一设定域名的第一服务器发送第一检测报文,当在设定时间间隔内接收到该第一服务器返回的第一响应报文时,确定IPv4链路可用,否则确定IPv4链路不可用。一般来说,IPv4链路不可用可能包括如下的任一种情况:1)IPv4的服务器出现故障;2)在IPv4-IPv6双栈向纯IPv6网络演进的过程中,IPv4服务器被删除了;3)在IPv4单栈网络向纯IPv6网络演进的过程中,IPv4服务器被删除了。After the first routing device obtains the IPv4 address and the IPv6 address and completes the configuration of the IPv4-IPv6 dual stack and/or DS-lite, in step S401, the first routing device may send a detection message to the network side to Measure the connection and disconnection of IPv4 links and IPv6 links, that is, whether the link is normal and available. Wherein, the first routing device detecting whether the IPv4 link is available may be: the first routing device uses the IPv4 link to send the first detection message to the first server with the first set domain name in the IPv4 public network, when the set time When receiving the first response message returned by the first server within the interval, it is determined that the IPv4 link is available, otherwise it is determined that the IPv4 link is not available. In general, the unavailability of IPv4 links may include any of the following situations: 1) The IPv4 server fails; 2) During the evolution of the IPv4-IPv6 dual stack to a pure IPv6 network, the IPv4 server is deleted; 3 ) During the evolution of IPv4 single-stack networks to pure IPv6 networks, IPv4 servers were deleted.
同理,第一路由设备检测IPv6链路是否可用可以为:第一路由设备使用IPv6链路向第二路由设备或者IPv6公网中具有第二设定域名的第二服务器发送第二检测报文,当在设定时间间隔内接收到第二路由设备或者具有第二设定域名的第二服务器发送的第二响应报文时,确定IPv6链路可用,否则确定IPv6链路不可用。Similarly, the first routing device detecting whether an IPv6 link is available may be: the first routing device uses the IPv6 link to send a second detection message to the second routing device or a second server with a second set domain name in the IPv6 public network When the second response message sent by the second routing device or the second server with the second set domain name is received within the set time interval, it is determined that the IPv6 link is available, otherwise it is determined that the IPv6 link is not available.
需要说明的是,第一路由设备在检测IPv4链路和IPv6链路的过程中,所使用的设定时间间隔可以相同,也可以不相同,而且,其中所指的第一设定域名和第二设定域名可以是同一设定域名,也可以是不同的设定域名,本申请均不作具体限定。It should be noted that, during the process of detecting the IPv4 link and the IPv6 link, the first routing device may use the same set time interval or may be different, and the first set domain name and the 2. The set domain name may be the same set domain name or different set domain names, and this application does not make specific limitations.
本申请实施例中,第一检测报文用于检测IPv4链路是否正常,该第一检测报文的源地址为第一路由设备的IPv4地址,目的地址为IPv4公网中第一设定域名对应的第一服务器的IPv4地址。它可以是基于因特网控制报文协议(internet control message protocol,ICMP)协议或是基于地址解析协议(address resolution protocol,ARP)协议的探测报文,例如ICMP回送请求报文,对应的,第一应答报文为ICMP回送应答报文。在一种可能的设计中,第一检测报文可以为第一因特网包探索器ping命令或第一ARP ping命令。In the embodiment of the present application, the first detection message is used to detect whether the IPv4 link is normal, the source address of the first detection message is the IPv4 address of the first routing device, and the destination address is the first set domain name in the IPv4 public network The IPv4 address of the corresponding first server. It can be a detection message based on the Internet Control Message Protocol (ICMP) protocol or an address resolution protocol (Address Resolution Protocol, ARP) protocol, such as an ICMP echo request message, corresponding, the first response The message is an ICMP echo reply message. In a possible design, the first detection message may be the first Internet packet explorer ping command or the first ARP ping command.
第二检测报文用于检测IPv6链路是否正常,该第二检测报文的源地址为第一路由设备的IPv6地址,目的地址为第二路由设备的IPv6地址或IPv6公网中第二设定域名对应的第二服务器的IPv6地址。它可以是基于IPv6下的因特网控制报文协议(internet control message protocol for ipv6,ICMPv6)协议或是基于地址解析协议(address resolution protocol,ARP)协议的探测报文,例如ICMPv6回送请求报文,相应地,第二检测报文为ICMPv6回送应答报文。在一种可能的设计中,第二检测报文可以为第二因特网包探索器ping命令 或第二ARP ping命令。The second detection message is used to detect whether the IPv6 link is normal. The source address of the second detection message is the IPv6 address of the first routing device, and the destination address is the IPv6 address of the second routing device or the second device in the IPv6 public network. The IPv6 address of the second server corresponding to the given domain name. It can be based on the Internet Control Message Protocol (Internet Control Message Protocol for IPv6, ICMPv6) protocol under IPv6 or a probe message based on the Address Resolution Protocol (ARP) protocol, such as the ICMPv6 echo request message, corresponding The second detection message is an ICMPv6 reply message. In a possible design, the second detection message may be a second Internet packet explorer ping command or a second ARP ping command.
当第一路由设备配置好IPv4-IPv6双栈和DS-lite这两种数据传输方式后,第一路由设备可周期性检测IPv4链路和IPv6链路是否可用,其中检测周期可由本领域技术人员根据网络需求进行灵活地设置,本申请实施例不作具体限定。After the first routing device is configured with the IPv4-IPv6 dual stack and DS-lite data transmission methods, the first routing device can periodically detect whether the IPv4 link and the IPv6 link are available, and the detection period can be determined by those skilled in the art Flexible settings are made according to network requirements, and the embodiments of the present application are not specifically limited.
在步骤S402中,当第一路由设备检测到IPv4链路可用,同时IPv6链路也可用时,可采用IPv4-IPv6双栈方式为终端设备传输数据。也就是说,在这一场景下,第一路由设备可工作在IPv4-IPv6双栈下,通过IPv4链路传输终端设备的IPv4报文,通过IPv6链路传输终端设备的IPv6报文。如此,可有效利用IPv4链路和IPv6链路的网络资源,提高数据传输效率。In step S402, when the first routing device detects that an IPv4 link is available and an IPv6 link is also available, the IPv4-IPv6 dual-stack mode may be used to transmit data for the terminal device. That is to say, in this scenario, the first routing device can work under the IPv4-IPv6 dual stack, transmit IPv4 packets of the terminal device through the IPv4 link, and transmit IPv6 packets of the terminal device through the IPv6 link. In this way, the network resources of the IPv4 link and the IPv6 link can be effectively used to improve the data transmission efficiency.
当第一路由设备检测到IPv4链路不可用但IPv6链路可用时,可采用DS-lite方式为终端设备传输数据。也就是说,在这一场景下,第一路由设备可工作在DS-lite方式下,通过IPv6链路直接传输终端设备的IPv6报文,通过对IPv4报文进行封装和解封装,在创建的IPv4in IPv6隧道中传输终端设备的IPv4报文。如此,可在IPv4链路因存在故障或其他原因而不可用时,也能保证终端设备的IPv4业务的正常进行。When the first routing device detects that the IPv4 link is unavailable but the IPv6 link is available, the DS-lite mode may be used to transmit data for the terminal device. That is to say, in this scenario, the first routing device can work in the DS-lite mode, directly transmit IPv6 packets of the terminal device through the IPv6 link, and encapsulate and decapsulate IPv4 packets in the created IPv4in IPv4 packets of terminal equipment are transmitted in the IPv6 tunnel. In this way, when the IPv4 link is unavailable due to a fault or other reasons, the IPv4 service of the terminal device can be normally performed.
在具体的应用场景中,由于第一路由设备可以周期性地检测IPv4链路和IPv6链路的通断情况,因此,如果第一路由设备之前检测到IPv4链路和IPv6链路均可用,并采用IPv4和IPv6方式为终端设备传输数据,后续若第一路由设备检测到IPv4链路不可用,但IPv6链路仍为正常时,第一路由设备可从IPv4-IPv6双栈方式切换到DS-lite方式下,从而通过DS-lite隧道传输终端设备的IPv4数据,避免终端设备IPv4业务的中断。In a specific application scenario, since the first routing device can periodically detect the connection and disconnection of the IPv4 link and the IPv6 link, if the first routing device previously detects that both the IPv4 link and the IPv6 link are available, and Use IPv4 and IPv6 to transmit data for the terminal device. If the first routing device detects that the IPv4 link is unavailable, but the IPv6 link is still normal, the first routing device can switch from IPv4-IPv6 dual-stack to DS- In the lite mode, the IPv4 data of the terminal device is transmitted through the DS-lite tunnel to avoid the interruption of the IPv4 service of the terminal device.
反之,如果第一路由设备之前检测到IPv4链路不可用而IPv6链路可用,并采用DS-lite方式为终端设备传输数据,后续若第一路由设备检测到IPv4链路恢复正常,同时IPv6链路也正常时,第一路由设备可以选择从DS-lite方式切换到IPv4-IPv6双栈方式下。这是因为,使用IPv6链路传输IPv4报文需要对IPv4进行封装和解封装处理,并将封装后的报文通过创建的IPv4in IPv6隧道传输,这一处理过程存在着额外的时间和报文开销,而且对IPv6链路的带宽有一定的影响。因此,当IPv4链路恢复正常后,第一路由设备分别使用IPv4链路和IPv6链路传输终端设备的IPv4报文和IPv6报文,可提高网络资源利用效率和数据传输效率。当然,第一路由设备也可以选择继续使用DS-lite方式,本申请实施例对此不作具体限定。Conversely, if the first routing device previously detects that the IPv4 link is unavailable and the IPv6 link is available, and uses the DS-lite method to transmit data for the terminal device, if the first routing device detects that the IPv4 link returns to normal and the IPv6 chain When the path is normal, the first routing device may choose to switch from the DS-lite mode to the IPv4-IPv6 dual stack mode. This is because the use of IPv6 links to transmit IPv4 packets requires encapsulation and decapsulation of IPv4, and the encapsulated packets are transmitted through the created IPv4in IPv6 tunnel. This processing process has additional time and packet overhead. And it has a certain impact on the bandwidth of IPv6 links. Therefore, when the IPv4 link returns to normal, the first routing device uses the IPv4 link and the IPv6 link to transmit the IPv4 packet and the IPv6 packet of the terminal device, respectively, which can improve the network resource utilization efficiency and data transmission efficiency. Of course, the first routing device may also choose to continue to use the DS-lite method, which is not specifically limited in the embodiments of the present application.
在一种可能的实现方式中,考虑到终端设备的业务连续性,第一路由设备可为从DS-lite到IPv4-IPv6之间的切换设置防抖动机制,以避免切换到IPv4-IPv6双栈后,IPv4链路不稳定无法正常传输数据,又需要再次切换到DS-lite的情况发生。例如,第一路由设备可以选择在检测到IPv4链路可用,且IPv4链路中的无丢包时延小于等于第一阈值(如30ms)、终端设备在设定时长内的数据流量小于等于第二阈值(如100kbps)的情况下,再将终端设备的数据传输切换到IPv4-IPv6双栈下。此处,IPv4链路中的无丢包时延小于等于第一阈值,说明IPv4链路已经恢复稳定,终端设备在设定时长内的数据流量小于等于第二阈值,说明终端设备当前的业务处于闲置的状态,此时,第一路由设备再去断开IPv4in IPv6隧道,将DS-lite切换到IPv4-IPv6双栈,可避免切换过程对影响终端设备的业务的影响,有效提高用户体验。再例如,该防抖动机制也可以是设置一定的防抖时间,即第一路由设备可以选择在检测到IPv4链路可用,并且经过设定的防抖时间后,再执行DS-lite到IPv4-IPv6双栈的切换。In a possible implementation, considering the service continuity of the terminal device, the first routing device may set an anti-jitter mechanism for switching from DS-lite to IPv4-IPv6 to avoid switching to IPv4-IPv6 dual After the stack, the IPv4 link is unstable and cannot transmit data normally, and it needs to switch to DS-lite again. For example, the first routing device may choose to detect that an IPv4 link is available, and that the packet-free delay in the IPv4 link is less than or equal to the first threshold (such as 30ms), and the data traffic of the terminal device within the set duration is less than or equal to the first In the case of two thresholds (such as 100 kbps), the data transmission of the terminal device is switched to the IPv4-IPv6 dual stack. Here, the packet-free delay in the IPv4 link is less than or equal to the first threshold, indicating that the IPv4 link has returned to stability, and the data traffic of the terminal device within the set duration is less than or equal to the second threshold, indicating that the current service of the terminal device is in In the idle state, at this time, the first routing device disconnects the IPv4in IPv6 tunnel and switches the DS-lite to IPv4-IPv6 dual stack, which can avoid the impact of the switching process on the services that affect the terminal device and effectively improve the user experience. As another example, the anti-shake mechanism may also be to set a certain anti-shake time, that is, the first routing device may choose to detect that an IPv4 link is available, and after the set anti-shake time, perform DS-lite to IPv4 -IPv6 dual stack switching.
采用本申请实施例中的技术方案,第一路由设备可根据IPv4链路和IPv6链路的可用性,灵活地从IPv4-IPv6双栈和DS-lite中选择可行的数据传输方式为终端设备传输数据,从而充分利用网络资源,提高数据传输的灵活性。Using the technical solution in the embodiments of the present application, the first routing device can flexibly select a feasible data transmission method from IPv4-IPv6 dual stack and DS-lite according to the availability of IPv4 links and IPv6 links to transmit data for the terminal device In order to make full use of network resources and improve the flexibility of data transmission.
进一步地,由于第一路由设备在IPv4链路和IPv6链路的可用性之前,通过获取自身的IPv4地址、IPv6地址等网络配置信息,预先对IPv4-IPv6双栈和DS-lite这两种数据传输方法进行配置,因此,当后续第一路由设备检测到IPv4链路和IPv6链路的可用性发生变化时,第一路由设备可在IPv4-IPv6双栈和DS-lite之间进行自动切换,选择可达的数据传输路径,而不需要修改配置,可有效提高切换效率和通信的灵活性。Further, since the first routing device obtains its own IPv4 address, IPv6 address and other network configuration information before the availability of the IPv4 link and the IPv6 link, the two data transmissions of IPv4-IPv6 dual stack and DS-lite are transmitted in advance The method is configured, so that when the subsequent first routing device detects that the availability of the IPv4 link and the IPv6 link changes, the first routing device can automatically switch between the IPv4-IPv6 dual stack and DS-lite. The data transmission path can be reached without modifying the configuration, which can effectively improve the switching efficiency and the flexibility of communication.
基于相同的发明构思,本申请实施例还提供一种路由设备,用于执行上述方法实施例中的方法流程。图6为本申请实施例提供的路由设备的结构示意图,如图6所示,该路由设备包括:处理模块610和通信模块620。Based on the same inventive concept, an embodiment of the present application further provides a routing device, which is used to execute the method flow in the foregoing method embodiment. FIG. 6 is a schematic structural diagram of a routing device provided by an embodiment of the present application. As shown in FIG. 6, the routing device includes: a processing module 610 and a communication module 620.
处理模块610,用于检测IPv4链路和IPv6链路是否可用,并在IPv4链路和IPv6链路均可用时,采用配置的IPv4-IPv6双栈方式通过通信模块620为终端设备传输数据,在IPv4链路不可用但IPv6链路可用时,采用配置的DS-lite方式通过通信模块620为终端设备传输数据;通信模块620,用于为终端设备传输数据。应理解,本发明实施例中的处理模块610可以由处理器或处理器相关电路组件实现,通信模块620可以由收发器或收发器相关电路组件实现。The processing module 610 is used to detect whether the IPv4 link and the IPv6 link are available, and when both the IPv4 link and the IPv6 link are available, the configured IPv4-IPv6 dual-stack mode is used to transmit data to the terminal device through the communication module 620. When the IPv4 link is unavailable but the IPv6 link is available, the configured DS-lite mode is used to transmit data for the terminal device through the communication module 620; the communication module 620 is used for transmitting data for the terminal device. It should be understood that the processing module 610 in this embodiment of the present invention may be implemented by a processor or a processor-related circuit component, and the communication module 620 may be implemented by a transceiver or a transceiver-related circuit component.
图7为本申请实施例中提供的路由设备的另一结构示意图,如图7所示,该路由设备700包括处理器710,存储器720、和通信接口730。可选地,该路由设备700还包括输入设备740、输出设备750和总线760。其中,处理器710、存储器720、通信接口730以及输入设备740、输出设备760通过总线750相互连接。存储器720中存储指令或程序,处理器710用于执行存储器720中存储的指令或程序。存储器720中存储的指令或程序被执行时,该处理器710用于执行上述方法实施例中处理模块610执行的操作,通信接口730用于执行上述实施例中通信模块620执行的操作。FIG. 7 is another schematic structural diagram of a routing device provided in an embodiment of the present application. As shown in FIG. 7, the routing device 700 includes a processor 710, a memory 720, and a communication interface 730. Optionally, the routing device 700 further includes an input device 740, an output device 750, and a bus 760. The processor 710, the memory 720, the communication interface 730, the input device 740, and the output device 760 are connected to each other through a bus 750. The memory 720 stores instructions or programs, and the processor 710 is used to execute the instructions or programs stored in the memory 720. When the instruction or program stored in the memory 720 is executed, the processor 710 is used to perform the operation performed by the processing module 610 in the foregoing method embodiment, and the communication interface 730 is used to perform the operation performed by the communication module 620 in the foregoing embodiment.
需要说明的是,本申请实施例提供的路由设备600或700可对应于本发明实施例提供的数据传输方法S401至S402中的第一路由设备,并且路由设备600或700中的各个模块的操作和/或功能分别为了实现图4至图5中所示方法的相应流程,为了简洁,在此不再赘述。It should be noted that the routing device 600 or 700 provided in this embodiment of the present application may correspond to the first routing device in the data transmission methods S401 to S402 provided in this embodiment of the present invention, and the operations of each module in the routing device 600 or 700 And/or functions are respectively for implementing the corresponding processes of the methods shown in FIG. 4 to FIG. 5, and for the sake of brevity, they are not repeated here.
应理解,本申请实施例中提及的处理器可以是中央处理单元(central processing unit,CPU),还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that the processor mentioned in the embodiments of the present application may be a central processing unit (central processing unit, CPU), and may also be other general-purpose processors, digital signal processors (DSPs), and application specific integrated circuits ( application, specific integrated circuit (ASIC), ready-made programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
还应理解,本申请实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、 同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electronically Erase programmable EPROM (EEPROM) or flash memory. The volatile memory may be a random access memory (random access memory, RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM) ) And direct memory bus random access memory (direct RAMbus RAM, DR RAM).
需要说明的是,当处理器为通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件时,存储器(存储模块)集成在处理器中。It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) is integrated in the processor.
应注意,本文描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It should be noted that the memories described herein are intended to include, but are not limited to these and any other suitable types of memories.
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。It should be understood that, in various embodiments of the present application, the size of the sequence numbers of the above processes does not mean that the execution order is sequential, and the execution order of each process should be determined by its function and inherent logic, and should not correspond to the embodiments of the present invention. The implementation process constitutes no limitation.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Persons of ordinary skill in the art may realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application of the technical solution and design constraints. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and conciseness of the description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical, or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application essentially or part of the contribution to the existing technology or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。The above is only the specific implementation of this application, but the scope of protection of this application is not limited to this, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in this application. It should be covered by the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

  1. 一种数据传输方法,其特征在于,包括:A data transmission method, characterized in that it includes:
    第一路由设备检测IPv4链路和IPv6链路是否可用,所述第一路由设备为支持IPv4和IPv6协议栈且位于轻量级双栈DS-lite的IPv4in IPv6隧道一端的路由设备;The first routing device detects whether an IPv4 link and an IPv6 link are available. The first routing device is a routing device that supports IPv4 and IPv6 protocol stacks and is located at one end of a lightweight dual-stack DS-lite IPv4 in IPv6 tunnel;
    所述第一路由设备在所述IPv4链路和所述IPv6链路均可用时,采用配置的IPv4-IPv6双栈方式为终端设备传输数据,在所述IPv4链路不可用但所述IPv6链路可用时,采用配置的所述DS-lite方式为所述终端设备传输数据。When the IPv4 link and the IPv6 link are both available, the first routing device uses the configured IPv4-IPv6 dual-stack method to transmit data for the terminal device, when the IPv4 link is unavailable but the IPv6 chain When the road is available, the configured DS-lite method is used to transmit data for the terminal device.
  2. 根据权利要求1所述的方法,其特征在于,所述路由设备检测IPv4链路和IPv6链路是否可用之前,所述方法还包括:The method according to claim 1, wherein before the routing device detects whether an IPv4 link and an IPv6 link are available, the method further comprises:
    所述第一路由设备获取自身的IPv4地址、IPv6地址和第二路由设备的IPv6地址,所述第二路由设备为位于所述DS-lite的IPv4-in-IPv6隧道对端的路由设备;The first routing device obtains its own IPv4 address, IPv6 address, and IPv6 address of a second routing device, and the second routing device is a routing device located at the opposite end of the IPv4-in-IPv6 tunnel of the DS-lite;
    所述第一路由设备根据所述IPv4地址、所述IPv6地址和所述第二路由设备的IP地址,配置所述IPv4-IPv6双栈方式和所述DS-lite方式。The first routing device configures the IPv4-IPv6 dual stack mode and the DS-lite mode according to the IPv4 address, the IPv6 address, and the IP address of the second routing device.
  3. 根据权利要求2所述的方法,其特征在于,所述第一路由设备检测IPv4链路和IPv6链路是否可用,包括:The method according to claim 2, wherein the first routing device detects whether an IPv4 link and an IPv6 link are available, including:
    所述第一路由设备使用所述IPv4链路向第一设定域名对应的第一服务器发送第一检测报文,若接收到所述第一服务器返回的第一响应报文,则确定所述IPv4链路可用,否则不可用;The first routing device uses the IPv4 link to send a first detection message to the first server corresponding to the first set domain name, and if the first response message returned by the first server is received, it is determined that the IPv4 link is available, otherwise it is not available;
    所述第一路由设备使用所述IPv6链路向所述第二路由设备或者第二设定域名对应的第二服务器发送第二检测报文,若接收到所述第二路由设备或者所述第二服务器返回的第二响应报文,则确定所述IPv6链路可用,否则不可用。The first routing device uses the IPv6 link to send a second detection message to the second routing device or the second server corresponding to the second set domain name, if the second routing device or the first The second response message returned by the second server determines that the IPv6 link is available, otherwise it is not available.
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,若所述第一路由设备采用配置的DS-lite方式为所述终端设备传输数据,所述方法还包括:The method according to any one of claims 1 to 3, wherein if the first routing device uses the configured DS-lite method to transmit data for the terminal device, the method further includes:
    所述第一路由设备在检测到IPv4链路可用,且所述IPv4链路中的无丢包时延小于等于第一阈值、所述终端设备在设定时长内的数据流量小于等于第二阈值时,切换到配置的所述IPv4-IPv6双栈网络为所述终端设备传输数据。The first routing device detects that an IPv4 link is available, and the packet-free delay in the IPv4 link is less than or equal to a first threshold, and the data traffic of the terminal device within a set duration is less than or equal to a second threshold At that time, switch to the configured IPv4-IPv6 dual-stack network to transmit data for the terminal device.
  5. 一种路由设备,其特征在于,所述路由设备包括:A routing device, characterized in that the routing device includes:
    处理模块,用于检测IPv4链路和IPv6链路是否可用,所述第一路由设备为支持IPv4和IPv6协议栈且位于轻量级双栈DS-lite网络中IPv4-in-IPv6隧道一端的路由设备;A processing module for detecting whether an IPv4 link and an IPv6 link are available. The first routing device is a route that supports IPv4 and IPv6 protocol stacks and is located at one end of an IPv4-in-IPv6 tunnel in a lightweight dual-stack DS-lite network equipment;
    通信模块,用于在所述处理模块检测到所述IPv4链路和所述IPv6链路均可用时,采用配置的IPv4-IPv6双栈方式为终端设备传输数据,以及在所述处理模块检测到所述IPv4链路不可用且所述IPv6链路可用时,采用配置的所述DS-lite方式为所述终端设备传输数据。The communication module is configured to transmit data for the terminal device by using the configured IPv4-IPv6 dual stack method when the processing module detects that both the IPv4 link and the IPv6 link are available, and the processing module detects When the IPv4 link is unavailable and the IPv6 link is available, the configured DS-lite mode is used to transmit data for the terminal device.
  6. 根据权利要求5所述的路由设备,其特征在于,所述通信模块还用于:The routing device according to claim 5, wherein the communication module is further configured to:
    获取自身的IPv4地址、IPv6地址和第二路由设备的IP地址,所述第二路由设备为位于所述DS-lite的IPv4-in-IPv6隧道对端的路由设备;Acquiring its own IPv4 address, IPv6 address, and IP address of a second routing device, where the second routing device is a routing device located at the opposite end of the IPv4-in-IPv6 tunnel of the DS-lite;
    所述处理模块还用于:The processing module is also used to:
    根据所述IPv4地址、所述IPv6地址和所述第二路由设备的IP地址,配置所述IPv4-IPv6双栈方式和所述DS-lite方式。Configure the IPv4-IPv6 dual stack mode and the DS-lite mode according to the IPv4 address, the IPv6 address, and the IP address of the second routing device.
  7. 根据权利要求6所述的路由设备,其特征在于,所述处理模块具体用于:The routing device according to claim 6, wherein the processing module is specifically configured to:
    使用所述IPv4链路通过所述通信模块向第一设定域名对应的第一服务器发送第一检测报文,若所述通信模块接收到所述第一服务器返回的第一响应报文,则确定所述IPv4链路可用,否则不可用;Send the first detection message to the first server corresponding to the first set domain name through the communication module using the IPv4 link, and if the communication module receives the first response message returned by the first server, Determine that the IPv4 link is available, otherwise it is not available;
    使用所述IPv6链路通过所述通信模块向所述第二路由设备或者第二设定域名对应的第二服务器发送第二检测报文,若所述通信模块接收到所述第二路由设备或者所述第二服务器返回的第二响应报文,则确定所述IPv6链路可用,否则不可用。Use the IPv6 link to send a second detection message to the second routing device or the second server corresponding to the second set domain name through the communication module, if the communication module receives the second routing device or The second response message returned by the second server determines that the IPv6 link is available, otherwise it is not available.
  8. 根据权利要求5至7中任一项所述的路由设备,其特征在于,若所述第一路由设备采用配置的DS-lite方式为所述终端设备传输数据,所述处理模块还用于:The routing device according to any one of claims 5 to 7, wherein if the first routing device uses the configured DS-lite method to transmit data for the terminal device, the processing module is further used to:
    在检测到IPv4链路可用,且所述IPv4链路中的无丢包时延小于等于第一阈值、所述终端设备在设定时长内的数据流量小于等于第二阈值时,切换到配置的所述IPv4-IPv6双栈方式为所述终端设备传输数据。When it is detected that the IPv4 link is available, and the packet-free delay in the IPv4 link is less than or equal to the first threshold, and the data traffic of the terminal device within the set duration is less than or equal to the second threshold, switch to the configured The IPv4-IPv6 dual stack mode transmits data for the terminal device.
  9. 一种路由设备,其特征在于,包括至少一个处理器,所述至少一个处理器与至少一个存储器耦合;A routing device, characterized in that it includes at least one processor, and the at least one processor is coupled to at least one memory;
    所述至少一个处理器,用于执行所述至少一个存储器中存储的计算机程序或指令,以使得所述路由设备执行如权利要求1至4中任一项所述的方法。The at least one processor is configured to execute a computer program or instructions stored in the at least one memory, so that the routing device executes the method according to any one of claims 1 to 4.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序或指令,当计算机读取并执行所述计算机程序或指令时,使得计算机执行如权利要求1至4中任一项所述的方法。A computer-readable storage medium, characterized in that a computer program or instruction is stored in the computer-readable storage medium, and when the computer reads and executes the computer program or instruction, the computer is executed as claimed in claims 1 to 4. The method as described in any one.
PCT/CN2018/124028 2018-12-26 2018-12-26 Data transmission method and routing device WO2020132982A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/124028 WO2020132982A1 (en) 2018-12-26 2018-12-26 Data transmission method and routing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/124028 WO2020132982A1 (en) 2018-12-26 2018-12-26 Data transmission method and routing device

Publications (1)

Publication Number Publication Date
WO2020132982A1 true WO2020132982A1 (en) 2020-07-02

Family

ID=71128428

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/124028 WO2020132982A1 (en) 2018-12-26 2018-12-26 Data transmission method and routing device

Country Status (1)

Country Link
WO (1) WO2020132982A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113572865A (en) * 2021-07-22 2021-10-29 中国建设银行股份有限公司 Dual-stack flow switching method, device, storage medium and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102387221A (en) * 2010-09-06 2012-03-21 成都市华为赛门铁克科技有限公司 Data forwarding method and system
CN102938736A (en) * 2012-11-20 2013-02-20 杭州迪普科技有限公司 Method and device for realizing IPv6 (Internet Protocol Version 6) network traversing of IPv4 message
US20130103853A1 (en) * 2011-07-29 2013-04-25 3Crowd Technologies, Inc. Directing clients based on communication format

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102387221A (en) * 2010-09-06 2012-03-21 成都市华为赛门铁克科技有限公司 Data forwarding method and system
US20130103853A1 (en) * 2011-07-29 2013-04-25 3Crowd Technologies, Inc. Directing clients based on communication format
CN102938736A (en) * 2012-11-20 2013-02-20 杭州迪普科技有限公司 Method and device for realizing IPv6 (Internet Protocol Version 6) network traversing of IPv4 message

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113572865A (en) * 2021-07-22 2021-10-29 中国建设银行股份有限公司 Dual-stack flow switching method, device, storage medium and equipment
CN113572865B (en) * 2021-07-22 2022-12-13 中国建设银行股份有限公司 Dual-stack flow switching method, device, storage medium and equipment

Similar Documents

Publication Publication Date Title
WO2018166233A1 (en) Routing processing method, device and system
US9781234B2 (en) Electronic device, network relay device, and non-transitory computer readable storage medium
US7583667B2 (en) Automatic determination of connectivity problem locations or other network-characterizing information in a network utilizing an encapsulation protocol
US20110246663A1 (en) Broadband network access
US20130205035A1 (en) Method and device for network communications
US9781034B2 (en) Electronic device, network relay device, and non-transitory computer readable storage medium
WO2010139194A1 (en) Method and device of host with ipv4 application for performing communication
KR20110060895A (en) A method and a gateway for providing multiple internet access
WO2019080592A1 (en) Method and device for sending messages
CN112654049B (en) Method, system, node and medium for configuring a wireless communication coverage extension system
CN111224854B (en) Working mode selection method, client front-end equipment and storage medium
US8295289B2 (en) Method and system for simultaneous local and EPC connectivity
WO2020135381A1 (en) Packet processing method, device, and system
EP3883203A1 (en) Ipv6 address configuration method and router device
WO2012136006A1 (en) Routing method and device for host in multi-homing site
US10637825B2 (en) Router and method for connecting an IPv4 network and an IPv6 network
WO2020132982A1 (en) Data transmission method and routing device
DK1817892T3 (en) PROCEDURE AND SYSTEM TO OPEN A NETWORK LINK
WO2015139397A1 (en) Nat64 resource acquisition method and acquisition/distribution apparatus
WO2016078235A1 (en) Network translation realization method and apparatus for transiting to ipv6 on the basis of pant
US20220294728A1 (en) Packet Transmission Path Switching Method, Device, and System
US20230171226A1 (en) Method for configuring a communication network and node implementing said configuration method
US20170264454A1 (en) Method and apparatus for routing data to cellular network
CN107547376B (en) Route detection method and device
KR101362290B1 (en) System and method for wireless internet access

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18944458

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18944458

Country of ref document: EP

Kind code of ref document: A1