CN-116743832-B - Network element service interface creation method and device and related equipment
Abstract
The application discloses a network element service interface creation method, which is applied to a main control unit and comprises the steps of creating a first service interface, generating configuration information of the first service interface, generating an RPC message according to the configuration information, and sending the RPC message to an executive body so that the executive body creates a second service interface corresponding to the first service interface by using the RPC message. By applying the technical scheme provided by the application, the quick and efficient network element service interface creation can be realized, and the research and development cost is effectively reduced. The application also discloses a network element service interface creation device, electronic equipment and a computer readable storage medium, which have the same technical effects.
Inventors
- TANG YIN
- JIANG YIMING
- ZHANG JIN
- LI ZONGZHENG
- LU SHANPING
- MA HAILONG
Assignees
- 网络通信与安全紫金山实验室
- 中国人民解放军战略支援部队信息工程大学
Dates
- Publication Date
- 20260505
- Application Date
- 20230626
Claims (12)
- 1. The method for creating the network element service interface is characterized in that the network element comprises a main control unit and an execution body in a mimicry architecture, and the method is applied to the main control unit and comprises the following steps: Creating a first service interface; generating configuration information of the first service interface; Generating an RPC message according to the configuration information; And sending the RPC message to the executive body so that the executive body creates a second service interface corresponding to the first service interface by using the RPC message.
- 2. The method for creating a service interface of a network element according to claim 1, wherein the generating the configuration information of the first service interface includes: Determining the interface name, binding VRF information, interface IP address and interface MAC address of the first service interface; And generating configuration information of the first service interface according to the interface name, the binding VRF information, the interface IP address and the interface MAC address.
- 3. The network element service interface creation method according to claim 1 or 2, further comprising: receiving the RPC reply message fed back by the executive body; determining index information of the second service interface according to the RPC reply message; And generating a service interface index mapping relation between the main control unit and the executive body according to the index information.
- 4. The network element service interface creation method according to claim 3, further comprising: When a service message is received, determining a first target service interface for receiving the service message; determining target index information corresponding to the first target service interface according to the service interface index mapping relation; adding the target index information to the service message to obtain a new service message; and sending the new service message to the executive body so that the executive body determines a second target service interface corresponding to the first target service interface according to the target index information in the new service message.
- 5. A method for creating a network element service interface, wherein the network element includes a main control unit and an execution body in a mimicry architecture, the method is applied to the execution body, and includes: Receiving an RPC message sent by the main control unit, wherein the RPC message is generated by the main control unit according to configuration information of a first service interface after the first service interface is created; Determining configuration information of the first service interface according to the RPC message; And creating a second service interface corresponding to the first service interface according to the configuration information.
- 6. The method for creating a service interface of a network element according to claim 5, wherein creating a second service interface corresponding to the first service interface according to the configuration information comprises: Determining an interface name, binding VRF information, an interface IP address and an interface MAC address of the first service interface according to the configuration information; Creating the second service interface according to the interface name; creating a new VRF according to the binding VRF information; Binding the second service interface with the new VRF; setting the IP address of the second service interface as the interface IP address; And setting the MAC address of the second service interface as the interface MAC address.
- 7. The network element service interface creation method according to claim 5 or 6, further comprising: Generating index information of the second service interface; generating an RPC reply message according to the index information; and feeding back the RPC reply message to the main control unit so that the main control unit generates a service interface index mapping relation between the main control unit and the executive body according to the index information.
- 8. The network element service interface creation method according to claim 7, further comprising: Receiving a new service message sent by the main control unit, wherein the new service message is generated by the main control unit according to an original service message and target index information of a first target service interface for receiving the original service message; analyzing the new service message to obtain an original service message and the target index information; determining a second target service interface corresponding to the first target service interface according to the target index information; and sending the original service message to the second target service interface.
- 9. A network element service interface creation device, wherein the network element includes a main control unit and an execution body in a mimicry architecture, the device is applied to the main control unit, and the device includes: The first creation module is used for creating a first service interface; The first generation module is used for generating configuration information of the first service interface; the second generation module is used for generating an RPC message according to the configuration information; And the sending module is used for sending the RPC message to the executive body so that the executive body creates a second service interface corresponding to the first service interface by using the RPC message.
- 10. A network element service interface creation device, wherein the network element includes a main control unit and an execution body in a mimicry architecture, the device is applied to the execution body, and the device includes: the system comprises a main control unit, a receiving module and a processing module, wherein the main control unit is used for establishing a first service interface and then generating the RPC message according to configuration information of the first service interface; The determining module is used for determining configuration information of the first service interface according to the RPC message; And the second creating module is used for creating a second service interface corresponding to the first service interface according to the configuration information.
- 11. An electronic device, comprising: A memory for storing a computer program; A processor for implementing the steps of the network element service interface creation method according to any of claims 1 to 8 when executing said computer program.
- 12. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the network element service interface creation method according to any of claims 1 to 8.
Description
Network element service interface creation method and device and related equipment Technical Field The present application relates to the field of internet technologies, and in particular, to a method for creating a network element service interface, and also relates to a device for creating a network element service interface, an electronic device, and a computer readable storage medium. Background In order to support network services, various network elements are often required to be added in a network, wherein the network elements comprise a main control unit and a plurality of execution bodies, and the network can be opened through a virtual switch. In general, a network element has a single or multiple service interfaces, which are input/output ports for transmitting network data with other network elements. Taking an SDN ((Software-definedNetworking, software defined network) controller as an example, the same service interfaces exist on the main control unit and the multiple execution bodies, protocol messages received from the service interfaces of the main control unit need to be copied and distributed to the multiple execution bodies, and after the execution bodies receive the messages, the protocol messages need to be considered as being received from the service interfaces so as to further analyze and process the protocol messages. Therefore, how to implement fast and efficient network element service interface creation, and reduce the development cost are the problems to be solved by those skilled in the art. Disclosure of Invention The application aims to provide a network element service interface creation method which can realize quick and efficient network element service interface creation and effectively reduce research and development cost, and the application also aims to provide a network element service interface creation device, electronic equipment and a computer readable storage medium which all have the beneficial effects. In a first aspect, the present application provides a method for creating a service interface of a network element, where the network element includes a main control unit and an executing body, and the method is applied to the main control unit, and includes: Creating a first service interface; generating configuration information of the first service interface; Generating an RPC message according to the configuration information; And sending the RPC message to the executive body so that the executive body creates a second service interface corresponding to the first service interface by using the RPC message. Optionally, the generating the configuration information of the first service interface includes: Determining the interface name, binding VRF information, interface IP address and interface MAC address of the first service interface; And generating configuration information of the first service interface according to the interface name, the binding VRF information, the interface IP address and the interface MAC address. Optionally, the method for creating the network element service interface further includes: receiving the RPC reply message fed back by the executive body; determining index information of the second service interface according to the RPC reply message; And generating a service interface index mapping relation between the main control unit and the executive body according to the index information. Optionally, the method for creating the network element service interface further includes: When a service message is received, determining a first target service interface for receiving the service message; determining target index information corresponding to the first target service interface according to the service interface index mapping relation; adding the target index information to the service message to obtain a new service message; and sending the new service message to the executive body so that the executive body determines a second target service interface corresponding to the first target service interface according to the target index information in the new service message. In a second aspect, the present application provides a method for creating a service interface of a network element, where the network element includes a main control unit and an execution body, and the method is applied to the execution body, and includes: Receiving an RPC message sent by the main control unit, wherein the RPC message is generated by the main control unit according to configuration information of a first service interface after the first service interface is created; Determining configuration information of the first service interface according to the RPC message; And creating a second service interface corresponding to the first service interface according to the configuration information. Optionally, the creating a second service interface corresponding to the first service interface according to the configuration information includes: Deter