CN118158077A - Gateway routing table setting method and system based on CWMP - Google Patents

Gateway routing table setting method and system based on CWMP Download PDF

Info

Publication number
CN118158077A
CN118158077A CN202410090868.9A CN202410090868A CN118158077A CN 118158077 A CN118158077 A CN 118158077A CN 202410090868 A CN202410090868 A CN 202410090868A CN 118158077 A CN118158077 A CN 118158077A
Authority
CN
China
Prior art keywords
gateway
data model
cwmp
routing table
command
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202410090868.9A
Other languages
Chinese (zh)
Inventor
王嘉良
袁苇
张宏辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Newland Communication Science Technologies Co ltd
Original Assignee
Fujian Newland Communication Science Technologies Co ltd
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 Fujian Newland Communication Science Technologies Co ltd filed Critical Fujian Newland Communication Science Technologies Co ltd
Priority to CN202410090868.9A priority Critical patent/CN118158077A/en
Publication of CN118158077A publication Critical patent/CN118158077A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a gateway routing table setting method and a system based on CWMP in the technical field of computers, wherein the method comprises the following steps: step S1, an automatic configuration server creates a data model specification table; step S2, the automatic configuration server sends AddObject commands to the gateway based on the data model specification table, and the CWMP process of the gateway adds data model objects based on the received AddObject commands; step S3, the automatic configuration server sends a SetParameterValues command to the gateway based on the data model specification table, and the CWMP process of the gateway configures model parameters of the data model object based on the received SetParameterValues command; and S4, the gateway acquires a gateway address of the virtual network card, sets a routing table based on the gateway address and model parameters, and stores the routing table into Flash by using a mia library. The invention has the advantages that: the gateway routing table is set based on the CWMP, and the gateway management convenience is greatly improved.

Description

Gateway routing table setting method and system based on CWMP
Technical Field
The invention relates to the technical field of computers, in particular to a gateway routing table setting method and system based on CWMP.
Background
CWMP (CPE WAN MANAGEMENT Protocol) is a remote management Protocol for managing customer premise equipment (CPE, customer Premises Equipment) in a network, and allows remote management and configuration of routers, ONUs and other network devices without direct access to the devices, i.e., by means of CWMP, remote diagnosis of problems, updating of device configuration, deployment of new services and execution of other management tasks can be performed, thereby improving network operation efficiency.
The data model of CWMP defines various parameters and configuration information for managing client devices based on TR-069 specifications, uses the HTTP protocol as a transport layer, and exchanges management information in XML format. That is, the data model is organized in a hierarchical manner and defines various parameters and configuration information based on a description language of XML, including a plurality of levels and objects, each object including a plurality of parameters, such as TR098, the specification defining a data model for remotely managing and configuring home gateway devices, such as wireless lan settings, firewall configurations, port mapping, device diagnostics, etc.
At present, most gateways realize remote management and configuration through CWMP, CWMP obtains information based on a data model, but the data model of CWMP, such as TR098 and TR181, has no function of setting a gateway routing table, and the routing table is important information and configuration.
Therefore, how to provide a method and a system for setting a gateway routing table based on CWMP, so as to implement setting of a gateway routing table based on CWMP, so as to improve convenience of gateway management, which is a technical problem to be solved urgently.
Disclosure of Invention
The invention aims to solve the technical problem of providing a gateway routing table setting method and a gateway routing table setting system based on CWMP, which realize the setting of the gateway routing table based on CWMP so as to improve the convenience of gateway management.
In a first aspect, the present invention provides a gateway routing table setting method based on CWMP, including the following steps:
step S1, an automatic configuration server creates a data model specification table;
Step S2, the automatic configuration server sends AddO bject commands to the gateway based on the data model specification table, and the CWMP process of the gateway adds data model objects based on the received AddObject commands;
Step S3, the automatic configuration server sends SetP arameterValues commands to the gateway based on the data model specification table, and the CWMP process of the gateway configures model parameters of the data model object based on the received SETPARAMETERVAL UES commands;
And S4, the gateway acquires a gateway address of the virtual network card, sets a routing table based on the gateway address and model parameters, and stores the routing table into Flash by using a mia library.
Further, in the step S1, the data model specification table at least includes a parameter name, a parameter type, a read-write identifier, a parameter default value, and a parameter description of the model parameter.
Further, the step S2 specifically includes:
The automatic configuration server sends AddObject commands to the gateway based on the data model specification table; the CWMP process of the gateway creates a data model object based on the received AddObject command, adds the data model object as a node to a pre-maintained data model linked list, and sends a response of the completion of the data model object addition to the automatic configuration server.
Further, the step S3 specifically includes:
And the automatic configuration server sends a SetParameterValues command carrying model parameters to the gateway based on the data model specification table, the CWMP process of the gateway analyzes the received SETPARAMETE RVALUES command to obtain model parameters at least comprising a network address, a subnet mask and a name mark, and the model parameters are configured into the data model object through snprintf functions.
Further, the step S4 specifically includes:
And the CWMP process of the gateway obtains the network card name of the virtual network card from the name mark configured by the data model object, obtains the gateway address of the virtual network card by using an ip command and the network card name, sets a routing table by using a snprintf function and a system function of c language based on the gateway address and model parameters, and stores the routing table in Flash by using a mix library.
In a second aspect, the present invention provides a gateway routing table setting system based on CWMP, including the following modules:
The data model specification table creation module is used for automatically configuring the server to create a data model specification table;
the automatic configuration server is used for sending AddObject commands to the gateway based on the data model specification table, and the CWMP process of the gateway is used for adding the data model object based on the received AddObject commands;
the model parameter configuration module is used for automatically configuring a server to send a SetParameterValues command to the gateway based on the data model specification table, and the CWMP process of the gateway configures model parameters of the data model object based on the received Set ParameterValues command;
And the routing table setting module is used for the gateway to acquire the gateway address of the virtual network card, setting a routing table based on the gateway address and model parameters, and storing the routing table into Flash by using a mia library.
Further, in the data model specification table creation module, the data model specification table at least includes a parameter name, a parameter type, a read-write identifier, a parameter default value and a parameter description of a model parameter.
Further, the data model object adding module is specifically configured to:
The automatic configuration server sends AddObject commands to the gateway based on the data model specification table; the CWMP process of the gateway creates a data model object based on the received AddObject command, adds the data model object as a node to a pre-maintained data model linked list, and sends a response of the completion of the data model object addition to the automatic configuration server.
Further, the model parameter configuration module is specifically configured to:
And the automatic configuration server sends a SetParameterValues command carrying model parameters to the gateway based on the data model specification table, the CWMP process of the gateway analyzes the received SETPARAMETE RVALUES command to obtain model parameters at least comprising a network address, a subnet mask and a name mark, and the model parameters are configured into the data model object through snprintf functions.
Further, the routing table setting module is specifically configured to:
And the CWMP process of the gateway obtains the network card name of the virtual network card from the name mark configured by the data model object, obtains the gateway address of the virtual network card by using an ip command and the network card name, sets a routing table by using a snprintf function and a system function of c language based on the gateway address and model parameters, and stores the routing table in Flash by using a mix library.
The invention has the advantages that:
1. creating a data model specification table through the automatic configuration server, sending AddObject a command to the gateway based on the data model specification table, and adding a data model object by the CWMP process of the gateway based on the AddObject command; then the automatic configuration server sends SETPARAME TERVALUES commands to the gateway based on the data model specification table, the CWMP process of the gateway configures model parameters of the data model object based on the SetParameterValues commands, finally the gateway obtains the gateway address of the virtual network card, sets a routing table based on the gateway address and the model parameters, and stores the routing table into Flash by using a mia library to complete the setting of the routing table; the method comprises the steps of adding a data model object and setting model parameters in a data model linked list in a gateway through a AddObject command and a setParameterValues command in a RPC (Remote Procedure Call) method, setting a routing table based on a gateway address and model parameters of a virtual network card, and further setting the gateway routing table based on CWMP, so that gateway management convenience is greatly improved.
2. And storing the routing table into Flash through the mib library, and preventing the loss of the routing table after the gateway is powered off.
Drawings
The invention will be further described with reference to examples of embodiments with reference to the accompanying drawings.
Fig. 1 is a flowchart of a gateway routing table setting method based on CWMP according to the present invention.
Fig. 2 is a schematic structural diagram of a gateway routing table setting system based on CWMP according to the present invention.
Fig. 3 is a schematic flow chart of the present invention.
Detailed Description
The technical scheme in the embodiment of the application has the following overall thought: through AddObject command and SetParameterValues command in RPC (Remote Procedure Call) method, add data model object and set model parameter in the data model linked list in gateway, then set routing table based on gateway address of virtual network card and model parameter, so as to realize gateway routing table set based on CWMP, and promote gateway management convenience.
Referring to fig. 1 to 3, a preferred embodiment of a gateway routing table setting method based on CWMP of the present invention includes the following steps:
step S1, an automatic configuration server (ACS, auto Configuration Server) creates a data model specification table; the automatic configuration server is a server for remotely managing the gateway and is responsible for establishing connection with the gateway, carrying out identity verification, inquiring and configuring parameters and managing the whole life cycle of the gateway;
step S2, the automatic configuration server sends AddO bject commands to the gateway based on the data model specification table, and the CWMP process (CWMP component) of the gateway adds data model objects based on the received AddObject commands; the CWMP process is used for establishing connection with an automatic configuration server, communicating, processing data model operation and the like;
Step S3, the automatic configuration server sends SetP arameterValues commands to the gateway based on the data model specification table, and the CWMP process of the gateway configures model parameters of the data model object based on the received SETPARAMETERVAL UES commands;
And S4, the gateway acquires a gateway address of the virtual network card, sets a routing table based on the gateway address and model parameters, and stores the routing table into Flash by using a mia library.
In the step S1, the data model specification table includes at least a parameter name, a parameter type, a read-write identifier, a parameter default value, and a parameter description of the model parameter.
The data model specification is as follows:
Examples are as follows:
InternetGatewayDevice.DeviceInfo.X_NL_SRouter.SRouterConfig.1;
InternetGatewayDevice.DeviceInfo.X_NL_SRouter.SRouterConfig.1.IPAddress;
InternetGatewayDevice.DeviceInfo.X_NL_SRouter.SRouterConfig.1.NetMask;
InternetGatewayDevice.DeviceInfo.X_NL_SRouter.SRouterConfig.1.Business;
The step S2 specifically comprises the following steps:
The automatic configuration server sends AddObject commands to the gateway based on the data model specification table; the CWMP process of the gateway creates a data model object based on the received AddObject command, adds the data model object as a node to a pre-maintained data model linked list, and sends a response of the completion of the data model object addition to the automatic configuration server.
The AddObject command is a command in the TR-069 protocol, and is used for adding a new data model object to the gateway, and after the operation, a data model object of a routing table is newly added.
Examples are as follows:
internet gateway device. Deviceinfo. X_nl_srounter. Srouterconfig.1 (original);
Internetgateway device. Deviceinfo. X_nl_srounter. Srouterconfig.2 (new addition).
The step S3 specifically comprises the following steps:
After receiving the response sent by the gateway, the automatic configuration server sends a SetParameterValues command carrying model parameters to the gateway based on the data model specification table, and the CWMP process of the gateway analyzes the received SetParameterValues command to obtain model parameters at least comprising a network address (IPADDR ESS), a subnet mask (NetMask) and a name tag (Business), and configures each model parameter into a data model object through a snprintf function.
Examples are as follows:
InternetGatewayDevice.DeviceInfo.X_NL_SRouter.SRouterConfig.1.IPAddress=192.168.10.0;
InternetGatewayDevice.DeviceInfo.X_NL_SRouter.SRouterConfig.1.NetMask=255.255.255.0;
InternetGatewayDevice.DeviceInfo.X_NL_SRouter.SRouterConfig.1.Business=IPTV。
the step S4 specifically includes:
The CWMP process of the gateway obtains the network card name of the virtual network card from the name mark configured by the data model object, obtains the gateway address (GateWay) of the virtual network card by using the ip command and the network card name, sets a routing table by using a snprintf function and a system function of c language based on the gateway address and model parameters, and stores the routing table in Flash by using a mia library.
Examples of the gateway address acquisition are as follows:
ip route show dev < interface_name > |grep default|awk '{ print $3}'; where < interface_name > is the network card name.
The command format for setting the routing table is as follows:
route add-net{IPAddress}netmask{NetMask}gw{GateWay}。
The invention relates to a preferred embodiment of a gateway routing table setting system based on CWMP, which comprises the following modules:
a data model specification table creation module for creating a data model specification table by an auto configuration server (ACS, auto Configuration Server); the automatic configuration server is a server for remotely managing the gateway and is responsible for establishing connection with the gateway, carrying out identity verification, inquiring and configuring parameters and managing the whole life cycle of the gateway;
A data model object adding module, configured to send AddObject a command to a gateway based on the data model specification table by using an auto configuration server, where a CWMP process (CWMP component) of the gateway adds a data model object based on the received AddObject command; the CWMP process is used for establishing connection with an automatic configuration server, communicating, processing data model operation and the like;
the model parameter configuration module is used for automatically configuring a server to send a SetParameterValues command to the gateway based on the data model specification table, and the CWMP process of the gateway configures model parameters of the data model object based on the received Set ParameterValues command;
And the routing table setting module is used for the gateway to acquire the gateway address of the virtual network card, setting a routing table based on the gateway address and model parameters, and storing the routing table into Flash by using a mia library.
In the data model specification table creation module, the data model specification table at least comprises a parameter name, a parameter type, a read-write identification, a parameter default value and a parameter description of a model parameter.
The data model specification is as follows:
Examples are as follows:
InternetGatewayDevice.DeviceInfo.X_NL_SRouter.SRouterConfig.1;
InternetGatewayDevice.DeviceInfo.X_NL_SRouter.SRouterConfig.1.IPAddress;
InternetGatewayDevice.DeviceInfo.X_NL_SRouter.SRouterConfig.1.NetMask;
InternetGatewayDevice.DeviceInfo.X_NL_SRouter.SRouterConfig.1.Business;
the data model object adding module is specifically configured to:
The automatic configuration server sends AddObject commands to the gateway based on the data model specification table; the CWMP process of the gateway creates a data model object based on the received AddObject command, adds the data model object as a node to a pre-maintained data model linked list, and sends a response of the completion of the data model object addition to the automatic configuration server.
The AddObject command is a command in the TR-069 protocol, and is used for adding a new data model object to the gateway, and after the operation, a data model object of a routing table is newly added.
Examples are as follows:
internet gateway device. Deviceinfo. X_nl_srounter. Srouterconfig.1 (original);
Internetgateway device. Deviceinfo. X_nl_srounter. Srouterconfig.2 (new addition).
The model parameter configuration module is specifically used for:
After receiving the response sent by the gateway, the automatic configuration server sends a SetParameterValues command carrying model parameters to the gateway based on the data model specification table, and the CWMP process of the gateway analyzes the received SetParameterValues command to obtain model parameters at least comprising a network address (IPADDR ESS), a subnet mask (NetMask) and a name tag (Business), and configures each model parameter into a data model object through a snprintf function.
Examples are as follows:
InternetGatewayDevice.DeviceInfo.X_NL_SRouter.SRouterConfig.1.IPAddress=192.168.10.0;
InternetGatewayDevice.DeviceInfo.X_NL_SRouter.SRouterConfig.1.NetMask=255.255.255.0;
InternetGatewayDevice.DeviceInfo.X_NL_SRouter.SRouterConfig.1.Business=IPTV。
the routing table setting module is specifically configured to:
The CWMP process of the gateway obtains the network card name of the virtual network card from the name mark configured by the data model object, obtains the gateway address (GateWay) of the virtual network card by using the ip command and the network card name, sets a routing table by using a snprintf function and a system function of c language based on the gateway address and model parameters, and stores the routing table in Flash by using a mia library.
Examples of the gateway address acquisition are as follows:
ip route show dev < interface_name > |grep default|awk '{ print $3}'; where < interface_name > is the network card name.
The command format for setting the routing table is as follows:
route add-net{IPAddress}netmask{NetMask}gw{GateWay}。
in summary, the invention has the advantages that:
1. creating a data model specification table through the automatic configuration server, sending AddObject a command to the gateway based on the data model specification table, and adding a data model object by the CWMP process of the gateway based on the AddObject command; then the automatic configuration server sends SETPARAME TERVALUES commands to the gateway based on the data model specification table, the CWMP process of the gateway configures model parameters of the data model object based on the SetParameterValues commands, finally the gateway obtains the gateway address of the virtual network card, sets a routing table based on the gateway address and the model parameters, and stores the routing table into Flash by using a mia library to complete the setting of the routing table; the method comprises the steps of adding a data model object and setting model parameters in a data model linked list in a gateway through a AddObject command and a setParameterValues command in a RPC (Remote Procedure Call) method, setting a routing table based on a gateway address and model parameters of a virtual network card, and further setting the gateway routing table based on CWMP, so that gateway management convenience is greatly improved.
2. And storing the routing table into Flash through the mib library, and preventing the loss of the routing table after the gateway is powered off.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that the specific embodiments described are illustrative only and not intended to limit the scope of the invention, and that equivalent modifications and variations of the invention in light of the spirit of the invention will be covered by the claims of the present invention.

Claims (10)

1. A gateway routing table setting method based on CWMP is characterized in that: the method comprises the following steps:
step S1, an automatic configuration server creates a data model specification table;
Step S2, the automatic configuration server sends AddO bject commands to the gateway based on the data model specification table, and the CWMP process of the gateway adds data model objects based on the received AddObject commands;
Step S3, the automatic configuration server sends SetP arameterValues commands to the gateway based on the data model specification table, and the CWMP process of the gateway configures model parameters of the data model object based on the received SETPARAMETERVAL UES commands;
And S4, the gateway acquires a gateway address of the virtual network card, sets a routing table based on the gateway address and model parameters, and stores the routing table into Flash by using a mia library.
2. The gateway routing table setting method based on CWMP according to claim 1, wherein: in the step S1, the data model specification table includes at least a parameter name, a parameter type, a read-write identifier, a parameter default value, and a parameter description of the model parameter.
3. The gateway routing table setting method based on CWMP according to claim 1, wherein: the step S2 specifically comprises the following steps:
The automatic configuration server sends AddObject commands to the gateway based on the data model specification table; the CWMP process of the gateway creates a data model object based on the received AddObject command, adds the data model object as a node to a pre-maintained data model linked list, and sends a response of the completion of the data model object addition to the automatic configuration server.
4. The gateway routing table setting method based on CWMP according to claim 1, wherein: the step S3 specifically comprises the following steps:
And the automatic configuration server sends a SetParameterValues command carrying model parameters to the gateway based on the data model specification table, the CWMP process of the gateway analyzes the received SETPARAMETE RVALUES command to obtain model parameters at least comprising a network address, a subnet mask and a name mark, and the model parameters are configured into the data model object through snprintf functions.
5. The gateway routing table setting method based on CWMP according to claim 1, wherein: the step S4 specifically includes:
And the CWMP process of the gateway obtains the network card name of the virtual network card from the name mark configured by the data model object, obtains the gateway address of the virtual network card by using an ip command and the network card name, sets a routing table by using a snprintf function and a system function of c language based on the gateway address and model parameters, and stores the routing table in Flash by using a mix library.
6. A gateway routing table setting system based on CWMP is characterized in that: the device comprises the following modules:
The data model specification table creation module is used for automatically configuring the server to create a data model specification table;
the automatic configuration server is used for sending AddObject commands to the gateway based on the data model specification table, and the CWMP process of the gateway is used for adding the data model object based on the received AddObject commands;
the model parameter configuration module is used for automatically configuring a server to send a SetParameterValues command to the gateway based on the data model specification table, and the CWMP process of the gateway configures model parameters of the data model object based on the received Set ParameterValues command;
And the routing table setting module is used for the gateway to acquire the gateway address of the virtual network card, setting a routing table based on the gateway address and model parameters, and storing the routing table into Flash by using a mia library.
7. The CWMP-based gateway routing table setting system of claim 6, wherein: in the data model specification table creation module, the data model specification table at least comprises a parameter name, a parameter type, a read-write identification, a parameter default value and a parameter description of a model parameter.
8. The CWMP-based gateway routing table setting system of claim 6, wherein: the data model object adding module is specifically configured to:
The automatic configuration server sends AddObject commands to the gateway based on the data model specification table; the CWMP process of the gateway creates a data model object based on the received AddObject command, adds the data model object as a node to a pre-maintained data model linked list, and sends a response of the completion of the data model object addition to the automatic configuration server.
9. The CWMP-based gateway routing table setting system of claim 6, wherein: the model parameter configuration module is specifically used for:
And the automatic configuration server sends a SetParameterValues command carrying model parameters to the gateway based on the data model specification table, the CWMP process of the gateway analyzes the received SETPARAMETE RVALUES command to obtain model parameters at least comprising a network address, a subnet mask and a name mark, and the model parameters are configured into the data model object through snprintf functions.
10. The CWMP-based gateway routing table setting system of claim 6, wherein: the routing table setting module is specifically configured to:
And the CWMP process of the gateway obtains the network card name of the virtual network card from the name mark configured by the data model object, obtains the gateway address of the virtual network card by using an ip command and the network card name, sets a routing table by using a snprintf function and a system function of c language based on the gateway address and model parameters, and stores the routing table in Flash by using a mix library.
CN202410090868.9A 2024-01-23 2024-01-23 Gateway routing table setting method and system based on CWMP Pending CN118158077A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410090868.9A CN118158077A (en) 2024-01-23 2024-01-23 Gateway routing table setting method and system based on CWMP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410090868.9A CN118158077A (en) 2024-01-23 2024-01-23 Gateway routing table setting method and system based on CWMP

Publications (1)

Publication Number Publication Date
CN118158077A true CN118158077A (en) 2024-06-07

Family

ID=91292639

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410090868.9A Pending CN118158077A (en) 2024-01-23 2024-01-23 Gateway routing table setting method and system based on CWMP

Country Status (1)

Country Link
CN (1) CN118158077A (en)

Similar Documents

Publication Publication Date Title
CN111596921B (en) Support for compilation and extensibility of a graph-based unified intent model
US7380025B1 (en) Method and apparatus providing role-based configuration of a port of a network element
US7580936B2 (en) Extendable discovery of network device information
Case et al. Rfc1157: Simple network management protocol (snmp)
US7493378B2 (en) Network management method for providing device list and network management device to provide device list
KR100942480B1 (en) A communication device and a system for managing the local devies remotely and the method thereof
KR101469571B1 (en) Application module and remote management server with parameter description model
US7457853B1 (en) Method and apparatus for automatically configuring a network device
US8635315B2 (en) Method and system for dynamic loading of management information bases on network devices
US20020196451A1 (en) System for replicating desired configurations for printers on a network
EP2357860B1 (en) Device management server, client and method for locating target operation object
US20060155825A1 (en) Network device managing apparatus and method and storage medium
US20140156816A1 (en) Method for composing configuration changes in a network element
WO2008101421A1 (en) System, device and method for auto-configuring application terminals in home network
EP1780941B1 (en) Network configuration
WO2006061179A1 (en) Remote management method, a related auto configuration server, a related further auto configuration server, a related routing gateway and a related device
JP2007525870A (en) Specifying the management node in the device management system
CN114465901A (en) Model-driven intent policy conflict detection and resolution through graph analysis
KR20090094259A (en) Management method for server customer communication
CN104065514A (en) Home network management method based on network configuration protocol (NETCONF) relay
WO2019042213A1 (en) Method and apparatus for managing network access device in sdn
US8868697B2 (en) Method and system for device management, and device
US20120246305A1 (en) System and method for management of cots devices in managed networks based on device auto-detection
JP2007128331A (en) Automatic generation mechanism for network connection equipment
CN113193975B (en) Controller device, method and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication