WO2023274146A1 - 远程接入方法、电子设备及存储介质 - Google Patents

远程接入方法、电子设备及存储介质 Download PDF

Info

Publication number
WO2023274146A1
WO2023274146A1 PCT/CN2022/101508 CN2022101508W WO2023274146A1 WO 2023274146 A1 WO2023274146 A1 WO 2023274146A1 CN 2022101508 W CN2022101508 W CN 2022101508W WO 2023274146 A1 WO2023274146 A1 WO 2023274146A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
application layer
layer protocol
type
dhcp
Prior art date
Application number
PCT/CN2022/101508
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 WO2023274146A1 publication Critical patent/WO2023274146A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures
    • 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • 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

  • the embodiments of the present application relate to the field of information technology, and in particular, to a remote access method, electronic equipment, and a storage medium.
  • DHCP Dynamic Host Configuration Protocol
  • DHCP is a protocol widely deployed on network devices and smart terminals, used to manage dynamic IP address allocation and other network-related configuration tasks, and reduce TCP/IP The burden of network planning, management and maintenance, to solve the problem of lack of IP address space. It can be understood that the above-mentioned DHCP also includes the v6 version of DHCP, that is, DHCP v6.
  • DHCP/DHCPv6 uses User Datagram Protocol (UDP) encapsulation, and the client uses Layer 2 broadcast to request a reply from the DHCP Server or DHCP relay/proxy device in the LAN, and selects a DHCP device from the DHCP devices that have received the reply.
  • the Server or DHCP relay/proxy device completes the DHCP interaction process and obtains the corresponding IP address.
  • DHCP/DHCPv6 cannot directly traverse the public network when the client device remotely accesses the organization's private network from the local network.
  • the usual practice is to deploy a virtual private network (Virtual Private Network, VPN) dedicated line, for example, deploy an IPSec tunnel between the egress access router (AR) device of the local network and the ingress AR device of the private network of the organization, or deploy an IPSec tunnel between the client device Deploy a dedicated VPN client on the network to realize the remote access of the above-mentioned client devices from the local network to the private network of the organization.
  • the above-mentioned deployment configurations are relatively complicated and costly. For example, the deployment of VPN private lines is relatively complicated and costly, and IPSec is rarely applied on laptops and smart phones.
  • the embodiment of the present application provides a remote access method, electronic equipment, and storage medium to provide a way for a client device to remotely access an organization's private network, and between the client device and the organization's private network through the QUIC protocol
  • the access authentication interactively establishes the connection, thereby improving the efficiency of remote access and reducing the cost of network deployment.
  • the embodiment of the present application provides a remote access method applied to the first device, including:
  • the above-mentioned declared application layer protocol message is used for remote access Interaction, thereby completing remote access authentication, can improve the efficiency of remote access, and can save network deployment costs.
  • the above application layer protocol types used for access authentication include a Dynamic Host Configuration Protocol (DHCP) type and an Extensible Authentication Protocol (EAP) type.
  • DHCP Dynamic Host Configuration Protocol
  • EAP Extensible Authentication Protocol
  • the above QUIC protocol-based session handshake is also used to declare the application layer protocol type used for forwarding.
  • the application layer protocol type used for forwarding is declared, thereby preventing the first device from accessing the network resources controlled by the second device before the authentication is successful, thereby avoiding network security issues. question.
  • the foregoing application layer protocol types used for forwarding include L2 type and L3 type.
  • the application layer protocol type used for access authentication is DHCP type
  • the interaction with the second device for access authentication includes:
  • the DHCP-type application layer protocol is used for DHCP message exchange
  • the EAP-type application layer protocol is used for EAP message exchange
  • Each DHCP message or each EAP message is carried by one or more ALP_STREAM frames, and or one or more STREAM frames, or
  • Each DHCP message or the EAP message is carried by one or more ALP_DATAGRAM frames and/or one or more DATAGRAM frames.
  • One of the possible implementations also includes:
  • a response message sent by the second device is received, where the response message includes the network resources requested to be accessed by the first device.
  • the above access message is carried by an ALP_DATAGRAM frame and/or a DATAGRAM frame.
  • the embodiment of the present application also provides a remote access method applied to the second device, including:
  • the session handshake based on the QUIC protocol is used to declare the type of application layer protocol used for access authentication; establish a QUIC session with the first device; In the session, use the application layer protocol message corresponding to the application layer protocol type used for access authentication to perform access authentication interaction with the first device, and complete the remote access authentication for the first device.
  • the application layer protocol type used for access authentication includes a Dynamic Host Configuration Protocol (DHCP) type and an Extensible Authentication Protocol (EAP) type.
  • DHCP Dynamic Host Configuration Protocol
  • EAP Extensible Authentication Protocol
  • the session handshake based on the QUIC protocol is also used to declare the application layer protocol type used for forwarding.
  • the application layer protocol types used for forwarding include L2 type and L3 type.
  • the application layer protocol type used for access authentication is DHCP type
  • the interaction with the first device for access authentication includes:
  • Each DHCP message or each EAP message is carried by one or more ALP_STREAM frames, and or one or more STREAM frames, or
  • Each DHCP message or each EAP message is carried by one or more ALP_DATAGRAM frames and/or one or more DATAGRAM frames.
  • One of the possible implementations also includes:
  • the access message is carried by an ALP_DATAGRAM frame and/or a DATAGRAM frame.
  • the embodiment of the present application provides a remote access device applied to the first device, including:
  • a handshake module configured to perform a session handshake based on the QUIC protocol with the second device, wherein the session handshake based on the QUIC protocol is used to declare the application layer protocol type used for access authentication;
  • a session establishment module configured to establish a QUIC session with the second device
  • the access module is configured to use the application layer protocol message corresponding to the application layer protocol type used for access authentication on the established QUIC session to perform access authentication interaction with the second device, and complete the authentication on the second device remote access.
  • the application layer protocol type used for access authentication includes a Dynamic Host Configuration Protocol (DHCP) type and an Extensible Authentication Protocol (EAP) type.
  • DHCP Dynamic Host Configuration Protocol
  • EAP Extensible Authentication Protocol
  • the above handshake module is also used to declare the application layer protocol type used for forwarding.
  • the above device further includes:
  • the declaration module is used to declare the application layer protocol type used for forwarding on the established QUIC session.
  • the application layer protocol types used for forwarding include L2 type and L3 type.
  • the application layer protocol type used for access authentication is a DHCP type
  • the access module is further configured to send a first message to the second device, wherein the first message is used to send the first message to the second device.
  • the device requests to allocate an IP address
  • Each DHCP message or each EAP message is carried by one or more ALP_STREAM frames, and or one or more STREAM frames, or
  • Each DHCP message or each EAP message is carried by one or more ALP_DATAGRAM frames and/or one or more DATAGRAM frames.
  • the above device further includes:
  • An access module configured to send an access message to the second device, where the access message is used to request access to the network resources of the second device;
  • a response message sent by the second device is received, where the response message includes the network resources requested to be accessed by the first device.
  • the access message is carried by an ALP_DATAGRAM frame and/or a DATAGRAM frame.
  • the embodiment of the present application also provides a remote access device applied to the second device, including:
  • a handshake module configured to perform a session handshake based on the QUIC protocol with the first device, wherein the session handshake based on the QUIC protocol is used to declare the application layer protocol type used for access authentication;
  • a session establishment module configured to establish a QUIC session with the first device
  • the authentication module is configured to use the application layer protocol message corresponding to the application layer protocol type used for access authentication on the established QUIC session to perform access authentication interaction with the first device and complete the remote access to the first device authentication.
  • the application layer protocol type used for access authentication includes a Dynamic Host Configuration Protocol (DHCP) type and an Extensible Authentication Protocol (EAP) type.
  • DHCP Dynamic Host Configuration Protocol
  • EAP Extensible Authentication Protocol
  • the above handshake module is also used to declare the application layer protocol type used for forwarding.
  • the above device further includes:
  • the declaration module is used to declare the application layer protocol type used for forwarding on the established QUIC session.
  • the application layer protocol types used for forwarding include L2 type and L3 type.
  • the application layer protocol type used for access authentication is DHCP type
  • the above authentication module is also used to receive the first message sent by the first device, wherein the first message is used to send the first message to the second device. 2.
  • the device requests to allocate an IP address;
  • the DHCP-type application layer protocol is used for DHCP message exchange
  • the EAP-type application layer protocol is used for EAP message exchange
  • Each DHCP message or each EAP message is carried by one or more ALP_STREAM frames, and or one or more STREAM frames, or
  • Each DHCP message or each EAP message is carried by one or more ALP_DATAGRAM frames and/or one or more DATAGRAM frames.
  • the above device further includes:
  • a response module configured to receive an access packet sent by the first device, where the access packet is used to request access to the network resources of the second device;
  • the access message is carried by an ALP_DATAGRAM frame and/or a DATAGRAM frame.
  • the embodiment of the present application provides a first device, including:
  • the above-mentioned memory is used to store computer program codes, and the above-mentioned computer program codes include instructions, when the above-mentioned first device reads the above-mentioned instructions from the above-mentioned memory so that the above-mentioned first device performs the following steps:
  • the application layer protocol type used for access authentication includes a Dynamic Host Configuration Protocol (DHCP) type and an Extensible Authentication Protocol (EAP) type.
  • DHCP Dynamic Host Configuration Protocol
  • EAP Extensible Authentication Protocol
  • the session handshake based on the QUIC protocol is also used to declare the application layer protocol type used for forwarding.
  • the application layer protocol types used for forwarding include L2 type and L3 type.
  • the application layer protocol type used for access authentication is DHCP type
  • the above-mentioned instruction when executed by the above-mentioned first device, the above-mentioned first device performs the step of interacting with the second device for access authentication include:
  • the DHCP-type application layer protocol is used for DHCP message exchange
  • the EAP-type application layer protocol is used for EAP message exchange
  • Each DHCP message or each EAP message is carried by one or more ALP_STREAM frames, and or one or more STREAM frames, or
  • Each DHCP message or each EAP message is carried by one or more ALP_DATAGRAM frames and/or one or more DATAGRAM frames.
  • the above-mentioned first device when executed by the above-mentioned first device, the above-mentioned first device also performs the following steps:
  • a response message sent by the second device is received, where the response message includes the network resources requested to be accessed by the first device.
  • the access message is carried by an ALP_DATAGRAM frame and/or a DATAGRAM frame.
  • the embodiment of the present application also provides a second device, including:
  • the above-mentioned memory is used to store computer program code
  • the above-mentioned computer program code includes instructions, when the above-mentioned second device reads the above-mentioned instructions from the above-mentioned memory, so that the above-mentioned second device performs the following steps:
  • the application layer protocol type used for access authentication includes a Dynamic Host Configuration Protocol (DHCP) type and an Extensible Authentication Protocol (EAP) type.
  • DHCP Dynamic Host Configuration Protocol
  • EAP Extensible Authentication Protocol
  • the session handshake based on the QUIC protocol is also used to declare the application layer protocol type used for forwarding.
  • the above-mentioned instruction when executed by the above-mentioned second device, after the above-mentioned second device executes the step of completing the remote access authentication of the first device, it also performs the following steps:
  • the application layer protocol types used for forwarding include L2 type and L3 type.
  • the application layer protocol type used for access authentication is a DHCP type
  • the above-mentioned instructions when executed by the above-mentioned second device, the above-mentioned second device performs an access authentication interaction with the first device.
  • the steps include:
  • the DHCP-type application layer protocol is used for DHCP message exchange
  • the EAP-type application layer protocol is used for EAP message exchange
  • Each DHCP message or each EAP message is carried by one or more ALP_STREAM frames, and or one or more STREAM frames, or
  • Each DHCP message or each EAP message is carried by one or more ALP_DATAGRAM frames and/or one or more DATAGRAM frames.
  • the above-mentioned second device when executed by the above-mentioned second device, the above-mentioned second device also performs the following steps:
  • the access message is carried by an ALP_DATAGRAM frame and/or a DATAGRAM frame.
  • an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when it is run on a computer, the computer executes the method described in the first aspect.
  • an embodiment of the present application provides a computer program, which is used to execute the method described in the first aspect when the above computer program is executed by a computer.
  • all or part of the program in the fifth aspect may be stored on a storage medium packaged with the processor, or part or all may be stored on a memory not packaged with the processor.
  • FIGS 1a-1c are schematic diagrams of application scenarios provided by the embodiments of the present application.
  • FIG. 2 is a schematic flowchart of an embodiment of a remote access method provided by the present application
  • FIG. 3 is a schematic structural diagram of an embodiment of a remote access device provided by the present application.
  • FIG. 4 is a schematic structural diagram of another embodiment of the remote access device provided by the present application.
  • FIG. 5 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • first and second are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, a feature defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, "plurality” means two or more.
  • the TCP/IP protocol family is the foundation of the Internet.
  • the transport layer protocol includes Transmission Control Protocol (Transmission Control Protocol, TCP) and User Datagram Protocol (User Datagram Protocol, UDP) protocol.
  • TCP Transmission Control Protocol
  • UDP User Datagram Protocol
  • UDP is lighter, but has much fewer error checks. Since in the UDP protocol, the client does not often communicate with the server to check whether the data packets are delivered or in order, this means that UDP is often more efficient.
  • UDP is not as reliable as TCP.
  • UDP is used for applications such as games, streaming media, and VoIP
  • TCP is used for most applications such as web pages, emails, and remote login.
  • DHCP Dynamic Host Configuration Protocol
  • DHCP is a protocol widely deployed on network devices and smart terminals, used to manage dynamic IP address allocation and other network-related configuration tasks, and reduce TCP/IP The burden of network planning, management and maintenance, to solve the problem of lack of IP address space. It can be understood that the above-mentioned DHCP also includes the v6 version of DHCP, that is, DHCP v6.
  • DHCP/DHCPv6 adopts encapsulation, and the client uses Layer 2 broadcast to request a reply from the DHCP Server or DHCP relay/proxy device in the LAN, and selects a DHCP Server or DHCP relay/proxy device from the DHCP devices that get the reply to complete the DHCP interaction process to obtain the corresponding IP address.
  • DHCP/DHCPv6 cannot directly traverse the public network when the client device remotely accesses the organization's private network from the local network.
  • the usual practice is to deploy a virtual private network (Virtual Private Network, VPN) dedicated line, for example, deploy an IPSec tunnel between the egress access router (AR) device of the local network and the ingress AR device of the private network of the organization, or deploy an IPSec tunnel between the client device Deploy a dedicated VPN client on the network to realize the remote access of the above-mentioned client devices from the local network to the private network of the institution.
  • the above-mentioned deployment configurations are relatively complicated and costly. For example, the deployment of VPN private lines is relatively complicated and costly, and IPSec is rarely applied on laptops and smart phones.
  • the Quick UDP Internet Connection (QUIC) protocol multiplexes the transport layer: after establishing the basic connection between the client and the server, it provides a separate transport for each web page element.
  • "Stream" (Stream) for data transmission the opening and closing of the stream are lightweight, will not affect the connection to which it belongs, and the streams are independent of each other, without affecting their respective transmissions.
  • the QUIC protocol supports encryption and can provide a secure transmission channel.
  • a QUIC packet is carried over UDP.
  • a QUIC packet can contain one or more STREAM frames.
  • a STREAM frame is a special type of frame in a QUIC packet and is used to distinguish different service flows carrying an application. For example, audio and video service flow, application text service flow or application layer control protocol service flow of the same service. Because of the confirmation and retransmission mechanism, Stream is a reliable transmission mechanism.
  • the QUIC protocol also includes a transport mechanism that does not require reliability guarantees, and is carried by DATAGRAM frames.
  • the DATAGRAM frame can also be extended to add the Flow ID field, and use the Flow ID to identify different business sessions or interaction requests.
  • the embodiment of the present application proposes a remote access method based on the above-mentioned QUIC protocol to realize DHCP remote access.
  • the above-mentioned remote access method can be applied to the first device 10 and the second device 20 .
  • the first device 10 may be a client device, and the client device may include but not limited to a mobile phone, a tablet computer (pad), a computer with a transceiver function, a virtual reality (Virtual Reality, VR) terminal device, an enhanced Reality (Augmented Reality, AR) terminal equipment, wireless terminals in Industrial Control, wireless terminals in Self Driving, wireless terminals in Remote Medical, Smart Grid wireless terminals in Transportation Safety, wireless terminals in Smart City, wireless terminals in Smart Home, wearable devices, vehicle-mounted devices and network devices, among which,
  • the network device may include, but not limited to, devices such as layer-3 switches, routers, broadband gateways, firewalls, and load balancers.
  • the second device 20 may be a server.
  • the server can provide services for the client devices, for example, can provide resources to the client devices and save client data, etc.
  • Figures 1a-1c show three application scenarios of the above-mentioned remote access method.
  • Figure 1a is a schematic diagram of the architecture of application scenario 1.
  • the above application scenario 1 includes a first device 10 , a second device 20 and a third device 30 .
  • the first device 10 is a client device
  • the second device 20 is a DHCP server
  • the third device 30 is a DHCP relay or a DHCP proxy.
  • There is a DHCP connection between the first device 10 and the third device 30 and a DHCP protocol interaction based on the QUIC protocol between the second device 20 and the third device 30 . Therefore, the third device 30 may be an access router device in the same local network as the first device 10 .
  • a safe and reliable layer-3 tunnel can be provided, which can then cross public network to realize remote access, and prevent the network configuration information of the private network device transmitted in the DHCP message from being intercepted by the intermediate device.
  • Fig. 1b is a schematic diagram of the architecture of application scenario 2.
  • the above application scenario 2 includes a first device 10 , a second device 20 and a third device 30 .
  • the first device 10 is a client device
  • the second device 20 is a DHCP server
  • the third device 30 is a DHCP relay or a DHCP proxy.
  • There is a DHCP connection between the second device 20 and the third device 30 and the DHCP protocol interaction based on the QUIC protocol is between the second device 20 and the first device 10 . Therefore, the third device 30 may be a device in the same external network as the second device 20 .
  • a safe and reliable layer-3 tunnel can be provided, which can then cross public network to realize remote access, and prevent the network configuration information of the private network device transmitted in the DHCP message from being intercepted by the intermediate device.
  • Fig. 1c is a schematic diagram of the architecture of application scenario 3.
  • the above application scenario 3 includes a first device 10 and a second device 20 .
  • the first device 10 is a client device
  • the second device 20 is a DHCP server.
  • the interaction between the second device 20 and the first device 10 is based on the DHCP protocol of the QUIC protocol.
  • a safe and reliable layer-3 tunnel can be provided, and then the public network can be crossed to realize remote access, and the private information transmitted in the DHCP message can be prevented.
  • the network configuration information of the network device is intercepted by the intermediate device.
  • the first device 10 remotely accesses the private network of the organization where the second device 20 is located through DHCP interaction as an example for illustration.
  • Fig. 2 is a schematic flow diagram of an embodiment of a remote access method provided by the embodiment of the present application, including:
  • Step 201 the first device 10 sends a remote access request to the second device 20 for establishing a QUIC session with the second device 20 .
  • the user can perform operations on the first device 10.
  • the user can configure the type of application layer protocol used for access authentication on the first device 10, and can The layer protocol type initiates the remote access authentication, that is to say, the first device 10 may complete the remote access authentication in the way of access authentication interaction based on the QUIC protocol.
  • the first device 10 may send a remote access request to the second device 20 to establish a QUIC session with the second device 20 to realize remote access to the private network of the organization where the second device 20 is located.
  • the user can also configure the application layer protocol type used for forwarding on the first device.
  • the application layer protocol type used for forwarding may be used to forward the application layer protocol message after the access authentication is successful.
  • the application layer protocol message may be a data packet corresponding to the above application layer protocol type.
  • the above-mentioned application layer protocol type used for access authentication may include a DHCP type and an Extensible Authentication Protocol (Extensible Authentication Protocol, EAP) type.
  • the above DHCP types may include DHCP over Quic and DHCPv6 over Quic.
  • DHCP over Quic is used to represent the DHCP interaction based on the QUIC protocol
  • DHCPv6 over Quic is used to represent the DHCPv6 interaction based on the QUIC protocol.
  • the string “dhcpoq” can be used to identify DHCP over Quic
  • the string "dhcpv6oq" can be used to identify DHCP over Quic.
  • the foregoing application layer protocol types used for forwarding may include L2 type and L3 type.
  • the aforementioned L2 type may include ethernet over Quic, where ethernet over Quic is used to characterize ethernet interaction based on the QUIC protocol.
  • ethernet over Quic can be identified by the string "ethoq”.
  • the above L3 types may include IPv4 over Quic and IPv6 over Quic. Among them, IPv4 over Quic is used to characterize IPv4 interaction based on QUIC protocol, and Ipv6 over Quic is used to characterize IPv6 interaction based on QUIC protocol.
  • the string “ipv4oq” can be used to identify IPv4 over Quic
  • the string “ipv6oq” can be used to identify Ipv6 over Quic.
  • the above string can be created in the registry of the Application Layer Protocol Negotiation (ALPN) protocol.
  • ALPN Application Layer Protocol Negotiation
  • the second device 20 can perform a session handshake based on the QUIC protocol with the first device 10, so as to communicate between the first device 10 and the second device 20.
  • a QUIC session is established between the two devices 20 .
  • the above-mentioned handshake process based on the QUIC protocol may include multiple interaction processes between the first device 10 and the second device 20.
  • the above-mentioned handshake process based on the QUIC protocol can complete authentication, capability negotiation, and key interaction. For details, please refer to the QUIC protocol , which will not be repeated here.
  • the above capability negotiation may be used to declare the application layer protocol type between the first device 10 and the second device 20 .
  • the handshake based on the above QUIC protocol can be triggered by the first DHCP Discovery message or the SOLICIT message of DHCPv6, and can also be triggered by other application protocol session establishment requests carried on the QUIC session, and then DHCP or DHCPv6 can reply Use this QUIC session to complete DHCP or DHCPv6 protocol interaction.
  • the first device 10 and the second device 20 can declare the supported application layer protocol type of bearer through application layer protocol negotiation (Application Layer Protocol Negotiation, ALPN), where , the application layer protocol type declared above may include the application layer protocol type used for access authentication. That is to say, by declaring the above application layer protocol type, the application layer protocol messages that support bearer can be declared.
  • ALPN Application Layer Protocol Negotiation
  • the protocol type of "dhcpoq” can be used to declare that the above-mentioned QUIC session supports the transmission of application layer protocol messages corresponding to "dhcpoq", such as DHCP packets;
  • the protocol type of "dhcpoqv6” can be used to declare that the above-mentioned QUIC session supports the transmission of Application layer protocol messages corresponding to "dhcpoqv6", such as DHCPv6 packets.
  • the application layer protocol type declared above may also include the application layer protocol type used for forwarding.
  • the protocol type of "ethoq” can be used to declare that the above-mentioned QUIC session supports the transmission of application layer protocol messages corresponding to "ethoq", such as ethernet packets;
  • the protocol type of "ipv4oq” can be used to declare that the above-mentioned QUIC session supports transmission Application layer protocol messages corresponding to "IPv4", such as IPv4 packets;
  • the protocol type of "ipv6oq” can be used to declare that the above QUIC session supports the transmission of application layer protocol messages corresponding to "ipv6oq", such as IPv6 packets.
  • DHCP message or DHCPv6 message can be carried by STREAM frame or DATAGRAM frame
  • ethernet message IPv4 message or IPv6 message
  • IPv6 message can be carried by DATAGRAM frame
  • the above-mentioned DHCP message or DHCPv6 message may also be carried by an ALP_STREAM frame or an ALP_DATAGRAM frame
  • the above-mentioned ethernet message, IPv4 message or IPv6 message may also be carried by an ALP_DATAGRAM frame.
  • the ALP_STREAM frame has one more ALP field than the STREAM frame
  • the ALP_DATAGRAM frame has one more ALP field than the DATAGRAM frame.
  • the ALP field is used to represent the application layer protocol type.
  • a DHCP message or DHCPv6 message can be composed of one or more ALP_STREAM frames, and/or one or more STREAM frames frame bearer.
  • the type of application layer protocol supported by the above statement may be DHCP over Quic or DHCPv6 over Quic, or ethernet over Quic, IPv4 over Quic or IPv6. That is to say, when the type of application layer protocol supported by the above statement is DHCP over Quic or DHCPv6 over Quic, ALP_STREAM frames and/or STREAM frames, or ALP_DATAGRAM frames and/or DATAGRAM frames can be used to carry DHCP messages or DHCPv6 messages.
  • the declared supported application layer protocol type may be IPv4 over Quic.
  • the first device 10 can create an ALP_DATAGRAM and/or DATAGRAM frame, and the ALP_DATAGRAM and/or DATAGRAM frame carries an IPv4 message.
  • the IPv4 message can include an IPv4 header and a load, and the load can be a UDP header of the DHCP message, so that the DHCP message can be carried indirectly through the IPv4 message.
  • the payload may also be other protocol packets, for example, an HTTP packet with a TCP header.
  • the declared supported application layer protocol type may be IPv6 over Quic.
  • the first device 10 can create an ALP_DATAGRAM and/or DATAGRAM frame, and the DATAGRAM frame carries an IPv6 packet.
  • the IPv6 packet can include an IPv6 header and a payload
  • the payload can be a DHCPv6 packet, so that Indirectly bear DHCPv6 packets through IPv6 packets.
  • the payload may also be other protocol packets, such as HTTP packets.
  • the declared supported application layer protocol type may be ethernet over Quic.
  • the first device 10 may create an ALP_DATAGRAM and/or DATAGRAM frame, where the ALP_DATAGRAM and/or DATAGRAM frame carries an ethernet packet.
  • the ethernet message may include an ethernet header, an IP header and a payload, and the payload may be a DHCP or DHCPv6 message with a UDP header, so that the Ethernet message may be used to indirectly carry the DHCP or DHCPv6 message.
  • the payload may be other protocol packets, for example, an HTTP packet with a TCP header.
  • the IP header may be an IPv4 header or an IPv6 header, and the type of the IP header may be determined according to the type of the IP address applied for by the first device 10 .
  • the statement of the application layer protocol of the above-mentioned L2 type (for example, ethernet over Quic) and the application layer protocol of the L3 type (for example, IPv4 over Quic or IPv6 over Quic) can be completed in the above-mentioned handshake process based on the QUIC protocol, It can also be completed through recapability negotiation between the first device 10 and the second device 20 in the established QUIC session, that is, after the access authentication is completed, the first device 10 can Continue to declare the supported L2 and/or L3 type of application layer protocol, which is used to notify the second device 20 of the supported L2 and/or L3 type of application layer protocol.
  • the embodiment of this application declares the application layer protocol type of the above-mentioned QUIC session The time is not particularly limited.
  • step 202 the first device 10 sends a first packet to the second device 20 for requesting allocation of an IP address.
  • the first device 10 may send a first packet (application layer protocol message) to the second device 20.
  • the first message may be a DHCP Discovery message.
  • the above-mentioned first message may be a DHCP Discovery message.
  • the first packet may also be a SOLICIT packet.
  • the first packet when carrying a DHCPv6 packet, the first packet may be a SOLICIT packet.
  • the first device 10 may create a bidirectional Stream with an ID of X and the first packet.
  • the X may be a preset integer (for example, X is 16).
  • the bidirectional Stream transmits ALP_STREAM frames and/or STREAM frames, and the ALP_STREAM frames and/or STREAM frames may be used to bear the foregoing first message.
  • the first message is used to request the second device 20 to allocate an IP address to the first device 10, and the IP address is an IP address of an organization's private network.
  • the payload of an ALP_STREAM frame or STREAM frame is usually small, which may not be enough to carry a first packet carrying a relatively large payload.
  • the payload is divided into multiple sub-messages, each sub-message of the first message is carried by an ALP_STREAM frame or STREAM frame, and the sub-messages of the above-mentioned multiple first messages can be reassembled at the second device 20, Thus, the first message is restored. That is to say, the foregoing first packet may be carried by one or more ALP_STREAM frames and or one or more STREAM frames.
  • the first frame in the aforementioned Stream may be an ALP_STREAM frame.
  • the ALP_STREAM frame may include the value of the Stream ID (for example, the value is 16) and the identification of the application layer protocol type carried by it (for example, the identification is dhcpoq), which is used to notify the second device 20 of the Stream corresponding to the Stream ID It carries DHCP packets.
  • the first device 10 can subsequently send the STREAM frame corresponding to the same Stream ID, it does not need to continue sending the ALP_STREAM frame, so that when the second device 20 subsequently receives the STREAM frame corresponding to the Stream ID, it can immediately It is identified that the STREAM frame corresponding to the Stream ID carries a DHCP message.
  • the above example only schematically shows the manner of carrying the first packet through the ALP_STREAM frame or the STREAM frame, and does not constitute a limitation to the embodiment of the present application.
  • the first packet may also be carried by an ALP_DATAGRAM frame or a DATAGRAM frame, that is, the first packet may be carried by one or more ALP_DATAGRAM frames and/or one or more DATAGRAM frames.
  • the following uses an ALP_STREAM frame or STREAM frame to carry other application layer protocol messages (for example, the second message, the third message, and the fourth message) as an example, but it is not limited to the ALP_STREAM frame or STREAM frame Carry the above-mentioned second message, third message and fourth message.
  • Step 203 the second device 20 analyzes the first message, and sends a second message to the first device 10 according to the result of the analysis, so as to provide an allocatable IP address.
  • the second device 20 may analyze the above-mentioned first packet, thereby providing an allocatable IP address according to the analysis result.
  • the above-mentioned second device 20 may receive the first message by obtaining the first message from an ALP_STREAM frame or STREAM frame, or by obtaining the first message from a group of ALP_STREAM frames or STREAM frames sub-messages, and recombining the sub-messages of the multiple first messages into the first message.
  • the second device may provide an assignable IPv4 address; If it is known through parsing the first message (for example, the first message is a SOLICIT message) that the first device 10 requests an IPv6 address, the second device may provide an assignable IPv6 address.
  • a second message (application layer protocol message) may be created, and the above second message may be encapsulated into an ALP_STREAM frame and/or STREAM frame whose ID is X, wherein the above second message may include an assignable IP address . Then, the second device 20 may send the ALP_STREAM frame and/or STREAM frame whose ID is X to the first device 10 .
  • the second message is a DHCP Offer message. If the above first message is a DHCPv6 SOLICIT message, then the second message is a DHCPv6 ADVERTISE message.
  • the above-mentioned second message can also be divided into multiple sub-messages of the second message, and each sub-message of the second message can be carried by an ALP_STREAM frame or a STREAM frame, so that the The first device 10 reassembles the sub-messages of the plurality of second messages, and then restores the second message at the first device 10 .
  • Step 204 the first device 10 analyzes the second message, and sends a third message to the second device 20 according to the result of the analysis, so as to confirm the assigned IP address.
  • the first device 10 after the first device 10 receives the second message sent by the second device 20, it can analyze the second message, so that the information carried by the second message and allocated by the second device 20 can be obtained. IP address. Next, the first device 10 may create a third message (application layer protocol message) according to the allocated IP address. The third message may be used to confirm to the second device 20 that the IP address allocated above is used. Then, the first device 10 may encapsulate the third packet in the ALP_STREAM frame and/or STREAM frame whose ID is X, and may send the ALP_STREAM frame and/or STREAM frame to the second device 20 .
  • ALP_STREAM frame and/or STREAM frame whose ID is X
  • the third message is a DHCP Request message. If the above second message is a DHCPv6 ADVERTISE message, then the third message is a DHCPv6 REQUEST message.
  • the third message above can also be divided into multiple sub-messages of the third message, and each sub-message of the third message can be carried by an ALP_STREAM frame or a STREAM frame, so that the The second device 20 reassembles the sub-messages of the plurality of third messages, and then restores the third message at the second device 20 .
  • Step 205 the second device 20 analyzes the third message, and sends a fourth message to the first device 10 according to the result of the analysis, so as to confirm the assignment of the IP address.
  • the second device 20 after the second device 20 receives the third message sent by the first device 10, it can analyze the above third message, so as to obtain the IP address assigned to the second device 20 in the above third message. Confirmation of the address. Next, the second device 20 can assign the above-mentioned IP address to the first device 10 for use, and can create a fourth message (application layer protocol message) according to the above-mentioned confirmation information, and the fourth message can be used to notify the first device 10 , the above IP address has been confirmed to be allocated to the first device 10 . Then, the second device 20 may encapsulate the fourth packet in the ALP_STREAM frame and/or STREAM frame whose ID is X, and may send the ALP_STREAM frame and/or STREAM frame to the first device 10 .
  • the second device 20 may encapsulate the fourth packet in the ALP_STREAM frame and/or STREAM frame whose ID is X, and may send the ALP_STREAM frame and/or STREAM frame to the first device
  • the fourth message can be a DHCP Ack message, and at this time, what is carried in the DHCP Request message is the IPv4 address assigned to the second device 20 Confirm the information.
  • the fourth message is a DHCPv6 REPLY message. At this time, the DREQUES message carries confirmation information for the IPv6 address allocated by the second device 20 .
  • the above fourth message can also be divided into multiple sub-messages of the fourth message, and each sub-message of the fourth message can be carried by an ALP_STREAM frame or a STREAM frame, so that the The first device 10 reassembles the sub-messages of the plurality of fourth messages, and then restores the fourth message at the first device 10 .
  • Step 206 the first device 10 analyzes the fourth packet, and determines an IP address according to the result of the analysis, so as to complete the DHCP interaction with the second device 20 .
  • the first device 10 after the first device 10 receives the fourth message sent by the second device 20, it can analyze the above fourth message, so that it can be obtained that the second device 20 in the above fourth message confirms that the IP is allocated. address information. Then, the first device 10 can use the IP address, thereby completing the DHCP interaction with the second device 20 , that is, completing the remote access authentication of the first device 10 on the second device 20 . It can be seen that the remote access of the first device 10 on the second device 20 can be realized through the interaction of the above application layer protocol messages (for example, the first message, the second message, the third message and the fourth message). certified.
  • the above application layer protocol messages for example, the first message, the second message, the third message and the fourth message. certified.
  • the first device 10 may dynamically trigger the QUIC protocol module after receiving the above-mentioned fourth message sent by the second device 20 .
  • the first device 10 may send a NEW_ALP frame to the second device 20 on the above-mentioned established QUIC session, and the NEW_ALP frame may be used to negotiate with the second device 20 to support the L2 or L3 application layer protocol.
  • the above step of negotiating the L2 or L3 application layer protocol is performed after the authentication is successful, it can prevent the first device 10 from accessing the network resources controlled by the second device 20 before the authentication is successful, In turn, network security problems can be avoided.
  • step 207 the first device 10 sends a fifth packet to the second device 20 based on the L2 or L3 application layer protocol, so as to access resources on the network where the second device 20 is located.
  • the first device 10 after the first device 10 completes the remote access on the second device 20, it can further perform remote access to the second device 20, that is, the first device 10 can control the network resources to access.
  • the first device 10 may create an access message for remote access (for the convenience of description, the above-mentioned "access message for remote access" will be referred to as the "fifth message” for short below), the The fifth packet may be carried by an ALP_DATAGRAM frame or a DATAGRAM frame.
  • the first device 10 may create a DATAGRAM flow, and the DATAGRAM flow may include multiple ALP_DATAGRAM frames or multiple DATAGRAM frames, wherein each ALP_DATAGRAM frame or DATAGRAM frame may include a flow ID, and the flow ID is used to identify the DATAGRAM flow identity of.
  • the first device 10 may encapsulate the above-mentioned fifth packet into an ALP_DATAGRAM frame or a DATAGRAM frame, where the ALP_DATAGRAM frame may include an ALP field, and the ALP field may be used to identify the application layer protocol type (for example, the application layer protocol type can be ipv4oq).
  • Step 208 the second device 20 sends a sixth message to the first device 10 to complete the access of the first device 10 to the second device 20 .
  • the second device 20 can obtain the fifth message (access message) in the above-mentioned ALP_DATAGRAM frame or DATAGRAM frame, and can according to the fifth message
  • the routing information in is forwarded to the upper layer or other network devices (for example, intranet resource server) of the network where the second device 20 is located.
  • the above routing information may be used to represent IP routing, therefore, the upper layer in the second device 20 may be a protocol layer above L3 (for example, IP layer).
  • the upper layer in the second device 20 or other network devices may generate a corresponding sixth packet according to the fifth packet.
  • the sixth message may be a response message, that is, the sixth message may be a response to the above-mentioned fifth message, and the sixth message may include the resources that the first device 10 wants to access .
  • the second device 20 may send the foregoing sixth packet to the first device 10 . It can be understood that if the upper layer in the second device 20 generates the corresponding sixth message, the second device 20 can directly send the sixth message to the first device 10; if other network devices generate the corresponding sixth packet, the other network device sends the sixth packet to the second device 20, and the second device 20 may forward the sixth packet to the first device 10.
  • the above-mentioned second device 20 may send the sixth message by encapsulating the above-mentioned sixth message into an ALP_DATAGRAM frame or a DATAGRAM frame, and sending the above-mentioned ALP_DATAGRAM frame or DATAGRAM frame to the first device 10 .
  • Step 209 the first device 10 receives and parses the sixth packet sent by the second device 20, and obtains resource information in the sixth packet.
  • the first device 10 may receive the ALP_DATAGRAM frame or the DATAGRAM frame sent by the second device 20, and may obtain the sixth packet from the above-mentioned ALP_DATAGRAM frame or the DATAGRAM frame.
  • the first device 10 may parse the sixth packet.
  • the first device 10 may parse the IP header and the transport protocol header in the sixth packet to obtain the The payload in the sixth packet is the resource accessed by the first device 10, so that the first device 10 can access the resource of the private network where the second device 20 is located.
  • the above steps 201 to 206 describe the scenario of applying for an IP address through DHCP interaction based on the QUIC protocol.
  • the above steps 201 to 206 are also applicable to the scenario of IP address renewal.
  • the message for IP address renewal can be carried on the STREAM frame or DATAGRAM frame based on the QUIC protocol, or can be carried on the For the ALP_STREAM frame or ALP_DATAGRAM frame based on the QUIC protocol, the specific process can refer to the above steps 201 to 206, which will not be repeated here.
  • the first device 10 applies for an IP address from the second device 20 through DHCP interaction based on the QUIC protocol, thereby realizing simple and efficient remote access authentication, and saving the cost of laying VPN dedicated lines or deploying dedicated VPNs. Substantial costs incurred by clients.
  • the above embodiment only exemplarily shows the process of interaction between the first device 10 and the second device 20 , and the interaction with the second device 20 may also be carried out after the first device 10 is relayed by the third device 30 .
  • step 201-step 209 are all optional steps, this application only provides a feasible embodiment, may also include more or less steps than step 201-step 209, this application No limit.
  • the above-mentioned access authentication type may also include the EAP type (such as , EAP over Quic), exemplary, the above-mentioned access authentication protocol of the EAP type can be represented by the character string "eapoq".
  • the protocol type of "eapoq" can support Extensible Authentication Protocol (Extensible Authentication Protocol, EAP) message. That is to say, using the second device 20 as an authentication point, the first device 10 may carry an EAP message through one or more ALP_STREAM frames and or one or more STREAM frames of the QUIC session.
  • the first device 10 may also use one or more ALP_DATAGRAM frames of the QUIC session, and/or one or more DATAGRAM frames to carry the EAP message, thereby completing the access authentication interaction with the second device 20, and then Then use the ALP_DATAGRAM frame or DATAGRAM frame to carry the L2 type or L3 type message to carry out the application for the private network IP address and the access to the private network network resources in the above embodiment.
  • FIG. 3 is a schematic structural diagram of an embodiment of the remote access device of the present application.
  • the above-mentioned remote access device 300 is applied to the first device 10 and may include: a handshake module 310, a session establishment module 320 and an access module 330; where,
  • the handshake module 310 is configured to perform a session handshake based on the QUIC protocol with the second device, wherein the session handshake based on the QUIC protocol is used to declare the application layer protocol type used for access authentication;
  • a session establishment module 320 configured to establish a QUIC session with the second device
  • the access module 330 is configured to use the application layer protocol message corresponding to the application layer protocol type used for access authentication on the established QUIC session to perform access authentication interaction with the second device, and complete the access authentication on the second device remote access.
  • the application layer protocol type used for access authentication includes a Dynamic Host Configuration Protocol (DHCP) type and an Extensible Authentication Protocol (EAP) type.
  • DHCP Dynamic Host Configuration Protocol
  • EAP Extensible Authentication Protocol
  • the above-mentioned handshake module 310 is also used to declare the application layer protocol type used for forwarding.
  • the above device 300 further includes:
  • the declaring module 340 is configured to declare the application layer protocol type used for forwarding on the established QUIC session.
  • the application layer protocol types used for forwarding include L2 type and L3 type.
  • the application layer protocol type used for access authentication is DHCP type
  • the access module 330 is further configured to send a first message to the second device, wherein the first message is used to The second device requests to allocate an IP address
  • the DHCP-type application layer protocol is used for DHCP message exchange
  • the EAP-type application layer protocol is used for EAP message exchange
  • Each DHCP message or each EAP message is carried by one or more ALP_STREAM frames, and or one or more STREAM frames, or
  • Each DHCP message or each EAP message is carried by one or more ALP_DATAGRAM frames and/or one or more DATAGRAM frames.
  • the above device 300 further includes:
  • An access module 350 configured to send an access message to the second device, where the access message is used to request access to network resources of the second device;
  • a response message sent by the second device is received, where the response message includes the network resources requested to be accessed by the first device.
  • the access message is carried by an ALP_DATAGRAM frame and/or a DATAGRAM frame.
  • Fig. 4 is a schematic structural diagram of another embodiment of the remote access device of the present application. As shown in Fig. 4, the above-mentioned remote access device 400 is applied to the second device 20, and may include: a handshake module 410, a session establishment module 420 and an authentication module 430; where,
  • the handshake module 410 is configured to perform a session handshake based on the QUIC protocol with the first device, wherein the session handshake based on the QUIC protocol is used to declare the application layer protocol type used for access authentication;
  • a session establishment module 420 configured to establish a QUIC session with the first device
  • the authentication module 430 is configured to use the application layer protocol message corresponding to the application layer protocol type used for access authentication on the established QUIC session to perform access authentication interaction with the first device, and complete the remote authentication of the first device. Access authentication.
  • the application layer protocol type used for access authentication includes a Dynamic Host Configuration Protocol (DHCP) type and an Extensible Authentication Protocol (EAP) type.
  • DHCP Dynamic Host Configuration Protocol
  • EAP Extensible Authentication Protocol
  • the above-mentioned handshake module 410 is also used to declare the application layer protocol type used for forwarding.
  • the above device 400 further includes:
  • the declaring module 440 is configured to declare the application layer protocol type used for forwarding on the established QUIC session.
  • the application layer protocol types used for forwarding include L2 type and L3 type.
  • the DHCP-type application layer protocol is used for DHCP message exchange
  • the EAP-type application layer protocol is used for EAP message exchange
  • Each DHCP message or each EAP message is carried by one or more ALP_STREAM frames, and or one or more STREAM frames, or
  • Each DHCP message or each EAP message is carried by one or more ALP_DATAGRAM frames and/or one or more DATAGRAM frames.
  • the above device 400 further includes:
  • a response module 450 configured to receive an access packet sent by the first device, where the access packet is used to request access to network resources of the second device;
  • the access message is carried by an ALP_DATAGRAM frame and/or a DATAGRAM frame.
  • the remote access device 300 and the remote access device 400 provided by the embodiment shown in Fig. 3 and Fig. 4 can be used to implement the technical solution of the method embodiment shown in Fig. 1 and Fig. 2 of this application, and its realization principle and technical effect can be further referred to Relevant descriptions in method embodiments.
  • each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software.
  • the above modules may be one or more integrated circuits configured to implement the above method, for example: one or more specific integrated circuits (Application Specific Integrated Circuit; hereinafter referred to as: ASIC), or, one or more microprocessors A Digital Signal Processor (hereinafter referred to as: DSP), or, one or more field programmable gate arrays (Field Programmable Gate Array; hereinafter referred to as: FPGA), etc.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processor
  • FPGA Field Programmable Gate Array
  • these modules can be integrated together and implemented in the form of a System-On-a-Chip (hereinafter referred to as SOC).
  • SOC System-On-a-Chip
  • FIG. 5 shows a schematic structural diagram of an electronic device 500 , which may be the above-mentioned first device 10 or second device 20 .
  • the above-mentioned electronic device 500 may include: at least one processor; and at least one memory connected to the above-mentioned processor in communication, wherein: the above-mentioned memory stores program instructions that can be executed by the above-mentioned processor, and the processor calls the above-mentioned program instructions to execute the application.
  • the remote access method provided by the embodiment shown in FIG. 1 and FIG. 2 .
  • FIG. 5 shows a block diagram of an exemplary electronic device 500 suitable for implementing embodiments of the present application.
  • the electronic device 500 shown in FIG. 5 is only an example, and should not limit the functions and scope of use of this embodiment of the present application.
  • electronic device 500 takes the form of a general-purpose computing device.
  • Components of the electronic device 500 may include, but are not limited to: one or more processors 510 , a memory 520 , a communication bus 540 connecting different system components (including the memory 520 and the processor 510 ), and a communication interface 530 .
  • Communication bus 540 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus structures.
  • these architectures include but are not limited to Industry Standard Architecture (Industry Standard Architecture; hereinafter referred to as: ISA) bus, Micro Channel Architecture (Micro Channel Architecture; hereinafter referred to as: MAC) bus, enhanced ISA bus, video electronics Standards Association (Video Electronics Standards Association; hereinafter referred to as: VESA) local bus and Peripheral Component Interconnection (hereinafter referred to as: PCI) bus.
  • Electronic device 500 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device and include both volatile and nonvolatile media, removable and non-removable media.
  • the memory 520 may include a computer system-readable medium in the form of a volatile memory, such as a random access memory (Random Access Memory; RAM for short) and/or a cache memory.
  • the electronic device may further include other removable/non-removable, volatile/nonvolatile computer system storage media.
  • a disk drive for reading and writing to a removable nonvolatile disk such as a "floppy disk”
  • a removable nonvolatile disk such as a Compact Disk ROM (Compact Disk)
  • CD-ROM Compact Disk ROM
  • DVD-ROM Digital Video Disc Read Only Memory
  • each drive may be connected to communication bus 540 through one or more data media interfaces.
  • the memory 520 may include at least one program product having a set (for example, at least one) of program modules configured to execute the functions of the various embodiments of the present application.
  • a program/utility having a set (at least one) of program modules may be stored in memory 520, such program modules including - but not limited to - an operating system, one or more application programs, other program modules, and program data , each or some combination of these examples may include implementations of network environments.
  • the program modules generally perform the functions and/or methods in the embodiments described herein.
  • the electronic device 500 can also communicate with one or more networks (such as a local area network (Local Area Network; hereinafter referred to as: LAN), a wide area network (Wide Area Network; hereinafter referred to as: WAN) and (or a public network, such as the Internet), the above-mentioned network adapter can communicate with other modules of the electronic device through the communication bus 540 .
  • networks such as a local area network (Local Area Network; hereinafter referred to as: LAN), a wide area network (Wide Area Network; hereinafter referred to as: WAN) and (or a public network, such as the Internet
  • RAID Redundant Arrays of Independent Drives
  • the processor 510 executes various functional applications and data processing by running the programs stored in the memory 520, for example, implementing the remote access method provided by the embodiment of the present application.
  • the above-mentioned electronic devices include corresponding hardware structures and/or software modules for performing each function.
  • the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software in combination with the example units and algorithm steps described in the embodiments disclosed herein. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the embodiments of the present application.
  • the embodiments of the present application can divide the above-mentioned electronic devices into functional modules according to the above-mentioned method examples.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in the embodiment of the present application is schematic, and is only a logical function division, and there may be other division methods in actual implementation.
  • Each functional unit in each embodiment of the embodiment of the present application may be integrated into one processing unit, or each unit may physically exist separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all 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
  • the medium includes several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk, and other various media capable of storing program codes.

Abstract

本申请实施例提供一种远程接入方法、电子设备及存储介质,涉及信息技术领域,该方法包括:与第二设备进行基于QUIC协议的会话握手,其中,所述基于QUIC协议的会话握手用于声明用于接入认证的应用层协议类型;建立与所述第二设备之间的QUIC会话;在所述已建立的QUIC会话上,使用与所述用于接入认证的应用层协议类型对应的应用层协议消息,与所述第二设备进行接入认证交互,完成在所述第二设备上的远程接入。本申请实施例提供的方法,能够提高远程接入的效率,降低网络部署的成本。

Description

远程接入方法、电子设备及存储介质
本申请要求于2021年07月01日提交中国专利局、申请号为202110741989.1、申请名称为“远程接入方法、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及信息技术领域,尤其涉及一种远程接入方法、电子设备及存储介质。
背景技术
动态主机配置协议(Dynamic Host Configuration Protocol,DHCP)是一种在网络设备和智能终端上广泛部署的一种协议,用于实现管理动态的IP地址分配及其他网络相关的配置工作,减轻TCP/IP网络的规划、管理和维护的负担,解决IP地址空间缺乏的问题。可以理解的是,上述DHCP还包括v6版本的DHCP,也就是DHCP v6。
DHCP/DHCPv6采用用户数据报协议(User Datagram Protocol,UDP)封装,客户端采用二层广播的方式在局域网内请求DHCP Server或DHCP relay/proxy设备的答复,从获得答复的DHCP设备中优选一个DHCP Server或DHCP relay/proxy设备完成DHCP的交互流程,获取到对应的IP地址。
目前,当客户端设备从本地网络远程接入到机构私网时,DHCP/DHCPv6无法直接穿越公网。通常的做法是部署虚拟专用网络(Virtual Private Network,VPN)专线,例如,在本地网络的出口接入路由器(AR)设备和机构私网的入口AR设备之间部署IPSec隧道,或者在客户端设备上部署专门的VPN客户端,以实现上述客户端设备从本地网络远程接入到机构私网。然而,上述的部署配置比较复杂,且成本较大,例如,VPN专线的部署较复杂,且成本较大,而IPSec在笔记本电脑、智能手机上实际应用比较少。
发明内容
本申请实施例提供了一种远程接入方法、电子设备及存储介质,以提供一种客户端设备远程接入到机构私网的方式,在客户端设备与机构私网之间通过基于QUIC协议的接入认证交互建立连接,由此可以提高远程接入的效率,并可以降低网络部署的成本。
第一方面,本申请实施例提供了一种远程接入方法,应用于第一设备,包括:
与第二设备进行基于QUIC协议的会话握手,其中,基于QUIC协议的会话握手用于声明用于接入认证的应用层协议类型;建立与第二设备之间的QUIC会话;在已建立的QUIC会话上,使用与用于接入认证的应用层协议类型对应的应用层协议消息,与第二设备进行接入认证交互,完成在第二设备上的远程接入。
本申请实施例中,通过在QUIC会话握手阶段声明用于接入认证的应用层协议类 型,并在建立QUIC会话后,在该QUIC会话上,使用上述已声明的应用层协议消息进行远程接入交互,由此完成远程接入认证,可以提高远程接入的效率,并可以节省网络部署成本。
其中一种可能的实现方式中,上述用于接入认证的应用层协议类型包括动态主机配置协议DHCP类型及扩展认证协议EAP类型。通过声明不同类型的用于接入认证的应用层协议消息,可以提高选取的灵活性。
其中一种可能的实现方式中,上述基于QUIC协议的会话握手还用于声明用于转发的应用层协议类型。
本申请实施例中,通过在QUIC握手阶段声明用于转发的应用层协议类型,可以避免在认证后进行用于转发的应用层协议类型的声明,由此可以提高效率。
其中一种可能的实现方式中,完成在第二设备上的远程接入后,还包括:
在已建立的QUIC会话上,声明用于转发的应用层协议类型。
本申请实施例中,在认证完成后,声明用于转发的应用层协议类型,由此可以避免第一设备在未认证成功前访问第二设备的所管控的网络资源,进而可以避免产生网络安全问题。
其中一种可能的实现方式中,上述用于转发的应用层协议类型包括L2类型及L3类型。通过声明不同类型的用于转发的应用层协议消息,可以提高选取的灵活性。
其中一种可能的实现方式中,用于接入认证的应用层协议类型为DHCP类型,与第二设备进行接入认证交互包括:
向第二设备发送第一报文,其中,第一报文用于向第二设备请求分配IP地址;接收第二设备发送的第二报文,其中,第二报文包含可分配的IP地址;向第二设备发送第三报文,其中,第三报文用于确认可分配的IP地址;接收第二设备发送的第四报文,其中,第四报文包含已分配的IP地址。
其中一种可能的实现方式中,DHCP类型的应用层协议用于进行DHCP报文交互,EAP类型的应用层协议用于进行EAP报文交互,其中,
每条DHCP报文或每条EAP报文由一个或多个ALP_STREAM帧,和或一个或多个STREAM帧承载,或
每条DHCP报文或所述EAP报文由一个或多个ALP_DATAGRAM帧,和/或一个或多个DATAGRAM帧承载。
本申请实施例中,通过上述不同类型的帧(例如STREAM帧或DATAGRAM帧)承载上述报文,可以提高报文传输的灵活性。
其中一种可能的实现方式中,还包括:
向第二设备发送访问报文,其中,访问报文用于请求访问第二设备的网络资源;
接收第二设备发送的响应报文,其中,响应报文包括被第一设备请求访问的网络资源。
其中一种可能的实现方式中,上述访问报文由ALP_DATAGRAM帧和/或DATAGRAM帧承载。
本申请实施例还提供了一种远程接入方法,应用于第二设备,包括:
与第一设备进行基于QUIC协议的会话握手,其中,基于QUIC协议的会话握手 用于声明用于接入认证的应用层协议类型;建立与第一设备之间的QUIC会话;在已建立的QUIC会话上,使用与用于接入认证的应用层协议类型对应的应用层协议消息,与第一设备进行接入认证交互,完成对第一设备的远程接入认证。
其中一种可能的实现方式中,用于接入认证的应用层协议类型包括动态主机配置协议DHCP类型及扩展认证协议EAP类型。
其中一种可能的实现方式中,基于QUIC协议的会话握手还用于声明用于转发的应用层协议类型。
其中一种可能的实现方式中,完成对第一设备的远程接入认证后,还包括:
在已建立的QUIC会话上,声明用于转发的应用层协议类型。
其中一种可能的实现方式中,用于转发的应用层协议类型包括L2类型及L3类型。
其中一种可能的实现方式中,用于接入认证的应用层协议类型为DHCP类型,与第一设备进行接入认证交互包括:
接收第一设备发送的第一报文,其中,第一报文用于向第二设备请求分配IP地址;向第一设备发送第二报文,其中,第二报文包含可分配的IP地址;接收第一设备发送的第三报文,其中,第三报文用于确认可分配的IP地址;向第一设备发送第四报文,其中,第四报文包含已分配的IP地址。
其中一种可能的实现方式中,DHCP类型的应用层协议用于进行DHCP报文交互,EAP类型的应用层协议用于进行EAP报文交互,其中,
每条DHCP报文或每条EAP报文由一个或多个ALP_STREAM帧,和或一个或多个STREAM帧承载,或
每条DHCP报文或每条EAP报文由一个或多个ALP_DATAGRAM帧,和/或一个或多个DATAGRAM帧承载。
其中一种可能的实现方式中,还包括:
接收第一设备发送的访问报文,其中,访问报文用于请求访问第二设备的网络资源;向第一设备发送响应报文,其中,响应报文包括被第一设备请求访问的网络资源。
其中一种可能的实现方式中,访问报文由ALP_DATAGRAM帧和/或DATAGRAM帧承载。
第二方面,本申请实施例提供一种远程接入装置,应用于第一设备,包括:
握手模块,用于与第二设备进行基于QUIC协议的会话握手,其中,基于QUIC协议的会话握手用于声明用于接入认证的应用层协议类型;
会话建立模块,用于建立与第二设备之间的QUIC会话;
接入模块,用于在已建立的QUIC会话上,使用与用于接入认证的应用层协议类型对应的应用层协议消息,与第二设备进行接入认证交互,完成在第二设备上的远程接入。
其中一种可能的实现方式中,用于接入认证的应用层协议类型包括动态主机配置协议DHCP类型及扩展认证协议EAP类型。
其中一种可能的实现方式中,上述握手模块还用于声明用于转发的应用层协议类型。
其中一种可能的实现方式中,上述装置还包括:
声明模块,用于在已建立的QUIC会话上,声明用于转发的应用层协议类型。
其中一种可能的实现方式中,用于转发的应用层协议类型包括L2类型及L3类型。
其中一种可能的实现方式中,用于接入认证的应用层协议类型为DHCP类型,上述接入模块还用于向第二设备发送第一报文,其中,第一报文用于向第二设备请求分配IP地址;
接收第二设备发送的第二报文,其中,第二报文包含可分配的IP地址;
向第二设备发送第三报文,其中,第三报文用于确认可分配的IP地址;
接收第二设备发送的第四报文,其中,第四报文包含已分配的IP地址。
其中一种可能的实现方式中,DHCP类型的应用层协议用于进行DHCP报文交互,EAP类型的应用层协议用于进行EAP报文交互,其中,
每条DHCP报文或每条EAP报文由一个或多个ALP_STREAM帧,和或一个或多个STREAM帧承载,或
每条DHCP报文或每条EAP报文由一个或多个ALP_DATAGRAM帧,和/或一个或多个DATAGRAM帧承载。
其中一种可能的实现方式中,上述装置还包括:
访问模块,用于向第二设备发送访问报文,其中,访问报文用于请求访问第二设备的网络资源;
接收第二设备发送的响应报文,其中,响应报文包括被第一设备请求访问的网络资源。
其中一种可能的实现方式中,访问报文由ALP_DATAGRAM帧和/或DATAGRAM帧承载。
本申请实施例还提供一种远程接入装置,应用于第二设备,包括:
握手模块,用于与第一设备进行基于QUIC协议的会话握手,其中,基于QUIC协议的会话握手用于声明用于接入认证的应用层协议类型;
会话建立模块,用于建立与第一设备之间的QUIC会话;
认证模块,用于在已建立的QUIC会话上,使用与用于接入认证的应用层协议类型对应的应用层协议消息,与第一设备进行接入认证交互,完成对第一设备的远程接入认证。
其中一种可能的实现方式中,用于接入认证的应用层协议类型包括动态主机配置协议DHCP类型及扩展认证协议EAP类型。
其中一种可能的实现方式中,上述握手模块还用于声明用于转发的应用层协议类型。
其中一种可能的实现方式中,上述装置还包括:
声明模块,用于在已建立的QUIC会话上,声明用于转发的应用层协议类型。
其中一种可能的实现方式中,用于转发的应用层协议类型包括L2类型及L3类型。
其中一种可能的实现方式中,用于接入认证的应用层协议类型为DHCP类型,上述认证模块还用于接收第一设备发送的第一报文,其中,第一报文用于向第二设备请求分配IP地址;
向第一设备发送第二报文,其中,第二报文包含可分配的IP地址;
接收第一设备发送的第三报文,其中,第三报文用于确认可分配的IP地址;
向第一设备发送第四报文,其中,第四报文包含已分配的IP地址。
其中一种可能的实现方式中,DHCP类型的应用层协议用于进行DHCP报文交互,EAP类型的应用层协议用于进行EAP报文交互,其中,
每条DHCP报文或每条EAP报文由一个或多个ALP_STREAM帧,和或一个或多个STREAM帧承载,或
每条DHCP报文或每条EAP报文由一个或多个ALP_DATAGRAM帧,和/或一个或多个DATAGRAM帧承载。
其中一种可能的实现方式中,上述装置还包括:
响应模块,用于接收第一设备发送的访问报文,其中,访问报文用于请求访问第二设备的网络资源;
向第一设备发送响应报文,其中,响应报文包括被第一设备请求访问的网络资源。
其中一种可能的实现方式中,访问报文由ALP_DATAGRAM帧和/或DATAGRAM帧承载。
第三方面,本申请实施例提供一种第一设备,包括:
存储器,上述存储器用于存储计算机程序代码,上述计算机程序代码包括指令,当上述第一设备从上述存储器中读取上述指令,以使得上述第一设备执行以下步骤:
与第二设备进行基于QUIC协议的会话握手,其中,基于QUIC协议的会话握手用于声明用于接入认证的应用层协议类型;
建立与第二设备之间的QUIC会话;
在已建立的QUIC会话上,使用与用于接入认证的应用层协议类型对应的应用层协议消息,与第二设备进行接入认证交互,完成在第二设备上的远程接入。
其中一种可能的实现方式中,用于接入认证的应用层协议类型包括动态主机配置协议DHCP类型及扩展认证协议EAP类型。
其中一种可能的实现方式中,基于QUIC协议的会话握手还用于声明用于转发的应用层协议类型。
其中一种可能的实现方式中,上述指令被上述第一设备执行时,使得上述第一设备执行的完成在第二设备上的远程接入的步骤之后,还执行以下步骤:
在已建立的QUIC会话上,声明用于转发的应用层协议类型。
其中一种可能的实现方式中,用于转发的应用层协议类型包括L2类型及L3类型。
其中一种可能的实现方式中,用于接入认证的应用层协议类型为DHCP类型,上述指令被上述第一设备执行时,使得上述第一设备执行与第二设备进行接入认证交互的步骤包括:
向第二设备发送第一报文,其中,第一报文用于向第二设备请求分配IP地址;
接收第二设备发送的第二报文,其中,第二报文包含可分配的IP地址;
向第二设备发送第三报文,其中,第三报文用于确认可分配的IP地址;
接收第二设备发送的第四报文,其中,第四报文包含已分配的IP地址。
其中一种可能的实现方式中,DHCP类型的应用层协议用于进行DHCP报文交互,EAP类型的应用层协议用于进行EAP报文交互,其中,
每条DHCP报文或每条EAP报文由一个或多个ALP_STREAM帧,和或一个或多个STREAM帧承载,或
每条DHCP报文或每条EAP报文由一个或多个ALP_DATAGRAM帧,和/或一个或多个DATAGRAM帧承载。
其中一种可能的实现方式中,上述指令被上述第一设备执行时,使得上述第一设备还执行以下步骤:
向第二设备发送访问报文,其中,访问报文用于请求访问第二设备的网络资源;
接收第二设备发送的响应报文,其中,响应报文包括被第一设备请求访问的网络资源。
其中一种可能的实现方式中,访问报文由ALP_DATAGRAM帧和/或DATAGRAM帧承载。
本申请实施例还提供一种第二设备,包括:
存储器,上述存储器用于存储计算机程序代码,上述计算机程序代码包括指令,当上述第二设备从上述存储器中读取上述指令,以使得上述第二设备执行以下步骤:
与第一设备进行基于QUIC协议的会话握手,其中,基于QUIC协议的会话握手用于声明用于接入认证的应用层协议类型;
建立与第一设备之间的QUIC会话;
在已建立的QUIC会话上,使用与用于接入认证的应用层协议类型对应的应用层协议消息,与第一设备进行接入认证交互,完成对第一设备的远程接入认证。
其中一种可能的实现方式中,用于接入认证的应用层协议类型包括动态主机配置协议DHCP类型及扩展认证协议EAP类型。
其中一种可能的实现方式中,基于QUIC协议的会话握手还用于声明用于转发的应用层协议类型。
其中一种可能的实现方式中,上述指令被上述第二设备执行时,使得上述第二设备执行完成对第一设备的远程接入认证的步骤之后,还执行以下步骤:
在已建立的QUIC会话上,声明用于转发的应用层协议类型。
其中一种可能的实现方式中,用于转发的应用层协议类型包括L2类型及L3类型。
其中一种可能的实现方式中,用于接入认证的应用层协议类型为DHCP类型,上述指令被上述第二设备执行时,使得上述第二设备执行与所述第一设备进行接入认证交互的步骤包括:
接收第一设备发送的第一报文,其中,第一报文用于向第二设备请求分配IP地址;
向第一设备发送第二报文,其中,第二报文包含可分配的IP地址;
接收第一设备发送的第三报文,其中,第三报文用于确认可分配的IP地址;
向第一设备发送第四报文,其中,第四报文包含已分配的IP地址。
其中一种可能的实现方式中,DHCP类型的应用层协议用于进行DHCP报文交互,EAP类型的应用层协议用于进行EAP报文交互,其中,
每条DHCP报文或每条EAP报文由一个或多个ALP_STREAM帧,和或一个或多个STREAM帧承载,或
每条DHCP报文或每条EAP报文由一个或多个ALP_DATAGRAM帧,和/或一个 或多个DATAGRAM帧承载。
其中一种可能的实现方式中,上述指令被上述第二设备执行时,使得上述第二设备还执行以下步骤:
接收第一设备发送的访问报文,其中,访问报文用于请求访问第二设备的网络资源;
向第一设备发送响应报文,其中,响应报文包括被第一设备请求访问的网络资源。
其中一种可能的实现方式中,访问报文由ALP_DATAGRAM帧和/或DATAGRAM帧承载。
第四方面,本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如第一方面所述的方法。
第五方面,本申请实施例提供一种计算机程序,当上述计算机程序被计算机执行时,用于执行第一方面所述的方法。
在一种可能的设计中,第五方面中的程序可以全部或者部分存储在与处理器封装在一起的存储介质上,也可以部分或者全部存储在不与处理器封装在一起的存储器上。
附图说明
图1a-图1c为本申请实施例提供的应用场景示意图;
图2为本申请提供的远程接入方法一个实施例的流程示意图;
图3为本申请提供的远程接入装置一个实施例的结构示意图;
图4为本申请提供的远程接入装置另一个实施例的结构示意图;
图5为本申请实施例提供的电子设备的硬件结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
TCP/IP协议族是互联网的基础。其中,传输层协议包括传输控制协议(Transmission Control Protocol,TCP)和用户数据报协议(User Datagram Protocol,UDP)协议。与TCP协议相比,UDP更为轻量,但是错误校验也要少得多。由于在UDP协议中,客户端不经常跟服务器端通信查看数据包是否送达或者按序,这也就意味着UDP往往效率更高。但是,UDP的可靠性比不上TCP。通常,对于游戏、流媒体以及VoIP等应用均采用UDP,而对于网页、邮件、远程登录等大部分的应用均采用TCP。
动态主机配置协议(Dynamic Host Configuration Protocol,DHCP)是一种在网络设备和智能终端上广泛部署的一种协议,用于实现管理动态的IP地址分配及其他网 络相关的配置工作,减轻TCP/IP网络的规划、管理和维护的负担,解决IP地址空间缺乏的问题。可以理解的是,上述DHCP还包括v6版本的DHCP,也就是DHCP v6。
DHCP/DHCPv6采用封装,客户端采用二层广播的方式在局域网内请求DHCP Server或DHCP relay/proxy设备的答复,从获得答复的DHCP设备中优选一个DHCP Server或DHCP relay/proxy设备完成DHCP的交互流程,获取到对应的IP地址。
目前,当客户端设备从本地网络远程接入到机构私网时,DHCP/DHCPv6无法直接穿越公网。通常的做法是部署虚拟专用网络(Virtual Private Network,VPN)专线,例如,在本地网络的出口接入路由器(AR)设备和机构私网的入口AR设备之间部署IPSec隧道,或者在客户端设备上部署专门的VPN客户端,以实现上述客户端设备从本地网络远程接入到机构私网。然而,上述的部署配置比较复杂,且成本较大,例如,VPN专线的部署较复杂,且成本较大,而IPSec在笔记本电脑、智能手机上实际应用比较少。
快速UDP互联网连接(Quick UDP Internet Connection,QUIC)协议对传输层进行了多路复用:在建立了客户端到服务器之间的基本连接之后,对于每个网页元素的传输,它都单独提供一个“流”(Stream)进行数据传输,流的开启和关闭都是轻量级的,不会影响其所属连接,且流与流之间相互独立,不影响各自的传输。QUIC协议支持加密,可以提供安全的传输通道。
QUIC报文承载在UDP上。QUIC报文可以包含一个或多个STREAM帧。STREAM帧作为QUIC报文中一种特殊类型的帧,用于区分承载一个应用的不同业务流。例如,同一个业务的音视频业务流、应用文字业务流或应用层控制协议业务流。因为有确认和重传机制,所以Stream是一种可靠的传输机制。
此外,QUIC协议也包括一种承载不需要可靠性保障的传输机制,用DATAGRAM帧承载。其中,DATAGRAM帧也可以扩展增加Flow ID字段,用Flow ID标识不同的业务会话或交互请求。
为了解决上述问题,本申请实施例基于上述QUIC协议,提出了一种远程接入方法,以实现DHCP远程接入,上述远程接入方法可以应用于第一设备10及第二设备20。示例性的,该第一设备10可以是客户端设备,该客户端设备可以包括但不限于手机、平板电脑(pad)、带收发功能的电脑、虚拟现实(Virtual Reality,VR)终端设备、增强现实(Augmented Reality,AR)终端设备、工业控制(Industrial Control)中的无线终端、无人驾驶(Self Driving)中的无线终端、远程医疗(Remote Medical)中的无线终端、智能电网(Smart Grid)中的无线终端、运输安全(Transportation Safety)中的无线终端、智慧城市(Smart City)中的无线终端、智慧家庭(Smart Home)中的无线终端、可穿戴设备、车载设备和网络设备,其中,该网络设备可以包括但不限于例如三层交换机、路由器、宽带网关、防火墙、负载均衡器等设备。该第二设备20可以是服务器。该服务器可以为客户端设备提供服务,例如,可以向客户端设备提供资源以及保存客户端数据等。
图1a-图1c为上述远程接入方法的三个应用场景。
图1a为应用场景1的架构示意图。如图1a所示,上述应用场景1包括第一设备10、第二设备20及第三设备30。其中,该第一设备10为客户端设备,第二设备20 为DHCP服务器,第三设备30为DHCP relay或DHCP proxy。第一设备10与第三设备30之间是DHCP连接,第二设备20与第三设备30之间是基于QUIC协议的DHCP协议交互。因此,该第三设备30可以是与第一设备10处于同一本地网络的接入路由器设备。通过第一设备10与第三设备30之间建立本地的DHCP连接,并通过第三设备30与第二设备20之间建立QUIC会话,由此可以提供安全、可靠的三层隧道,进而可以跨越公网,以实现远程接入,并可以防止DHCP报文中传递的私网设备网络配置信息被中间设备侦听。
图1b为应用场景2的架构示意图。如图1b所示,上述应用场景2包括第一设备10、第二设备20及第三设备30。其中,该第一设备10为客户端设备,第二设备20为DHCP服务器,第三设备30为DHCP relay或DHCP proxy。第二设备20与第三设备30之间是DHCP连接,第二设备20与第一设备10之间是基于QUIC协议的DHCP协议交互。因此,该第三设备30可以是与第二设备20处于同一外部网络的设备。通过第二设备20与第三设备30之间建立本地的DHCP连接,并通过第三设备30与第一设备10之间建立QUIC会话,由此可以提供安全、可靠的三层隧道,进而可以跨越公网,以实现远程接入,并可以防止DHCP报文中传递的私网设备网络配置信息被中间设备侦听。
图1c为应用场景3的架构示意图。如图1c所示,上述应用场景3包括第一设备10及第二设备20。其中,该第一设备10为客户端设备,第二设备20为DHCP服务器。第二设备20与第一设备10之间是基于QUIC协议的DHCP协议交互。通过第二设备20与第一设备10之间建立QUIC会话,由此可以提供安全、可靠的三层隧道,进而可以跨越公网,以实现远程接入,并可以防止DHCP报文中传递的私网设备网络配置信息被中间设备侦听。
接着,以第一设备10通过DHCP交互的方式远程接入第二设备20所在的机构私网为例进行说明。
图2为本申请实施例提供的远程接入方法一个实施例的流程示意图,包括:
步骤201,第一设备10向第二设备20发送远程接入请求,用于建立与第二设备20之间的QUIC会话。
具体地,用户可以在第一设备10上进行操作,示例性的,用户可以在第一设备10上配置用于接入认证的应用层协议类型,并可以根据配置的用于接入认证的应用层协议类型发起远程接入认证,也就是说,第一设备10可以采用基于QUIC协议的接入认证交互的方式完成远程接入认证。响应于用户的操作,第一设备10可以向第二设备20发送远程接入请求,以和第二设备20建立QUIC会话,实现远程接入到第二设备20所在的机构私网。
此外,用户还可以在第一设备上配置用于转发的应用层协议类型。其中,用于转发的应用层协议类型可以用于在接入认证成功后,对应用层协议消息进行转发。其中,该应用层协议消息可以是与上述应用层协议类型对应的数据报文。
其中,在本申请实施例中,上述用于接入认证的应用层协议类型可以包括DHCP类型及扩展认证协议(Extensible Authentication Protocol,EAP)类型。示例性的,上述DHCP类型可以包括DHCP over Quic及DHCPv6 over Quic。其中,DHCP over Quic 用于表征基于QUIC协议的DHCP交互,DHCPv6 over Quic用于表征基于QUIC协议的DHCPv6交互。在具体实现时,可以通过字符串“dhcpoq”标识DHCP over Quic,通过字符串“dhcpv6oq”标识DHCP over Quic。
上述用于转发的应用层协议类型可以包括L2类型及L3类型。上述L2类型可以包括ethernet over Quic,其中,ethernet over Quic用于表征基于QUIC协议的ethernet交互。在具体实现时,可以通过字符串“ethoq”标识ethernet over Quic。上述L3类型可以包括IPv4 over Quic及IPv6 over Quic。其中,IPv4 over Quic用于表征基于QUIC协议的IPv4交互,Ipv6 over Quic用于表征基于QUIC协议的Ipv6交互。在具体实现时,可以通过字符串“ipv4oq”标识IPv4 over Quic,通过字符串“ipv6oq”标识Ipv6 over Quic。上述字符串可以在应用层协议协商(Application Layer Protocol Negotiation,ALPN)协议的注册表中创建。
可以理解的是,上述第一设备10向第二设备20发送远程接入请求后,第二设备20可以与第一设备10之间进行基于QUIC协议的会话握手,以在第一设备10与第二设备20之间建立QUIC会话。上述基于QUIC协议的握手过程可以包括第一设备10与第二设备20之间的多次交互过程,上述基于QUIC协议的握手过程可以完成鉴权、能力协商及密钥交互,具体可以参考QUIC协议,在此不再赘述。其中,上述能力协商可以用于完成第一设备10与第二设备20之间的应用层协议类型的声明。
可选地,上述基于QUIC协议的握手可以由首个DHCP Discovery报文或DHCPv6的SOLICIT报文触发,也可以由其他承载在QUIC会话上的应用协议会话建立请求触发,然后,DHCP或DHCPv6可以复用该QUIC会话来完成DHCP或DHCPv6协议交互。
需要说明的是,在上述基于QUIC协议的会话握手过程中,第一设备10与第二设备20可以通过应用层协议协商(Application Layer Protocol Negotiation,ALPN)声明支持的承载的应用层协议类型,其中,上述声明的应用层协议类型可以包括用于接入认证的应用层协议类型。也就是说,通过声明上述应用层协议类型,可以声明支持承载的应用层协议消息。示例性的,“dhcpoq”的协议类型可以用于声明上述QUIC会话支持传输与“dhcpoq”对应的应用层协议消息,例如DHCP报文;“dhcpoqv6”的协议类型可以用于声明上述QUIC会话支持传输与“dhcpoqv6”对应的应用层协议消息,例如DHCPv6报文。
可选地,上述声明的应用层协议类型还可以包括用于转发的应用层协议类型。示例性的,“ethoq”的协议类型可以用于声明上述QUIC会话支持传输与“ethoq”对应的应用层协议消息,例如ethernet报文;“ipv4oq”的协议类型可以用于声明上述QUIC会话支持传输与“IPv4”对应的应用层协议消息,例如IPv4报文;“ipv6oq”的协议类型可以用于声明上述QUIC会话支持传输与“ipv6oq”对应的应用层协议消息,例如Ipv6报文。
其中,DHCP报文或DHCPv6报文可以通过STREAM帧或DATAGRAM帧承载,ethernet报文、IPv4报文或IPv6报文可以通过DATAGRAM帧承载
可选地,上述DHCP报文或DHCPv6报文还可以通过ALP_STREAM帧或ALP_DATAGRAM帧承载,上述ethernet报文、IPv4报文或IPv6报文也可以通过 ALP_DATAGRAM帧承载。其中,该ALP_STREAM帧比STREAM帧多一个ALP域,ALP_DATAGRAM帧比DATAGRAM帧多一个ALP域。其中,该ALP域用于表征应用层协议类型。
可以理解的是,当通过ALP_STREAM帧和/或STREAM帧承载上述DHCP报文或DHCPv6报文时,一个DHCP报文或DHCPv6报文可以由一个或多个ALP_STREAM帧,和/或一个或多个STREAM帧承载。
此外,上述声明支持的应用层协议类型可以是一个或多个。示例性的,上述声明支持的应用层协议类型可以是DHCP over Quic或DHCPv6 over Quic,也可以是ethernet over Quic、IPv4 over Quic或IPv6。也就是说,当上述声明支持的应用层协议类型为DHCP over Quic或DHCPv6 over Quic时,可以通过ALP_STREAM帧和/或STREAM帧、或ALP_DATAGRAM帧和/或DATAGRAM帧承载DHCP报文或DHCPv6报文。当上述声明支持的应用层协议类型为ethernet over Quic、IPv4 over Quic或IPv6 over Quic时,可以通过ethernet报文、IPv4报文或IPv6报文间接承载上述DHCP报文或DHCPv6报文以及其他协议报文。
示例性的,以第一设备10发送DHCP报文以及申请IPv4地址为例,此时,声明支持的应用层协议类型可以是IPv4 over Quic。第一设备10可以创建ALP_DATAGRAM和/或DATAGRAM帧,该ALP_DATAGRAM和/或DATAGRAM帧帧承载的是IPv4报文,可以理解的是,该IPv4报文可以包含IPv4头和载荷,该载荷可以是带UDP头的DHCP报文,由此可以实现通过IPv4报文间接承载DHCP报文。可以理解的是,该载荷也可以是其他协议报文,例如带TCP头的HTTP报文。
接着,以第一设备10发送DHCPv6报文以及申请IPv6地址为例,此时,声明支持的应用层协议类型可以是IPv6 over Quic。第一设备10可以创建ALP_DATAGRAM和/或DATAGRAM帧,该DATAGRAM帧承载的是IPv6报文,可以理解的是,该IPv6报文可以包含IPv6头和载荷,该载荷可以是DHCPv6报文,由此可以实现通过IPv6报文间接承载DHCPv6报文。可以理解的是,该载荷也可以是其他协议报文,例如HTTP报文。
进一步地,以第一设备10发送DHCP报文或DHCPv6报文为例,此时,声明支持的应用层协议类型可以是ethernet over Quic。第一设备10可以创建ALP_DATAGRAM和/或DATAGRAM帧,该ALP_DATAGRAM和/或DATAGRAM帧承载的是ethernet报文。可以理解的是,该ethernet报文可以包含ethernet头、IP头和载荷,该载荷可以是带UDP头的DHCP或DHCPv6报文,由此可以实现通过ethernet报文间接承载DHCP或DHCPv6报文。该载荷可以是其他协议报文,例如带TCP头的HTTP报文。可以理解的是,上述IP头可以是IPv4头或IPv6头,上述IP头的类型可以根据第一设备10申请的IP地址的类型确定。
可选地,上述L2类型的应用层协议(例如,ethernet over Quic)及L3类型的应用层协议(例如,IPv4 over Quic或IPv6 over Quic)的声明可以在上述基于QUIC协议的握手过程中完成,也可以在已建立的QUIC会话中通过第一设备10与第二设备20之间的再次能力协商完成,也就是说,第一设备10可以在接入认证完成后,在已建立的QUIC会话中继续声明支持的L2和/或L3类型的应用层协议,用于通知第二设 备20支持的L2和/或L3类型的应用层协议,本申请实施例对上述QUIC会话的应用层协议类型的声明时刻不作特殊限定。
步骤202,第一设备10向第二设备20发送第一报文,用于请求分配IP地址。
具体地,当第一设备10与第二设备20建立QUIC会话后,第一设备10可以向第二设备20发送第一报文(应用层协议消息)。其中,该第一报文可以是DHCP Discovery报文,示例性的,在承载DHCP报文时,上述第一报文可以是DHCP Discovery报文。该第一报文也可以是SOLICIT报文,示例性的,在承载DHCPv6报文时,上述第一报文可以是SOLICIT报文。
在具体实现时,第一设备10可以创建一个ID为X的双向Stream及第一报文。其中,该X可以为预设的整数(例如,X为16)。该双向Stream传输ALP_STREAM帧和/或STREAM帧,该ALP_STREAM帧和/或STREAM帧可以用于承载上述第一报文。该第一报文用于请求第二设备20给第一设备10分配IP地址,该IP地址是机构私网的IP地址。
可以理解的是,一个ALP_STREAM帧或STREAM帧的载荷通常较小,可能不足以承载一个携带较大载荷的第一报文,因此,可以将上述第一报文根据一个ALP_STREAM帧或STREAM帧的最大载荷分割成多个子报文,每个第一报文的子报文通过一个ALP_STREAM帧或STREAM帧承载,并可以在第二设备20处将上述多个第一报文的子报文进行重组,由此还原出第一报文。也就是说,上述第一报文可以由一个或多个ALP_STREAM帧,和或一个或多个STREAM帧承载。
可选地,第一设备10在向第二设备20发送Stream数据时,上述Stream中的首个帧可以为ALP_STREAM帧。该ALP_STREAM帧中可以包含Stream ID的数值(例如,该数值为16)及其承载的应用层协议类型的标识(例如,该标识为dhcpoq),用于通知第二设备20该Stream ID对应的Stream承载的是DHCP报文。也就是说,第一设备10后续可以发送同一Stream ID对应的STREAM帧时,可以不用继续发送ALP_STREAM帧,由此可以使得第二设备20在后续收到该Stream ID对应的STREAM帧时,可以马上识别出该Stream ID对应的STREAM帧承载的是DHCP报文。
需要说明的是,上述示例仅示意性的示出了通过ALP_STREAM帧或STREAM帧承载第一报文的方式,并不构成对本申请实施例的限定。在一些实施例中,也可以通过ALP_DATAGRAM帧或DATAGRAM帧承载上述第一报文,也就是说,上述第一报文可以由一个或多个ALP_DATAGRAM帧,和/或一个或多个DATAGRAM帧承载。为说明方便,下文以ALP_STREAM帧或STREAM帧承载其他应用层协议消息(例如,第二报文、第三报文及第四报文)为例进行说明,但并不限于通过ALP_STREAM帧或STREAM帧承载上述第二报文、第三报文及第四报文。
步骤203,第二设备20对第一报文进行解析,并根据解析结果向第一设备10发送第二报文,用于提供可分配的IP地址。
具体地,当第二设备20接收到第一设备10发送的第一报文后,可以对上述第一报文进行解析,由此可以根据解析结果提供可分配的IP地址。在具体实现时,上述第二设备20接收第一报文的方式可以是从一个ALP_STREAM帧或STREAM帧中获取第一报文,也可以是从一组ALP_STREAM帧或STREAM帧中获取第一报文的子报文, 并将多个第一报文的子报文重组成第一报文。
示例性的,若通过对上述第一报文(例如,该第一报文是DHCP Discovery报文)解析获知第一设备10请求的是IPv4地址,则第二设备可以提供可分配的IPv4地址;若通过对上述第一报文(例如,该第一报文是SOLICIT报文)解析获知第一设备10请求的是IPv6地址,则第二设备可以提供可分配的IPv6地址。
接着,第二设备20在根据上述第一报文携带的第一设备10的用户认证信息在本地认证、授权和计费(Authentication、Authorization and Accounting,AAA)模块和远程AAA服务器上认证通过后,可以创建第二报文(应用层协议消息),并可以将上述第二报文封装到ID为X的ALP_STREAM帧和/或STREAM帧中,其中,上述第二报文可以包含可分配的IP地址。然后,第二设备20可以将上述ID为X的ALP_STREAM帧和/或STREAM帧发送给第一设备10。
可以理解的是,若上述第一报文是DHCP Discovery报文,则第二报文为DHCP Offer报文。若上述第一报文是DHCPv6的SOLICIT报文,则第二报文为DHCPv6的ADVERTISE报文。
需要说明的是,上述第二报文也可以分割成多个第二报文的子报文,每个第二报文的子报文可以通过一个ALP_STREAM帧或STREAM帧承载,由此可以使得在第一设备10处将上述多个第二报文的子报文进行重组,进而在第一设备10处还原出第二报文。
步骤204,第一设备10对第二报文进行解析,根据解析结果向第二设备20发送第三报文,以确认分配的IP地址。
具体地,当第一设备10接收到第二设备20发送的第二报文后,可以对上述第二报文进行解析,由此可以得到上述第二报文携带的由第二设备20分配的IP地址。接着,第一设备10可以根据该分配的IP地址创建第三报文(应用层协议消息)。该第三报文可以用于向第二设备20确认使用上述分配的IP地址。然后,第一设备10可以将上述第三报文封装在ID为X的ALP_STREAM帧和/或STREAM帧中,并可以将该ALP_STREAM帧和/或STREAM帧发送给第二设备20。
可以理解的是,若上述第二报文是DHCP Offer报文,则第三报文为DHCP Request报文。若上述第二报文是DHCPv6的ADVERTISE报文,则第三报文为DHCPv6的REQUEST报文。
需要说明的是,上述第三报文也可以分割成多个第三报文的子报文,每个第三报文的子报文可以通过一个ALP_STREAM帧或STREAM帧承载,由此可以使得在第二设备20处将上述多个第三报文的子报文进行重组,进而在第二设备20处还原出第三报文。
步骤205,第二设备20对第三报文进行解析,根据解析结果向第一设备10发送第四报文,以确认分配IP地址。
具体地,当第二设备20接收到第一设备10发送的第三报文后,可以对上述第三报文进行解析,由此可以得到上述第三报文中对第二设备20分配的IP地址的确认信息。接着,第二设备20可以将上述IP地址分配给第一设备10使用,并可以根据上述确认信息创建第四报文(应用层协议消息),该第四报文可以用于通知第一设备10, 上述IP地址已经确认分配给第一设备10。然后,第二设备20可以将上述第四报文封装在ID为X的ALP_STREAM帧和/或STREAM帧中,并可以将该ALP_STREAM帧和/或STREAM帧发送给第一设备10。
可以理解的是,若上述第三报文是DHCP Request报文,则第四报文可以是DHCP Ack报文,此时,DHCP Request报文中携带的是对第二设备20分配的IPv4地址的确认信息。若上述第三报文是DHCPv6的REQUEST报文,则第四报文为DHCPv6的REPLY报文,此时,DREQUES报文中携带的是对第二设备20分配的IPv6地址的确认信息。
需要说明的是,上述第四报文也可以分割成多个第四报文的子报文,每个第四报文的子报文可以通过一个ALP_STREAM帧或STREAM帧承载,由此可以使得在第一设备10处将上述多个第四报文的子报文进行重组,进而在第一设备10处还原出第四报文。
步骤206,第一设备10对第四报文进行解析,根据解析结果确定IP地址,以完成与第二设备20之间的DHCP交互。
具体地,当第一设备10接收到第二设备20发送的第四报文后,可以对上述第四报文进行解析,由此可以得到上述第四报文中第二设备20确认分配该IP地址的信息。接着,第一设备10可以使用该IP地址,由此可以完成与第二设备20之间的DHCP交互,也就是完成了该第一设备10在第二设备20上的远程接入认证。可见,通过上述应用层协议消息的交互(例如,第一报文、第二报文、第三报文及第四报文),可以实现第一设备10在第二设备20上的远程接入认证。
可选地,如果在上述QUIC协议的握手阶段没有协商好支持L2或L3类型应用层协议,第一设备10收到第二设备20发送的上述第四报文后,可以动态触发QUIC协议模块。示例性的,第一设备10可以在上述已建立的QUIC会话上发送NEW_ALP帧给第二设备20,该NEW_ALP帧可以用于与第二设备20协商支持L2或L3类型的应用层协议。由于在上述方式中,上述协商L2或L3类型的应用层协议的步骤是在认证成功之后执行,因此,可以避免第一设备10在未认证成功前访问第二设备20的所管控的网络资源,进而可以避免产生网络安全问题。
步骤207,第一设备10基于L2或L3类型的应用层协议向第二设备20发送第五报文,以访问第二设备20所在的网络上的资源。
具体地,当第一设备10完成在第二设备20上的远程接入后,可以进一步对第二设备20进行远程访问,也就是说,第一设备10可以对第二设备20所管控的网络资源进行访问。
在具体实现时,第一设备10可以创建用于进行远程访问的访问报文(为说明方便,下文将上述“用于进行远程访问的访问报文”简称为“第五报文”),该第五报文可以通过ALP_DATAGRAM帧或DATAGRAM帧承载。示例性的,第一设备10可以创建DATAGRAM flow,该DATAGRAM flow可以包括多个ALP_DATAGRAM帧或多个DATAGRAM帧,其中,每个ALP_DATAGRAM帧或DATAGRAM帧可以包括flow ID,该flow ID用于标识DATAGRAM flow的身份。
接着,第一设备10可以将上述第五报文封装到ALP_DATAGRAM帧或 DATAGRAM帧中,其中,该ALP_DATAGRAM帧可以包括ALP域,该ALP域可以用于标识应用层协议类型(例如,该应用层协议类型可以是ipv4oq)。
步骤208,第二设备20向第一设备10发送第六报文,以完成第一设备10对第二设备20的访问。
具体地,第二设备20接收到第一设备10发送的ALP_DATAGRAM帧或DATAGRAM帧后,可以获取上述ALP_DATAGRAM帧或DATAGRAM帧中的第五报文(访问报文),并可以根据该第五报文中的路由信息转发给上层或第二设备20所在网络的其他网络设备(例如,内网资源服务器)。可以理解的是,上述路由信息可以用于表征IP路由,因此,上述第二设备20中的上层可以是L3(例如,IP层)以上的协议层。
接着,当上述第二设备20中的上层或其他网络设备接收到上述第五报文后,可以根据该第五报文生成对应的第六报文。其中,该第六报文可以是响应报文,也就是说,该第六报文可以是对上述第五报文的响应,该第六报文中可以包括第一设备10想要访问的资源。然后,第二设备20可以将上述第六报文发送给第一设备10。可以理解的是,若上述第二设备20中的上层生成对应的第六报文,则可以直接由第二设备20将上述第六报文发送给第一设备10;若其他网络设备生成对应的第六报文,则该其他网络设备将上述第六报文发送给第二设备20,并可以由第二设备20转发给第一设备10。
在具体实现时,上述第二设备20发送第六报文的方式可以是,将上述第六报文封装到ALP_DATAGRAM帧或DATAGRAM帧中,并可以将上述ALP_DATAGRAM帧或DATAGRAM帧发送给第一设备10。
步骤209,第一设备10接收并解析第二设备20发送的第六报文,获取第六报文中的资源信息。
具体地,第一设备10可以接收第二设备20发送的ALP_DATAGRAM帧或DATAGRAM帧,并可以从上述ALP_DATAGRAM帧或DATAGRAM帧中获取第六报文。接着,第一设备10可以对上述第六报文进行解析,示例性的,第一设备10可以对上述第六报文中的IP头及传输协议头进行解析,以获得上述第六报文中的载荷,上述第六报文中的载荷即为第一设备10访问的资源,由此可以实现第一设备10对第二设备20所在的私网的资源的访问。
可以理解的是,上述步骤201-步骤206描述了通过基于QUIC协议的DHCP交互申请IP地址的场景。同样地,上述步骤201-步骤206的方式也适用于IP地址续租的场景,例如,用于IP地址续租的报文可以承载在基于QUIC协议的STREAM帧或DATAGRAM帧上,也可以承载在基于QUIC协议的ALP_STREAM帧或ALP_DATAGRAM帧上,具体过程可以参考上述步骤201-步骤206,在此不再赘述。
本申请实施例中,第一设备10通过基于QUIC协议的DHCP交互向第二设备20申请IP地址,由此可以实现简单高效的远程接入认证,并可以节省由于铺设VPN专线或部署专门的VPN客户端导致的大量成本。
可以理解的是,上述实施例仅示例性的示出了第一设备10与第二设备20交互的过程,也可以通过第一设备10经第三设备30中转后与第二设备20进行交互。
此外,上面实施例中,步骤201-步骤209均为可选步骤,本申请只提供一种可行 的实施例,还可以包括比步骤201-步骤209更多或更少的步骤,本申请对此不做限定。
需要说明的是,上述示例仅示例性的示出了DHCP类型的接入认证方式,并不构成对本申请实施例的限定,在一些实施例中,上述接入认证类型还可以包括EAP类型(例如,EAP over Quic),示例性的,可以通过字符串“eapoq”表征上述EAP类型的接入认证协议。其中,“eapoq”的协议类型可以支持扩展认证协议(Extensible Authentication Protocol,EAP)报文。也就是说,将第二设备20作为认证点,第一设备10可以通过QUIC会话的一个或多个ALP_STREAM帧,和或一个或多个STREAM帧承载承载EAP报文。可选地,第一设备10也可以通过QUIC会话的一个或多个ALP_DATAGRAM帧,和/或一个或多个DATAGRAM帧承载EAP报文,由此可以和第二设备20完成接入认证交互,然后再通过ALP_DATAGRAM帧或DATAGRAM帧承载L2类型或L3类型报文进行上述实施例中私网IP地址的申请和私网网络资源的访问。
图3为本申请远程接入装置一个实施例的结构示意图,如图3所示,上述远程接入装置300应用与第一设备10,可以包括:握手模块310、会话建立模块320及接入模块330;其中,
握手模块310,用于与第二设备进行基于QUIC协议的会话握手,其中,基于QUIC协议的会话握手用于声明用于接入认证的应用层协议类型;
会话建立模块320,用于建立与第二设备之间的QUIC会话;
接入模块330,用于在已建立的QUIC会话上,使用与用于接入认证的应用层协议类型对应的应用层协议消息,与第二设备进行接入认证交互,完成在第二设备上的远程接入。
其中一种可能的实现方式中,用于接入认证的应用层协议类型包括动态主机配置协议DHCP类型及扩展认证协议EAP类型。
其中一种可能的实现方式中,上述握手模块310还用于声明用于转发的应用层协议类型。
其中一种可能的实现方式中,上述装置300还包括:
声明模块340,用于在已建立的QUIC会话上,声明用于转发的应用层协议类型。
其中一种可能的实现方式中,用于转发的应用层协议类型包括L2类型及L3类型。
其中一种可能的实现方式中,用于接入认证的应用层协议类型为DHCP类型,上述接入模块330还用于向第二设备发送第一报文,其中,第一报文用于向第二设备请求分配IP地址;
接收第二设备发送的第二报文,其中,第二报文包含可分配的IP地址;
向第二设备发送第三报文,其中,第三报文用于确认可分配的IP地址;
接收第二设备发送的第四报文,其中,第四报文包含已分配的IP地址。
其中一种可能的实现方式中,DHCP类型的应用层协议用于进行DHCP报文交互,EAP类型的应用层协议用于进行EAP报文交互,其中,
每条DHCP报文或每条EAP报文由一个或多个ALP_STREAM帧,和或一个或多个STREAM帧承载,或
每条DHCP报文或每条EAP报文由一个或多个ALP_DATAGRAM帧,和/或一个 或多个DATAGRAM帧承载。
其中一种可能的实现方式中,上述装置300还包括:
访问模块350,用于向第二设备发送访问报文,其中,访问报文用于请求访问第二设备的网络资源;
接收第二设备发送的响应报文,其中,响应报文包括被第一设备请求访问的网络资源。
其中一种可能的实现方式中,访问报文由ALP_DATAGRAM帧和/或DATAGRAM帧承载。
图4为本申请远程接入装置另一个实施例的结构示意图,如图4所示,上述远程接入装置400应用于第二设备20,可以包括:握手模块410、会话建立模块420及认证模块430;其中,
握手模块410,用于与第一设备进行基于QUIC协议的会话握手,其中,基于QUIC协议的会话握手用于声明用于接入认证的应用层协议类型;
会话建立模块420,用于建立与第一设备之间的QUIC会话;
认证模块430,用于在已建立的QUIC会话上,使用与用于接入认证的应用层协议类型对应的应用层协议消息,与第一设备进行接入认证交互,完成对第一设备的远程接入认证。
其中一种可能的实现方式中,用于接入认证的应用层协议类型包括动态主机配置协议DHCP类型及扩展认证协议EAP类型。
其中一种可能的实现方式中,上述握手模块410还用于声明用于转发的应用层协议类型。
其中一种可能的实现方式中,上述装置400还包括:
声明模块440,用于在已建立的QUIC会话上,声明用于转发的应用层协议类型。
其中一种可能的实现方式中,用于转发的应用层协议类型包括L2类型及L3类型。
其中一种可能的实现方式中,用于接入认证的应用层协议类型为DHCP类型,上述认证模块430还用于接收第一设备发送的第一报文,其中,第一报文用于向第二设备请求分配IP地址;
向第一设备发送第二报文,其中,第二报文包含可分配的IP地址;
接收第一设备发送的第三报文,其中,第三报文用于确认可分配的IP地址;
向第一设备发送第四报文,其中,第四报文包含已分配的IP地址。
其中一种可能的实现方式中,DHCP类型的应用层协议用于进行DHCP报文交互,EAP类型的应用层协议用于进行EAP报文交互,其中,
每条DHCP报文或每条EAP报文由一个或多个ALP_STREAM帧,和或一个或多个STREAM帧承载,或
每条DHCP报文或每条EAP报文由一个或多个ALP_DATAGRAM帧,和/或一个或多个DATAGRAM帧承载。
其中一种可能的实现方式中,上述装置400还包括:
响应模块450,用于接收第一设备发送的访问报文,其中,访问报文用于请求访问第二设备的网络资源;
向第一设备发送响应报文,其中,响应报文包括被第一设备请求访问的网络资源。
其中一种可能的实现方式中,访问报文由ALP_DATAGRAM帧和/或DATAGRAM帧承载。
图3和图4所示实施例提供的远程接入装置300及远程接入装置400可用于执行本申请图1和图2所示方法实施例的技术方案,其实现原理和技术效果可以进一步参考方法实施例中的相关描述。
应理解以上图3和图4所示的远程接入装置的各个模块的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块以软件通过处理元件调用的形式实现,部分模块通过硬件的形式实现。例如,检测模块可以为单独设立的处理元件,也可以集成在电子设备的某一个芯片中实现。其它模块的实现与之类似。此外这些模块全部或部分可以集成在一起,也可以独立实现。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。
例如,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit;以下简称:ASIC),或,一个或多个微处理器(Digital Signal Processor;以下简称:DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array;以下简称:FPGA)等。再如,这些模块可以集成在一起,以片上系统(System-On-a-Chip;以下简称:SOC)的形式实现。
下面结合图5进一步介绍本申请以下实施例中提供的示例性电子设备。图5示出了电子设备500的结构示意图,该电子设备500可以是上述第一设备10或第二设备20。
上述电子设备500可以包括:至少一个处理器;以及与上述处理器通信连接的至少一个存储器,其中:上述存储器存储有可被上述处理器执行的程序指令,处理器调用上述程序指令能够执行本申请图1和图2所示实施例提供的远程接入方法。
图5示出了适用于实现本申请实施方式的示例性电子设备500的框图。图5显示的电子设备500仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图5所示,电子设备500以通用计算设备的形式表现。电子设备500的组件可以包括但不限于:一个或者多个处理器510,存储器520,连接不同系统组件(包括存储器520和处理器510)的通信总线540以及通信接口530。
通信总线540表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(Industry Standard Architecture;以下简称:ISA)总线,微通道体系结构(Micro Channel Architecture;以下简称:MAC)总线,增强型ISA总线、视频电子标准协会(Video Electronics Standards Association;以下简称:VESA)局域总线以及外围组件互连(Peripheral Component Interconnection;以下简称:PCI)总线。
电子设备500典型地包括多种计算机系统可读介质。这些介质可以是任何能够被电子设备访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。
存储器520可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(Random Access Memory;以下简称:RAM)和/或高速缓存存储器。电子设备可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。尽管图5中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如:光盘只读存储器(Compact Disc Read Only Memory;以下简称:CD-ROM)、数字多功能只读光盘(Digital Video Disc Read Only Memory;以下简称:DVD-ROM)或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与通信总线540相连。存储器520可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本申请各实施例的功能。
具有一组(至少一个)程序模块的程序/实用工具,可以存储在存储器520中,这样的程序模块包括——但不限于——操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块通常执行本申请所描述的实施例中的功能和/或方法。
电子设备500也可以与一个或多个外部设备(例如键盘、指向设备、显示器等)通信,还可与一个或者多个使得用户能与该电子设备交互的设备通信,和/或与使得该电子设备能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过通信接口530进行。并且,电子设备500还可以通过网络适配器(图5中未示出)与一个或者多个网络(例如局域网(Local Area Network;以下简称:LAN),广域网(Wide Area Network;以下简称:WAN)和/或公共网络,例如因特网)通信,上述网络适配器可以通过通信总线540与电子设备的其它模块通信。应当明白,尽管图5中未示出,可以结合电子设备500使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、磁盘阵列(Redundant Arrays of Independent Drives;以下简称:RAID)系统、磁带驱动器以及数据备份存储系统等。
处理器510通过运行存储在存储器520中的程序,从而执行各种功能应用以及数据处理,例如实现本申请实施例提供的远程接入方法。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备500的结构限定。在本申请另一些实施例中,电子设备500也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
可以理解的是,上述电子设备等为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。
本申请实施例可以根据上述方法示例对上述电子设备等进行功能模块的划分,例 如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (22)

  1. 一种远程接入方法,应用于第一设备,其特征在于,所述方法包括:
    与第二设备进行基于QUIC协议的会话握手,其中,所述基于QUIC协议的会话握手用于声明用于接入认证的应用层协议类型;
    建立与所述第二设备之间的QUIC会话;
    在所述已建立的QUIC会话上,使用与所述用于接入认证的应用层协议类型对应的应用层协议消息,与所述第二设备进行接入认证交互,完成在所述第二设备上的远程接入。
  2. 根据权利要求1所述的方法,其特征在于,所述用于接入认证的应用层协议类型包括动态主机配置协议DHCP类型及扩展认证协议EAP类型。
  3. 根据权利要求1或2所述的方法,其特征在于,所述基于QUIC协议的会话握手还用于声明用于转发的应用层协议类型。
  4. 根据权利要求1或2所述的方法,其特征在于,所述完成在所述第二设备上的远程接入后,所述方法还包括:
    在所述已建立的QUIC会话上,声明用于转发的应用层协议类型。
  5. 根据权利要求3或4所述的方法,其特征在于,所述用于转发的应用层协议类型包括L2类型及L3类型。
  6. 根据权利要求2所述的方法,其特征在于,所述用于接入认证的应用层协议类型为DHCP类型,所述与所述第二设备进行接入认证交互包括:
    向所述第二设备发送第一报文,其中,所述第一报文用于向所述第二设备请求分配IP地址;
    接收所述第二设备发送的第二报文,其中,所述第二报文包含可分配的IP地址;
    向所述第二设备发送第三报文,其中,所述第三报文用于确认所述可分配的IP地址;
    接收所述第二设备发送的第四报文,其中,所述第四报文包含已分配的IP地址。
  7. 根据权利要求2所述的方法,其特征在于,所述DHCP类型的应用层协议用于进行DHCP报文交互,所述EAP类型的应用层协议用于进行EAP报文交互,其中,
    每条所述DHCP报文或每条所述EAP报文由一个或多个ALP_STREAM帧,和或一个或多个STREAM帧承载,或
    每条所述DHCP报文或每条所述EAP报文由一个或多个ALP_DATAGRAM帧,和/或一个或多个DATAGRAM帧承载。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述方法还包括:
    向所述第二设备发送访问报文,其中,所述访问报文用于请求访问所述第二设备的网络资源;
    接收所述第二设备发送的响应报文,其中,所述响应报文包括被所述第一设备请求访问的网络资源。
  9. 根据权利要求8所述的方法,其特征在于,所述访问报文由ALP_DATAGRAM帧和/或DATAGRAM帧承载。
  10. 一种远程接入方法,应用于第二设备,其特征在于,所述方法包括:
    与第一设备进行基于QUIC协议的会话握手,其中,所述基于QUIC协议的会话握手用于声明用于接入认证的应用层协议类型;
    建立与所述第一设备之间的QUIC会话;
    在所述已建立的QUIC会话上,使用与所述用于接入认证的应用层协议类型对应的应用层协议消息,与所述第一设备进行接入认证交互,完成对所述第一设备的远程接入认证。
  11. 根据权利要求10所述的方法,其特征在于,所述用于接入认证的应用层协议类型包括动态主机配置协议DHCP类型及扩展认证协议EAP类型。
  12. 根据权利要求10或11所述的方法,其特征在于,所述基于QUIC协议的会话握手还用于声明用于转发的应用层协议类型。
  13. 根据权利要求10或11所述的方法,其特征在于,所述完成对所述第一设备的远程接入认证后,所述方法还包括:
    在所述已建立的QUIC会话上,声明用于转发的应用层协议类型。
  14. 根据权利要求12或13所述的方法,其特征在于,所述用于转发的应用层协议类型包括L2类型及L3类型。
  15. 根据权利要求11所述的方法,其特征在于,所述用于接入认证的应用层协议类型为DHCP类型,所述与所述第一设备进行接入认证交互包括:
    接收所述第一设备发送的第一报文,其中,所述第一报文用于向所述第二设备请求分配IP地址;
    向所述第一设备发送第二报文,其中,所述第二报文包含可分配的IP地址;
    接收所述第一设备发送的第三报文,其中,所述第三报文用于确认所述可分配的IP地址;
    向所述第一设备发送第四报文,其中,所述第四报文包含已分配的IP地址。
  16. 根据权利要求11所述的方法,其特征在于,所述DHCP类型的应用层协议用于进行DHCP报文交互,所述EAP类型的应用层协议用于进行EAP报文交互,其中,
    每条所述DHCP报文或每条所述EAP报文由一个或多个ALP_STREAM帧,和或一个或多个STREAM帧承载,或
    每条所述DHCP报文或每条所述EAP报文由一个或多个ALP_DATAGRAM帧,和/或一个或多个DATAGRAM帧承载。
  17. 根据权利要求10所述的方法,其特征在于,所述方法还包括:
    接收所述第一设备发送的访问报文,其中,所述访问报文用于请求访问所述第二设备的网络资源;
    向所述第一设备发送响应报文,其中,所述响应报文包括被所述第一设备请求访问的网络资源。
  18. 根据权利要求17所述的方法,其特征在于,所述访问报文由ALP_DATAGRAM帧和/或DATAGRAM帧承载。
  19. 一种第一设备,其特征在于,包括:存储器,所述存储器用于存储计算机程序代码,所述计算机程序代码包括指令,当所述第一设备从所述存储器中读取所述指令,以使得所述第一设备执行如权利要求1-9中任一项所述的方法。
  20. 一种第二设备,其特征在于,包括:存储器,所述存储器用于存储计算机程序代码,所述计算机程序代码包括指令,当所述第二设备从所述存储器中读取所述指令,以使得所述第二设备执行如权利要求10-18中任一项所述的方法。
  21. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在所述第一设备上运行时,使得所述第一设备执行如权利要求1-9中任一项所述的方法,或当所述计算机指令在所述第二设备上运行时,使得所述第二设备执行如权利要求10-18中任一项所述的方法。
  22. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-18中任一项所述的方法。
PCT/CN2022/101508 2021-07-01 2022-06-27 远程接入方法、电子设备及存储介质 WO2023274146A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110741989.1 2021-07-01
CN202110741989.1A CN115567497A (zh) 2021-07-01 2021-07-01 远程接入方法、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2023274146A1 true WO2023274146A1 (zh) 2023-01-05

Family

ID=84690091

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/101508 WO2023274146A1 (zh) 2021-07-01 2022-06-27 远程接入方法、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN115567497A (zh)
WO (1) WO2023274146A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109906625A (zh) * 2016-09-12 2019-06-18 瑞典爱立信有限公司 无线局域网上的安全链路层连接的方法
CN110519413A (zh) * 2019-09-10 2019-11-29 赛尔网络有限公司 基于DNS over QUIC的排名统计方法、装置、系统及介质
CN112311774A (zh) * 2020-10-16 2021-02-02 北京金山云网络技术有限公司 一种数据处理方法、装置、电子设备及存储介质
CN112887433A (zh) * 2021-04-12 2021-06-01 网络通信与安全紫金山实验室 基于quic协议的云端访问边缘服务的方法和系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109906625A (zh) * 2016-09-12 2019-06-18 瑞典爱立信有限公司 无线局域网上的安全链路层连接的方法
CN110519413A (zh) * 2019-09-10 2019-11-29 赛尔网络有限公司 基于DNS over QUIC的排名统计方法、装置、系统及介质
CN112311774A (zh) * 2020-10-16 2021-02-02 北京金山云网络技术有限公司 一种数据处理方法、装置、电子设备及存储介质
CN112887433A (zh) * 2021-04-12 2021-06-01 网络通信与安全紫金山实验室 基于quic协议的云端访问边缘服务的方法和系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
M. THOMSON, ED. MOZILLA S. TURNER: "Using TLS to Secure QUIC; rfc9001.txt", USING TLS TO SECURE QUIC; RFC9001.TXT, 9001, 27 May 2021 (2021-05-27), Geneva, Switzerland, pages 1 - 31, XP015146227 *

Also Published As

Publication number Publication date
CN115567497A (zh) 2023-01-03

Similar Documents

Publication Publication Date Title
US10862863B2 (en) Session identifier for a communication session
US8914522B2 (en) Systems and methods for facilitating a peer to peer route via a gateway
US9231918B2 (en) Use of virtual network interfaces and a websocket based transport mechanism to realize secure node-to-site and site-to-site virtual private network solutions
US20180248761A1 (en) Methods and systems for managing vpn tunnels
JP4146886B2 (ja) 通信モジュール及びこの通信モジュールを備えたアプリケーションプログラム
WO2013086869A1 (zh) 一种互联方法、装置和系统
US11824685B2 (en) Method for implementing GRE tunnel, access point and gateway
EP3488581B1 (en) EFFICIENT TRANSPORT OF ENCAPSULATED MEDIA TRAFFIC OVER 
A DATAGRAM BASED TRANSPORT LAYER
JP2023523048A (ja) パケット処理方法及び関連デバイス
US20220239629A1 (en) Business service providing method and system, and remote acceleration gateway
JP2020010326A (ja) WiFi管理フレームを利用したデータ送信方法、データ受信方法及びデータ通信方法
US10015287B2 (en) Efficient tunneled streams for real-time communications
WO2016066027A1 (zh) 一种媒体传输方法和设备
CN108064441B (zh) 一种加速网络传输优化方法以及系统
WO2023274146A1 (zh) 远程接入方法、电子设备及存储介质
US9614816B2 (en) Dynamic encryption for tunneled real-time communications
US10263913B2 (en) Tunnel consolidation for real-time communications
US10334086B2 (en) Header redundancy removal for tunneled media traffic
CN113067910A (zh) 一种nat穿越方法、装置、电子设备和存储介质
CN117460085A (zh) 用于住宅网关进行网络接入的单独pfcp会话模型
CN117459964A (zh) 用于通过住宅网关进行的网络接入的组合pfcp会话模型
CN117459965A (zh) 用于通过住宅网关进行的网络接入的单独pfcp会话模型
WO2022043737A1 (en) Methods and systems for transmitting session-based packets
CN113992461A (zh) 一种数据隔离传输方法、系统及存储介质

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE