WO2020107871A1 - 一种工作模式的选择方法、客户端前端设备及存储介质 - Google Patents

一种工作模式的选择方法、客户端前端设备及存储介质 Download PDF

Info

Publication number
WO2020107871A1
WO2020107871A1 PCT/CN2019/091787 CN2019091787W WO2020107871A1 WO 2020107871 A1 WO2020107871 A1 WO 2020107871A1 CN 2019091787 W CN2019091787 W CN 2019091787W WO 2020107871 A1 WO2020107871 A1 WO 2020107871A1
Authority
WO
WIPO (PCT)
Prior art keywords
cpe
mode
ipv6
message
tunnel
Prior art date
Application number
PCT/CN2019/091787
Other languages
English (en)
French (fr)
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 华为技术有限公司
Publication of WO2020107871A1 publication Critical patent/WO2020107871A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]

Definitions

  • the present application relates to the field of communication technology, and in particular, to a method for selecting a working mode, a client front-end device, and a storage medium.
  • IP network protocol
  • CPE customer premise equipment
  • Embodiments of the present application provide a method for selecting a working mode, a client front-end device, and a storage medium, which are used to enable the CPE to communicate with both IPv4 devices and IPv6 devices, which helps to increase the flexibility of communication.
  • this application provides a method for selecting a working mode, which can be applied to a CPE that supports the dual stack mode and the Internet Protocol version 6 rapid deployment (IPv6 deployment, 6RD) tunnel mode.
  • the dual stack mode refers to IPv4
  • the 6RD tunnel mode refers to the communication mode for rapid IPv6 deployment on the IPv4 infrastructure; the method includes the CPE determining that the upper layer network is currently enabled for IPv6, and selecting the dual stack mode from the dual stack mode and the 6RD tunnel mode When the CPE determines that the 6RD tunnel mode is currently opened in the upper layer network, the 6RD tunnel mode is selected from the dual stack mode and the 6RD tunnel mode, and the CPE works in the selected mode.
  • CPE can communicate with both IPv4 devices and IPv6 devices through dual-stack mode or 6RD tunnel mode.
  • CPE can realize the transition from IPv4 to IPv6 through dual-stack mode or 6RD tunnel mode.
  • the CPE can flexibly select a mode from the supported dual stack mode and 6RD tunnel mode, and work in the selected mode, thereby helping to increase the flexibility of communication.
  • the CPE can obtain configuration information from a dynamic host configuration protocol (DHCP) server; according to the configuration information, it sends a probe message to the corresponding device in the upper layer network, and from the corresponding layer in the upper layer network. After receiving the response message for the probe message, the device determines that the upper-layer network is currently in IPv6 or 6RD tunnel mode. The probe message is used to detect whether the upper-layer network is currently in IPv6 or 6RD tunnel mode.
  • DHCP dynamic host configuration protocol
  • the following implementation method 1 provides the process for the CPE to determine that the upper-layer network is currently enabled for IPv6, and implementation method 2 provides the process for the CPE to determine that the upper-layer network is currently open for 6RD tunnel mode.
  • the CPE may first determine whether the upper layer network is currently opened for IPv6, or may first determine whether the 6RD tunnel mode is currently opened, or both may be determined together.
  • the CPE obtains the first configuration information from the DHCP server, and then the CPE sends the first probe message to the first device. If the CPE receives the first response to the first probe message within the first preset duration, it determines that the upper-layer network is currently Enable IPv6, where the first configuration information includes the CPE IPv6 public network address, the first probe message is used to detect whether the upper-layer network is currently enabled for IPv6, and the source address of the first probe message includes the CPE IPv6 public network address, the first The destination address of the detection message is the network protocol (IP) address of the first device, and the first device is a device that supports the IPv6 protocol in the upper layer network.
  • IP network protocol
  • the first configuration information includes the CPE's IPv6 public network address.
  • the CPE can be allowed to quickly and dynamically obtain its own IP address instead of statically specifying each CPE IP addresses, thus, can achieve a reasonable allocation of IP addresses, helping to improve the utilization rate of IP addresses.
  • the CPE can directly obtain the first configuration information from the DHCP server, and the network administrator is not required to set the configuration information one by one in the CPE, which helps reduce the workload of the network administrator for setting the configuration information on the CPE.
  • the first detection message may be the Internet Control Information Protocol version 6 (internet control management protocol version 6, ICMPv6) request to send back the message; or, the neighbor discovery (neighbor discovery, ND) protocol Probe messages; or, messages based on hypertext transfer protocol (HTTP)/HTTPS protocol.
  • Internet Control Information Protocol version 6 Internet control management protocol version 6, ICMPv6
  • ICMPv6 Internet control management protocol version 6, ICMPv6
  • ND neighbor discovery protocol Probe messages
  • HTTP hypertext transfer protocol
  • HTTP hypertext transfer protocol
  • the CPE obtains the second configuration information from the DHCP server.
  • the CPE sends a second probe message to the device at the opposite end of the 6RD tunnel. If the CPE receives the second response message for the second probe message within the second preset duration, it is determined
  • the 6RD tunnel is currently opened by the upper layer network.
  • the second configuration information includes the IPv4 public network address of the CPE and the address of the device at the opposite end of the 6RD tunnel.
  • the second probe message is used to detect whether the 6RD tunnel mode is currently opened by the upper layer network.
  • the source address includes the IPv4 public network address of the CPE, and the destination address of the second detection packet includes the address of the device at the opposite end of the 6RD tunnel.
  • the CPE can be automatically assigned second configuration information, which includes the CPE's IPv4 public network address and the address of the device at the opposite end of the 6RD tunnel.
  • second configuration information includes the CPE's IPv4 public network address and the address of the device at the opposite end of the 6RD tunnel.
  • the CPE can directly obtain the address of the device at the opposite end of the 6RD tunnel from the second configuration information, so that the CPE and the device at the opposite end of the tunnel can establish the 6RD tunnel.
  • the CPE can directly obtain the second configuration information from the DHCP server, and the network administrator is not required to set the configuration information one by one in the CPE, which helps reduce the workload of the network administrator to set the configuration information on the CPE.
  • the second probe message may be an ICMPv4 request return message; or, an address resolution protocol (address resolution protocol) that queries the media access control (MAC) address of the device at the opposite end of the tunnel , ARP) message.
  • address resolution protocol address resolution protocol
  • an embodiment of the present application provides a CPE.
  • the CPE includes a processor and a communication interface.
  • a memory is also included.
  • the memory is used to store instructions; the processor is used to execute the instructions stored in the memory and control the transceiver to receive and send signals.
  • the processor executes the instructions stored in the memory, the CPE is used to execute the first Aspect or any method of the first aspect.
  • an embodiment of the present application provides a CPE for implementing the first aspect or any one of the methods in the first aspect, including corresponding function modules, which are respectively used to implement the steps in the above method.
  • the function can be realized by hardware, and can also be realized by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the structure of the network device includes a processing unit and a transceiver unit, and these units can perform corresponding functions in the foregoing method examples. For details, refer to the detailed description in the method examples, and details are not described here.
  • an embodiment of the present application provides a computer storage medium, in which instructions are stored in a computer storage medium, which when run on a computer, causes the computer to execute the method in the first aspect or any possible implementation manner of the first aspect .
  • an embodiment of the present application provides a computer program product containing instructions that, when run on a computer, enable the computer to execute the method in the first aspect or any possible implementation manner of the first aspect.
  • FIG. 1a is a schematic diagram of a communication system architecture provided by this application.
  • FIG. 1b is a schematic diagram of a system architecture of an optical access network provided by this application.
  • FIG. 2 is a schematic flow chart of a method for adaptively selecting a working mode in a multi-network environment provided by this application;
  • 3a is a schematic flowchart of a method provided by the present application for determining a mode that can be used by a CPE, including a dual-stack mode;
  • Figure 3b is a format of an IPv6 message encapsulated with an ICMPv6 message provided by this application;
  • FIG. 4 is a schematic flowchart of a method provided by a CPE to determine a mode that can be used, including a 6RD tunnel mode;
  • FIG. 5 is a schematic flowchart of a method for a CPE to work in a dual-stack mode provided by this application;
  • FIG. 6 is a schematic flowchart of a method for a CPE to work in a 6RD tunnel mode provided by this application;
  • FIG. 7 is a schematic structural diagram of a client front-end device provided by this application.
  • FIG. 8 is a schematic structural diagram of a client front-end device provided by this application.
  • FIG. 1a exemplarily shows a schematic structural diagram of a communication system provided by an embodiment of the present application.
  • the communication system includes CPE 101 and gateway 102. Further, the communication system may further include a DHCP server 103, user equipment 104, and one device 105 in the upper-layer network. In FIG. 1a, an example is described in which two user equipments 104 are included.
  • the CPE 101 may be configured with a local area network (LAN) port connected to the user equipment 104, or may be configured with a wide area network (WAN) port connected to the gateway 102.
  • the CPE 101 and the user equipment 104 can communicate through a LAN port and the gateway 102 through a WAN port.
  • the CPE 101 receives a message from the user equipment 104 through the LAN port, and passes the IP address of the user equipment (that is, the intranet IP address) in the message through the network
  • the address translation (NAT) table is converted to the IP address of the WAN port corresponding to the CPE.
  • the IP address of the converted WAN port is the source IP address of the message, and the message is sent to the upper layer through the gateway 102 A device in the network (for example, it can be sent to the device 105 in the figure).
  • the device in the upper-layer network processes the message and parses out the IP address of the WAN port, and then sends a response message corresponding to the message to CPE101.
  • the destination address of the response message is the above The IP address of the WAN port.
  • CPE101 converts the destination address in the response message into the intranet IP through the NAT table. In this way, CPE completes the sending and receiving of the message.
  • CPE 101 can be used to centrally manage user equipment.
  • the user device 104 may be configured with an IP address.
  • the CPE 101 may obtain network (IPv4 network or IPv6 network) configuration information from the DHCP server 103. Then CPE 101 configures IP address for user equipment 104 according to the network configuration information. It can also be understood that the CPE 101 can dynamically acquire network configuration information from the DHCP server 103 through DHCP to implement centralized management of the user equipment 104.
  • IPv6 network configuration information such as the IPv6 prefix and the length of the IPv6 prefix (64 bits)
  • CPE 101 may configure an IPv6 address for user equipment 104 according to the IPv6 prefix.
  • Each user equipment 104 may generate a respective IPv6 address using a random algorithm according to the 64-bit IPv6 prefix.
  • the DHCP server 103 is used to manage and distribute network configuration information.
  • CPE101 is dynamically assigned an IP address.
  • the CPE 101 sends a request for obtaining IPv6 configuration information to the DHCP server 103 in the IPv4 network.
  • the DHCP server 103 sends a response to the request to the CPE 101 according to the policy.
  • the response includes the IPv6 prefix and the length of the IPv6 prefix.
  • ISP network service provider
  • the gateway 102 is a device on the edge layer of the backbone network. As shown in Figure 1a, the backbone network may refer to an upper layer IPv4 network or an IPv6 network.
  • the gateway 102 is also configured with an IPv6 user port and an IPv4 user port.
  • the IPv6 user port of the gateway 102 can be used to communicate with the IPv6 WAN port of the CPE 101, and the IPv6 user port of the gateway 102 can be used to communicate with the IPv4 WAN port of the CPE 101.
  • the gateway 102 may be a broadband remote access server (broadband remote access server, BRAS), an edge router (border router, BR), or an ISP deployed as a centralized access point for an IPv6 network.
  • BRAS broadband remote access server
  • BR border router
  • ISP deployed as a centralized access point for an IPv6 network.
  • the user equipment 104 may be a mobile phone, a tablet computer, or some other household equipment.
  • the user equipment 104 may send an IPv4 message to the CPE 101 or an IPv6 message.
  • the upper layer network refers to the upper layer network of the CPE 101.
  • the upper layer network may be an IPv6 network or an IPv4 network. If the upper layer network is an IPv6 network, the device 105 in the upper layer network is a device that supports the IPv6 protocol stack. If the upper layer network is an IPv4 network, the devices in the upper layer network (not shown in the figure) are devices that support the IPv4 protocol stack.
  • the communication system shown in FIG. 1a may be a communication system of an optical access network, and the optical access network is an access network using light as a transmission medium.
  • FIG. 1b it is a system architecture diagram of an optical access network provided by the present application.
  • the optical access network includes an optical network terminal 101a and a BRAS 102a.
  • the optical network terminal in FIG. 1b may be an example of the CPE 101 in FIG. 1a described above, and BRAS 102a is an example of the gateway 102 in FIG. 1a described above.
  • the optical network terminal 101a may be an optical network terminal (ONT) or an optical network unit (ONU).
  • the optical network terminal 101a is a user-end device in an optical access network, and is usually placed on the user-end and can manage the user equipment.
  • ONT is usually used in conjunction with an optical line terminal (optical line terminal, OLT) (not shown in FIG. 1b), which can receive data sent by the OLT and can also respond to the management naming issued by the OLT.
  • OLT optical line terminal
  • the OLT is the core component of the optical access network and can be connected to the ONT at the front end to convert the received signal into an optical signal.
  • BRAS 102a located at the edge of the backbone network, can provide broadband access services and realize the convergence and forwarding of multiple services.
  • the optical network terminal 101a After the optical network terminal 101a receives the IPv6 message, there are two possible transmission modes according to the actual situation of the upper layer network. One way is to transmit through the 6RD tunnel technology established between the optical network terminal 101a and the BRAS 102a, and the other way is that the optical network terminal 101a directly transmits the IPv6 message to the BRAS 102a.
  • the dual-stack mode refers to the simultaneous start of the IPv4 protocol stack and the IPv6 protocol stack on one device. It can also be understood that this device can communicate with both IPv4 devices and IPv6 devices. When this device is CPE101 in Figure 1a, you can configure IPv4 addresses and IPv6 addresses on different ports configured on CPE101, or it can be understood that IPv4 ports and IPv6 ports are configured on CPE101, and the CPE101 With the ability to handle both protocol stacks simultaneously. Dual-stack mode can provide full compatibility with IPv4 networks and IPv6 networks.
  • the 6RD tunnel mode is a kind of tunnel mode, in which the tunnel mode refers to a technique of encapsulating one protocol into another protocol for transparent transmission.
  • the ISP may deploy a gateway 102 at the edge layer of the network, and a 6RD tunnel may be established between the CPE 101 and the gateway 102.
  • the user equipment 104 is an IPv6 device
  • the IPv6 packet sent by the IPv6 device to the CPE 101 can pass through the 6RD tunnel to reach the gateway 102 without being upgraded to the IPv6 network device in the network.
  • the 6RD tunnel mode is to encapsulate IPv6 packets into IPv4 packets, and the source and destination addresses of the IPv4 packets are the tunnel entry (CPE101) and tunnel exit IPv4 addresses (gateway 102), respectively. In this way, large-scale upgrades of various devices in the network by the ISP can be avoided.
  • FIG. 2 exemplarily shows a schematic flowchart of a method for selecting a working mode provided by the present application.
  • the CPE may be the CPE101 in FIG. 1a described above, or may be the optical network terminal 101a in FIG. 1b described above.
  • the method includes the following steps:
  • Step 201 when the CPE determines that the upper layer network is currently enabled with IPv6, it selects the dual stack mode from the dual stack mode and the 6RD tunnel mode; when the CPE determines that the upper layer network is currently enabled with the 6RD tunnel mode, it selects the 6RD tunnel mode from the dual stack mode and 6RD tunnel mode .
  • CPE supports two working modes, namely dual stack mode and 6RD tunnel mode.
  • which working mode the CPE can currently use is related to the environment where the upper layer network is currently opened.
  • CPE may or may not be currently available. For example, if the upper-layer network is currently enabled with IPv6, the CPE can currently use the dual-stack mode; if the upper-layer network is not enabled with IPv6, the CPE cannot currently use the dual-stack mode.
  • CPE may or may not be currently available. For example, if the upper-layer network currently opens a 6RD tunnel, the CPE can currently use the 6RD tunnel mode; if the upper-layer network does not open the 6RD tunnel, the CPE cannot currently use the 6RD tunnel mode.
  • Step 202 the CPE works in the selected mode.
  • the CPE works in the dual-stack mode. If the working mode selected by the CPE is the 6RD tunnel mode, the CPE is in the 6RD tunnel mode.
  • CPE can communicate with both IPv4 devices and IPv6 devices through dual stack mode or 6RD tunnel mode.
  • CPE can use dual stack mode or 6RD tunnel mode Realize the transition from IPv4 to IPv6.
  • the CPE can flexibly select a mode from the supported dual stack mode and 6RD tunnel mode, and work in the selected mode, thereby helping to increase the flexibility of communication.
  • a method provided by the present application to determine whether the upper-layer network is currently enabled with IPv6 or the current 6RD tunnel mode is specifically as follows: the CPE obtains configuration information from the DHCP server of the dynamic host configuration protocol, and sends the configuration information to the upper-layer network according to the configuration information The corresponding device sends a probe message. If a response message for the probe message is received from the corresponding device in the upper-layer network, it is determined that the upper-layer network is currently in IPv6 or 6RD tunnel mode. The probe message is used to detect the upper-layer network. Whether IPv6 is currently enabled or whether 6RD tunnel mode is enabled.
  • the following describes the process of CPE determining that the upper layer network is currently open for IPv6 and the process for determining the upper layer network is currently open for 6RD tunnel mode.
  • FIG. 3a exemplarily shows a schematic flowchart of a method for a CPE to determine that the upper-layer network is currently enabled with IPv6.
  • the CPE may be the CPE 101 in FIG. 1a described above, or may be the optical network terminal 101a in FIG. 1b described above.
  • the method includes the following steps:
  • Step 301 the CPE obtains the first configuration information from the DHCP server.
  • the first configuration information includes the IPv6 public network address of the CPE.
  • the CPE periodically obtains the first configuration information from the DHCP server, so that the CPE can timely determine the provisioning environment of the upper layer network.
  • CPE 101 can perform IPv6 dialing to DHCP server 103, that is, CPE 101 dynamically requests network configuration information from DHCP server 103, and DHCP server 103 sends a response packet for IPv6 dialing to CPE 101, and the response packet carries the first configuration. information.
  • the response message may be a DHCP message, and the DHCP message includes the IPv6 public network address allocated by the DHCP server 103 to the CPE. Further, the DHCP message also includes the IPv6 prefix and the length of the IPv6 prefix. The length of the IPv6 prefix and the IPv6 prefix is used to enable the CPE to allocate an IPv6 address to the user equipment according to the IPv6 prefix.
  • the first configuration information can be automatically assigned to the CPE.
  • the first configuration information includes the CPE's IPv6 public network address.
  • the CPE can be allowed to quickly and dynamically obtain its own IP address instead of statically specifying each CPE IP addresses, thus, can achieve a reasonable allocation of IP addresses, helping to improve the utilization rate of IP addresses.
  • the CPE can directly obtain the first configuration information from the DHCP server, and the network administrator is not required to set the configuration information one by one in the CPE, which helps reduce the workload of the network administrator for setting the configuration information on the CPE.
  • Step 302 the CPE sends a first probe message to the first device.
  • the first probe message is used to detect whether the upper-layer network is currently enabled for IPv6.
  • the source address of the first probe message includes the IPv6 public network address of the CPE, and the destination address of the first probe message is the IP address of the first device.
  • a probe message may be: an ICMPv6 request echo message, or an ND probe message, or a message based on the HTTP/HTTPS protocol.
  • the first device is a device supporting IPv6 protocol in the upper layer network.
  • it can be a specific device that supports the IPv6 protocol, it can also be a device that supports the IPv6 protocol corresponding to a well-known domain name, or it can be the next-hop gateway of the IPv6 WAN port of the CPE (gateway 102 in Figure 1a) IPv6 address.
  • This application provides three implementation manners for the CPE to send the first probe message to the first device, which are implementation manner A, implementation manner B, and implementation manner C, respectively.
  • Ping is to send a test packet to a device to see if the other device responds to test whether the network is connected.
  • the Ping command will construct a fixed format ICMPv6 request return message, and then the ICMP protocol will send this request return message together with the IPv6 address of the first device to the IP layer protocol.
  • the IP layer protocol will use the IPv6 address of the first device as the The destination address, the IP address of the CPE is used as the source address, and some control information is added to form an IPv6 message. As shown in FIG. 3b, this is an IPv6 message format encapsulated with ICMPv6 messages.
  • the overall structure of the IPv6 packet is divided into an IPv6 packet header and an IPv6 payload.
  • the IPv6 packet header includes a basic header and an extended header.
  • the basic header is a mandatory packet header with a fixed length of 40B.
  • the basic information of the packet; the extended header is an optional header. There may be 0, 1 or more.
  • the IPv6 protocol implements various rich functions through the extended header; the IPv6 payload includes the ICMPv6 header and ICMPv6 packet body.
  • the ICMPv6 message header and ICMPv6 message body are the upper layer data carried by the IPv6 message.
  • the CPE then sends the IP message to the first device.
  • the first device After the first device receives the IP message, if it is determined that the destination address is the address of the first device, the IP message is parsed, and useful information is extracted to the ICMP protocol. After processing the useful information, the ICMP protocol constructs an ICMP response message and sends To the CPE, that is, the CPE receives a response to the ICMPv6 request echo message.
  • the CPE performs ND detection on the next-hop gateway of the IPv6 WAN port of the CPE.
  • the next hop gateway of the IPv6 WAN port of the CPE is the gateway 102. It can also be understood that the CPE 101 performs ND detection to the gateway 102.
  • Implementation C The CPE sends a packet based on the HTTP/HTTPS protocol to the first device.
  • Step 303 the CPE determines whether the first response message for the first probe message is received within the first preset duration. If it is received, step 304 is performed; if it is not received, step 305 is performed.
  • step 304 it is determined that the upper-layer network is currently enabled with IPv6.
  • the current upper layer network is enabled with IPv6, which indicates that the CPE 101 and the gateway 102 can transmit IPv6 packets.
  • Step 305 the process ends.
  • step 305 may also be performed as shown in step 401 to step 405 in FIG. 4 as follows.
  • FIG. 4 exemplarily shows a schematic flow chart of a method for a CPE to determine a current 6RD tunnel mode opened by an upper layer network.
  • the CPE may be the CPE 101 in FIG. 1a described above, or may be the optical network terminal 101a in FIG. 1b described above.
  • the method includes the following steps:
  • Step 401 the CPE obtains the second configuration information from the DHCP server.
  • the second configuration information includes the IPv4 public network address of the CPE and the address of the device at the opposite end of the 6RD tunnel.
  • the address of the device at the opposite end of the 6RD tunnel in the second configuration information may also be the domain name of the device at the opposite end of the 6RD tunnel, and the address of the device at the opposite end of the 6RD tunnel may be obtained by parsing the domain name.
  • CPE 101 can perform IPv4 dialing to DHCP server 103, that is, CPE 101 dynamically requests network configuration information from DHCP server 103, and DHCP server 103 sends a response packet for IPv4 dialing to CPE 101, and the response packet carries the second configuration. information.
  • the response message may be a DHCP message.
  • the DHCP message includes the fields Ciaddr and the options field (options).
  • the Ciaddr field can identify the IPv4 public network address of the CPE.
  • the options field has a variable length and can be composed of three parts: Type, Length, and Value. The options field can be used to store There are no control information and parameters defined in common protocols.
  • options212 is usually used to indicate the IPv4 address of the device at the opposite end of the 6RD tunnel.
  • the CPE can be automatically assigned second configuration information, which includes the CPE's IPv4 public network address and the address of the device at the opposite end of the 6RD tunnel. This allows the CPE to quickly and dynamically obtain its own IP address, and Instead of statically assigning IP addresses to each CPE, a reasonable allocation of IP addresses can be achieved, helping to increase the utilization rate of IP addresses.
  • the CPE can directly obtain the address of the device at the opposite end of the 6RD tunnel from the second configuration information, so that the CPE and the device at the opposite end of the tunnel can establish the 6RD tunnel. Further, the CPE can directly obtain the second configuration information from the DHCP server, and the network administrator is not required to set the configuration information one by one in the CPE, which helps reduce the workload of the network administrator to set the configuration information on the CPE.
  • Step 402 the CPE sends a second probe message to the device at the opposite end of the 6RD tunnel.
  • the second probe message is used to detect whether the upper layer network is currently in 6RD tunnel mode.
  • the source address of the second probe message includes the IPv4 public network address of the CPE, and the destination address of the second probe message includes the device at the opposite end of the 6RD tunnel. address.
  • the second probe message may be an ICMPv4 request echo message, or an ARP message that queries the MAC address of the device at the opposite end of the tunnel.
  • this application provides two implementation manners for the CPE to send the second probe message to the device at the opposite end of the 6RD tunnel: implementation manner a and implementation manner b.
  • the device at the opposite end of the tunnel may be the gateway 102 in FIG. 1a.
  • the ARP message is used to query the MAC address of the device at the opposite end of the tunnel.
  • This implementation is that when the CPE determines that it is on the same network segment as the device at the opposite end of the tunnel, the CPE broadcasts an ARP message. If the device at the opposite end of the tunnel receives the broadcast ARP message, it can send its own MAC address to the CPE.
  • Step 403 the CPE determines whether the second response to the second probe message is received within the second preset duration. If received, go to step 404; if not received, go to step 405.
  • step 404 the CPE determines that the upper layer network is currently opening a 6RD tunnel.
  • the 6RD tunnel currently opened by the upper layer network may indicate that a 6RD tunnel may be established between the CPE 101 and the gateway 102, so that the CPE 101 transmits IPv6 packets to the gateway 102.
  • Step 405 the process ends or the above steps 301 to 305 in FIG. 3a are executed.
  • the CPE may also send a third probe message to the first device.
  • the third probe message is that the CPE encapsulates the IPv6 message into an IPv4 message. If the CPE receives the third response to the third probe message within the third preset duration, the CPE may also determine that the upper layer network is currently opening a 6RD tunnel.
  • the source address of the third probe message is the IPv4 public network address of the CPE, and the destination address of the third probe message is the IPv4 address of the first device.
  • the third probe message may be an ICMPv6 request return message or may be a message of HTTP/HTTPS protocol.
  • the CPE can assume that the upper-layer network is currently open with a 6RD tunnel, and try to send the third probe message through the 6RD tunnel. If a third response to the third probe message can be received, the assumption is true, that is, the upper layer The 6RD tunnel is currently opened on the network.
  • the CPE may first determine whether the upper layer network is currently turned on for IPv6, or may first determine whether the 6RD tunnel mode is currently turned on, or the two may also be determined together.
  • the CPE may be determined according to a preset order, which may be introduced separately in the following three scenarios.
  • Case 1 CPE first determines whether the upper-layer network is currently enabled with IPv6. If it is determined that the upper-layer network is currently enabled with IPv6, select the dual-stack mode from the dual-stack mode and the 6RD tunnel mode; Whether the 6RD tunnel mode is currently enabled.
  • Case 2 The CPE first determines whether the upper-layer network is currently enabled for 6RD tunnel mode. If it is determined that the upper-layer network is currently enabled for 6RD tunnel mode, select the 6RD tunnel mode from the dual-stack mode and 6RD tunnel mode; Then continue to determine whether the upper-layer network is currently enabled for IPv6.
  • the CPE can determine whether the upper-layer network is currently enabled with IPv6 and whether to enable 6RD tunnel mode. If it is determined that the upper-layer network is currently enabled with IPv6 only, select the dual-stack mode from the dual-stack mode and the 6RD tunnel mode; To enable 6RD tunnel mode, select 6RD tunnel mode from dual stack mode and 6RD tunnel mode; if it is determined that IPv6 and 6RD tunnel modes are currently enabled on the upper layer network, you can select from 6RD tunnel mode and dual stack mode according to the preset selection strategy A pattern.
  • the priority of setting the 6RD tunnel mode is higher than that of the dual stack mode, and when there are many devices supporting the IPv6 protocol stack in the network, the priority of the dual stack mode is set. Higher than 6RD tunnel mode.
  • the CPE may work in the dual stack mode or the 6RD tunnel mode.
  • FIG. 5 it is a schematic flowchart of a method for the CPE to work in the dual stack mode provided by this application.
  • the CPE in this example may be the CPE 101 in FIG. 1a described above, the optical network terminal 101a in FIG. 1b described above, or the CPE in FIG. 3a described above.
  • the method includes the following steps:
  • Step 501 the CPE receives the first message.
  • the CPE 101 may receive a first message from the user equipment 104, and the first message may be a message for the user equipment 104 to access network resources.
  • step 502 the CPE determines whether the first message is an IPv4 message or an IPv6 message. If it is an IPv4 message, go to step 503; if it is an IPv6 message, go to step 504.
  • the CPE splits and detects the first packet, and can determine whether it is an IPv4 packet or an IPv4 packet according to the first field in the header of the first packet, that is, the version number of the first packet IPv6 packets. If the first field of the header of the first packet is 4, that is, the version number of the first packet is 4, the first packet is an IPv4 packet; if the first field of the header of the first packet Is 6, that is, the version number of the first packet is 6, and the first packet is an IPv6 packet.
  • Step 503 the CPE forwards the first message from the IPv4 WAN port.
  • the CPE hands the first packet to the IPv4 protocol stack for processing.
  • Step 504 the CPE forwards the first message from the IPv6 WAN port.
  • the CPE hands the first packet to the IPv6 protocol stack for processing.
  • CPE 101 is configured with an IPv4 WAN port and an IPv6 WAN port. If the first packet is an IPv4 packet, CPE 101 can send the first packet from the IPv4 WAN port to the IPv6 user port of gateway 102. If the first message is an IPv6 message, CPE 101 may send the first message from the IPv6 WAN port to the IPv6 user port of gateway 102.
  • the optical network terminal 101a is configured with IPv4 WAN ports and IPv6 WAN ports. If the first packet is an IPv4 packet, the optical network terminal 101a can send the first packet from the IPv4 WAN port to the IPv4 user port of the BRAS 102a . If the first message is an IPv6 message, the optical network terminal 101a may send the first message from the IPv6 WAN port to the IPv6 user port of the BRAS 102a.
  • FIG. 6 it is a schematic flowchart of a method for a CPE to work in a 6RD tunnel mode provided by this application.
  • the CPE may be the CPE 101 in FIG. 1a described above, the optical network terminal 101a in FIG. 1b described above, or the CPE in FIG. 4 described above.
  • the method includes the following steps:
  • Step 601 the CPE receives the second message.
  • the second message may be the same message as the first message in FIG. 5 above.
  • the CPE 101 may receive a second message from the user equipment 104, and the second message may also be a message that the user equipment 104 accesses a network resource.
  • Step 602 the CPE determines whether the second message is an IPv4 message or an IPv6 message. If it is an IPv4 message, step 603 is performed; if it is an IPv6 message, step 604 is performed.
  • the second packet is an IPv4 packet or an IPv6 packet
  • Step 603 the CPE forwards the second message from the IPv4 WAN port.
  • the CPE 101 may send a second message from the IPv4 WAN port of the CPE to the IPv6 user port of the gateway 102. It can also be understood that when the CPE works in the 6RD tunnel mode, when the CPE receives the IPv4 packet, it can be transmitted through the original path.
  • Step 604 the CPE encapsulates the second message into a third message.
  • the third message is an IPv4 message.
  • the device at the opposite end of the tunnel may be the gateway 102 in FIG. 1a or the BRAS 102a in FIG. 1b.
  • the CPE adds the 6-in-4 tunnel header to the second packet, and then adds the IPv4 packet header to obtain the third packet.
  • the source address in the encapsulated IPv4 packet header is the IPv4 public network address of the CPE, and the destination address is the IPv4 address of the device at the opposite end of the tunnel.
  • Step 605 The CPE sends a third message to the device at the opposite end of the tunnel.
  • the device at the opposite end of the tunnel receives the third message.
  • Step 606 The device at the opposite end of the tunnel decapsulates the received third message to obtain a second message.
  • the gateway 102 or the BRAS 102a after receiving the third packet, the gateway 102 or the BRAS 102a removes the IPv4 header and the 6-in-4 tunnel header of the third packet to recover the second packet.
  • the device at the opposite end of the tunnel may continue to forward the second message according to the destination address in the second message.
  • FIG. 7 exemplarily shows a schematic structural diagram of a CPE provided by an embodiment of the present application.
  • the CPE includes a processor 701 and a communication interface 704, and optionally, a transceiver 702 and a memory 703.
  • the client front-end device in this example may be the CPE in the above content, may execute the above-mentioned solution executed by the client front-end in FIG. 2, or may execute the above-mentioned solution executed on the CPE side in FIGS. 3 a and 4 to 6.
  • the CPE 700 may also be the CPE 101 in FIG. 1a described above, or may be the optical network terminal 101a in FIG. 1b described above.
  • the processor 701 may be a central processing unit (CPU), a network processor (NP), or a combination of CPU and NP.
  • the processor 701 may further include a hardware chip.
  • the hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof.
  • the PLD can be a complex programmable logic device (completable programmable logic device, CPLD), a field programmable gate array (field-programmable gate array, FPGA), a general array logic (generic array logic, GAL), or any combination thereof.
  • the CPE may further include a memory 703.
  • the memory 703 may include volatile memory (volatile memory), such as random-access memory (RAM); the memory 703 may also include non-volatile memory (non-volatile memory), such as flash memory (flash) memory), hard disk drive (HDD) or solid-state drive (SSD); memory 703 may also include a combination of the aforementioned types of memory.
  • the communication interface 704 may be a wired communication access port, a wireless communication interface, or a combination thereof, where the wired communication interface may be, for example, an Ethernet interface.
  • the Ethernet interface may be an optical interface, an electrical interface, or a combination thereof.
  • the wireless communication interface may be a WLAN interface.
  • the instructions may be stored in the memory 703, or may be stored in the processor 703 (for example, when the processor is NP), and the processor 701 invokes the stored instruction, and may execute one or more of the embodiments shown in the above solutions Steps, or optional implementations thereof.
  • the processor 701 is used to: when determining that the upper-layer network is currently enabled with IPv6 through the communication interface, select the dual-stack mode from the dual-stack mode and the 6RD tunnel mode; In tunnel mode, select 6RD tunnel mode from dual stack mode and 6RD tunnel mode.
  • FIG. 8 exemplarily shows a schematic structural diagram of a CPE provided by the present application.
  • the CPE 800 includes a processing unit 801, a transceiver unit 802, and a storage unit 803.
  • the CPE may be the CPE in the above content, and may implement the solution executed by the CPE in FIG. 2 described above, or may execute the solution executed in the CPE side in FIGS. 3a, 4, 5, and 6 described above.
  • the CPE 800 may also be the CPE 101 in FIG. 1a or the optical network terminal 101a in FIG. 1b.
  • each unit of the above network device is only a division of logical functions, and in actual implementation, it may be fully or partially integrated into a physical entity or may be physically separated.
  • the processing unit 801 involved in FIG. 8 may be implemented by the processor 701 of FIG. 7 described above
  • the transceiver unit 802 in FIG. 8 may be implemented by the transceiver 702 of FIG. 7 described above
  • the storage unit 803 in FIG. 8 It can be realized by the memory 703 in FIG. 7 described above. That is to say, in the embodiment of the present application, the processing unit 801 can execute the solution executed by the processor 701 of FIG.
  • the transceiver unit 802 can execute the solution executed by the transceiver 702 of FIG. 7 above, and the storage unit 803 can execute the above diagram
  • the rest of the content can refer to the above content, which will not be repeated here.
  • the above embodiments it may be implemented in whole or in part by software, hardware, or a combination thereof, and when implemented using a software program, it may be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application are generated in whole or in part.
  • the computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices.
  • Instructions can be stored in a computer storage medium, or transmitted from one computer storage medium to another computer storage medium, for example, the instructions can be from a website site, computer, server or data center via wire (such as coaxial cable, optical fiber, twisted pair Line) or wireless (such as infrared, wireless, microwave, etc.) to another website, computer, server or data center.
  • the computer storage medium may be any medium that can be accessed by a computer or a data storage device including one or more media integrated servers, data centers, and the like.
  • the media may be magnetic media (eg, floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical media (eg, optical disk), or semiconductor media (eg, ROM, EPROM, EEPROM, solid state disk (SSD)) )Wait.
  • magnetic media eg, floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.
  • optical media eg, optical disk
  • semiconductor media eg, ROM, EPROM, EEPROM, solid state disk (SSD)
  • each flow and/or block in the flowchart and/or block diagram and a combination of the flow and/or block in the flowchart and/or block diagram may be implemented by instructions. These instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processing machine, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device are generated for implementation A device of a function specified in a block or blocks in a flowchart or a flow or a plurality of flows and/or block diagrams.
  • These computer program instructions may also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, the instructions
  • the device implements the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种工作模式的选择方法、客户端前端设备及存储介质,该方法应用于支持双栈模式和互联网协议第6版IPv6快速部署6RD隧道模式的客户端前端设备CPE,双栈模式指对IPv4和IPv6均支持的通信模式,6RD隧道模式指在IPv4基础设施上进行IPv6快速部署的通信模式;其中方法包括CPE确定上层网络当前开通IPv6时,从双栈模式和6RD隧道模式中选择双栈模式;CPE确定上层网络当前开通6RD隧道模式时,从双栈模式和6RD隧道模式中选择6RD隧道模式;CPE工作于选择的模式。CPE可以灵活的从支持的双栈模式和6RD隧道模式中选择一种模式,并工作于选择的模式,从而有助于提高通信的灵活性。

Description

一种工作模式的选择方法、客户端前端设备及存储介质
本申请要求在2018年11月27日提交中华人民共和国知识产权局、申请号为201811427280.9、发明名称为“一种工作模式选择方法、客户端前端设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种工作模式选择方法、客户端前端设备及存储介质。
背景技术
随着互联网蓬勃发展,越来越多的网络设备进入互联网,需要越来越多的网络协议(internet protocol,IP)地址进行通信,导致当前采用的互联网协议第4版(internet protocol version 4,IPv4)地址逐步耗尽。而互联网协议第6版(internet protocol version 6,IPv6)已经被认为是下一代互联网的核心标准,IPv6的演进也被正式提上了日程。
目前,通常用客户端前端设备(customer premise equipment,CPE)来集中管理用户设备。现有技术中,在IPV4网络中,CPE只支持IPv4协议栈。随着IPv6的演进,有些CPE也支持IPv6。因而,在现有技术中CPE只能与IPv4设备进行通信,或只能与IPv6设备进行通信,灵活性差。
发明内容
本申请实施例提供一种工作模式选择方法、客户端前端设备及存储介质,用于使CPE既可以与IPv4设备进行通信,又可以与IPv6设备进行通信,有助于提高通信的灵活性。
第一方面,本申请提供一种工作模式的选择方法,该方法可应用于支持双栈模式和互联网协议第6版快速部署(IPv6 rapid deployment,6RD)隧道模式的CPE,双栈模式指对IPv4和IPv6均支持的通信模式,6RD隧道模式指在IPv4基础设施上进行IPv6快速部署的通信模式;该方法包括CPE确定上层网络当前开通IPv6时,从双栈模式和6RD隧道模式中选择双栈模式;CPE确定上层网络当前开通6RD隧道模式时,从双栈模式和6RD隧道模式中选择6RD隧道模式,CPE工作于选择的模式。
基于该方案,CPE可通过双栈模式或6RD隧道模式,实现既与IPv4设备进行通信,又可以与IPv6设备进行通信,如此,CPE通过双栈模式或6RD隧道模式可实现IPv4向IPv6过渡。而且,本申请中,CPE可以灵活的从支持的双栈模式和6RD隧道模式中选择一种模式,并工作于选择的模式,从而有助于提高通信的灵活性。
在一种可能的实现方式中,CPE可从动态主机配置协议(dynamic host configuration protocol,DHCP)服务器获取配置信息;根据配置信息向上层网络中对应的设备发送探测报文,从上层网络中对应的设备接收到针对探测报文的响应报文后,确定上层网络当前开通IPv6或是6RD隧道模式,探测报文用于探测上层网络当前是否开通IPv6或是否开通6RD隧道模式。
如下实现方式一提供了CPE确定上层网络当前开通IPv6的过程,实现方式二提供了 CPE确定上层网络当前开通6RD隧道模式的过程。一种可能的实现方式中,CPE可先确定上层网络当前开通是否开通IPv6,也可以先确定当前是否开通6RD隧道模式,或者这两者也可以一起确定。
实现方式一
CPE从DHCP服务器获取第一配置信息,之后CPE向第一设备发送第一探测报文,若CPE在第一预设时长内收到针对第一探测报文的第一响应,则确定上层网络当前开通IPv6,其中,第一配置信息包括CPE的IPv6公网地址,第一探测报文用于探测上层网络当前是否开通IPv6,第一探测报文的源地址包括CPE的IPv6公网地址,第一探测报文的目的地址为第一设备的网络协议(internet protocol,IP)地址,第一设备为上层网络中支持IPv6协议的设备。通过DHCP服务器,可自动为CPE分配第一配置信息,第一配置信息包括CPE的IPv6公网地址,如此,可允许CPE快速、动态的获得自身的IP地址,而不是静态的为每个CPE指定IP地址,从而,可以实现IP地址的合理分配、有助于提高IP地址的使用率。进一步,CPE可从DHCP服务器中直接获取第一配置信息,不需要网络管理员一个一个去CPE中设置配置信息,如此,有助于减小网络管理员对CPE设置配置信息的工作量。
在一种可能的实现方式中,第一探测报文可能为互联网控制信息协议第6版(internet control managemet protocol version 6,ICMPv6)请求回送报文;或者,邻居发现(neighbor discovery,ND)协议的探测报文;或者,基于超文本传输协议(hypertext transfer protocol,HTTP)/HTTPS协议的报文。
实现方式二
CPE从DHCP服务器获取第二配置信息,CPE向6RD隧道对端的设备发送第二探测报文,若CPE在第二预设时长内收到针对第二探测报文的第二响应报文,则确定上层网络当前开通6RD隧道,第二配置信息包括CPE的IPv4公网地址和6RD隧道对端的设备的地址,第二探测报文用于探测上层网络当前是否开通6RD隧道模式,第二探测报文的源地址包括CPE的IPv4公网地址,第二探测报文的目的地址包括6RD隧道对端的设备的地址。通过DHCP服务器,可自动为CPE分配第二配置信息,第二配置信息包括CPE的IPv4公网地址和6RD隧道对端的设备的地址,如此,可允许CPE快速、动态的获得自身的IP地址,而不是静态的为每个CPE指定IP地址,从而,可以实现IP地址的合理分配、有助于提高IP地址的使用率。而且,CPE可以直接从第二配置信息中获取到6RD隧道对端的设备的地址,便于CPE和隧道对端的设备建立6RD隧道。进一步,CPE可从DHCP服务器中直接获取第二配置信息,不需要网络管理员一个一个去CPE中设置配置信息,如此,有助于减小网络管理员对CPE设置配置信息的工作量。
在一种可能的实施方式中,第二探测报文可以为ICMPv4请求回送报文;或者,查询隧道对端的设备的媒体接入控制(medium access control,MAC)地址的地址解析协议(address resolution protocol,ARP)报文。
第二方面,本申请实施例提供一种CPE,CPE包括处理器和通信接口。可选地,还包括存储器。当其包括存储器时,存储器用于存储指令;处理器用于根据执行存储器存储的指令,并控制收发器进行信号接收和信号发送,当处理器执行存储器存储的指令时,CPE用于执行上述第一方面或第一方面中任一种方法。
第三方面,本申请实施例提供一种CPE,用于实现上述第一方面或第一方面中的任意 一种方法,包括相应的功能模块,分别用于实现以上方法中的步骤。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。在一种可能的实施方式中,网络设备的结构中包括处理单元和收发单元,这些单元可以执行上述方法示例中相应功能,具体参见方法示例中的详细描述,此处不做赘述。
第四方面,本申请实施例提供一种计算机存储介质,计算机存储介质中存储有指令,当其在计算机上运行时,使得计算机执行第一方面或第一方面的任意可能的实现方式中的方法。
第五方面,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行第一方面或第一方面的任意可能的实现方式中的方法。
附图说明
图1a为本申请提供的一种通信系统架构示意图;
图1b为本申请提供的一种光接入网络的系统架构示意图;
图2为本申请提供的一种多网络环境下的工作模式自适应选择方法流程示意图;
图3a为本申请提供的一种CPE确定能够使用的模式包括双栈模式的方法流程示意图;
图3b为本申请提供的一种封装有ICMPv6报文的IPv6报文的格式;
图4为本申请提供的一种CPE确定能够使用的模式包括6RD隧道模式的方法流程示意图;
图5为本申请提供的一种CPE工作于双栈模式的方法流程示意图;
图6为本申请提供的一种CPE工作于6RD隧道模式的方法流程示意图;
图7为本申请提供的一种客户端前端设备的结构示意图;
图8为本申请提供的一种客户端前端设备的结构示意图。
具体实施方式
图1a示例性示出了本申请实施例提供的一种通信系统架构示意图。如图1a所示,该通信系统包括CPE101和网关102。进一步的,该通信系统还可以包括DHCP服务器103、用户设备104和上层网络中的一个设备105。图1a中以包括两个用户设备104为例说明。
CPE101,可配置有与用户设备104连接的局域网(local area network,LAN)端口,也可配置有与网关102连接的广域网(wide area network,WAN)端口。CPE101与用户设备104可通过LAN端口进行通信,与网关102通过WAN端口进行通信。示例性地,当用户设备104需要访问上层网络中的资源时,CPE101通过LAN端口从用户设备104接收报文,并将该报文中的用户设备的IP地址(即内网IP地址)通过网络地址转换(network address translation,NAT)表,转化为对应CPE的WAN端口的IP地址,转化后的WAN端口的IP地址即为该报文的源IP地址,将该报文通过网关102发送至上层网络中的设备(例如可发给图中的设备105)。上层网络中的设备接收到该报文后,对该报文进行处理,并解析出WAN端口的IP地址,然后向CPE101发送该报文对应的响应报文,该响应报文的目的地址为上述WAN端口的IP地址。CPE101将该响应报文中的目的地址通过NAT表,转化为内网IP,如此,CPE完成了报文的发送和接收。
在一种可能的实现方式中,CPE101可用于集中管理用户设备。例如,可为用户设备104配置IP地址。具体可以是CPE101从DHCP服务器103中获取到网络(IPv4网络或IPv6 网络)配置信息。之后CPE101根据网络配置信息为用户设备104配置IP地址。也可以理解为,CPE101可通过DHCP从DHCP服务器103动态获取网络配置信息,来实现对用户设备104的集中管理。示例性地,当CPE101获取到IPv6网络配置信息,例如IPv6前缀和IPv6前缀的长度(64bit),CPE101可根据IPv6前缀为用户设备104配置IPv6地址,具体过程可以是CPE101广播一个64bit的IPv6前缀,各用户设备104可根据该64bit的IPv6前缀,利用随机算法生成各自的IPv6地址。
DHCP服务器103,用于管理、分配网络配置信息。例如为CPE101动态的分配IP地址。一种可能的实现方式中,CPE101向IPv4网络中的DHCP服务器103发送获取IPv6的配置信息的请求,DHCP服务器103根据策略向CPE101发送针对该请求的响应,响应中包括IPv6前缀、IPv6前缀的长度、以及该CPE101的IP地址;其中,IPv6前缀、IPv6前缀的长度、以及该CPE101的IP地址可以是网络提供商(internet service provider,ISP)分配的。
网关102,是骨干网络的边缘层上的设备。如图1a所示,骨干网络可指上层的IPv4网络或IPv6网络。网关102上也配置有IPv6用户端口和IPv4用户端口,网关102的IPv6用户端口可用于与CPE101的IPv6 WAN端口进行通信,网关102的IPv6用户端口可用于与CPE101的IPv4 WAN端口进行通信。网关102可以是宽带远程接入服务器(broadband remote access server,BRAS),也可以是一个边缘路由器(border router,BR),也可以是ISP部署一个作为IPv6网络集中接入点。
用户设备104,可以是手机、平板电脑、或者其他一些家用设备。用户设备104可能会向CPE101发送IPv4报文,也可能发送IPv6报文。
上层网络中的一个设备105,上层网络是指CPE101的上层网络,上层网络可以是IPv6网络,也可以是IPv4网络。若上层网络是IPv6网络,则上层网络中的设备105为支持IPv6协议栈的设备。若上层网络是IPv4网络,则上层网络中的设备(图中未示出)为支持IPv4协议栈的设备。
图1a所示的通信系统可以是光接入网络的通信系统,光接入网络是以光为传输介质的接入网络。如图1b所示,为本申请提供的一种光接入网络的系统架构图。在光接入网络中包括光网络终端101a和BRAS 102a。图1b中的光网络终端可为上述图1a中的CPE101的一种示例,BRAS 102a为上述图1a中的网关102的一种示例。
光网络终端101a,可以是光网络终端(optical network terminal,ONT)或者光网络单元(optical network unit,ONU)。光网络终端101a是光接入网络中的用户端设备,通常放置在用户端,可以实现对用户设备的管理。ONT通常与光线路终端(optical line terminal,OLT)(图1b中未示出)配合使用,可以接收OLT发送的数据,也可以响应于OLT发出的管理命名。OLT是光接入网的核心部件,可以与前端的ONT连接,将接收到的信号转化成光信号。
BRAS 102a,位于骨干网络的边缘,可提供宽带接入服务、实现多种业务的汇聚与转发。
基于上述光接入网络,当光网络终端101a接收到IPv6报文后,可根据上层网络的实际情况,有两种可能的传输方式。一种方式是通过光网络终端101a和BRAS 102a之间建立的6RD隧道技术进行传输,另一种方式是光网络终端101a直接将IPv6报文传输至BRAS102a。
下面,为了便于理解,结合上述图1a和图1b对本申请中涉及到的双栈模式和6RD隧道模式进行介绍。
双栈模式,是指在一台设备上同时启动IPv4协议栈和IPv6协议栈。也可以理解为,这台设备既可以和IPv4设备通信,又可以和IPv6设备通信。当这台设备为图1a中的CPE101时,即可在CPE101上配置的不同端口上分别配置了IPv4地址和IPv6地址,也可以理解为,在CPE101上配置了IPv4端口和IPv6端口,且该CPE101具备同时处理这两个协议栈的能力。双栈模式可对IPv4网络和IPv6网络提供完全的兼容。
6RD隧道模式是隧道模式的一种,其中,隧道模式是指将一种协议封装到另一种协议进行透明传输的技术。结合上述图1a,在6RD隧道模式中,可以是ISP在网络的边缘层部署一个网关102,CPE101和网关102之间可建立6RD的隧道。例如,当用户设备104为IPv6设备时,IPv6设备发送至CPE101中的IPv6报文可通过6RD的隧道穿越网络中没有升级到IPv6网络设备,到达网关102。具体地,6RD隧道模式是将IPv6报文封装到IPv4报文中,IPv4报文的源地址和目的地址分别是隧道入口(CPE101)和隧道出口的IPv4地址(网关102)。如此,可免除ISP对网络中各设备的大规模升级。
基于上述内容,图2示例性示出了本申请提供的一种工作模式的选择方法流程示意图。CPE可以是上述图1a中的CPE101,也可以是上述图1b中的光网络终端101a。如图2所示,该方法包括以下步骤:
步骤201,CPE确定上层网络当前开通IPv6时,从双栈模式和6RD隧道模式中选择双栈模式;CPE确定上层网络当前开通6RD隧道模式时,从双栈模式和6RD隧道模式中选择6RD隧道模式。
基于前述描述,CPE支持两种工作模式,即为双栈模式和6RD隧道模式。在具体实现过程,CPE当前能够使用哪种工作模式,与上层网络当前开通的环境相关。
针对双栈模式,CPE当前可能能够使用,也可能不能使用。比如,若上层网络当前开通了IPv6,则CPE当前能够使用双栈模式;若上层网络没有开通IPv6,则CPE当前不能使用双栈模式。
同样地,针对6RD隧道模式,CPE当前可能能够使用,也可能不能使用。比如,若上层网络当前开通了6RD隧道,则CPE当前能够使用6RD隧道模式;若上层网络没有开通6RD隧道,则CPE当前不能使用6RD隧道模式。
步骤202,CPE工作于选择的模式。
示例性地,若CPE选择的工作模式为双栈模式,则CPE在双栈模式工作。若CPE选择的工作模式为6RD隧道模式,则CPE在6RD隧道模式。
通过上述步骤201-步骤202可以看出,CPE可通过双栈模式或6RD隧道模式,实现既与IPv4设备进行通信,又可以与IPv6设备进行通信,如此,CPE通过双栈模式或6RD隧道模式可实现IPv4向IPv6过渡。而且,本申请中,CPE可以灵活的从支持的双栈模式和6RD隧道模式中选择一种模式,并工作于选择的模式,从而有助于提高通信的灵活性。
针对上述步骤201,本申请提供的一种CPE确定上层网络当前开通IPv6或是当前开通6RD隧道模式的方式,具体为:CPE从动态主机配置协议DHCP服务器获取配置信息,根据配置信息向上层网络中对应的设备发送探测报文,若从上层网络中对应的设备接收到针对探测报文的响应报文后,确定上层网络当前开通IPv6或是6RD隧道模式,其中,探测报文用于探测上层网络当前是否开通IPv6或是否开通6RD隧道模式。
下面分别介绍CPE确定上层网络当前开通IPv6的过程、以及确定上层网络当前开通6RD隧道模式的过程。
图3a示例性示出了一种CPE确定上层网络当前开通IPv6的方法流程示意图。该示例性中,CPE可以是上述图1a中的CPE101,也可以是上述图1b中的光网络终端101a。如图3a所示,该方法包括以下步骤:
步骤301,CPE从DHCP服务器获取第一配置信息。
其中,第一配置信息包括CPE的IPv6公网地址。可选地,可以是CPE周期性从DHCP服务器获取第一配置信息,便于CPE及时确定上层网络的开通环境。
结合上述图1a,CPE101可以向DHCP服务器103进行IPv6拨号,即CPE101向DHCP服务器103动态的请求网络配置信息,DHCP服务器103向CPE101发送针对IPv6拨号的响应报文,响应报文中携带第一配置信息。响应报文可以是DHCP报文,DHCP报文中包括DHCP服务器103为CPE分配的IPv6公网地址。进一步,DHCP报文中还包括IPv6前缀和IPv6前缀的长度,IPv6前缀和IPv6前缀的长度用于使CPE根据IPv6前缀为用户设备分配IPv6地址。通过DHCP服务器,可自动为CPE分配第一配置信息,第一配置信息包括CPE的IPv6公网地址,如此,可允许CPE快速、动态的获得自身的IP地址,而不是静态的为每个CPE指定IP地址,从而,可以实现IP地址的合理分配、有助于提高IP地址的使用率。进一步,CPE可从DHCP服务器中直接获取第一配置信息,不需要网络管理员一个一个去CPE中设置配置信息,如此,有助于减小网络管理员对CPE设置配置信息的工作量。
步骤302,CPE向第一设备发送第一探测报文。
其中,第一探测报文用于探测上层网络当前是否开通IPv6,第一探测报文的源地址包括CPE的IPv6公网地址,第一探测报文的目的地址为第一设备的IP地址,第一探测报文可以为:ICMPv6请求回送报文,或者ND探测报文,或者基于HTTP/HTTPS协议的报文。第一设备为上层网络中支持IPv6协议的设备。例如,可以是某个特定的支持IPv6协议的设备,也可以是某个知名域名对应的支持IPv6协议的设备、也可以是CPE的IPv6 WAN端口的下一跳网关(图1a中的网关102)的IPv6地址。
本申请提供了CPE向第一设备发送第一探测报文的三种实现方式,分别为实现方式A、实现方式B和实现方式C。
实现方式A,Ping+第一设备的IPv6地址。
ping就是对一个设备发送测试数据包,看对方设备是否有响应,以此测试网络是否联通。一种可能的实现方式中,可以是在CPE上运行“Ping第一设备的IPv6地址”。Ping命令会构建一个固定格式的ICMPv6请求回送报文,然后由ICMP协议将这个请求回送报文连同第一设备的IPv6地址一起交给IP层协议,IP层协议将以第一设备的IPv6地址作为目的地址,CPE的IP地址作为源地址,加上一些控制信息,构建成一个IPv6报文,如图3b所示,为本申请提供的一种封装有ICMPv6报文的IPv6报文的格式。图3b所示,该IPv6报文的整体结构分为IPv6报文头和IPv6负载,IPv6报文头包括基础报头和扩展报头,基础报头是必选报文头部,长度固定为40B,包含该报文的基本信息;扩展报头是可选报文头,可能存在0个、1个或多个,IPv6协议通过扩展报头实现各种丰富的功能;IPv6负载包括ICMPv6报文头和ICMPv6报文体,ICMPv6报文头和ICMPv6报文体是该IPv6报文携带的上层数据。之后CPE将该IP报文发送至第一设备。第一设备收到该IP报文后,若 确定目的地址为第一设备的地址,解析该IP报文,提取有用信息交给ICMP协议,ICMP协议处理有用信息后构建一个ICMP应答报文,发送至CPE,即CPE收到针对该ICMPv6请求回送报文的响应。
实现方式B,CPE向CPE的IPv6 WAN端口的下一跳网关进行ND探测。
结合上述图1a,CPE的IPv6 WAN端口的下一跳网关即为网关102。也可以理解为,CPE101向网关102进行ND探测。
实现方式C,CPE向第一设备发送基于HTTP/HTTPS协议的报文。
步骤303,CPE确定在第一预设时长内是否收到针对第一探测报文的第一响应报文。若收到,则执行步骤304;若未收到,则执行步骤305。
步骤304,确定上层网络当前开通IPv6。
结合上述图1a,上层网络当前开通IPv6可说明CPE101和网关102可以之间传输IPv6报文。
步骤305,流程结束。
在一种可能的实现方式中,步骤305也可以是执行如下图4中步骤401至步骤405。
图4示例性示出了一种CPE确定上层网络当前开通6RD隧道模式的方法流程示意图。该示例中,CPE可以是上述图1a中的CPE101,也可以是上述图1b中的光网络终端101a。如图4所示,该方法包括以下步骤:
步骤401,CPE从DHCP服务器获取第二配置信息。
其中,第二配置信息包括CPE的IPv4公网地址和6RD隧道对端的设备的地址。可选地,第二配置信息中6RD隧道对端的设备的地址也可能是6RD隧道对端的设备的域名,通过对域名的解析得到6RD隧道对端的设备的地址。
结合上述图1a,CPE101可以向DHCP服务器103进行IPv4拨号,即CPE101向DHCP服务器103动态的请求网络配置信息,DHCP服务器103向CPE101发送针对IPv4拨号的响应报文,响应报文中携带第二配置信息。响应报文可以是DHCP报文。DHCP报文中包括字段Ciaddr和可选项字段(options),Ciaddr字段可标识出CPE的IPv4公网地址,options字段长度可变,可由Type、Length和Value三部分组成,该options字段可以用来存放普通协议中没有定义的控制信息和参数,例如,options212通常用于表示6RD隧道对端的设备的IPv4地址。通过DHCP服务器,可自动为CPE分配第二配置信息,第二配置信息包括CPE的IPv4公网地址和6RD隧道对端的设备的地址,如此,可允许CPE快速、动态的获得自身的IP地址,而不是静态的为每个CPE指定IP地址,从而,可以实现IP地址的合理分配、有助于提高IP地址的使用率。而且,CPE可以直接从第二配置信息中获取到6RD隧道对端的设备的地址,便于CPE和隧道对端的设备建立6RD隧道。进一步,CPE可从DHCP服务器中直接获取第二配置信息,不需要网络管理员一个一个去CPE中设置配置信息,如此,有助于减小网络管理员对CPE设置配置信息的工作量。
步骤402,CPE向6RD隧道对端的设备发送第二探测报文。
其中,第二探测报文用于探测上层网络当前是否开通6RD隧道模式,第二探测报文的源地址包括CPE的IPv4公网地址,第二探测报文的目的地址包括6RD隧道对端的设备的地址。此处,第二探测报文可为ICMPv4请求回送报文,或者查询隧道对端的设备的MAC地址的ARP报文。
结合上述图1a,本申请提供了CPE向6RD隧道对端的设备发送第二探测报文的两种 实现方式:实现方式a和实现方式b。其中,隧道对端的设备可以为上述图1a中的网关102。
实现方式a,Ping+隧道对端的设备的IPv4地址。详细的过程可参见图3a中步骤302的实现方式A中的介绍,此处不再赘述。
实现方式b,CPE广播ARP报文。
其中,ARP报文用于询问隧道对端的设备的MAC地址。该实现方式是在CPE确定与隧道对端的设备在同一网段时,CPE广播ARP报文,若隧道对端的设备接收到广播的ARP报文后,可向CPE发送自身的MAC地址。
步骤403,CPE确定在第二预设时长内是否收到针对第二探测报文的第二响应。若收到,则执行步骤404;若未收到,则执行步骤405。
步骤404,CPE确定上层网络当前开通6RD隧道。
结合上述图1a,上层网络当前开通6RD隧道可说明CPE101可以和网关102之间可以建立6RD隧道,以实现CPE101向网关102传输IPv6的报文。
步骤405,流程结束或执行上述图3a中的步骤301至步骤305。
针对上述图3a和图4,在一种可能的实现方式中,若确定上层网络未开通IPv6,则可以继续确定上层网络是否开通6RD隧道。在另一种可能的实现方式中,若确定上层网路开通6RD隧道,则可继续确定上层网络是否开通IPv6。
在上述步骤401之后,CPE还可以向第一设备发送第三探测报文,第三探测报文是CPE将IPv6报文封装为IPv4报文。若CPE在第三预设时长内收到针对第三探测报文的第三响应,则CPE也可以确定上层网络当前开通6RD隧道。其中,第三探测报文的源地址CPE的IPv4公网地址,第三探测报文的目的地址为第一设备的IPv4地址。可选地,第三探测报文可以是ICMPv6请求回送报文或者可以是HTTP/HTTPS协议的报文。也可以理解为,CPE可以假设上层网络当前开通了6RD隧道,尝试通过6RD隧道来发送第三探测报文,如果能收到针对第三探测报文的第三响应,则说明假设成立,即上层网络当前开通了6RD隧道。
针对上述图3a和图4,CPE可先确定上层网络当前开通是否开通IPv6,也可以先确定当前是否开通6RD隧道模式,或者这两者也可以一起确定。一种可能的实现方式中,CPE可以按照的预设顺序来确定,具体可分如下三种情形分别介绍。
情形一,CPE先确定上层网络当前是否开通IPv6,若确定上层网络当前开通IPv6,则从双栈模式和6RD隧道模式中选择双栈模式;若确定上层网络当前未开通IPv6,则继续确定上层网络当前是否开通6RD隧道模式。
情形二,CPE先确定上层网络当前是否开通6RD隧道模式,若确定上层网络当前开通6RD隧道模式,则从双栈模式和6RD隧道模式中选择6RD隧道模式;若确定上层网络未开通6RD隧道模式,则继续确定上层网络当前是否开通IPv6。
情形三,CPE可以一起确定上层网络当前是否开通IPv6和是否开通6RD隧道模式,若确定上层网络当前仅开通IPv6,则从双栈模式和6RD隧道模式中选择双栈模式;若确定上层网络当前仅开通6RD隧道模式,则从双栈模式和6RD隧道模式中选择6RD隧道模式;若确定上层网络当前开通IPv6和6RD隧道模式,可以根据预设的选择策略,从6RD隧道模式和双栈模式中选择一种模式。
示例性地,在IPv4向IPv6演进的初期,可以设置先确定上层网络是否开通6RD隧道模式;在IPv4向IPv6演进的中期,可以先确定上层网络是否开通IPv6。也可以理解为, 在网络中支持IPv6协议栈的设备较少时,设置6RD隧道模式的优先级高于双栈模式,在网络中支持IPv6协议栈的设备较多时,设置双栈模式的优先级高于6RD隧道模式。
针对上述步骤202,CPE可能工作在双栈模式,也可能工作在6RD隧道模式下,如图5所示,为本申请提供的一种CPE工作于双栈模式的方法流程示意图。该示例中的CPE可以是上述图1a中CPE101,也可以是上述图1b中的光网络终端101a,或者也可以是上述图3a中的CPE。
该方法包括以下步骤:
步骤501,CPE接收第一报文。
结合上述图1a,CPE101可从用户设备104接收第一报文,第一报文可为用户设备104访问网络资源的报文。
步骤502,CPE判断第一报文是IPv4报文还是IPv6报文。若是IPv4报文,则执行步骤503;若是IPv6报文,则执行步骤504。
一种可能的实现方式中,CPE拆分并检测第一报文,可根据第一报文的报文头中的第一个字段,即第一报文的版本号,确定是IPv4报文还是IPv6报文。若第一报文的报文头的第一字段为4,即第一报文的版本号为4,则第一报文为IPv4报文;若第一报文的报文头的第一字段为6,即第一报文的版本号为6,则第一报文为IPv6报文。
步骤503,CPE从IPv4 WAN端口转发第一报文。
此处,CPE将第一报文交给IPv4协议栈来处理。
步骤504,CPE从IPv6 WAN端口转发第一报文。
此处,CPE将第一报文交给IPv6协议栈来处理。
结合上述图1a,CPE101配置有IPv4 WAN端口和IPv6 WAN端口,若第一报文为IPv4报文,CPE101可以从IPv4 WAN端口向网关102的IPv6用户端口发送第一报文。若第一报文为IPv6报文,CPE101可以从IPv6 WAN端口向网关102的IPv6用户端口发送第一报文。结合上述图1b,光网络终端101a配置有IPv4 WAN端口和IPv6 WAN端口,若第一报文为IPv4报文,光网络终端101a可以从IPv4 WAN端口向BRAS 102a的IPv4用户端口发送第一报文。若第一报文为IPv6报文,光网络终端101a可以从IPv6 WAN端口向BRAS102a的IPv6用户端口发送第一报文。
如图6所示,为本申请提供的一种CPE工作于6RD隧道模式的方法流程示意图。CPE可以是上述图1a中CPE101,也可以是上述图1b中的光网络终端101a,或者也可以是上述图4中的CPE。该方法包括以下步骤:
步骤601,CPE接收第二报文。
其中,第二报文可以与上述图5中的第一报文是同一个报文。
结合上述图1a,CPE101可以从用户设备104中接收第二报文,第二报文也可以是用户设备104访问网络资源的报文。
步骤602,CPE判断第二报文是IPv4报文还是IPv6报文。若是IPv4报文,则执行步骤603;若是IPv6报文,则执行步骤604。
此处,判断第二报文是IPv4报文还是IPv6报文可以参见上述图5中步骤502中介绍,此处不再赘述。
步骤603,CPE从IPv4 WAN端口转发第二报文。
结合上述图1a,CPE101可以从CPE的IPv4 WAN端口向网关102的IPv6用户端口发送第二报文。也可以理解为,当CPE工作于6RD隧道模式时,CPE收到IPv4报文时,可通过原有的路径传输。
步骤604,CPE将第二报文封装为第三报文。
其中,第三报文为IPv4报文。
隧道对端的设备可以为上述图1a中的网关102,也可以是上述图1b中的BRAS 102a。CPE在第二报文中添加6-in-4隧道头,再添加IPv4报文头,得到第三报文。封装后的IPv4报文头中的源地址为CPE的IPv4公网地址,目的地址为隧道对端的设备的IPv4地址。
步骤605,CPE向隧道对端的设备发送第三报文。
相应地,隧道对端的设备接收第三报文。
步骤606,隧道对端的设备对接收到的第三报文进行解封装,得到第二报文。
结合上述图1a和图1b,网关102或者BRAS 102a接收到第三报文后,对第三报文去掉IPv4报文头、再去掉6-in-4隧道头,恢复出第二报文。一种可能的实现方式中,隧道对端的设备可根据第二报文中的目的地址继续转发第二报文。
基于上述内容和相同构思,本申请提供了一种CPE,用于执行上述方法CPE的任一个方案。图7示例性示出了本申请实施例提供的一种CPE的结构示意图,如图7所示,该CPE包括处理器701和通信接口704,可选地,还包括收发器702和存储器703。该示例中的客户端前端设备可以上述内容中的CPE,可以执行上述图2中客户端前端执行的方案,也可以执行上述图3a、图4至图6中的CPE侧执行的方案。该CPE700也可以是上述图1a中的CPE101,也可以是上述图1b中的光网络终端101a。
处理器701可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP)或者CPU和NP的组合。处理器701还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(comple programmable logic device,CPLD),现场可编程门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。
一种可选地实施方式中,CPE还可以包括存储器703。存储器703可以包括易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器703也可以包括非易失性存储器(non-volatile memory),例如快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器703还可以包括上述种类的存储器的组合。
通信接口704可以为有线通信接入口,无线通信接口或其组合,其中,有线通信接口例如可以为以太网接口。以太网接口可以是光接口,电接口或其组合。无线通信接口可以为WLAN接口。
可以在存储器703中存储指令,也可以在处理器703中存储指令(比如处理器为NP时),处理器701调用所存储的指令,可以执行上述方案中所示实施例中的一个或多个步骤,或其中可选的实施方式。
在示例中的CPE为上述CPE的情况下,处理器701用于:通过通信接口确定上层网络当前开通IPv6时,从双栈模式和6RD隧道模式中选择双栈模式;CPE确定上层网络当前开通6RD隧道模式时,从双栈模式和6RD隧道模式中选择6RD隧道模式。
本申请实施例中上述可选地实施方式的相关内容可以参见上述实施例,在此不再赘述。
基于上述内容和相同构思,本申请实施例提供了一种CPE,用于执行上述方法中CPE的任一个方案。图8示例性示出了本申请提供的一种CPE的结构示意图,如图8所示,CPE800包括处理单元801、收发单元802和存储单元803。该示例中CPE可以是上述内容中的CPE,可以执行上述图2中CPE执行的方案,也可以执行上述图3a、图4、图5和图6中的CPE侧执行的方案。该CPE800也可以是上述图1a中的CPE101,也可以是上述图1b中的光网络终端101a。
应理解,以上网络设备的各单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。本申请实施例中,图8涉及到的处理单元801可以由上述图7的处理器701实现,图8中的收发单元802可以由上述图7的收发器702实现,图8中的存储单元803可以由上述图7中的存储器703实现。也就是说,本申请实施例中处理单元801可以执行上述图7的处理器701所执行的方案,收发单元802可以执行上述图7的收发器702所执行的方案,存储单元803可以执行上述图7中的存储器703所执行的方案,其余内容可以参见上述内容,在此不再赘述。
在上述实施例中,可以全部或部分地通过软件、硬件或者其组合来实现、当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。指令可以存储在计算机存储介质中,或者从一个计算机存储介质向另一个计算机存储介质传输,例如,指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、双绞线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机存储介质可以是计算机能够存取的任何介质或者是包含一个或多个介质集成的服务器、数据中心等数据存储设备。介质可以是磁性介质,(例如,软盘、硬盘、磁带、磁光盘(MO)等)、光介质(例如光盘)、或者半导体介质(例如ROM、EPROM、EEPROM、固态硬盘(solid state disk,SSD))等。
本申请实施例是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (13)

  1. 一种工作模式的选择方法,其特征在于,应用于支持双栈模式和互联网协议第6版快速部署6RD隧道模式的客户端前端设备CPE,所述双栈模式指对IPv4和IPv6均支持的通信模式,所述6RD隧道模式指在IPv4基础设施上进行IPv6快速部署的通信模式;所述方法包括:
    所述CPE确定上层网络当前开通所述IPv6时,从所述双栈模式和所述6RD隧道模式中选择所述双栈模式;所述CPE确定上层网络当前开通所述6RD隧道模式时,从所述双栈模式和所述6RD隧道模式中选择所述6RD隧道模式;
    所述CPE工作于选择的模式。
  2. 如权利要求1所述的方法,其特征在于,所述CPE确定上层网络当前开通所述IPv6或是当前开通所述6RD隧道模式,包括:
    所述CPE从动态主机配置协议DHCP服务器获取配置信息;
    所述CPE根据所述配置信息向所述上层网络中对应的设备发送探测报文,所述探测报文用于探测所述上层网络当前是否开通IPv6或是否开通6RD隧道模式;
    所述CPE从所述上层网络中对应的设备接收到针对所述探测报文的响应报文后,确定所述上层网络当前开通IPv6或是6RD隧道模式。
  3. 如权利要求2所述的方法,其特征在于,所述配置信息为第一配置信息,所述第一配置信息包括所述CPE的IPv6公网地址;
    所述CPE根据所述配置信息向所述上层网络中对应的设备发送探测报文,包括:
    所述CPE向所述上层网络中的第一设备发送所述第一探测报文,所述第一探测报文用于探测所述上层网络当前是否开通IPv6,所述第一探测报文的源地址包括所述CPE的IPv6公网地址,所述第一探测报文的目的地址为所述第一设备的IP地址,所述第一设备为所述上层网络中支持IPv6的设备;
    所述CPE从所述上层网络中对应的设备接收到针对所述探测报文的响应报文后,确定所述上层网络当前是否开通IPv6,包括:
    若所述CPE在第一预设时长内从所述第一设备接收到针对所述第一探测报文的第一响应报文,则确定所述上层网络当前开通IPv6。
  4. 如权利要求3所述的方法,其特征在于,所述第一探测报文为以下内容中的任一项:
    互联网控制信息协议第6版ICMPv6请求回送报文;
    邻居发现ND探测报文;
    基于超文本传输协议HTTP/HTTPS协议的报文。
  5. 如权利要求2所述的方法,其特征在于,所述配置信息为第二配置信息,所述第二配置信息包括所述CPE的IPv4公网地址和6RD隧道对端的设备的地址;
    所述CPE根据所述配置信息向所述上层网络中对应的设备发送探测报文,包括;
    所述CPE向所述上层网络中的6RD隧道对端的设备发送第二探测报文,所述第二探测报文用于探测所述上层网络当前是否开通6RD隧道模式,所述第二探测报文的源地址包括所述CPE的IPv4公网地址,所述第二探测报文的目的地址包括所述6RD隧道对端的设备的地址;
    所述CPE从所述上层网络中对应的设备接收到针对所述探测报文的响应报文后,确定所述上层网络当前是否开通6RD隧道模式,包括:
    若所述CPE在第二预设时长内收到从所述6RD隧道对端的设备针对所述第二探测报文的第二响应报文,则确定所述上层网络当前开通6RD隧道模式。
  6. 如权利要求5所述的方法,其特征在于,所述第二探测报文为以下内容中的任一项:
    互联网控制信息协议第4版ICMPv4请求回送报文;
    查询所述隧道对端的设备的媒体接入控制MAC地址的地址解析协议ARP报文。
  7. 一种客户端前端设备,其特征在于,所述客户端前端设备CPE支持双栈模式和互联网协议第6版快速部署6RD隧道模式,所述双栈模式指对IPv4和IPv6均支持的通信模式,所述6RD隧道模式指在IPv4基础设施上进行IPv6快速部署的通信模式;所述客户端前端设备包括:
    通信接口,用于与上层网络进行通信;
    处理器,用于通过所述通信接口确定上层网络当前开通所述IPv6时,从所述双栈模式和所述6RD隧道模式中选择所述双栈模式,确定上层网络当前开通所述6RD隧道模式时,从所述双栈模式和所述6RD隧道模式中选择所述6RD隧道模式,并工作于选择的模式。
  8. 如权利要求7所述的客户端前端设备,其特征在于,所述处理器,具体用于:
    通过所述通信接口从动态主机配置协议DHCP服务器获取配置信息;
    根据所述配置信息通过所述通信接口向所述上层网络中对应的设备发送探测报文,所述探测报文用于探测所述上层网络当前是否开通IPv6或是否开通6RD隧道模式;
    通过所述通信接口从所述上层网络中对应的设备接收到针对所述探测报文的响应报文后,确定所述上层网络当前开通IPv6或是6RD隧道模式。
  9. 如权利要求8所述的客户端前端设备,其特征在于,所述配置信息为第一配置信息,所述第一配置信息包括所述CPE的IPv6公网地址;
    所述处理器,具体用于:
    通过所述通信接口向所述上层网络中的第一设备发送所述第一探测报文,所述第一探测报文用于探测所述上层网络当前是否开通IPv6,所述第一探测报文的源地址包括所述CPE的IPv6公网地址,所述第一探测报文的目的地址为所述第一设备的IP地址,所述第一设备为所述上层网络中支持IPv6协议的设备;
    若在第一预设时长内通过所述通信接口从所述第一设备接收到针对所述第一探测报文的第一响应报文,则确定所述上层网络当前开通IPv6。
  10. 如权利要求9所述的客户端前端设备,其特征在于,所述第一探测报文为以下内容中的任一项:
    互联网控制信息协议第6版ICMPv6请求回送报文;
    邻居发现ND探测报文;
    基于超文本传输协议HTTP/HTTPS协议的报文。
  11. 如权利要求8所述的客户端前端设备,其特征在于,所述配置信息为第二配置信息,所述第二配置信息包括所述CPE的IPv4公网地址和6RD隧道对端的设备的地址;
    所述处理器,具体用于:
    通过所述通信接口向所述上层网络中的6RD隧道对端的设备发送第二探测报文,所述 第二探测报文用于探测所述上层网络当前是否开通6RD隧道模式,所述第二探测报文的源地址包括所述CPE的IPv4公网地址,所述第二探测报文的目的地址包括所述6RD隧道对端的设备的地址;
    若在第二预设时长内通过所述通信接口接收到从所述6RD隧道对端的设备针对所述第二探测报文的第二响应报文,则确定所述上层网络当前开通6RD隧道模式。
  12. 如权利要求11所述的客户端前端设备,其特征在于,所述第二探测报文为以下内容中的任一项:
    互联网控制信息协议第4版ICMPv4请求回送报文;
    查询所述隧道对端的设备的媒体接入控制MAC地址的地址解析协议ARP报文。
  13. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机可执行指令,所述计算机可执行指令在被计算机调用时,使所述计算机执行如权利要求1至6任一权利要求所述的方法。
PCT/CN2019/091787 2018-11-27 2019-06-18 一种工作模式的选择方法、客户端前端设备及存储介质 WO2020107871A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811427280.9 2018-11-27
CN201811427280.9A CN111224854B (zh) 2018-11-27 2018-11-27 一种工作模式的选择方法、客户端前端设备及存储介质

Publications (1)

Publication Number Publication Date
WO2020107871A1 true WO2020107871A1 (zh) 2020-06-04

Family

ID=70827425

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/091787 WO2020107871A1 (zh) 2018-11-27 2019-06-18 一种工作模式的选择方法、客户端前端设备及存储介质

Country Status (2)

Country Link
CN (1) CN111224854B (zh)
WO (1) WO2020107871A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115695565B (zh) * 2021-07-13 2024-04-09 大唐移动通信设备有限公司 一种数据报文处理方法、装置及计算机可读存储介质
CN113747470B (zh) * 2021-08-09 2024-05-24 咪咕音乐有限公司 接口流量的分析方法、路由设备及存储介质
CN114244704B (zh) * 2021-12-31 2023-06-20 四川天邑康和通信股份有限公司 一种路由器lanwan自适应方法及系统
CN115150266B (zh) * 2022-06-29 2024-03-15 北京天融信网络安全技术有限公司 局域网互联配置及数据传输方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100202321A1 (en) * 2009-02-11 2010-08-12 Cisco Technology, Inc. IPv6 ADDRESSING OVER NON-IPv6 SYSTEMS
CN103731394A (zh) * 2012-10-10 2014-04-16 中国移动通信集团公司 一种在CPE上配置IPv6过渡技术的方法及设备
CN106330651A (zh) * 2015-06-29 2017-01-11 中兴通讯股份有限公司 4in6隧道模式选择方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5907239B2 (ja) * 2014-01-31 2016-04-26 株式会社バッファロー ネットワーク中継装置、ネットワーク中継装置が有するパケット中継処理部の動作モードを設定する方法、およびコンピュータープログラム
CN104954161A (zh) * 2014-03-28 2015-09-30 中兴通讯股份有限公司 IPv6过渡技术类型处理方法、装置及系统
CN105591929B (zh) * 2015-10-28 2019-10-08 新华三技术有限公司 轻量级双协议栈组网下的认证方法及装置
CN106911489B (zh) * 2015-12-22 2019-08-27 中国电信股份有限公司 一种接入设备的自动适配方法、管理装置及系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100202321A1 (en) * 2009-02-11 2010-08-12 Cisco Technology, Inc. IPv6 ADDRESSING OVER NON-IPv6 SYSTEMS
CN103731394A (zh) * 2012-10-10 2014-04-16 中国移动通信集团公司 一种在CPE上配置IPv6过渡技术的方法及设备
CN106330651A (zh) * 2015-06-29 2017-01-11 中兴通讯股份有限公司 4in6隧道模式选择方法及装置

Also Published As

Publication number Publication date
CN111224854B (zh) 2021-09-07
CN111224854A (zh) 2020-06-02

Similar Documents

Publication Publication Date Title
WO2020107871A1 (zh) 一种工作模式的选择方法、客户端前端设备及存储介质
US9674030B2 (en) Methods and apparatus for a common control protocol for wired and wireless nodes
US11374900B2 (en) Network address translation (NAT) traversal and proxy between user plane function (UPF) and session management function (SMF)
US9705706B2 (en) Multiple prefix connections with translated virtual local area network
US20130058256A1 (en) Port mapping method and apparatus, and communication system
WO2012013133A1 (zh) 一种网络通信的方法和设备
WO2011098039A1 (zh) Ipv6过渡网络中获取ipv6配置信息的方法、系统以及装置
EP4027593A1 (en) Tunnel configuration method, apparatus and system, and device and storage medium
CN112654049B (zh) 用于配置无线通信覆盖扩展系统的方法、系统、节点和介质
AU2015264883A1 (en) Access control method and system, and access point
WO2015085788A1 (zh) 一种动态主机配置协议报文处理方法及装置
US20140313933A1 (en) Method, apparatus, and system for layer 2 interworking based on ipv6
US20140032782A1 (en) Method and apparatus for route selection of host in multihoming site
Kärkkäinen et al. Enabling ad-hoc-style communication in public wlan hot-spots
US9438475B1 (en) Supporting relay functionality with a distributed layer 3 gateway
WO2022142905A1 (zh) 报文转发的方法、装置和网络系统
WO2014063606A1 (zh) 报文转发的方法和相应设备
CN107547467B (zh) 一种电路认证处理方法、系统及控制器
WO2020132982A1 (zh) 一种数据传输方法及路由设备
CN113746715B (zh) 实现二层报文跨三层传输的方法及装置
WO2015139397A1 (zh) 一种nat64资源获取方法及获取/分配装置
WO2011095109A1 (zh) 实现在不同网络间进行通信的方法及装置
WO2019114510A1 (zh) 负载分担方法、装置和系统、计算机可读存储介质
WO2015143824A1 (zh) IPv6过渡技术类型处理方法、装置及系统
Enache et al. A Study of the Technology Transition from IPv4 to IPv6 for an ISP

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: 19889995

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: 19889995

Country of ref document: EP

Kind code of ref document: A1