Disclosure of Invention
The embodiment of the invention provides a capability negotiation method, a network controller and terminal equipment, which are used for solving the problem that SDWAN controllers cannot identify private capability reported by CPE, trigger repeated renegotiation and consume processing resources of SDWAN controllers.
In order to solve the technical problems, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a capability negotiation method, which is applied to a network controller, including:
sending a first message to terminal equipment, wherein the first message contains an identifier of the network controller;
and receiving a second message sent by the terminal equipment, wherein the second message comprises a capability set supported by the terminal equipment and corresponding to the identifier.
Optionally, the first message and the second message are Hello messages in a netcon protocol.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor field in the first message.
Optionally, the first message further includes a capability set supported by the network controller.
Optionally, the second message further includes the identifier.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor-back field in the second message.
Optionally, after receiving the second message sent by the terminal device, the method further includes:
And acquiring the capability set supported by the terminal equipment in the second message, comparing the capability set with the capability set supported by the terminal equipment, and completing the capability negotiation process if the complete comparison is successful.
Optionally, acquiring the capability set supported by the terminal device in the second message includes:
judging whether the second message contains the identifier of the network controller or not;
Discarding the second message if the second message does not contain the identifier of the network controller;
and if the second message contains the identifier of the network controller, acquiring the capability set supported by the terminal equipment in the second message.
In a second aspect, an embodiment of the present invention provides a capability negotiation method, which is applied to a terminal device, and includes:
Receiving a first message sent by a network controller, wherein the first message comprises an identifier of the network controller;
determining a capability set supported by the terminal equipment corresponding to the identification;
and sending a second message to the network controller, wherein the second message contains a capability set supported by the terminal equipment corresponding to the identifier.
Optionally, the first message and the second message are Hello messages in a netcon protocol.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor field in the first message.
Optionally, the first message further includes a capability set supported by the network controller;
The determining the capability set supported by the terminal equipment corresponding to the identifier comprises the following steps:
Extracting a capability set supported by the network controller from the first message;
traversing the local capability set, and determining the capability set matched with the capability set supported by the network controller as the capability set supported by the terminal equipment corresponding to the identification.
Optionally, the second message further includes the identifier.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor-back field in the second message.
In a third aspect, an embodiment of the present invention provides a network controller, including:
A sending module, configured to send a first message to a terminal device, where the first message includes an identifier of the network controller;
And the receiving module is used for receiving a second message sent by the terminal equipment, wherein the second message comprises a capability set supported by the terminal equipment corresponding to the identifier.
Optionally, the first message and the second message are Hello messages in a netcon protocol.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor field in the first message.
Optionally, the first message further includes a capability set supported by the network controller.
Optionally, the second message further includes the identifier.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor-back field in the second message.
Optionally, the network controller further includes:
And the processing module is used for acquiring the capability set supported by the terminal equipment in the second message, comparing the capability set with the capability set supported by the terminal equipment, and completing the capability negotiation process if the complete comparison is successful.
Optionally, the processing module is configured to determine whether the second message includes an identifier of the network controller, discard the second message if the second message does not include the identifier of the network controller, and obtain a capability set supported by the terminal device in the second message if the second message includes the identifier of the network controller.
In a fourth aspect, an embodiment of the present invention provides a network controller, including a transceiver and a processor;
The transceiver is configured to send a first message to a terminal device, where the first message includes an identifier of the network controller;
the transceiver is further configured to receive a second message sent by the terminal device, where the second message includes a capability set supported by the terminal device corresponding to the identifier.
Optionally, the second message further includes the identifier.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor-back field in the second message.
In a fifth aspect, an embodiment of the present invention provides a terminal device, including:
The receiving module is used for receiving a first message sent by the network controller, wherein the first message comprises an identifier of the network controller;
a determining module, configured to determine a capability set supported by the terminal device corresponding to the identifier;
and the sending module is used for sending a second message to the network controller, wherein the second message comprises a capability set supported by the terminal equipment corresponding to the identifier.
Optionally, the first message and the second message are Hello messages in a netcon protocol.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor field in the first message.
Optionally, the first message further includes a capability set supported by the network controller;
The determining module is used for extracting the capability set supported by the network controller from the first message, traversing the local capability set, and determining the capability set matched with the capability set supported by the network controller as the capability set supported by the terminal equipment corresponding to the identifier.
Optionally, the second message further includes the identifier.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor-back field in the second message.
In a sixth aspect, an embodiment of the present invention provides a terminal device, including a transceiver and a processor;
the transceiver is configured to receive a first message sent by a network controller, where the first message includes an identifier of the network controller;
The processor is configured to determine a capability set supported by the terminal device corresponding to the identifier;
The transceiver is further configured to send a second message to the network controller, where the second message includes a capability set supported by the terminal device corresponding to the identifier.
Optionally, the first message and the second message are Hello messages in a netcon protocol.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor field in the first message.
Optionally, the first message further includes a capability set supported by the network controller;
The processor is used for extracting the capability set supported by the network controller from the first message, traversing the local capability set, and determining the capability set matched with the capability set supported by the network controller as the capability set supported by the terminal equipment corresponding to the identifier.
Optionally, the second message further includes the identifier.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor-back field in the second message.
In a seventh aspect, an embodiment of the present invention provides a network controller, including a processor, a memory, and a program stored in the memory and executable on the processor, where the program is executed by the processor to implement the steps of the capability negotiation method of the first aspect.
In an eighth aspect, an embodiment of the present invention provides a terminal device, including a processor, a memory, and a program stored in the memory and executable on the processor, where the program is executed by the processor to implement the steps of the capability negotiation method of the second aspect.
In a ninth aspect, an embodiment of the present invention provides a computer readable storage medium, where a computer program is stored, where the computer program implements the steps of the capability negotiation method of the first aspect when executed by a processor, or where the computer program implements the steps of the capability negotiation method of the second aspect when executed by a processor.
In the embodiment of the invention, the capability set reported to the network controller by the terminal is the capability set matched with the identifier of the network controller, and the network controller can identify the capability set reported by the terminal, so that the repeated negotiation problem of capability negotiation between the network controller and the terminal equipment is avoided, the resource consumption of the network controller in the capability negotiation process is effectively reduced, the connection establishment efficiency of the network controller and the terminal equipment is improved, and the customer experience is further improved.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, an embodiment of the present invention provides a capability negotiation method, which is applied to a network controller, and includes:
Step 11, a first message is sent to terminal equipment, wherein the first message contains the identification of the network controller;
In this embodiment of the present invention, optionally, the identifier may be a manufacturer identifier of the network controller, for example, a name of the network controller, or may be other types of identifiers.
Through the identifier, on one hand, the terminal can confirm that the message is a capability negotiation message, and on the other hand, the terminal can also determine a capability set corresponding to the identifier according to the determination and report the capability set to the network controller.
And step 12, receiving a second message sent by the terminal equipment, wherein the second message comprises a capability set supported by the terminal equipment corresponding to the identifier.
The Network controller in the embodiment of the present invention may be a SDWAN (Software-defined wide area Network) controller, and the terminal device may be a CPE (Customer Premise Equipment, customer premises equipment).
SDWAN the controller controls the CPE through NETCONF (Network Configuration Protocol ) Callhome mechanism, and converts user operation into specific configuration and sends the specific configuration to the CPE, so that the service is opened. The CPE realizes SDWAN IPSEC (Internet Protocol Security, protocol security) encryption and decryption of service flow, routing, detection of link quality and intelligent switching, and provides high-speed wired and wireless access for the terminal users.
The netcon protocol and Callhome mechanism are briefly described below.
NETCONF protocol, defined by RFC 6241, is used in place of command line interface (command LINE INTERFACE, CLI), simple network management protocol (Simple Network Management Protocol, SNMP), and other proprietary configuration mechanisms. The management software may use the netcon protocol to write configuration data to the device, or may retrieve data from the device. All data is encoded in extensible markup language (Extensible Markup Language, XML) and transported using remote procedure calls (remote procedure calls, RPCs) via SSL (Secure Sockets Layer secure sockets layer) or transport layer security, connection oriented protocols.
Callhome mechanisms are very helpful to the initialized deployment and continuous management of network equipment, and the specific advantages are as follows:
1) The network device may actively call the home after the first start-up to register on its management system.
2) The network device may access the network in a manner that dynamically allocates IP addresses, but does not register its allocated IP addresses with a mapping service (e.g., dynamic DNS (domain name system)).
3) The network device may be deployed behind a firewall that implements Network Address Translation (NAT) of all internal network IP addresses.
4) The network device element may be deployed behind a firewall that does not allow any management access to the internal network.
Of course, it should be noted that in the embodiment of the present invention, the network controller is not excluded from being other types of network controllers, and the terminal device is not excluded from being other types of terminal devices.
In the above embodiment of the present invention, optionally, if the network controller and the terminal device communicate through a netcon f protocol, before the sending of the first message to the terminal device, the method further includes establishing a netcon f connection with the terminal device.
In the embodiment of the invention, if the network controller and the terminal equipment are communicated through the NETCONF protocol, the carrying of the identifier of the network controller can be realized by expanding the NETCONF protocol.
In this embodiment of the present invention, optionally, the first message and the second message are Hello messages in a netcon protocol.
In the embodiment of the present invention, optionally, the identifier is a manufacturer identifier of the network controller, and the format carried by the factor field in the first message may be as follows:
<capability>
urn:ietf:params:netconf:factory:<cotroller-name>
</capability>
Where < cotroller-name > is the name (i.e., identity) of the network controller.
I.e. by extending a factor field in the first message to carry the identity of the network controller.
In the embodiment of the present invention, optionally, the first message further includes a capability set supported by the network controller.
In the embodiment of the present invention, optionally, the second message further includes the identifier, and by using the identifier, the network controller can verify whether the message is a capability negotiation reply message, and in addition, can verify whether the identifier carried in the second message is the identifier of the network controller, thereby verifying whether the second message belongs to the network controller.
In this embodiment of the present invention, optionally, the identifier is a manufacturer identifier of the network controller, and the format may be as follows, where the manufacturer identifier is carried by a factor-back field in the second message:
<capability>
urn:ietf:params:netconf:factory-back:<cotroller-name>
</capability>
Where < cotroller-name > is the name (i.e., identity) of the network controller.
I.e. by extending a factor-back field in the second message, carrying the identity of the network controller.
In this embodiment of the present invention, optionally, after receiving the second message sent by the terminal device, the method further includes:
And acquiring the capability set supported by the terminal equipment in the second message, comparing the capability set with the capability set supported by the terminal equipment, and completing the capability negotiation process if the complete comparison is successful.
In the embodiment of the present invention, further optionally, acquiring the capability set supported by the terminal device in the second message includes:
judging whether the second message contains the identifier of the network controller or not;
And if the second message does not contain the identifier of the network controller, discarding the second message, and if the second message does not contain the identifier or does not contain the identifier of the network controller, discarding the second message.
And if the second message contains the identifier of the network controller, acquiring the capability set supported by the terminal equipment in the second message.
That is, the network controller can determine whether to process the second message by whether the second message includes the identifier of the network controller, only process the available second message, and discard the second message without including the identifier of the network controller directly, thereby improving the processing efficiency.
By the method in the embodiment of the invention, the capability set reported to the network controller by the terminal is the capability set matched with the identifier of the network controller, and the network controller can identify the capability set reported by the terminal, so that the repeated negotiation problem of capability negotiation between the network controller and the terminal equipment is avoided, the resource consumption of the network controller in the capability negotiation process is effectively reduced, the connection establishment efficiency of the network controller and the terminal equipment is improved, and the customer experience is further improved.
Referring to fig. 2, the embodiment of the present invention further provides a capability negotiation method, which is applied to a terminal device, and includes:
step 21, receiving a first message sent by a network controller, wherein the first message comprises an identifier of the network controller;
through the identifier, on one hand, the terminal can confirm that the message is a capability negotiation message, and on the other hand, the terminal can also determine a capability set corresponding to the identifier according to the determination and report the capability set to the network controller.
Step 22, determining a capability set supported by the terminal equipment corresponding to the identification;
And step 23, sending a second message to the network controller, wherein the second message contains a capability set supported by the terminal equipment corresponding to the identifier.
By means of the identification in the first message, the terminal device can identify what type of network controller is to be connected, so that a capability set matched with the type of network controller can be provided, on one hand, the situation that the network controller cannot identify the capability set reported by the terminal device can be avoided, and on the other hand, unnecessary expenditure caused by reporting all the capability sets can be avoided.
The network controller in the embodiment of the present invention may be a SDWAN controller, and the terminal device may be a CPE.
In the embodiment of the invention, if the network controller and the terminal equipment are communicated through the NETCONF protocol, the carrying of the identifier of the network controller can be realized by expanding the NETCONF protocol.
In this embodiment of the present invention, optionally, the first message and the second message are Hello messages in a netcon protocol.
In this embodiment of the present invention, optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor field in the first message.
In the embodiment of the invention, optionally, the first message further comprises a capability set supported by the network controller, and the determining the capability set supported by the terminal equipment corresponding to the identifier comprises:
Extracting a capability set supported by the network controller from the first message;
traversing the local capability set, and determining the capability set matched with the capability set supported by the network controller as the capability set supported by the terminal equipment corresponding to the identification.
In this embodiment of the present invention, optionally, the second message further includes the identifier. Through the identifier, the network controller can verify whether the message is a capability negotiation reply message or not, and in addition, the identifier carried in the second message can also verify whether the second message is the identifier of the network controller or not, so that whether the second message belongs to the network controller or not is verified.
In this embodiment of the present invention, optionally, the identifier is a vendor identifier of the network controller, and is carried by a factory-back field in the second message.
The capability negotiation method according to the embodiment of the present invention is described below by taking a network controller as SDWAN and a terminal device as CPE as an example.
Referring to fig. 3, a capability negotiation method according to an embodiment of the present invention includes:
step 31, after the SDWAN controller is successfully established by the NETCONF, a Hello message is sent to the terminal equipment by the NETCONF, wherein the Hello message comprises a factor field, the factor field carries a manufacturer identifier of the SDWAN controller, and the Hello message carries a self-supported capability set;
Step 32, after receiving the Hello message sent by the SDWAN controller, the CPE extracts the capability set supported by the SDWAN controller from the Hello message, and traverses the local capability set to find the capability set supported by the CPE, which is matched with the capability set supported by the SDWAN controller.
Step 33, constructing a Hello message by the CPE, wherein the Hello message comprises a factor-back field, the factor-back field carries SDWAN manufacturer identifiers of the controller, the Hello message carries the searched CPE supported capability set, and the constructed Hello message is sent to the network controller through the NETCONF;
And step 34, after the SDWAN controller receives the Hello message sent by the CPE, judging whether the received Hello message contains a manufacturer identifier of the SDWAN controller, if so, extracting a capability set supported by the CPE from the received Hello message, comparing the extracted capability set supported by the CPE with the capability set of the SDWAN controller, and completing the capability negotiation process after the complete comparison is successful.
Referring to fig. 4, an embodiment of the present invention provides a network controller 40, including:
a sending module 41, configured to send a first message to a terminal device, where the first message includes an identifier of the network controller;
And a receiving module 42, configured to receive a second message sent by the terminal device, where the second message includes a capability set supported by the terminal device corresponding to the identifier.
Optionally, the first message and the second message are Hello messages in a netcon protocol.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor field in the first message.
Optionally, the first message further includes a capability set supported by the network controller.
Optionally, the second message further includes the identifier.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor-back field in the second message.
Optionally, the network controller further includes:
And the processing module is used for acquiring the capability set supported by the terminal equipment in the second message, comparing the capability set with the capability set supported by the terminal equipment, and completing the capability negotiation process if the complete comparison is successful.
Optionally, the processing module is configured to determine whether the second message includes an identifier of the network controller, discard the second message if the second message does not include the identifier of the network controller, and obtain a capability set supported by the terminal device in the second message if the second message includes the identifier of the network controller.
Referring to fig. 5, an embodiment of the present invention provides a network controller 50, which includes a transceiver 51 and a processor 52;
The transceiver 51 is configured to send a first message to a terminal device, where the first message includes an identifier of the network controller;
The transceiver 51 is further configured to receive a second message sent by the terminal device, where the second message includes a capability set supported by the terminal device corresponding to the identifier.
Optionally, the second message further includes the identifier.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor-back field in the second message.
Referring to fig. 6, an embodiment of the present invention provides a terminal device 60, including:
A receiving module 61, configured to receive a first message sent by a network controller, where the first message includes an identifier of the network controller;
a determining module 62, configured to determine a capability set supported by the terminal device corresponding to the identifier;
and a sending module 63, configured to send a second message to the network controller, where the second message includes a capability set supported by the terminal device corresponding to the identifier.
Optionally, the first message and the second message are Hello messages in a netcon protocol.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor field in the first message.
Optionally, the first message further includes a capability set supported by the network controller;
The determining module 62 is configured to extract a capability set supported by the network controller from the first message, traverse the local capability set, and determine a capability set matching the capability set supported by the network controller as the capability set supported by the terminal device corresponding to the identifier.
Optionally, the second message further includes the identifier.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor-back field in the second message.
Referring to fig. 7, an embodiment of the present invention provides a terminal device 70, including a transceiver 71 and a processor 72;
The transceiver 71 is configured to receive a first message sent by a network controller, where the first message includes an identifier of the network controller;
The processor 72 is configured to determine a capability set supported by the terminal device corresponding to the identifier;
The transceiver 71 is further configured to send a second message to the network controller, where the second message includes a capability set supported by the terminal device corresponding to the identifier.
Optionally, the first message and the second message are Hello messages in a netcon protocol.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor field in the first message.
Optionally, the first message further includes a capability set supported by the network controller;
The processor 72 is configured to extract a capability set supported by the network controller from the first message, traverse the local capability set, and determine a capability set matching the capability set supported by the network controller as a capability set supported by the terminal device corresponding to the identifier.
Optionally, the second message further includes the identifier.
Optionally, the identifier is a vendor identifier of the network controller, and is carried by a factor-back field in the second message.
Referring to fig. 8, an embodiment of the present invention provides a network controller 80, which includes a processor 81, a memory 82, and a program stored in the memory 82 and capable of running on the processor, wherein the program, when executed by the processor 81, implements the above-mentioned various processes of the capability negotiation method embodiment applied to the network controller, and can achieve the same technical effects, so that repetition is avoided and no further description is provided herein.
Referring to fig. 9, an embodiment of the present invention provides a terminal device 90, including a processor 91, a memory 92, and a program stored in the memory 92 and capable of running on the processor 91, where the program, when executed by the processor 91, implements each process of the above-mentioned capability negotiation method embodiment applied to a terminal device, and can achieve the same technical effects, and for avoiding repetition, a detailed description is omitted herein.
The embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements each process of the foregoing capability negotiation method embodiment applied to a network controller, or where the computer program when executed by a processor implements each process of the foregoing capability negotiation method embodiment applied to a terminal device, and the same technical effects can be achieved, and for avoiding repetition, details are not repeated herein. Wherein the computer readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.