WO2019214508A1 - 网络配置方法、设备及系统 - Google Patents

网络配置方法、设备及系统 Download PDF

Info

Publication number
WO2019214508A1
WO2019214508A1 PCT/CN2019/085148 CN2019085148W WO2019214508A1 WO 2019214508 A1 WO2019214508 A1 WO 2019214508A1 CN 2019085148 W CN2019085148 W CN 2019085148W WO 2019214508 A1 WO2019214508 A1 WO 2019214508A1
Authority
WO
WIPO (PCT)
Prior art keywords
network device
configuration
primary
template file
command
Prior art date
Application number
PCT/CN2019/085148
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 华为技术有限公司
Priority to EP19798890.0A priority Critical patent/EP3787232A4/en
Publication of WO2019214508A1 publication Critical patent/WO2019214508A1/zh
Priority to US17/093,696 priority patent/US11394607B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/173Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0843Configuration by using pre-existing information, e.g. using templates or copying from other elements based on generic templates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0846Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0889Techniques to speed-up the configuration process
    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a network configuration method, device, and system.
  • the Spine-Leaf network architecture is the mainstream architecture of the DCN, and the Spine-Leaf network architecture is also called the distributed core architecture.
  • the Spine-Leaf network architecture usually includes the Spine-based device and the Leaf-based device.
  • the Spine-based device functions as the backbone device in the Spine-Leaf network architecture. It is responsible for connecting all the Leaf devices and each Spine device.
  • the Leaf device is connected to the device in the Spine-Leaf network architecture, and is mainly responsible for devices connected to the server.
  • the corresponding connection relationship and function are determined based on the device role type (Spine or Leaf), and the network device has the same device role type.
  • Configuration parameters are highly similar.
  • the Spine-Leaf network architecture a large number of network devices are deployed to provide powerful network transmission resources for clients. Before the network transmission resources are provided to the client by deploying a large number of network devices, each network device needs to be configured.
  • an administrator manually generates and delivers a corresponding device for a large number of network devices.
  • the configuration data is similar. Therefore, the configuration data of the device of the same role type is similar. Therefore, when the administrator manually generates the configuration data of each device, the configuration is not efficient, and the configuration is error-prone. high.
  • the present application provides a network configuration method, device, and system, which implements automatic configuration of network devices to improve network device configuration efficiency and configuration accuracy.
  • the embodiment of the present application provides a network configuration method, where the method may include:
  • the main network device obtains a configuration template file according to the type of the network device to be configured, where the configuration template file corresponds to a network device of the same type, the configuration template file includes at least one configuration command, and at least one configuration command is used to indicate the network device to be configured.
  • the relationship between the configuration parameters and the configuration parameters of the other network devices; and the generated configuration data of the network device to be configured is generated according to the configuration parameters of the network device to be configured and the at least one configuration command; and the instantiated configuration data is sent to be configured.
  • the network device is configured to configure the network device to be configured according to the instantiated configuration data.
  • the instantiated configuration data is used to indicate that the network device to be configured is configured according to the instantiated configuration data.
  • the configuration command in the configuration template file indicates the relationship between the configuration parameters of the network device to be configured and the configuration parameters of other network devices, so that the primary network device can directly Configuring a network device configuration parameter and at least one configuration command to generate the instantiated configuration data of the network device to be configured, and sending the instantiated configuration data to the network device to be configured, so that the network device to be configured performs matching according to the instantiated configuration data.
  • the administrator does not need to manually generate the configuration data of each device, which realizes the automation of the configuration, which not only improves the configuration efficiency of the network device, but also improves the accuracy of the configuration.
  • the at least one configuration command includes a first configuration command
  • the primary network device generates the instantiated configuration data of the network device to be configured according to the configuration parameter of the network device to be configured and the at least one configuration command, including: the primary network.
  • the device obtains a parameter of the first network device according to the first configuration command, where the first configuration command is used to indicate a relationship between a configuration parameter of the network device to be configured and a parameter of the first network device; when the primary network device obtains the first network device When the parameter is configured, the primary network device generates the instantiated configuration data of the network device to be configured according to the configuration parameter of the network device to be configured, the first configuration command, and the parameter of the first network device.
  • the primary network device can obtain the parameters of the first network device
  • the instantiated configuration data of the network device to be configured can be directly generated according to the configuration parameters of the network device to be configured, the first configuration command, and the parameters of the first network device. To help further improve the efficiency of the automation configuration.
  • the method may further include:
  • the primary network device When the primary network device obtains the parameter of the first network device, the primary network device sends the configuration parameter and the first configuration command of the network device to be configured to the network device to be configured, so that the network device to be configured is configured according to the configuration parameter of the network device to be configured. And the first configuration command generates instantiation configuration data and configures according to the instantiated configuration data.
  • the configuration parameter and the first configuration command of the network device to be configured may be sent to the network to be configured.
  • the network device to be configured generates the instantiated configuration data according to the configuration parameters of the network device to be configured and the first configuration command, thereby avoiding the occurrence of the unconfigurable situation and further improving the reliability of the automatic configuration.
  • the method may further include:
  • the primary network device receives the resource data sent by the network device to be configured, and the resource data is the resource data generated in the process of generating the instantiated configuration data by the network to be configured.
  • the resource data is global resource data, such as address information, and the primary network device receives the resource data, so that the primary network device can learn the resource data allocated to the network device to be configured, thereby avoiding the resource data being allocated to other network devices. In turn, the uniqueness of the resource data is guaranteed.
  • the method may further include:
  • the primary network device receives an acknowledgment response message, and the acknowledgment response message is used to indicate that the instantiation configuration data is correct.
  • the instantiated configuration data received by the network device to be configured is correctly instantiated configuration data, thereby improving the correctness and accuracy of the configuration of the network device to be configured.
  • the method may further include:
  • the primary network device compares the attribute information of the primary network device with the attribute information of other network devices in the type to which the primary network device belongs; and determines that the attribute information of the primary network device satisfies the first preset condition, that is, only determines that it is the primary After the network device, the configuration template file can be obtained according to the type of the network device to be configured.
  • the master network device obtains the configuration template file according to the type of the network device to be configured, and may include:
  • the primary network device receives the at least one configuration template file sent by the second network device, where the second network device is any one of the network devices; and determines the configuration template file in the at least one configuration template file according to the type of the network device to be configured. For the administrator, it is not necessary to determine the primary network device by the attribute of each network device, but randomly send at least one configuration template file to the second network device, and then the second network device sends at least one configuration template file to the primary device. Network devices, which reduces the complexity of administrator operations.
  • the primary network device may further include:
  • the primary network device determines the backup network device according to the second preset condition, and the type of the backup network device is different from the type of the primary network device; and sends a first backup indication message to the backup network device, where the first backup indication message includes a configuration template file, A backup indication message is used to instruct the backup network device to back up the configuration template file to back up the configuration template file by using the backup network device, thereby improving the security and reliability of the configuration template file.
  • the method may further include:
  • the primary network device sends a second backup indication message to the backup network device, where the second backup indication message includes dynamic data generated during the process of generating the instantiated configuration data, and the second backup indication message is used to indicate that the backup network device backs up the dynamic data to pass the Backup network devices enable backup of dynamic data, which improves the security and reliability of dynamic data.
  • the method may further include:
  • the primary network device determines the type of the third network device; when the type of the third network device is the same as the type of the primary network device, the primary network device sets the attribute information of the third network device Comparing with the attribute information of the primary network device; when the attribute information of the primary network device meets the first preset condition, the primary network device configures according to the configuration parameter of the third network device and the configuration template file corresponding to the type of the third network device
  • the command generates the instantiated configuration data of the third network device, so that when a new third network device joins, if it is determined that the primary network device switching does not occur, the primary network device still needs to be configured according to the configuration parameters of the third network device.
  • the configuration command in the configuration template file corresponding to the type of the three network devices generates the instantiated configuration data of the third network device, so that the third network device matches according to the instantiated configuration data, without manually generating each one by an administrator.
  • the configuration data of the device not only improves the configuration efficiency of the network device, but also improves Configuring accuracy.
  • the method may further include:
  • the primary network device determines that the third network device is the new primary network device, and clears the instantiation configuration data, thereby reducing the complexity of the primary network device.
  • the method may further include:
  • the primary network device compares the attribute information of the third network device with the attribute information of the backup network device; when the attribute information of the third network device meets the second preset When the condition is met, the primary network device determines that the third network device is a new backup network device; the primary network device sends a configuration template file to the new backup network device, so that when a new third network device joins, if it is determined to perform the backup network device When switching, the primary network device sends a configuration template file to the new backup network device to back up the configuration template file through the new backup network device, thereby improving the reliability and security of the configuration template file.
  • the method may further include:
  • the primary network device When the attribute information of the third network device does not satisfy the second preset condition, the primary network device generates the third network device according to the configuration parameter of the third network device and the configuration command in the configuration template file corresponding to the type of the third network device. Instantiating configuration data; and sending the instantiated configuration data to a third network device.
  • the configuration template file is generated by offline editing.
  • the third backup network device is a network device that does not perform configuration configuration data configuration.
  • the embodiment of the present application further provides a network configuration method, where the network configuration method may include:
  • the network device to be configured receives the instantiated configuration data sent by the primary network device, and the instantiated configuration data is generated by the primary network device according to the configuration parameter of the network device to be configured and at least one configuration command included in the configuration template file, where the configuration template file is the primary network.
  • the configuration template file corresponds to a network device of the same type, and the configuration command is used to indicate the relationship between the configuration parameters of the network device to be configured and the configuration parameters of other network devices; Instantiate configuration data to configure the network device to be configured.
  • the configuration command in the configuration template file indicates the relationship between the configuration parameters of the network device to be configured and the configuration parameters of other network devices, so that the primary network device can directly Configuring a network device configuration parameter and at least one configuration command to generate the instantiated configuration data of the network device to be configured, and sending the instantiated configuration data to the network device to be configured, so that the network device to be configured performs matching according to the instantiated configuration data.
  • the configuration data of each device is not manually generated by the administrator, which not only improves the configuration efficiency of the network device, but also improves the accuracy of the configuration.
  • the at least one configuration command includes a first configuration command, where the first configuration command is used to indicate a relationship between a configuration parameter of the network device to be configured and a parameter of the first network device, when the primary network device obtains
  • the method may further include:
  • the network device to be configured receives the configuration parameter and the first configuration command of the network device to be configured sent by the primary network device, and obtains the parameter of the first network device according to the first configuration command, and then according to the configuration parameter and the first configuration of the network device to be configured.
  • the command and the parameters of the first network device generate instantiation configuration data.
  • the configuration parameters and the first configuration command of the network device to be configured are directly sent to the network to be configured, so that the network device to be configured is configured to receive the primary device.
  • the configuration parameter and the first configuration command of the network device to be configured sent by the network device, and the generated configuration data is generated according to the configuration parameter of the network device to be configured and the first configuration command, and the configuration data of each device is not manually generated by the administrator. Not only improves the configuration efficiency of the network device, but also improves the accuracy of the configuration. In addition, it is not necessary for the primary network device to obtain the parameters of the first network device and generate the instantiated configuration data, which also reduces the complexity of the primary network device.
  • the method may further include:
  • the network device to be configured sends resource data to the primary network device, where the resource data is resource data generated during the process of generating the instantiated configuration data by the network to be configured.
  • the resource data is global resource data, such as address information, and the network device to be configured sends the resource data to the primary network device, so that the primary network device can learn the resource data allocated to the network device to be configured, thereby avoiding assigning the resource data to the network device.
  • Other network devices in turn, ensure the uniqueness of resource data.
  • the configuration template file is generated by offline editing.
  • the embodiment of the present application further provides a network device, where the network device may include:
  • a processing unit configured to obtain a configuration template file according to the type of the network device to be configured, where the configuration template file corresponds to a network device of the same type, the configuration template file includes at least one configuration command, and at least one configuration command is used to indicate that the configuration file is to be configured. Relationship between configuration parameters of network devices and configuration parameters of other network devices;
  • the processing unit is further configured to generate the instantiated configuration data of the network device to be configured according to the configuration parameter of the network device to be configured and the at least one configuration command;
  • the sending unit is configured to send the instantiated configuration data to the network device to be configured, and the instantiation configuration data is used to indicate that the network device to be configured is configured according to the instantiated configuration data.
  • the at least one configuration command includes a first configuration command
  • the processing unit is configured to obtain a parameter of the first network device according to the first configuration command, where the first configuration command is used to indicate the network device to be configured.
  • the relationship between the configuration parameter and the parameter of the first network device; when the parameter of the first network device is obtained, the network device to be configured is generated according to the configuration parameter of the network device to be configured, the first configuration command, and the parameter of the first network device Instantiate configuration data.
  • the processing unit is further configured to: when the parameter of the first network device is not obtained, send the configuration parameter and the first configuration command of the network device to be configured to the network device to be configured, so as to be Configure the network device to generate instantiated configuration data according to the configuration parameters of the network device to be configured and the first configuration command, and configure the configuration data according to the instantiation configuration data.
  • the network device may further include:
  • the receiving unit is configured to receive an acknowledgement response message, where the acknowledgement response message is used to indicate that the instantiated configuration data is correct.
  • the processing unit is further configured to compare attribute information of the primary network device with attribute information of other network devices in a type to which the primary network device belongs; and determine that the attribute information of the primary network device meets the A preset condition.
  • the processing unit is configured to receive at least one configuration template file sent by the second network device, where the second network device is any one of the network devices, and according to the type of the network device to be configured At least one configuration template file determines the configuration template file.
  • the processing unit is further configured to determine, according to the second preset condition, a backup network device, where the type of the backup network device is different from the type of the primary network device;
  • the sending unit is further configured to send a first backup indication message to the backup network device, where the first backup indication message includes a configuration template file, where the first backup indication message is used to indicate that the backup network device backs up the configuration template file.
  • the processing unit is further configured to: when determining that a third network device is added in the network, determine a type of the third network device; when the type of the third network device is the same as the type of the primary network device Comparing the attribute information of the third network device with the attribute information of the primary network device;
  • the processing unit is further configured to generate an instance of the third network device according to the configuration parameter of the third network device and the configuration command in the configuration template file corresponding to the type of the third network device. Configuration data.
  • the processing unit is further configured to: when the attribute information of the third network device meets the first preset condition, determine that the third network device is a new primary network device, and clear the instantiated configuration data.
  • the processing unit is further configured to compare the attribute information of the third network device with the attribute information of the backup network device when the type of the third network device is different from the type of the primary network device; When the attribute information of the third network device meets the second preset condition, determining that the third network device is a new backup network device;
  • the sending unit is further configured to send a configuration template file to the new backup network device.
  • the processing unit is further configured to: when the attribute information of the third network device does not meet the second preset condition, the primary network device according to the configuration parameter of the third network device and the type of the third network device The configuration command in the corresponding configuration template file generates the instantiation configuration data of the third network device;
  • the sending unit is further configured to send the instantiated configuration data to the third network device.
  • the embodiment of the present application further provides a network device to be configured, where the network device to be configured may include:
  • a receiving unit configured to receive the instantiated configuration data sent by the primary network device, where the configuration data is generated by the primary network device according to the configuration parameter of the network device to be configured and at least one configuration command included in the configuration template file, where the configuration template file is the primary
  • the network device is obtained according to the type of the network device to be configured, and the configuration template file corresponds to a network device of the same type.
  • the configuration command is used to indicate the relationship between the configuration parameter of the network device to be configured and the configuration parameters of other network devices.
  • a processing unit configured to configure the network device according to the instantiated configuration data.
  • the at least one configuration command includes a first configuration command, where the first configuration command is used to indicate a relationship between a configuration parameter of the network device to be configured and a parameter of the first network device, when the primary network device obtains
  • the receiving unit is further configured to receive configuration parameters and a first configuration command of the network device to be configured sent by the primary network device, when the parameter of the first network device is used;
  • the processing unit is configured to obtain the parameter of the first network device according to the first configuration command, and generate the instantiation configuration data according to the configuration parameter of the network device to be configured, the first configuration command, and the parameter of the first network device.
  • the network device to be configured may further include:
  • a sending unit configured to send resource data to the primary network device, where the resource data is resource data generated during the process of generating the instantiated configuration data by the network to be configured.
  • the embodiment of the present application further provides a network device, where the network device may include:
  • the processor is configured to obtain a configuration template file according to the type of the network device to be configured, where the configuration template file corresponds to a network device of the same type, the configuration template file includes at least one configuration command, and at least one configuration command is used to indicate that the configuration file is to be configured. Relationship between configuration parameters of network devices and configuration parameters of other network devices;
  • a processor configured to generate instantiation configuration data of the network device to be configured according to configuration parameters of the network device to be configured and at least one configuration command;
  • the transceiver is configured to send the instantiated configuration data to the network device to be configured, and the instantiated configuration data is used to indicate that the network device to be configured is configured according to the instantiated configuration data.
  • the at least one configuration command includes a first configuration command
  • the processor is configured to obtain a parameter of the first network device according to the first configuration command, where the first configuration command is used to indicate a relationship between a configuration parameter of the network device to be configured and a parameter of the first network device; when the primary network device obtains The parameterized configuration data of the network device to be configured is generated according to the configuration parameter of the network device to be configured, the first configuration command, and the parameter of the first network device.
  • the processor is further configured to: when the parameter of the first network device is not obtained, send the configuration parameter and the first configuration command of the network device to be configured to the network device to be configured, so that the to-be-configured
  • the network device generates the instantiated configuration data according to the configuration parameters of the network device to be configured and the first configuration command, and performs configuration according to the instantiated configuration data.
  • the transceiver is further configured to receive an acknowledgement response message, where the acknowledgement response message is used to indicate that the instantiated configuration data is correct.
  • the processor is further configured to compare the attribute information of the primary network device with the attribute information of other network devices in the type to which the primary network device belongs; and determine that the attribute information of the primary network device meets the A preset condition.
  • the transceiver is configured to receive at least one configuration template file sent by the second network device, where the second network device is any one of the network devices, and the processor is configured to use the network to be configured.
  • the type of device determines the configuration template file in at least one configuration template file.
  • the processor is further configured to determine, according to the second preset condition, the backup network device, where the type of the backup network device is different from the type of the primary network device;
  • the transceiver is further configured to send a first backup indication message to the backup network device, where the first backup indication message includes a configuration template file, and the first backup indication message is used to indicate that the backup network device backs up the configuration template file.
  • the processor is further configured to determine, when the third network device is added to the network, the type of the third network device; when the type of the third network device is the same as the type of the primary network device, Comparing the attribute information of the third network device with the attribute information of the primary network device; and when the attribute information of the primary network device meets the first preset condition, configuring according to the configuration parameter of the third network device and the type of the third network device
  • the configuration command in the template file generates instantiation configuration data of the third network device.
  • the processor is further configured to: when the attribute information of the third network device meets the first preset condition, determine that the third network device is a new primary network device, and clear the instantiated configuration data.
  • the processor is further configured to compare the attribute information of the third network device with the attribute information of the backup network device when the type of the third network device is different from the type of the primary network device; When the attribute information of the three network devices meets the second preset condition, determining that the third network device is a new backup network device;
  • a transceiver for sending a configuration template file to a new backup network device for sending a configuration template file to a new backup network device.
  • the processor is further configured to: when the attribute information of the third network device does not meet the second preset condition, the configuration template corresponding to the configuration parameter of the third network device and the type of the third network device The configuration command in the file generates instantiation configuration data of the third network device;
  • transceiver configured to send the instantiated configuration data to the third network device.
  • the embodiment of the present application further provides a network device to be configured, where the network device to be configured may include:
  • the transceiver is configured to receive the instantiated configuration data sent by the primary network device, where the configuration data is generated by the primary network device according to the configuration parameter of the network device to be configured and at least one configuration command included in the configuration template file, where the configuration template file is the primary
  • the network device is obtained according to the type of the network device to be configured, and the configuration template file corresponds to a network device of the same type.
  • the configuration command is used to indicate the relationship between the configuration parameter of the network device to be configured and the configuration parameters of other network devices.
  • a processor configured to configure the network device according to the instantiated configuration data.
  • the at least one configuration command includes a first configuration command, where the first configuration command is used to indicate a relationship between a configuration parameter of the network device to be configured and a parameter of the first network device, when the primary network device obtains
  • the transceiver is further configured to receive configuration parameters and a first configuration command of the network device to be configured sent by the primary network device when the parameter of the first network device is used;
  • the processor is configured to obtain the parameter of the first network device according to the first configuration command, and generate the instantiation configuration data according to the configuration parameter of the network device to be configured, the first configuration command, and the parameter of the first network device.
  • the transceiver when the instantiation configuration data includes the resource data, the transceiver is further configured to send the resource data to the primary network device, where the resource data is the resource data generated during the process of generating the instantiation configuration data by the network to be configured. .
  • the embodiment of the present application further provides a network device, where the network device includes: a processor, a transceiver, a random access memory, a read only memory, and a bus.
  • the processor is respectively coupled to the transmitter, the random access memory, and the read only memory through a bus.
  • the basic input/output system in the read-only memory or the bootloader booting system in the embedded system is booted to boot the network device into a normal running state.
  • the application and operating system are run in a random access memory such that the processor performs the method of the first aspect or any possible implementation of the first aspect.
  • the embodiment of the present application further provides a network device to be configured, where the network device to be configured includes: a processor, a transceiver, a random access memory, a read only memory, and a bus.
  • the processor is respectively coupled to the transmitter, the random access memory, and the read only memory through a bus.
  • booting is performed by the bootloader booting system in the basic input/output system or the embedded system in the read-only memory, and the network device to be configured is put into a normal running state.
  • the application and the operating system are run in the random access memory, such that the processor performs the method of any of the second aspect or the second aspect.
  • the embodiment of the present application further provides a network device, where the network device includes: a main control board and an interface board, and further, a switching network board.
  • the network device is operative to perform the method of the first aspect or any of the possible implementations of the first aspect.
  • the network device comprises means for performing the method of the first aspect or any of the possible implementations of the first aspect.
  • the embodiment of the present application further provides a network device to be configured, where the network device to be configured includes: a main control board and an interface board, and further includes a switching network board.
  • the network device is operative to perform the method of any of the second aspect or any of the possible implementations of the second aspect.
  • the network device to be configured comprises means for performing the method of any of the possible implementations of the second or second aspect.
  • the embodiment of the present application further provides a network configuration system, where the network configuration system includes the network device in any possible implementation manner of the third aspect or the third aspect, and the fourth aspect or the fourth aspect The network device to be configured in any possible implementation manner;
  • the network configuration system includes the network device in any possible implementation manner of the fifth aspect or the fifth aspect, and the network device to be configured in any possible implementation manner of the sixth aspect or the sixth aspect;
  • the network configuration system includes the network device in any possible implementation manner of the seventh aspect or the seventh aspect, and the network device to be configured in any possible implementation manner of the eighth aspect or the eighth aspect;
  • the network configuration system includes the network device in any possible implementation manner of the ninth aspect or the ninth aspect, and the network device to be configured in any possible implementation manner of the tenth aspect or the tenth aspect.
  • the embodiment of the present application further provides a computer storage medium, including instructions, when the instruction is run on a network device, causing the network device to perform a network in any possible implementation manner according to the first aspect or the first aspect.
  • Configuration method
  • the network device to be configured is configured to perform the network configuration method in any possible implementation manner of the second aspect or the second aspect.
  • the embodiment of the present application further provides a chip, where the computer program is stored on the chip, and when the computer program is executed by the processor, the network configuration in any possible implementation manner of the first aspect or the first aspect is performed. Method; or, the network configuration method in any of the possible implementations of the second aspect or the second aspect.
  • the network configuration method, device, and system provided by the embodiment of the present application enable the primary network device to obtain a configuration template file according to the type of the network device to be configured before configuring the network device; the configuration template file corresponds to a network of the same type.
  • the device configuration file includes at least one configuration command, and at least one configuration command is used to indicate the relationship between the configuration parameters of the network device to be configured and the configuration parameters of other network devices.
  • the configuration command in the configuration template file indicates the network to be configured. The relationship between the configuration parameters of the device and the configuration parameters of the other network devices, so that the primary network device can directly generate the instantiated configuration data of the network device to be configured according to the configuration parameters of the configured network device and the at least one configuration command, and instantiate the configuration.
  • the data is sent to the network device to be configured, so that the network device to be configured is matched according to the instantiated configuration data, and the configuration data of each device is manually generated by the administrator, thereby realizing automatic configuration of the network device, which not only improves the network device. Set efficiency, but also improve the accuracy of the configuration.
  • FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a network configuration method according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a key requirement and an implementation mechanism of a configuration template file according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of determining a configuration command according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of another determining configuration command according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic flowchart diagram of another network configuration method according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic flowchart diagram of still another network configuration method according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a network configuration method according to an embodiment of the present application.
  • FIG. 9 is a schematic flowchart diagram of another network configuration method according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a network device according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of a network device to be configured according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of another network device according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram of another network device to be configured according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram of still another network device according to an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of still another network device to be configured according to an embodiment of the present disclosure.
  • FIG. 16 is a schematic structural diagram of still another network device according to an embodiment of the present disclosure.
  • FIG. 17 is a schematic structural diagram of still another network device to be configured according to an embodiment of the present disclosure.
  • FIG. 18 is a schematic structural diagram of a network configuration system according to an embodiment of the present application.
  • the network architecture and the scenario described in the embodiments of the present application are for the purpose of more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation of the technical solutions provided by the embodiments of the present application.
  • the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
  • FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • the network configuration method provided by the present application can be applied to the Spine-Leaf network architecture.
  • Each network device in the Spine-Leaf network architecture is a device in the ANIMA domain.
  • the two-layer Spine-Leaf network architecture includes two types of network devices: the Spine class and the Leaf class. Of course, it can also be a three-layer Spine-Leaf network architecture.
  • the three-layer Spine-Leaf network architecture includes three types of role network devices: the Spine class, the border leaf class, and the server leaf class.
  • the Spine-Leaf network architecture includes three Spine devices and four Leaf devices, as shown in FIG. 1 .
  • the three Spine devices are Spine device 1, Spine device 2, and Spine device 3; the four leaf devices are Leaf device 1, Leaf device 2, Leaf device 3, and Leaf device 4; each of the Spine devices is four.
  • Each Leaf device in the Leaf device is connected.
  • One of the three Spine devices has a Spine device as the primary network device (for example, Spine Device 2), and one of the four Leaf devices has a Leaf device as the backup network device (for example, Leaf device 3).
  • the primary network device is used to perform the configuration of all the network devices in the Spine-Leaf network architecture.
  • the network device of the same type corresponds to the same configuration template file. Therefore, the primary network device needs to be configured according to the type of the network device to be configured. Obtain the corresponding configuration template file. It should be noted that, in the embodiment of the present application, when determining the number of required configuration template files, it is determined according to the number of network device types in the Spine-Leaf network architecture and the network devices to be configured (such as a part). Network device or all network devices).
  • the network device may be a device that performs a route forwarding function, such as a router, a switch, a forwarding device, and the like.
  • the primary network device obtains a configuration template file according to the type of the network device to be configured before the network device is configured; the configuration template file corresponds to a network device of the same type, and the configuration template file includes At least one configuration command, the at least one configuration command is used to indicate the relationship between the configuration parameters of the network device to be configured and the configuration parameters of other network devices; the configuration command in the configuration template file indicates the configuration parameters of the network device to be configured and other
  • the relationship between the configuration parameters of the network device is such that the primary network device can directly generate the instantiated configuration data of the network device to be configured according to the configuration parameters of the configured network device and the at least one configuration command, and send the instantiated configuration data to the network to be configured.
  • Equipment to make The network device is configured to perform matching according to the instantiated configuration data, and the configuration data of each device is manually generated by the administrator, thereby realizing the configuration efficiency of the network device and improving the configuration accuracy.
  • the Spine-Leaf network architecture there is usually one Spine DR device (belonging to the Spine class) and one Leaf DR (belonging to the Leaf class) device.
  • the Spine DR device is determined in the Spine network device according to the first preset condition.
  • the Spine DR is the IPv6 ULA "small" Spine device in the fabric, which is equivalent to the "virtual network management" in the fabric.
  • the Spine DR device is responsible for the Spine-Leaf network.
  • Some Spine-type devices (including themselves) and/or Leaf-type devices in the architecture generate instantiated configuration data according to the configuration template file.
  • the leaf DR device is determined according to the second preset condition. For example, the IPv6 ULA "least" leaf device in the fabric does not instantiate the configuration template. It is used as the backup device of the Spine DR and is mainly used in the Spine DR device.
  • the configuration template file and the content of the dynamic running data are backed up, thereby ensuring the reliability of the configuration template file and the content of the dynamically running data.
  • the Spine DR device or the Leaf DR device needs to be used. Switching operation, which is triggered by RPL route convergence. When the handover is completed (when the RPL route convergence is completed), backup processing of the configuration template content and running status data is required.
  • the Spine DR device and the Leaf DR device elected by all devices are the same because all the Spine and Leaf devices in the DCN have the same prefixed RPL host route. That is, if the centralized calculation is not performed, the uniqueness of the election result can be guaranteed.
  • the IPv6 ULA address remains unchanged. Therefore, the Spine DR device and the Leaf DR device are not easily changed. In addition, the data between the Spine DR device and the Leaf DR device needs to be synchronized in real time.
  • the interconnection interface between the Spine device and the Leaf device is an Inline Interface; the connection interface between the Spine device and the external network device and the connection interface between the Leaf device and the external network device are an Outreach Interface;
  • a direct link aggregation link between the two devices of the Multi-Chassis Link Aggregation Group (M-LAG) is a peer-link interface (Peer-link Interface).
  • M-LAG Multi-Chassis Link Aggregation Group
  • the main function of the M-LAG is to provide access reliability for the device that accesses the fabric. The three main steps are as follows: 1. The user equipment accesses the two leaf devices at the same time and passes the virtual router redundancy protocol.
  • Redundancy Protocol selects the Leaf device and the Leaf DR device.
  • a line (called peer-link) is connected between the two Leaf devices to run data between the two Leaf devices (for example, dynamic The learned ARP entry is backed up. 3.
  • peer-link can also be used to forward downlink traffic.
  • the network device to be configured is referred to as a leaf device 1 as an example, and the technical solutions of the present application and the technical solutions of the present application are specifically described in detail by using a specific embodiment.
  • the embodiment of the present application is only described by using the network device to be configured as the instantiated configuration process of the leaf device 1.
  • the instantiation configuration process of other devices is similar to the instantiation configuration process of the Leaf device 1.
  • the embodiments of the present application are not described again.
  • the following specific embodiments may be combined with each other, and the same or similar concepts or processes are not described in some embodiments.
  • FIG. 2 is a schematic flowchart of a network configuration method according to an embodiment of the present disclosure.
  • the network configuration method may include:
  • the primary network device compares the attribute information of the primary network device with the attribute information line of the other network device in the type to which the primary network device belongs.
  • the primary network device is a Spine DR device, which is used to instantiate other devices or all network devices in the Spine-Leaf network architecture.
  • the Spine DR device belongs to the Spine class. When determining the type of each network device, it can be divided according to the role of the device to determine the role type of each network device.
  • the ANIMA function is enabled on the internal interface between the Spine device and the Leaf device.
  • the peer-link is deployed between the Spine and the Spine, or the peer-link is deployed between the Leaf and the Leaf, the ANIMA function is enabled on the peer-link interface.
  • all Spine devices or Leaf devices in the ANIMA domain maintain an RPL host routing table with the same prefix list. You can obtain the online/offline status of all Spine devices or Leaf devices in the fabric.
  • the Leaf device can use the IPv6 ULA address as the unique identifier in the fabric.
  • each network device in the Spine-Leaf network architecture must first determine whether it is a Spine DR device. Because each network device in the ANIMA domain is fully versatile. Normally, RPL (or its alternative routing protocol) is used to achieve full connectivity, but RPL can also publish routes from other sources (for example, NMS host network segment routing in a plug-and-play scenario), so it cannot be simple.
  • Each network device can access other network devices in the ANIMA domain to obtain the type and attribute information of other network devices, so as to determine whether it is a Spine DR device according to the attribute information of each network device.
  • the attribute information may be address information, thereby determining the type and address information to which each network device belongs.
  • the Spine device 2 is taken as the main network device, and the Spine device 2 can determine the Spine device 1 and the Spine device 3 after obtaining the type and address information of each network device in the network. It is a Spine-type device, and then its own attribute information is compared with the attribute information of the Spine device 1 and the attribute information of the Spine device 3 respectively. For example, when the attribute information is the address information, the Spine device 2 will The address information is compared with the address information of the Spine device 1 and the address information of the Spine device 3, respectively, to determine whether it is the primary network device.
  • the primary network device determines that the attribute information of the primary network device meets the first preset condition, and obtains a configuration template file according to the type of the network device to be configured.
  • the first preset condition may be understood as the maximum or minimum attribute information of the primary network device in the Spine-type device.
  • the attribute information is the address information
  • the IPv6 ULA address of each network device in the ANIMA is unique and fixed
  • the address information in the Spine-type device can be minimized as the first preset condition.
  • the address information in the Spine-type device can also be maximized as the first preset condition.
  • the first preset condition is that the address information in the Spine-type device is the smallest.
  • the primary network device and other network devices in the Spine class need to compare the IPv6 ULA address information with the IPv6 ULA address information of other Spine devices in the Spine class. If the IPv6 ULA address information of the primary network device is the smallest, it is determined that the primary network device is the primary network device for performing the instantiation configuration, that is, the Spine DR device. After being determined as the primary network device, the primary network device is used to generate instantiated configuration data according to the configuration template file for some Spine-type devices (including itself) and/or Leaf devices in the Spine-Leaf network architecture.
  • the configuration template file can be obtained according to the type of the network device to be configured.
  • the number of configuration template files may be one or multiple, and may be set according to actual needs.
  • the configuration template file corresponding to the same type of network device is the same. If the network device to be configured is a Spine device or a leaf device, the corresponding configuration template file or Leaf corresponding to the Spine device can be obtained.
  • the configuration template file of the device can be configured. When the network device to be configured includes the Spine device and the leaf device, you can configure two template files.
  • One configuration template file is used to generate the configuration data for the Spine device.
  • Another configuration template file is used to generate instantiation configuration data for the Leaf class device.
  • the number of the configuration template file is one, and the configuration template file in the embodiment of the present application refers to the configuration.
  • the configuration template file is generated by offline editing, and can be edited manually or using a related UI tool.
  • the configuration data of the basic network architecture can be automatically generated online for any number of Spine devices and/or Leaf devices by using the one-time offline editing configuration template, so that the consistency of the generated configuration data is high. Improve the deployment efficiency of the DCN network.
  • the configuration template in the embodiment of the present application supports processing the configuration of the foregoing M-LAG.
  • the configuration template file is to "parameterize" the command line configuration data (mainly for the basic network architecture) of the same device role type in the fabric. See FIG. 3, which is provided in the embodiment of the present application.
  • An example of a key requirement and implementation mechanism of a configuration template file which needs to satisfy the templating/parameterization of the configuration file.
  • the requirement can be parameterized by a macro definition, and the same configuration parameter is in the DCN. It needs to be uniformly allocated to avoid conflicts. This requirement can be allocated by resource allocation, and the resource value can be allocated and referenced through macros. 3.
  • the parameters of the configuration command need to reflect the final state, which is independent of the operation timing.
  • Instantiation, release timing dependency implementation; 4 need to support the automatic generation of configuration data based on rules, and achieve linkage update, the requirements can be achieved through well-known macros, predefined target object sets, or through requirements instantiation, support according to deployment / installation State selection command set implementation, or through loop instantiation, support based on type instead of
  • the instance generates the configuration data, or delays the instantiation, and senses the expansion of the target object set, and dynamically updates the configuration data. 5.
  • Supports the peer relationship calculates and generates the paired configuration command on the related device, and implements the linkage update.
  • the peer relationship can be defined by the peer group (the Spine device and the Spine device, the Spine device, the Leaf device, the Leaf device, and the Leaf device).
  • the instance needs to be satisfied.
  • the administrator submits the data of the instantiated configuration data to avoid the error of the generated instantiation configuration data, which can be implemented by the dry-run mechanism.
  • the macro is used to implement the templating of the command line.
  • the instantiation of the macro is to implement/expand the macro definition with specific values.
  • the type of the macro may include at least six of the following:
  • Well-known macro A predefined macro, based on some configuration data related to device installation and deployment information (for example, a list of internal interface names on Spine or Leaf, added to peer-link) Such a macro can be used in the list of interface names, etc.).
  • Well-known macros are not required, nor can they be defined in the configuration template (duplicate), and can be used directly as arguments to the command line.
  • resource macro each instantiation, you need to assign a new value from the specified resource pool, and to ensure that the newly assigned value is unique within the specified range.
  • negotiation macro A resource macro assigned by negotiation.
  • a special resource macro which is characterized by the fact that the resource allocation needs to meet certain constraints (for example, the IP addresses configured on the interfaces directly connected to the two devices need to be on the same network segment), and the related resources are not simple by Spine DR.
  • the ground is allocated from the resource pool, and these constraints need to be met through negotiation between devices. Since there is a negotiation process between devices when allocating resources, when defining a negotiation macro, you need to specify the target object of the negotiation operation.
  • Reference macro The macro refers to the specified parameters of other commands in the same device configuration file.
  • the referenced parameter itself must also be a macro.
  • the currently qualified referenced parameter can only be a simple macro or a resource macro.
  • a reference macro is actually an alias for a simple macro and a resource macro. The advantage of using reference macros is that they are more semantically clear and can avoid multiple allocations of resources when multiple reference to resource macros.
  • each configuration template file includes at least one configuration command, and the configuration command is used to indicate a relationship between configuration parameters of the network device to be configured and configuration parameters of other network devices, and the configuration command may be configured according to the network device to be configured. Hardware installation or other conditions to select different command sets for automated configuration.
  • the configuration template file can also include other commands, such as commands for indicating resource allocation.
  • FIG. 4 is a schematic diagram of determining a configuration command according to an embodiment of the present application.
  • the configuration command determines different command sets according to the type of the board installed on the device.
  • the configuration command can be determined according to the product form.
  • FIG. 5 is a schematic diagram of another determining configuration command according to an embodiment of the present application.
  • the configuration template file corresponds to one type of network device, and the generated configuration data of each network device to be configured is generated according to the configuration template file.
  • the configuration command in the configuration template file indicates the relationship between the configuration parameters of the network device to be configured and the configuration parameters of other network devices, so that the primary network device can automatically generate the configuration according to the configuration parameters of the configured network device and at least one configuration command.
  • Configuring the instantiation configuration data of the network device without manually generating the configuration data of each device by the administrator not only improves the configuration efficiency of the network device, but also improves the configuration accuracy.
  • the primary network device may receive at least one configuration template file sent by the second network device when the configuration template file is obtained according to the type of the network device to be configured, where the second network device is in the network. Any one of the network devices; and determining a configuration template file in at least one configuration template file according to the type of the network device to be configured.
  • the second network device may be used as an injection network device, which may be any one of the network devices, and may also be a primary network device.
  • the administrator can use the OM interface and use a common file transfer protocol (such as Trivial File Transfer Protocol (TFTP) or File Transfer Protocol (FTP).
  • TFTP Trivial File Transfer Protocol
  • FTP File Transfer Protocol
  • the protocol (general file transfer protocol such as TFTP/FTP, etc., or a file transfer mechanism based on the General Responsibility Assignment Software Pattern (GRASP)) is sent to the primary network device so that the primary network device can be configured according to At least one configuration command in the configuration parameter of the network device and the configuration template file generates the instantiation configuration data of the network device to be configured.
  • GRASP General Responsibility Assignment Software Pattern
  • the Spine device 2 when it is determined whether the Spine device 2 meets the first preset condition, when the IPv6 ULA address information of the Spine device 2 is greater than one of the address information of the Spine device 1 and the address information of the address information of the Spine device 3 If it is greater than the address information of the Spine device 1 and the address information of the address information of the Spine device 3, it is determined that it is not the primary network device.
  • the Spine device 2 receives the configuration template file sent by the network device, the Spine device 2 refuses to receive the configuration template. The file is reversed.
  • the Spine device 2 determines that its own IPv6 ULA address information is smaller than the address information of the Spine device 1 and the address information of the Spine device 3, it determines that it is the primary network device and receives the injection through the network device (for example, injecting).
  • the network device can send a configuration template file to the leaf device and obtain at least one configuration command in the configuration template file, and execute the following S203:
  • the master network device generates the instantiated configuration data of the network device to be configured according to the configuration parameter of the network device to be configured and the at least one configuration command.
  • the at least one configuration command includes the first configuration command
  • the S203 main network device generates the instantiated configuration data of the network device to be configured according to the configuration parameter of the network device to be configured and the at least one configuration command.
  • the primary network device obtains a parameter of the first network device according to the first configuration command, where the first configuration command is used to indicate a relationship between a configuration parameter of the network device to be configured and a parameter of the first network device; when the primary network device obtains When the parameter of the first network device is used, the primary network device generates the network device to be configured according to the configuration parameter of the network device to be configured, the first configuration command, and the parameter of the first network device. Instantiate configuration data. It should be noted that, when the configuration template file further includes a resource allocation command, and the primary network device can directly obtain the parameters of the first network device, the primary network device allocates resources for the network device to be configured, and generates instantiation configuration data.
  • the resource data that is allocated for the network device to be configured where the resource data is the resource data generated during the process of generating the instantiated configuration data by the network to be configured. It can be seen that when the primary network device can obtain the parameters of the first network device, the instantiated configuration data of the network device to be configured can be directly generated according to the configuration parameters of the network device to be configured, the first configuration command, and the parameters of the first network device. To help further improve the efficiency of the automation configuration.
  • the resource data may be IPv6 ULA address information.
  • the parameters of the first network device are related to the parameters of the network device to be configured
  • the parameters of the first network device are all parameters of the first network device; and when the parameters of the first network device are When there is an association between the parameters of the network device, the parameters of the first network device are part of the parameters of the first network device associated with the parameters of the network device to be configured.
  • the primary network device when the primary network device generates the instantiated configuration data for the network device to be configured, not all the leaf devices have been online and configured beforehand. Therefore, the primary network device cannot automatically generate configuration commands for the device at the first time. . In this case, if the primary network device does not obtain the parameters of the first network device, the primary network device sends the configuration parameters and the first configuration command of the network device to be configured to the network device to be configured, so that the network device to be configured is configured.
  • the generated configuration data is generated according to the configuration parameters of the network device to be configured and the first configuration command, and is configured according to the instantiated configuration data.
  • the configuration parameter and the first configuration command of the network device to be configured may be sent to the network to be configured.
  • the network device to be configured generates the instantiated configuration data according to the configuration parameters of the network device to be configured and the first configuration command, thereby avoiding the occurrence of the unconfigurable situation and further improving the reliability of the automatic configuration.
  • the configuration template file further includes a resource allocation command
  • the network device to be configured allocates resources and generates instantiation configuration data, where the instantiation configuration data is included in the network to be configured. Resource data assigned by the device.
  • the network device to be configured does not need to send all the generated instantiation configuration data to the primary network device, and may only send the resource data in the instantiated configuration data to the primary network device, so that the primary device The network device can obtain the resource data allocated for the network device to be configured.
  • the network device is configured as the leaf device 1 as an example.
  • the configuration file includes two configurations.
  • the command where the first configuration command is used to indicate the association between the configuration parameter of the Leaf device 1 and the partial parameter of the Leaf device 2, and the second configuration command is used to indicate the configuration parameter of the Leaf device 1 and some parameters of the Leaf device 4.
  • the association information of the Leaf device 1 can be obtained by the primary network device according to the configuration parameters of the Leaf device 1, the first configuration command, and the second configuration command.
  • the leaf device 2 and the leaf device 4 are obtained according to the first configuration command and the second configuration command, respectively, before the configuration data of the leaf device 1 is generated according to the configuration parameter, the first configuration command, and the second configuration command of the leaf device 1.
  • the respective parameters of the device when obtaining the respective parameters of the Leaf device 2 and the Leaf device 4 device, the primary network device can directly according to the configuration parameters of the Leaf device 1, the first configuration command, the second configuration command, the Leaf device 2, and the Leaf.
  • the respective parameters of the device 4 device generate instantiation configuration data of the Leaf device 1.
  • the primary network device may send the configuration parameter, the first configuration command, and the second configuration command of the Leaf device 1 to the Leaf device 1.
  • the leaf device 1 determines the respective parameters of the Leaf device 2 and the Leaf device 4 device in association with the Leaf device 2 and the Leaf device 4 device, and according to the configuration parameters of the Leaf device 1, the first configuration command, the second configuration command, and the Leaf device. 2 and the respective parameters of the Leaf device 4 device generate the instantiation configuration data of the Leaf device 1.
  • the primary network device sends the instantiated configuration data to the network device to be configured.
  • the instantiated configuration data is used to indicate that the network device to be configured is configured according to the instantiated configuration data.
  • the generated network configuration configuration data may be sent to the network device to be configured.
  • the configuration network device is configured according to the instantiation configuration data. Specifically, the network device to be configured is configured to be instantiated, and if the configuration is not required to be delayed, the instantiated configuration data may be directly loaded and validated. If a part or a small number of configuration commands need to be delayed, the delay instantiation processing is performed.
  • the default value is used; if the partial completion and the unfinished part does not have a default value, an error is returned; if there is no error, the data is not loaded temporarily; after that, the primary network is returned.
  • the device returns the resource allocation result during the instantiation configuration process.
  • the Scenario configuration data can be sent to the Leaf device 1 so that the Leaf device 1 receives the instantiation configuration data, according to the Instantiate configuration data configuration.
  • the configuration command in the configuration template file indicates the configuration parameter of the network device to be configured and the configuration parameter of the other network device.
  • the relationship enables the primary network device to automatically obtain the instantiated configuration data of the network device to be configured according to the configuration parameters of the configured network device and the at least one configuration command, without manually generating the configuration data of each device by the administrator, thereby improving the network.
  • the configuration efficiency of the device is improved, and the accuracy of the configuration is improved.
  • the network configuration method provided by the embodiment of the present application is configured to obtain a configuration template file according to the type of the network device to be configured before the network device is configured; the configuration template file corresponds to a network device of the same type, and the configuration template is configured.
  • the file includes at least one configuration command, and the at least one configuration command is used to indicate the relationship between the configuration parameter of the network device to be configured and the configuration parameter of the other network device; the configuration command in the configuration template file indicates the configuration parameter of the network device to be configured.
  • the relationship between the configuration parameters and the configuration parameters of the other network devices so that the primary network device can directly generate the instantiated configuration data of the network device to be configured according to the configuration parameters of the configured network device and the at least one configuration command, and send the instantiated configuration data to the
  • the network device is configured to match the configured network device according to the instantiated configuration data, and the configuration data of each device is not manually generated by the administrator, thereby realizing the configuration, thereby improving the configuration efficiency of the network device and improving the configuration. Configuring accuracy.
  • the S204 main network device sends the instantiated configuration data to the network device to be configured after the S204 is configured.
  • the administrator can check the instantiated configuration data through the dry-run mechanism to ensure that the generated instantiation configuration data is correct.
  • FIG. 6 is a schematic flowchart of another network configuration method according to an embodiment of the present application.
  • the primary network device sends an acknowledgement request message.
  • the confirmation request message includes instantiation configuration data, and the confirmation request message is used to request confirmation of the instantiated configuration data.
  • the main network device (Spine device 2) sends the instantiated configuration data to the network device to be configured, before the network device to be configured actually loads the instantiated configuration data, in order to avoid the error of the instantiation configuration data content, the loading occurs.
  • the problem is that the network device to be configured does not load the instantiated configuration data, and the primary network device sends an acknowledgement request message to the injected network device (Leaf device 1) or the administrator, where the confirmation request message includes the generated instantiation configuration data, Confirm the generated instantiation configuration data by injecting a network device or an administrator.
  • the injection network device may collect the confirmation opinion of the administrator through the OM interface and return the confirmation result to the primary network device.
  • the primary network device may also not send the acknowledgement request message, but in the process of generating the instantiated configuration data, the injected network device or the administrator may synchronously obtain the instantiated configuration data, thereby injecting the network device or the administrator. Confirm the generated instantiation configuration data.
  • the S602 primary network device receives the acknowledgement response message.
  • the confirmation response message is used to indicate that the instantiation configuration data is correct.
  • the authenticated configuration data is correctly instantiated configuration data, and then the network device to be configured is loaded according to the instantiated configuration data and takes effect. Conversely, if the primary network device receives the acknowledgement reject message, the instantiated configuration data is incorrect or the instantiated configuration data does not meet the new instantiation configuration requirement, and the related data is cleared by the network device to be configured, and the relevant information is released locally. Resources.
  • the network device or the administrator is injected. Confirm the instantiated configuration data, so as to avoid the problem of loading the data due to the error of the configuration data.
  • the administrator can re-examine the network deployment to ensure that the network device is configured to receive the instance.
  • the configuration data is the correct instantiation configuration data, which improves the correctness and accuracy of the configuration of the network device to be configured.
  • FIG. 7 is a schematic flowchart diagram of still another network configuration method according to an embodiment of the present application.
  • the primary network device determines the backup network device according to the second preset condition.
  • the second preset condition can be understood as the maximum or minimum attribute information of the network device in the Leaf class device.
  • the attribute information is the address information
  • the IPv6 ULA address of each network device in the ANIMA is unique and fixed
  • the address information in the Leaf class device can be minimized as the second preset condition.
  • the address information in the Leaf class device can also be used as the second preset condition.
  • the second preset condition is that the address information in the Leaf class device is the smallest.
  • the type of the backup network device is different from that of the primary network device, that is, the type of the backup network device used for backup is one of the Leaf class devices, and the backup network device is a network device that is not configured with the instantiation configuration data.
  • the primary network device After the primary network device obtains the configuration template file through S202, in order to back up the configuration template file through the backup network device, the primary network device needs to obtain the IPv6 ULA address of each Leaf device in the Leaf class device, and the IPv6 ULA of each Leaf device. The address is compared. If the IPv6ULA address of the backup network device is the smallest, the backup network device is determined to be the network device for backup.
  • the Spine device 2 can determine that the Leaf device 1, the Leaf device 2, the Leaf device 3, and the Leaf device 4 are all Leaf devices.
  • the address information of the Leaf device 1, the address information of the Leaf device 2, the address information of the Leaf device 3, and the address information of the Leaf device 4 are compared to determine which Leaf device is the backup network device for backup, that is, the Leaf DR device. After the comparison, if the IPv6 ULA address of the Leaf device 3 is smaller than the address information of the Leaf device 1, the address information of the Leaf device 2, and the address information of the Leaf device 4, it is determined that the Leaf device 3 is a backup network device.
  • the primary network device sends a first backup indication message to the backup network device.
  • the first backup indication message includes a configuration template file, and the first backup indication message is used to indicate that the backup network device backs up the configuration template file.
  • the file transfer protocol (such as TFTP/FTP, etc., or the GRASP-based file transfer mechanism) that is common to the Leaf device is used to the Leaf device.
  • 3 Send a first backup indication message including a configuration template file.
  • the Leaf device 3 compares its own IPv6 ULA address with the IPv6 ULA address of the Leaf device 1, the IPv6 ULA address of the Leaf device 2, and the IPv6 ULA address of the Leaf device 4, respectively. Determine if it is a backup network device for backup.
  • the leaf device 3 determines itself. It is not a backup network device for backup. At this time, Leaf device 3 refuses to receive the first backup indication message. Conversely, if the Leaf device 3 determines that its own IPv6 ULA address is smaller than the address information of the Leaf device 1, the address information of the Leaf device 2, and the address information of the Leaf device 4, it determines that it is a backup network device, and the Leaf device 3 receives the primary device.
  • the first backup indication message that is sent by the network device, including the configuration template file, is backed up, and the configuration template file is backed up, so as to avoid the loss of the configuration template file, thereby improving the security of the configuration template file.
  • the method further includes:
  • the second backup indication message includes dynamic data generated in the process of generating the instantiated configuration data, and the second backup indication message is used to instruct the backup network device to back up the dynamic data.
  • the primary network device may generate dynamic data (for example, assign an address from the address pool as the interface IP address of the device), in order to implement the allocation of the dynamic data, instantiate in S204.
  • the primary network device may also send a second backup indication message to the backup network device (ie, the leaf device 3) for backup, where the second backup indication message includes generating the generated configuration data.
  • the dynamic data generated in the process thereby backing up the dynamic data through the second backup indication message, avoiding the loss of dynamic data, thereby improving the security of the dynamic data.
  • FIG. 8 is a schematic diagram of a network configuration method according to an embodiment of the present application.
  • the primary network device determines the type of the third network device.
  • the primary network device may learn the RPL route in a manner that the RPL synchronously carries or adds a separate process when the route is advertised, and uses the GRASP message to actively obtain the information. Specifically, if a new host route is added to the RPL route, it indicates that a new network device is added to the network, and once the new network device joins the ANIMA domain, its corresponding IPv6 ULA address is always stable. Conversely, if the RPL route is revoked When a host is routed, the network device is offline.
  • Spine device 2 when Spine device 2 finds that a new host route is added to the RPL route, it indicates that a new network device (third network device) is added to the network.
  • Spine device 2 needs to determine the type of the third network device first. That is, the third network device belongs to a Spine class device or a Leaf class device.
  • the primary network device compares the attribute information of the third network device with the attribute information of the primary network device.
  • the Spine device 2 determines that the third network device is a Spine device, indicating that the type of the third network device is the same as the type of the primary network device, the Spine device 2 needs to further address the address information of the third network device and the address of the primary network device. The information is compared to determine if a switchover of the Spine DR device is required.
  • the primary network device When the primary network device meets the first preset condition, the primary network device generates the instantiation configuration data of the third network device according to the configuration parameter of the third network device and the configuration command in the configuration template file corresponding to the type of the third network device. .
  • the IPv6 ULA address of the Spine device 2 is smaller than the IPv6 ULA address of the third network device, the IPv6 ULA address of the Spine device 2 is still the smallest, and it is determined that the Spine DR device does not need to be switched.
  • the Spine device 2 continues to function as the Spine DR device.
  • the configuration parameter in the configuration template file corresponding to the type of the third network device and the configuration command in the configuration template file corresponding to the type of the third network device generate the instantiated configuration data of the third network device, thereby completing the instantiation configuration of the newly added third network device. resource allocation.
  • the IPv6 ULA address of the Spine device 2 is greater than the IPv6 ULA address of the third network device, the IPv6 ULA address of the third network device is the smallest.
  • the Spine DR device is to be switched, and the primary network device determines that the third network device is the Spine.
  • the DR device which is the new primary network device, clears and releases related resources.
  • the IPv6 ULA address of the Spine device 2 is also compared with its own IPv6 ULA address. If the IPv6 ULA address of the Spine device 2 is greater than the IPv6 ULA address of the third network device, it is determined to be the new master.
  • the network device needs to determine the backup network device for backup and obtain the configuration template file by backing up the network device.
  • the third network device needs to determine the backup network device for backup.
  • the dynamic data is generated and backed up.
  • the third network device can also obtain the dynamic data by using the backup network device, so that the obtained configuration template file and the dynamic data are other network devices. Make an instantiation configuration. It should be noted that, when determining whether to perform Spine DR switching, only the address information of the third network device needs to be compared with the address information of the primary network device, because the primary network device Spine DR itself is the Spine with the smallest address.
  • the address information will not change once it is assigned. Therefore, when determining whether the Spine DR needs to be switched, only the address information of the newly added third network device and the current minimum primary network device are needed. The address information can be compared. Of course, the address information of the third network device can also be compared with the address information of each network device in the Spine-type device.
  • FIG. 9 is a schematic flowchart diagram of another network configuration method according to an embodiment of the present application.
  • the primary network device compares the attribute information of the third network device and the backup network device.
  • the Spine device 2 determines that the third network device is a Leaf device, indicating that the type of the third network device is different from the type of the primary network device, the Spine device 2 needs to further further obtain the address information of the third network device and the Leaf for backup. The address information of device 3 is compared to determine whether a switch of the Leaf DR device needs to be performed.
  • the address information of the third network device is only necessary to compare the address information of the third network device with the address information of the backup network device, because the backup network device Leaf DR itself is the address with the smallest address. In the Spine-Leaf architecture, the address information does not change once it is assigned. Therefore, when determining whether the Leaf DR needs to be switched, only the address information of the newly added third network device and the current minimum backup network are needed. The address information of the device can be compared. Of course, the address information of the third network device can also be compared with the address information of each of the network devices in the Leaf class device.
  • the IPv6 ULA address of the third network device is smaller than the IPv6 ULA address of the leaf device 3
  • the IPv6 ULA address of the third network device is the smallest.
  • the switching of the Leaf DR device is performed, and the primary network device determines that the third network device is the Leaf DR device. That is, a new backup network device.
  • the primary network device sends a configuration template file to the new backup network device.
  • the configuration template file may be sent to the new backup network device, and the new third network device will also receive the leaf after receiving the configuration template file.
  • the IPv6 ULA address of the device 3 is compared with its own IPv6 ULA address. When the IPv6 ULA address of the leaf device 3 is greater than the IPv6 ULA address of the third network device, it is determined to be a new backup network device, and the configuration template file sent by the Spine device 2 is received. And back up the configuration template file.
  • the third network device determines that it is not a new network device and refuses to receive the configuration template file sent by the Spine device 2.
  • the primary network device may further include: after comparing the attribute information of the third network device and the backup network device:
  • the primary network device When the third network device does not meet the second preset condition, the primary network device generates an instance of the third network device according to the configuration parameter of the third network device and the configuration command in the configuration template file corresponding to the type of the third network device. Configuration data.
  • the Spine device 2 determines that the IPv6 ULA address of the third network device is greater than the IPv6 ULA address of the Leaf device 3, the third network device is not the IPv6 ULA address minimum Leaf device, and The switching of the Leaf DR device needs to be performed, and the Spine device 2 can generate the instantiated configuration data of the third network device according to the configuration parameter of the third network device and the configuration command in the configuration template file corresponding to the type of the third network device.
  • the primary network device sends the instantiated configuration data to the third network device.
  • the Spine device 2 sends the instantiated configuration data to the newly joined third network device, so that the third network device can configure it according to the instantiated configuration data, thereby completing the instantiated configuration of the third network device.
  • FIG. 10 is a schematic structural diagram of a network device 100 according to an embodiment of the present disclosure.
  • the network device 100 is used as a primary network device, and includes:
  • the processing unit 1001 is configured to obtain a configuration template file according to the type of the network device to be configured, where the configuration template file corresponds to a network device of the same type, the configuration template file includes at least one configuration command, and at least one configuration command is used to indicate to be configured. Configure the relationship between the configuration parameters of network devices and the configuration parameters of other network devices.
  • the processing unit 1001 is further configured to generate the instantiated configuration data of the network device to be configured according to the configuration parameter of the network device to be configured and the at least one configuration command.
  • the sending unit 1002 is configured to send the instantiated configuration data to the network device to be configured, and the instantiation configuration data is used to indicate that the network device to be configured is configured according to the instantiated configuration data.
  • the at least one configuration command includes a first configuration command
  • the processing unit 1001 is configured to obtain, according to the first configuration command, a parameter of the first network device, where the first configuration command is used to indicate a configuration parameter of the network device to be configured.
  • a relationship between the parameters of the network device; when the parameters of the first network device are obtained, the instantiated configuration of the network device to be configured is generated according to the configuration parameters of the network device to be configured, the first configuration command, and the parameters of the first network device data.
  • the processing unit 1001 is further configured to: when the parameter of the first network device is not obtained, send the configuration parameter and the first configuration command of the network device to be configured to the network device to be configured, so that the network device to be configured is configured according to The configuration parameters and the first configuration command of the network device to be configured generate instantiation configuration data, and are configured according to the instantiated configuration data.
  • the network device 100 may further include:
  • the receiving unit 1003 is configured to receive an acknowledgement response message, where the acknowledgement response message is used to indicate that the instantiated configuration data is correct.
  • the processing unit 1001 is further configured to compare the attribute information of the primary network device with the attribute information of other network devices in the type to which the primary network device belongs; and determine that the attribute information of the primary network device meets the first preset condition. .
  • the processing unit 1001 is configured to receive, by the second network device, at least one configuration template file, where the second network device is any one of the network devices 100, and configured in at least one according to the type of the network device to be configured.
  • the configuration template file is determined in the template file.
  • processing unit 1001 is further configured to determine, according to the second preset condition, the backup network device, where the type of the backup network device is different from the type of the primary network device.
  • the sending unit 1002 is further configured to send a first backup indication message to the backup network device, where the first backup indication message includes a configuration template file, where the first backup indication message is used to indicate that the backup network device backs up the configuration template file.
  • the processing unit 1001 is further configured to determine, when the third network device is added to the network, the type of the third network device; when the type of the third network device is the same as the type of the primary network device, the third The attribute information of the network device is compared with the attribute information of the primary network device.
  • the processing unit 1001 When the attribute information of the primary network device meets the first preset condition, the processing unit 1001 generates an instantiation configuration of the third network device according to the configuration parameter of the third network device and the configuration command in the configuration template file corresponding to the type of the third network device. data.
  • the processing unit 1001 is further configured to: when the attribute information of the third network device meets the first preset condition, determine that the third network device is a new primary network device, and clear the instantiated configuration data.
  • the processing unit 1001 is further configured to: when the type of the third network device is different from the type of the primary network device, compare the attribute information of the third network device with the attribute information of the backup network device; when the third network device When the attribute information satisfies the second preset condition, the third network device is determined to be a new backup network device.
  • the sending unit 1002 is further configured to send a configuration template file to the new backup network device.
  • the processing unit 1001 is further configured to: when the attribute information of the third network device does not meet the second preset condition, the configuration template corresponding to the configuration parameter of the third network device and the type of the third network device by the primary network device The configuration command in the file generates instantiation configuration data for the third network device.
  • the sending unit 1002 is further configured to send the instantiated configuration data to the third network device.
  • the network device 100 shown in the embodiment of the present application may perform various steps and methods implemented by the primary network device in the foregoing embodiment corresponding to FIG. 2 to FIG. 9 , and the implementation principle and the beneficial effects are similar. Narration.
  • FIG. 11 is a schematic structural diagram of a network device 110 to be configured according to an embodiment of the present disclosure.
  • the network device 110 to be configured may further include:
  • the receiving unit 1101 is configured to receive the instantiated configuration data sent by the primary network device, where the configuration data is generated by the primary network device according to the configuration parameter of the network device 110 to be configured and the at least one configuration command included in the configuration template file, and the configuration template file is configured.
  • the main network device is obtained according to the type of the network device 110 to be configured, and the configuration template file corresponds to a network device of the same type, and the configuration command is used to indicate that the configuration parameter of the network device 110 to be configured is different from the configuration parameters of other network devices. Relationship.
  • the processing unit 1102 is configured to configure the network device 110 to be configured according to the instantiated configuration data.
  • the at least one configuration command includes a first configuration command, where the first configuration command is used to indicate a relationship between a configuration parameter of the network device 110 to be configured and a parameter of the first network device, where the primary network device cannot obtain the first network.
  • the receiving unit 1101 is further configured to receive configuration parameters and a first configuration command of the network device 110 to be configured sent by the primary network device.
  • the processing unit 1102 is configured to obtain the parameter of the first network device according to the first configuration command, and generate the instantiation configuration data according to the configuration parameter of the network device 110 to be configured, the first configuration command, and the parameter of the first network device.
  • the network device 110 to be configured may further include:
  • the sending unit 1103 is configured to send resource data to the primary network device, where the resource data is resource data generated during the process of generating the instantiated configuration data by the network to be configured.
  • the network device 110 to be configured in the embodiment of the present application may perform various steps and methods implemented by the network device to be configured in the foregoing embodiment corresponding to FIG. 2 to FIG. 9 , and the implementation principle and the beneficial effects are similar. No more details are given.
  • FIG. 12 is a schematic structural diagram of another network device 120 according to an embodiment of the present disclosure.
  • the network device 120 is used as a primary network device, and includes:
  • the processor 1201 is configured to obtain a configuration template file according to the type of the network device to be configured, where the configuration template file corresponds to a network device of the same type, the configuration template file includes at least one configuration command, and at least one configuration command is used to indicate to be Configure the relationship between the configuration parameters of network devices and the configuration parameters of other network devices.
  • the processor 1201 is configured to generate instantiated configuration data of the network device to be configured according to the configuration parameter of the network device to be configured and the at least one configuration command.
  • the transceiver 1202 is configured to send the instantiated configuration data to the network device to be configured, and the instantiation configuration data is used to indicate that the network device to be configured is configured according to the instantiated configuration data.
  • the at least one configuration command includes a first configuration command
  • the processor 1201 is configured to obtain, according to the first configuration command, a parameter of the first network device, where the first configuration command is used to indicate a configuration parameter of the network device to be configured.
  • a relationship between the parameters of the network device; when the primary network device obtains the parameter of the first network device, the instance of the network device to be configured is generated according to the configuration parameter of the network device to be configured, the first configuration command, and the parameter of the first network device.
  • Configuration data is configured to obtain, according to the first configuration command, a parameter of the first network device, and the parameter of the first network device.
  • the processor 1201 is further configured to: when the parameter of the first network device is not obtained, send the configuration parameter and the first configuration command of the network device to be configured to the network device to be configured, so that the network device to be configured is configured according to Configure configuration parameters and first configuration commands of the network device to generate instantiation configuration data, and configure the configuration data according to the instantiation configuration data.
  • the transceiver 1202 is further configured to receive an acknowledgment response message, where the acknowledgment response message is used to indicate that the instantiated configuration data is correct.
  • the processor 1201 is further configured to compare attribute information of the primary network device with attribute information of other network devices in the type to which the primary network device belongs; and determine that the attribute information of the primary network device meets the first preset condition. .
  • the transceiver 1202 is configured to receive at least one configuration template file sent by the second network device, where the second network device is any one of the network devices, and the processor 1201 is configured to: according to the type of the network device to be configured.
  • the configuration template file is determined in at least one configuration template file.
  • the processor 1201 is further configured to determine, according to the second preset condition, the backup network device, where the type of the backup network device is different from the type of the primary network device.
  • the transceiver 1202 is further configured to send a first backup indication message to the backup network device, where the first backup indication message includes a configuration template file, and the first backup indication message is used to indicate that the backup network device backs up the configuration template file.
  • the processor 1201 is further configured to: when determining that a third network device is added in the network, determine a type of the third network device; when the type of the third network device is the same as the type of the primary network device, the third network is used.
  • the attribute information of the device is compared with the attribute information of the primary network device; when the attribute information of the primary network device meets the first preset condition, according to the configuration parameter of the third network device and the configuration template file corresponding to the type of the third network device
  • the configuration command generates instantiation configuration data of the third network device.
  • the processor 1201 is further configured to: when the attribute information of the third network device meets the first preset condition, determine that the third network device is a new primary network device, and clear the instantiated configuration data.
  • the processor 1201 is further configured to: when the type of the third network device is different from the type of the primary network device, compare the attribute information of the third network device with the attribute information of the backup network device; when the third network device When the attribute information satisfies the second preset condition, it is determined that the third network device is a new backup network device.
  • the transceiver 1202 is configured to send a configuration template file to the new backup network device.
  • the processor 1201 is further configured to: when the attribute information of the third network device does not meet the second preset condition, configure the configuration template file according to the configuration parameter of the third network device and the type of the third network device.
  • the command generates instantiation configuration data of the third network device.
  • the transceiver 1202 is configured to send the instantiated configuration data to the third network device.
  • the network device 120 shown in the embodiment of the present application may perform various steps and methods implemented by the primary network device in the foregoing embodiment corresponding to FIG. 2 to FIG. 9 , and the implementation principle and the beneficial effects are similar. Narration.
  • FIG. 13 is a schematic structural diagram of another network device 130 to be configured according to an embodiment of the present disclosure.
  • the network device 130 to be configured may include:
  • the transceiver 1301 is configured to receive the instantiated configuration data sent by the primary network device, where the instantiated configuration data is configured by the primary network device according to the configuration parameter of the to-be-configured network device 130 and the configuration template file.
  • the configuration template file is obtained by the primary network device according to the type of the network device 130 to be configured, and the configuration template file corresponds to a network device of the same type, and the configuration command is used to indicate that The relationship between the configuration parameters of the network device 130 and the configuration parameters of other network devices is configured.
  • the processor 1302 is configured to configure the to-be-configured network device 130 according to the instantiated configuration data.
  • the at least one configuration command includes a first configuration command, where the first configuration command is used to indicate a relationship between a configuration parameter of the network device 130 to be configured and a parameter of the first network device, where the primary network device cannot obtain the first network.
  • the transceiver 1301 is further configured to receive configuration parameters and a first configuration command of the network device 130 to be configured sent by the primary network device.
  • the processor 1302 is configured to obtain a parameter of the first network device according to the first configuration command, and generate an instantiation configuration according to the configuration parameter of the network device 130 to be configured, the first configuration command, and the parameter of the first network device.
  • the transceiver 1301 is further configured to send resource data to the primary network device, where the resource data is resource data generated during the process of generating the instantiation configuration data by the network to be configured.
  • the network device 130 to be configured in the embodiment of the present application may perform various steps and methods implemented by the network device to be configured in the foregoing embodiment corresponding to FIG. 2 to FIG. 9 , and the implementation principle and the beneficial effects are similar. No more details are given.
  • FIG. 14 is a schematic structural diagram of still another network device 140 according to an embodiment of the present disclosure.
  • the network device 140 is used as a primary network device, and includes: a processor 1401, a transceiver 1402, and a random access memory. 1403, read only memory 1404 and bus 1405.
  • the processor 1401 is coupled to the transmitter, the random access memory 1403, and the read only memory 1404 via the bus 1405.
  • the basic input/output system in the read-only memory 1404 or the bootloader booting system in the embedded system is booted to boot the network device 140 into a normal operating state.
  • the application and operating system are run in the random access memory 1403 such that:
  • the processor 1401 is configured to obtain a configuration template file according to a type of the network device to be configured, where the configuration template file corresponds to a network device of the same type, the configuration template file includes at least one configuration command, and the at least one configuration
  • the command is used to indicate the relationship between the configuration parameter of the network device to be configured and the configuration parameter of the other network device; and generate an instance of the network device to be configured according to the configuration parameter of the network device to be configured and the at least one configuration command.
  • the configuration data is sent by the transceiver 1402 to the network device to be configured, and the instantiated configuration data is used to indicate that the network device to be configured is configured according to the instantiated configuration data.
  • the network device 140 provided by the embodiment of the present application may correspond to the primary network device in the foregoing embodiment corresponding to FIG. 2 to FIG. 9, and the processor 1401, the transceiver 1402, and the like in the network device 140 may implement FIG. 2 to FIG. 9
  • the processor 1401 is configured to perform all operations of the processing unit of the network device 140 in FIG. 10, and the transceiver 1402 is configured to perform all operations of the receiving unit and the transmitting unit of the network device 140 in FIG. For the sake of brevity, it will not be repeated here.
  • FIG. 15 is a schematic structural diagram of a network device 150 to be configured according to an embodiment of the present disclosure.
  • the network device 150 to be configured includes: a processor 1501, a transceiver 1502, and a random access memory 1503.
  • the processor 1501 is coupled to the transmitter, the random access memory 1503, and the read only memory 1504 via the bus 1505.
  • the basic input/output system in the read-only memory 1504 or the bootloader booting system in the embedded system is booted to guide the network device 150 to be configured to enter a normal running state.
  • the application and the operating system are run in the random access memory 1503 such that:
  • the transceiver 1502 is configured to receive the instantiated configuration data sent by the primary network device, where the primary configuration data is generated by the primary network device according to the configuration parameter of the to-be-configured network device 150 and at least one configuration command included in the configuration template file.
  • the configuration template file is obtained by the primary network device according to the type of the network device 150 to be configured, the configuration template file corresponding to a network device of the same type, and the configuration command is used to indicate that the configuration file is to be configured.
  • the relationship between the configuration parameters of the network device 150 and the configuration parameters of the other network devices; the processor 1501 is configured to configure the network device 150 to be configured according to the instantiated configuration data.
  • the network device 150 to be configured provided by the embodiment of the present application may correspond to the network device 150 to be configured in the embodiment corresponding to the foregoing FIG. 2 to FIG. 9, and the processor 1501, the transceiver 1502, and the like in the network device 150 to be configured.
  • the functions and/or various steps and methods implemented by the network device 150 to be configured in the embodiment corresponding to FIG. 2 to FIG. 9 may be implemented.
  • the processor 1501 is configured to perform all operations of the processing unit of the network device 150 to be configured in FIG. 11, and the transceiver 1502 is configured to perform all operations of the receiving unit of the network device 150 to be configured in FIG. For the sake of brevity, it will not be repeated here.
  • FIG. 16 is a schematic structural diagram of another network device 160 according to an embodiment of the present disclosure.
  • the network device 160 is used as a primary network device, and includes: a main control board 1601, an interface board 1603, a switching network board 1602, and an interface board 1604.
  • the main control board 1601 is used to complete functions such as system management, device maintenance, and protocol processing.
  • the switching network board 1602 is used to complete data exchange between each interface board (also referred to as a line card or a service board).
  • Interface boards 1603 and 1604 are used to provide various service interfaces (eg, Ethernet interfaces, POS interfaces, etc.) and to implement forwarding of data packets.
  • the main control board 1601, the interface boards 1603 and 1604, and the switching network board 1602 are connected to each other through the system bus to implement interworking.
  • the central processing unit 16031 on the interface board 1603 is for controlling and managing the interface board and communicating with the central processing unit 16011 on the main control board 1601.
  • the central processing unit 16011 on the main control board 1601 is configured to obtain a configuration template file according to the type of the network device to be configured, and configured to generate the instantiation configuration data of the network device to be configured according to the configuration parameter of the network device to be configured and the at least one configuration command. (For details, please refer to the description of related parts in FIG. 2 to FIG. 9 , and details are not described herein again), and the instantiated configuration data is encapsulated in an IP packet and sent to the interface board 1603 or 1604.
  • the destination IP address in the IP packet header is the IP address of the network device to be configured.
  • the network processor 16032 on the interface board 1603 searches the forwarding table (the association relationship between the saved IP address and the outbound interface) stored in the forwarding entry storage 16034 according to the IP address of the network device to be configured, and obtains the network device to be configured.
  • the forwarding entry corresponding to the IP address is matched, so that the outbound interface 1 corresponding to the IP address of the network device to be configured is further obtained, and the outgoing interface 1 is located on the physical interface card 16033.
  • the physical interface card 16033 is configured to send the instantiated configuration data to the network device to be configured.
  • the central processing unit 16011 on the main control board 1601 is further configured to obtain parameters of the first network device 160 according to the first configuration command, where the first configuration command is used to indicate configuration parameters of the network device to be configured and the first network device.
  • the relationship between the parameters of the network device is generated.
  • the instantiated configuration data of the network device to be configured is generated according to the configuration parameter of the network device to be configured, the first configuration command, and the parameter of the first network device.
  • the physical interface card 16033 on the interface board 1603 is further configured to: when the parameter of the first network device 160 is not obtained, send configuration parameters and a first configuration command of the network device to be configured to the network device to be configured, so that The network device to be configured generates the instantiated configuration data according to the configuration parameters of the network device to be configured and the first configuration command, and performs configuration according to the instantiated configuration data.
  • the physical interface card 16033 on the interface board 1603 is further configured to receive an acknowledgment response message, where the acknowledgment response message is used to indicate that the instantiated configuration data is correct.
  • the central processing unit 16011 on the main control board 1601 is further configured to compare attribute information of the primary network device with attribute information of other devices in the type to which the primary network device belongs; and determine that the attribute information of the primary network device is satisfied.
  • the first preset condition is further configured to compare attribute information of the primary network device with attribute information of other devices in the type to which the primary network device belongs.
  • the physical interface card 16033 on the interface board 1603 is further configured to receive at least one configuration template file from the second network device, where the second network device is any network device in the network; and the central processing unit on the main control board 1601
  • the 16011 is further configured to determine a configuration template file in the at least one configuration template file according to the type of the network device to be configured.
  • the central processing unit 16011 on the main control board 1601 is further configured to determine, according to the second preset condition, the backup network device, where the type of the backup network device is different from the type of the primary network device; the physical interface card 16033 on the interface board 1603
  • the first backup indication message includes a configuration template file, where the first backup indication message is used to indicate that the backup network device backs up the configuration template file.
  • the central processing unit 16011 on the main control board 1601 is further configured to determine a type of the third network device when determining that a third network device is added in the network; when the type of the third network device is different from that of the primary network device 160 When the types are the same, the attribute information of the third network device is compared with the attribute information of the primary network device 160; when the attribute information of the primary network device 160 satisfies the first preset condition, according to the configuration parameters of the third network device and the third network The configuration command in the configuration template file corresponding to the type of the device generates the instantiation configuration data of the third network device.
  • the central processing unit 16011 on the main control board 1601 is further configured to: when the attribute information of the third network device meets the first preset condition, determine that the third network device is a new primary network device, and clear the instantiation configuration. data.
  • the central processing unit 16011 on the main control board 1601 is further configured to: when the type of the third network device is different from the type of the primary network device 160, perform attribute information of the third network device and attribute information of the backup network device. Comparing; when the attribute information of the third network device meets the second preset condition, determining that the third network device is a new backup network device; the physical interface card 16033 on the interface board 1603 is further configured to send the configuration to the new backup network device. Template file.
  • the central processing unit 16011 on the main control board 1601 is further configured to respond according to the configuration parameter of the third network device and the type of the third network device.
  • the configuration command in the configuration template file generates the instantiated configuration data of the third network device; the physical interface card 16033 on the interface board 1603 is further configured to send the instantiated configuration instantiation configuration data to the third network device.
  • the operation on the interface board 1604 in the embodiment of the present application is consistent with the operation of the interface board 1603, and details are not described herein for brevity.
  • the network device 160 of the present embodiment may correspond to the network device 160 in the embodiment corresponding to the foregoing FIG. 2 to FIG. 9, and the main control board 1601, the interface board 1603, and/or 1604 in the network device 160 may be implemented.
  • the functions and/or steps of the network device 160 in the embodiment corresponding to FIG. 2 to FIG. 9 are not described herein again for the sake of brevity.
  • the main control board may have one or more blocks. When there are multiple blocks, the main control board and the standby main control board may be included.
  • the interface board may have one or more blocks. The stronger the data processing capability of the network device 160, the more interface boards are provided.
  • the physical interface card on the interface board can also have one or more blocks.
  • the switching network board may not exist, and there may be one or more blocks. When there are multiple blocks, the load sharing redundant backup can be implemented together. Under the centralized forwarding architecture, the network device 160 does not need to exchange a network board, and the interface board undertakes the processing function of the service data of the entire system.
  • the network device 160 may have at least one switching network board, and implement data exchange between multiple interface boards through the switching network board to provide large-capacity data exchange and processing capability. Therefore, the network access device 160 of the distributed architecture has greater data access and processing capabilities than the centralized architecture.
  • the network device 160 may also be in the form of only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the board, and the central processing unit and the main board on the interface board at this time.
  • the central processing unit on the control board can be combined into a central processing unit on the board to perform the superimposed functions.
  • the data exchange and processing capability of the device is low (for example, low-end switches or routers, etc.) Network device 160). Which architecture is used depends on the specific network deployment scenario, and is not limited here.
  • FIG. 17 is a schematic structural diagram of another network device 170 to be configured according to an embodiment of the present disclosure.
  • the network device 170 to be configured includes: a main control board 1701, an interface board 1703, a switching network board 1702, and an interface. Board 1704.
  • the main control board 1701 is used to complete functions such as system management, device maintenance, and protocol processing.
  • the switching network board 1702 is used to complete data exchange between each interface board (also referred to as a line card or a service board).
  • Interface boards 1703 and 1704 are used to provide various service interfaces (eg, Ethernet interfaces, POS interfaces, etc.) and to implement forwarding of data packets.
  • the main control board 1701, the interface boards 1703 and 1704, and the switching network board 1702 are connected to each other through a system bus to implement interworking.
  • the central processing unit 17031 on the interface board 1703 is for controlling and managing the interface board and communicating with the central processing unit 17011 on the main control board 1701.
  • the physical interface card 17033 on the interface board 1703 is configured to receive an IP packet that is encapsulated with the instantiated configuration data sent by the primary network device, where the destination IP address in the IP packet header is an IP address of the network device to be configured.
  • the IP packet is sent to the network processor 17032 on the interface board 1703.
  • the network processor 17032 searches the forwarding table stored in the forwarding entry storage 17034 according to the destination IP address (the IP address of the network device to be configured).
  • the IP address is associated with the egress interface.
  • the local device is the network device to be configured.
  • the IP packet is sent to the central processor on the main control board 1701 through the central processing unit 17031 on the interface board 1703. 17011.
  • the central processor 17011 on the main control board 1701 is configured to configure the network device 170 to be configured in accordance with the instantiated configuration data.
  • the at least one configuration command includes a first configuration command, where the first configuration command is used to indicate a relationship between the configuration parameter of the network device to be configured and a parameter of the first network device, when the primary network device obtains
  • the physical interface card 17033 on the interface board 1703 is further configured to receive the configuration parameters and the first configuration command of the network device 170 to be configured sent by the primary network device.
  • the central processing unit 17011 on the main control board 1701 is further configured to obtain a parameter of the first network device according to the first configuration command, and generate an instance according to the configuration parameter of the network device 170 to be configured, the first configuration command, and the parameter of the first network device. Configuration.
  • the operation on the interface board 1704 in the embodiment of the present application is consistent with the operation of the interface board 1703, and details are not described herein for brevity.
  • the network device 170 to be configured in this embodiment may correspond to the network device 170 to be configured in the embodiment corresponding to FIG. 2 to FIG. 9 , and the main control board 1701 and the interface board 1703 in the network device 170 to be configured.
  • the functions and/or the steps of the network device 170 to be configured in the embodiment corresponding to FIG. 2 to FIG. 9 may be implemented. For brevity, details are not described herein again.
  • the main control board may have one or more blocks. When there are multiple blocks, the main control board and the standby main control board may be included.
  • the interface board may have one or more blocks. The stronger the data processing capability of the network device 170 to be configured, the more interface boards are provided.
  • the physical interface card on the interface board can also have one or more blocks.
  • the switching network board may not exist, and there may be one or more blocks. When there are multiple blocks, the load sharing redundant backup can be implemented together.
  • the network device 170 to be configured may not need to exchange a network board, and the interface board shall bear the processing function of the service data of the entire system.
  • the network device 170 to be configured may have at least one switching network board, and implement data exchange between multiple interface boards through the switching network board to provide large-capacity data exchange and processing capability. Therefore, the data access and processing capability of the network device 170 to be configured of the distributed architecture is greater than that of the centralized architecture.
  • the configuration of the network device 170 to be configured may be only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the board, and the central processing unit on the interface board at this time And the central processing unit on the main control board can be combined into a central processing unit on the board to perform the superimposed function, and the data exchange and processing capability of the device is low (for example, the low-end switch or The router is waiting to configure the network device 170).
  • Which architecture is used depends on the specific network deployment scenario, and is not limited here.
  • FIG. 18 is a schematic structural diagram of a network configuration system 180 according to an embodiment of the present disclosure.
  • the network configuration system 180 includes the network device 1801 shown in any one of the foregoing embodiments, and the network device to be configured 1802 shown in any of the foregoing embodiments.
  • the implementation principle and beneficial effects are similar, and will not be described here.
  • the embodiment of the present application further provides a computer storage medium, including instructions, when the instruction is run on a network device, causing the network device to perform various implementations performed by the network device in the embodiment corresponding to FIG. 2-9
  • the steps and methods, the implementation principles and the beneficial effects are similar, and will not be described again here.
  • the embodiment of the present application further provides a computer storage medium, including instructions, when the instruction is run on a network device to be configured, causing the network device to be configured to perform the network to be configured in the embodiment corresponding to FIG. 2-9
  • the various steps and methods implemented by the device have similar implementation principles and beneficial effects, and are not described herein again.
  • the embodiment of the present application further provides a chip on which a computer program is stored, and when the computer program is executed by the processor, performing various steps and methods performed by the network device in the embodiment corresponding to FIG. 2 to FIG. 9 .
  • the various steps and methods implemented by the network device to be configured in the embodiment corresponding to FIG. 2 to FIG. 9 are performed, and the implementation principle and the beneficial effects are similar. Narration.
  • the processor may be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), or a field programmable gate array (FPGA). Or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a random access memory (RAM), a flash memory, a read-only memory (ROM), a programmable read only memory or an electrically erasable programmable memory, a register, etc.
  • RAM random access memory
  • ROM read-only memory
  • programmable read only memory or an electrically erasable programmable memory
  • register etc.
  • the storage medium is located in the memory, and the processor reads the instructions in the memory and combines the hardware to complete the steps of the above method.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Automation & Control Theory (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

本申请提供一种网络配置方法、设备及系统,该方法包括:主网络设备根据待配置网络设备的类型获得配置模板文件,其中,配置模板文件对应具有相同类型的一类网络设备,配置模板文件包括至少一条配置命令,至少一条配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;主网络设备根据待配置网络设备的配置参数和至少一条配置命令生成待配置网络设备的实例化配置数据;主网络设备将实例化配置数据发送给待配置网络设备,实例化配置数据用于指示待配置网络设备根据实例化配置数据进行配置,实现了配置的自动化,不仅提高了网络设备的配置效率,而且提高了配置的准确度。

Description

网络配置方法、设备及系统
本申请要求于2018年05月11日提交中国国家知识产权局、申请号为201810451317.5、申请名称为“网络配置方法、设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种网络配置方法、设备及系统。
背景技术
在数据中心网络(Data Center Network,DCN)中,Spine-Leaf网络架构是DCN的主流架构,Spine-Leaf网络架构又称为分布式核心架构。在Spine-Leaf网络架构中,通常包括Spine类设备和Leaf类设备,其中,Spine类设备作为Spine-Leaf网络架构中的骨干设备,主要负责连接所有Leaf类设备,且每一个Spine设备均与所有的Leaf设备连接;Leaf类设备作为Spine-Leaf网络架构中的接入设备,主要负责下接服务器等设备。
对于Spine-Leaf网络架构中的Spine类设备或者Leaf类设备而言,其对应的连接关系和功能均是基于设备角色类型(Spine类或Leaf类)确定的,具有相同设备角色类型的网络设备的配置参数具有高度的相似性。在Spine-Leaf网络架构中,通过部署大量的网络设备为客户端提供强大的网络传输资源。在通过部署大量的网络设备为客户端提供网络传输资源之前,需要先对每一个网络设备进行配置,现有技术中,是通过管理员手动为大量的网设备生成并下发每一个设备对应的配置数据,由于相同角色类型的设备对应的配置数据类似,因此,管理员手动生成每一个设备的配置数据时,不仅配置的效率不高,而且在配置时容易出错,从而造成配置的准确度不高。
发明内容
本申请提供一种网络配置方法、设备及系统,实现自动化配置网络设备,以提高网络设备的配置效率及配置的准确度。
第一方面,本申请实施例提供一种网络配置方法,该方法可以包括:
主网络设备根据待配置网络设备的类型获得配置模板文件,其中,配置模板文件对应具有相同类型的一类网络设备,配置模板文件包括至少一条配置命令,至少一条配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;并根据待配置网络设备的配置参数和至少一条配置命令生成待配置网络设备的实例化配置数据;再将实例化配置数据发送给待配置网络设备,以使待配置网络设备根据实例化配置数据进行配置。其中,实例化配置数据用于指示待配置网络设备根据实例化配置数据进行配置。
由此可见,本申请实施例提供的网络配置方法,由于配置模板文件中的配置命令指示了待配置网络设备的配置参数与其它网络设备的配置参数之间的关系,使得主网络设备可以直接根据配置网络设备的配置参数和至少一条配置命令生成待配置网络设 备的实例化配置数据,并将实例化配置数据发送给待配置网络设备,以使待配置网络设备根据该实例化配置数据进行匹配,而无需通过管理员手动生成每一个设备的配置数据,实现了配置的自动化,不仅提高了网络设备的配置效率,而且提高了配置的准确度。
在一种可能的实现方式中,至少一条配置命令包括第一配置命令,主网络设备根据待配置网络设备的配置参数和至少一条配置命令生成待配置网络设备的实例化配置数据,包括:主网络设备根据第一配置命令获得第一网络设备的参数,第一配置命令用于指示待配置网络设备的配置参数与第一网络设备的参数之间的关系;当主网络设备获得到第一网络设备的参数时,主网络设备根据待配置网络设备的配置参数、第一配置命令及第一网络设备的参数生成待配置网络设备的实例化配置数据。
由此可见,当主网络设备能够获得到第一网络设备的参数时,可以直接根据待配置网络设备的配置参数、第一配置命令及第一网络设备的参数生成待配置网络设备的实例化配置数据,有助于进一步提升自动化配置的效率。
在一种可能的实现方式中,该方法还可以包括:
当主网络设备获得不到第一网络设备的参数时,主网络设备向待配置网络设备发送待配置网络设备的配置参数和第一配置命令,以使待配置网络设备根据待配置网络设备的配置参数和第一配置命令生成实例化配置数据,并根据实例化配置数据进行配置。
由此可见,当主网络设备获得不到第一网络设备的参数,无法生成待配置网络设备的实例化配置数据时,可以将待配置网络设备的配置参数和第一配置命令发送给待配置网络,以使待配置网络设备根据待配置网络设备的配置参数和第一配置命令生成实例化配置数据,避免了无法配置情况的发生,有助于进一步提升自动化配置的可靠性。此外,无需主网络设备获得第一网络设备的参数,并生成实例化配置数据,也降低了主网络设备的复杂度。
在一种可能的实现方式中,当实例化配置数据包括资源数据时,该方法还可以包括:
主网络设备接收待配置网络设备发送的资源数据,资源数据为待配置网络生成实例化配置数据过程中产生的资源数据。
其中,资源数据为全局资源数据,例如地址信息,主网络设备通过接收该资源数据,使得主网络设备可以获知为待配置网络设备分配的资源数据,从而避免再将该资源数据分配给其它网络设备,进而保证了资源数据的唯一性。
在一种可能的实现方式中,主网络设备将实例化配置数据发送给待配置网络设备之后,还可以包括:
主网络设备接收确认响应消息,确认响应消息用于指示实例化配置数据正确。
由此可见,通过注入网络设备或者管理员对实例化配置数据进行确认,这样可以避免因实例化配置数据内容错误,而导致加载时出现问题,此外,管理员也可以重新对网络部署进行再次审视,从而确保待配置网络设备接收到的实例化配置数据为正确的实例化配置数据,进而提高了待配置网络设备配置的正确性和准确性。
在一种可能的实现方式中,主网络设备根据待配置网络设备的类型获得配置模板 文件之前,还可以包括:
主网络设备将主网络设备的属性信息与主网络设备所属的类型中的其它网络设备的属性信息进行比较;并确定主网络设备的属性信息满足第一预设条件,即只有在确定其为主网络设备之后,可以根据待配置网络设备的类型获得配置模板文件。
在一种可能的实现方式,主网络设备根据待配置网络设备的类型获得配置模板文件,可以包括:
主网络设备接收来自第二网络设备发送的至少一个配置模板文件,第二网络设备为网络中任一个网络设备;并根据待配置网络设备的类型在至少一个配置模板文件中确定配置模板文件。对于管理员而言,无需通过每一个网络设备的属性确定主网络设备,而是随机将至少一个配置模板文件发送给第二网络设备,再由第二网络设备将至少一个配置模板文件发送给主网络设备,从而降低了管理员操作的复杂度。
在一种可能的实现方式中,主网络设备根据待配置网络设备的类型获得配置模板文件之后,还可以包括:
主网络设备根据第二预设条件确定备份网络设备,备份网络设备的类型与主网络设备的类型不同;并向备份网络设备发送第一备份指示消息,第一备份指示消息包括配置模板文件,第一备份指示消息用于指示备份网络设备备份配置模板文件,以通过备份网络设备实现对配置模板文件进行备份,从而提高了配置模板文件的安全性和可靠性。
在一种可能的实现方式中,主网络设备将实例化配置数据发送给待配置网络设备之后,还可以包括:
主网络设备向备份网络设备发送第二备份指示消息,第二备份指示消息包括生成实例化配置数据的过程中产生的动态数据,第二备份指示消息用于指示备份网络设备备份动态数据,以通过备份网络设备实现对动态数据进行备份,从而提高了动态数据的安全性和可靠性。
在一种可能的实现方式中,该方法还可以包括:
当确定网络中有第三网络设备加入时,主网络设备判断第三网络设备的类型;当第三网络设备的类型与主网络设备的类型相同时,主网络设备将第三网络设备的属性信息与主网络设备的属性信息进行比较;当主网络设备的属性信息满足第一预设条件时,主网络设备根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据,使得在有新的第三网络设备加入时,若确定不发生主网络设备切换时,该主网络设备依然需要根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据,以使待第三网络设备根据该实例化配置数据进行匹配,而无需通过管理员手动生成每一个设备的配置数据,不仅提高了网络设备的配置效率,而且提高了配置的准确度。
在一种可能的实现方式中,该方法还可以还包括:
当第三网络设备的属性信息满足第一预设条件时,主网络设备确定第三网络设备为新的主网络设备,并清除实例化配置数据,从而降低了主网络设备的复杂度。
在一种可能的实现方式中,该方法还可以还包括:
当第三网络设备的类型与主网络设备的类型不同时,主网络设备将第三网络设备的属性信息和备份网络设备的属性信息进行比较;当第三网络设备的属性信息满足第二预设条件时,主网络设备确定第三网络设备为新的备份网络设备;主网络设备向新的备份网络设备发送配置模板文件,使得在有新的第三网络设备加入时,若确定执行备份网络设备切换时,主网络设备向新的备份网络设备发送配置模板文件,以通过该新的备份网络设备备份该配置模板文件,从而提高了配置模板文件的可靠性和安全性。
在一种可能的实现方式中,该方法还可以包括:
当第三网络设备的属性信息不满足第二预设条件时,主网络设备根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据;并将实例化配置数据发送给第三网络设备。
在一种可能的实现方式中,配置模板文件是离线编辑生成的。
在一种可能的实现方式中,第三备份网络设备为不进行实例化配置数据配置的网络设备。
第二方面,本申请实施例还提供一种网络配置方法,该网络配置方法可以包括:
待配置网络设备接收主网络设备发送的实例化配置数据,实例化配置数据是主网络设备根据待配置网络设备的配置参数和配置模板文件包括的至少一条配置命令生成的,配置模板文件是主网络设备根据待配置网络设备的类型获得的,配置模板文件对应具有相同类型的一类网络设备,配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;并根据实例化配置数据对待配置网络设备进行配置。
由此可见,本申请实施例提供的网络配置方法,由于配置模板文件中的配置命令指示了待配置网络设备的配置参数与其它网络设备的配置参数之间的关系,使得主网络设备可以直接根据配置网络设备的配置参数和至少一条配置命令生成待配置网络设备的实例化配置数据,并将实例化配置数据发送给待配置网络设备,以使待配置网络设备根据该实例化配置数据进行匹配,而无需通过管理员手动生成每一个设备的配置数据,不仅提高了网络设备的配置效率,而且提高了配置的准确度。
在一种可能的实现方式中,至少一条配置命令包括第一配置命令,第一配置命令用于指示待配置网络设备的配置参数与第一网络设备的参数之间的关系,当主网络设备获得不到第一网络设备的参数时,方法还可以包括:
待配置网络设备接收主网络设备发送的待配置网络设备的配置参数和第一配置命令;并根据第一配置命令获得第一网络设备的参数;再根据待配置网络设备的配置参数、第一配置命令及第一网络设备的参数生成实例化配置数据。
由此可见,当主网络设备获得不到第一网络设备的参数时,可以直接待配置网络设备的配置参数和第一配置命令发送给待配置网络,以使待配置网络设备待配置网络设备接收主网络设备发送的待配置网络设备的配置参数和第一配置命令,并根据待配置网络设备的配置参数和第一配置命令生成实例化配置数据,同样无需通过管理员手动生成每一个设备的配置数据,不仅提高了网络设备的配置效率,而且提高了配置的准确度。此外,无需主网络设备获得第一网络设备的参数,并生成实例化配置数据,也降低了主网络设备的复杂度。
在一种可能的实现方式中,当实例化配置数据包括资源数据时,待配置网络设备根据待配置网络设备的配置参数和第一配置命令生成实例化配置之后,还可以包括:
待配置网络设备向主网络设备发送资源数据,资源数据为待配置网络生成实例化配置数据过程中产生的资源数据。
其中,资源数据为全局资源数据,例如地址信息,待配置网络设备向主网络设备发送资源数据,使得主网络设备可以获知为待配置网络设备分配的资源数据,从而避免再将该资源数据分配给其它网络设备,进而保证了资源数据的唯一性。
在一种可能的实现方式中,配置模板文件是离线编辑生成的。
第三方面,本申请实施例还提供一种网络设备,该网络设备可以包括:
处理单元,用于根据待配置网络设备的类型获得配置模板文件,其中,配置模板文件对应具有相同类型的一类网络设备,配置模板文件包括至少一条配置命令,至少一条配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;
处理单元,还用于根据待配置网络设备的配置参数和至少一条配置命令生成待配置网络设备的实例化配置数据;
发送单元,用于将实例化配置数据发送给待配置网络设备,实例化配置数据用于指示待配置网络设备根据实例化配置数据进行配置。
在一种可能的实现方式中,至少一条配置命令包括第一配置命令,处理单元,具体用于根据第一配置命令获得第一网络设备的参数,第一配置命令用于指示待配置网络设备的配置参数与第一网络设备的参数之间的关系;当获得到第一网络设备的参数时,根据待配置网络设备的配置参数、第一配置命令及第一网络设备的参数生成待配置网络设备的实例化配置数据。
在一种可能的实现方式中,处理单元,还具体用于当获得不到第一网络设备的参数时,向待配置网络设备发送待配置网络设备的配置参数和第一配置命令,以使待配置网络设备根据待配置网络设备的配置参数和第一配置命令生成实例化配置数据,并根据实例化配置数据进行配置。
在一种可能的实现方式中,该网络设备还可以包括:
接收单元,用于接收确认响应消息,确认响应消息用于指示实例化配置数据正确。
在一种可能的实现方式中,处理单元,还用于将主网络设备的属性信息与主网络设备所属的类型中的其它网络设备的属性信息进行比较;并确定主网络设备的属性信息满足第一预设条件。
在一种可能的实现方式中,处理单元,具体用于接收来自第二网络设备发送的至少一个配置模板文件,第二网络设备为网络中任一个网络设备;并根据待配置网络设备的类型在至少一个配置模板文件确定配置模板文件。
在一种可能的实现方式中,处理单元,还用于根据第二预设条件确定备份网络设备,备份网络设备的类型与主网络设备的类型不同;
发送单元,还用于向备份网络设备发送第一备份指示消息,第一备份指示消息包括配置模板文件,第一备份指示消息用于指示备份网络设备备份配置模板文件。
在一种可能的实现方式中,处理单元,还用于当确定网络中有第三网络设备加入 时,判断第三网络设备的类型;当第三网络设备的类型与主网络设备的类型相同时,将第三网络设备的属性信息与主网络设备的属性信息进行比较;
当主网络设备的属性信息满足第一预设条件时,处理单元还用于根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据。
在一种可能的实现方式中,处理单元,还用于当第三网络设备的属性信息满足第一预设条件时,确定第三网络设备为新的主网络设备,并清除实例化配置数据。
在一种可能的实现方式中,处理单元,还用于当第三网络设备的类型与主网络设备的类型不同时,将第三网络设备的属性信息和备份网络设备的属性信息进行比较;当第三网络设备的属性信息满足第二预设条件时,确定第三网络设备为新的备份网络设备;
发送单元,还用于向新的备份网络设备发送配置模板文件。
在一种可能的实现方式中,处理单元,还用于当第三网络设备的属性信息不满足第二预设条件时,主网络设备根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据;
发送单元,还用于将实例化配置数据发送给第三网络设备。
第四方面,本申请实施例还提供一种待配置网络设备,该待配置网络设备可以包括:
接收单元,用于接收主网络设备发送的实例化配置数据,实例化配置数据是主网络设备根据待配置网络设备的配置参数和配置模板文件包括的至少一条配置命令生成的,配置模板文件是主网络设备根据待配置网络设备的类型获得的,配置模板文件对应具有相同类型的一类网络设备,配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;
处理单元,用于根据实例化配置数据对待配置网络设备进行配置。
在一种可能的实现方式中,至少一条配置命令包括第一配置命令,第一配置命令用于指示待配置网络设备的配置参数与第一网络设备的参数之间的关系,当主网络设备获得不到第一网络设备的参数时,接收单元,还用于接收主网络设备发送的待配置网络设备的配置参数和第一配置命令;
处理单元,用于根据第一配置命令获得第一网络设备的参数;并根据待配置网络设备的配置参数、第一配置命令及第一网络设备的参数生成实例化配置数据。
在一种可能的实现方式中,当实例化配置数据包括资源数据时,待配置网络设备还可以包括:
发送单元,用于向主网络设备发送资源数据,资源数据为待配置网络生成实例化配置数据过程中产生的资源数据。
第五方面,本申请实施例还提供一种网络设备,该网络设备可以包括:
处理器,用于根据待配置网络设备的类型获得配置模板文件,其中,配置模板文件对应具有相同类型的一类网络设备,配置模板文件包括至少一条配置命令,至少一条配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;
处理器,用于根据待配置网络设备的配置参数和至少一条配置命令生成待配置网络设备的实例化配置数据;
收发器,用于将实例化配置数据发送给待配置网络设备,实例化配置数据用于指示待配置网络设备根据实例化配置数据进行配置。
在一种可能的实现方式中,至少一条配置命令包括第一配置命令,
处理器,具体用于根据第一配置命令获得第一网络设备的参数,第一配置命令用于指示待配置网络设备的配置参数与第一网络设备的参数之间的关系;当主网络设备获得到第一网络设备的参数时,根据待配置网络设备的配置参数、第一配置命令及第一网络设备的参数生成待配置网络设备的实例化配置数据。
在一种可能的实现方式中,处理器还具体用于当获得不到第一网络设备的参数时,向待配置网络设备发送待配置网络设备的配置参数和第一配置命令,以使待配置网络设备根据待配置网络设备的配置参数和第一配置命令生成实例化配置数据,并根据实例化配置数据进行配置。
在一种可能的实现方式中,收发器,还用于接收确认响应消息,确认响应消息用于指示实例化配置数据正确。
在一种可能的实现方式中,处理器,还用于将主网络设备的属性信息与主网络设备所属的类型中的其它网络设备的属性信息进行比较;并确定主网络设备的属性信息满足第一预设条件。
在一种可能的实现方式中,收发器,具体用于接收来自第二网络设备发送的至少一个配置模板文件,第二网络设备为网络中任一个网络设备;处理器,用于根据待配置网络设备的类型在至少一个配置模板文件确定配置模板文件。
在一种可能的实现方式中,处理器还用于根据第二预设条件确定备份网络设备,备份网络设备的类型与主网络设备的类型不同;
收发器还用于向备份网络设备发送第一备份指示消息,第一备份指示消息包括配置模板文件,第一备份指示消息用于指示备份网络设备备份配置模板文件。
在一种可能的实现方式中,处理器还用于当确定网络中有第三网络设备加入时,判断第三网络设备的类型;当第三网络设备的类型与主网络设备的类型相同时,将第三网络设备的属性信息与主网络设备的属性信息进行比较;当主网络设备的属性信息满足第一预设条件时,根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据。
在一种可能的实现方式中,处理器还用于当第三网络设备的属性信息满足第一预设条件时,确定第三网络设备为新的主网络设备,并清除实例化配置数据。
在一种可能的实现方式中,处理器还用于当第三网络设备的类型与主网络设备的类型不同时,将第三网络设备的属性信息和备份网络设备的属性信息进行比较;当第三网络设备的属性信息满足第二预设条件时,确定第三网络设备为新的备份网络设备;
收发器,用于向新的备份网络设备发送配置模板文件。
在一种可能的实现方式中,处理器还用于当第三网络设备的属性信息不满足第二预设条件时,根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据;
收发器,用于将实例化配置数据发送给第三网络设备。
第六方面、本申请实施例还提供一种待配置网络设备,该待配置网络设备可以包括:
收发器,用于接收主网络设备发送的实例化配置数据,实例化配置数据是主网络设备根据待配置网络设备的配置参数和配置模板文件包括的至少一条配置命令生成的,配置模板文件是主网络设备根据待配置网络设备的类型获得的,配置模板文件对应具有相同类型的一类网络设备,配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;
处理器,用于根据实例化配置数据对待配置网络设备进行配置。
在一种可能的实现方式中,至少一条配置命令包括第一配置命令,第一配置命令用于指示待配置网络设备的配置参数与第一网络设备的参数之间的关系,当主网络设备获得不到第一网络设备的参数时,收发器,还用于接收主网络设备发送的待配置网络设备的配置参数和第一配置命令;
处理器,用于根据第一配置命令获得第一网络设备的参数;并根据待配置网络设备的配置参数、第一配置命令及第一网络设备的参数生成实例化配置数据。
在一种可能的实现方式中,当实例化配置数据包括资源数据时,收发器,还用于向主网络设备发送资源数据,资源数据为待配置网络生成实例化配置数据过程中产生的资源数据。
第七方面,本申请实施例还提供一种网络设备,网络设备包括:处理器、收发器、随机存取存储器、只读存储器以及总线。其中,处理器通过总线分别耦接发送器、随机存取存储器以及只读存储器。其中,当需要运行网络设备时,通过固化在只读存储器中的基本输入输出系统或者嵌入式系统中的bootloader引导系统进行启动,引导网络设备进入正常运行状态。在网络设备进入正常运行状态后,在随机存取存储器中运行应用程序和操作系统,使得该处理器执行第一方面或第一方面的任意可能的实现方式中的方法。
第八方面,本申请实施例还提供一种待配置网络设备,待配置网络设备包括:处理器、收发器、随机存取存储器、只读存储器以及总线。其中,处理器通过总线分别耦接发送器、随机存取存储器以及只读存储器。其中,当需要运行待配置网络设备时,通过固化在只读存储器中的基本输入输出系统或者嵌入式系统中的bootloader引导系统进行启动,引导待配置网络设备进入正常运行状态。在待配置网络设备进入正常运行状态后,在随机存取存储器中运行应用程序和操作系统,使得该处理器执行第二方面或第二方面的任意可能的实现方式中的方法。
第九方面,本申请实施例还提供一种网络设备,网络设备包括:主控板和接口板,进一步,还可以包括交换网板。网络设备用于执行第一方面或第一方面的任意可能的实现方式中的方法。具体地,网络设备包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的模块。
第十方面,本申请实施例还提供一种待配置网络设备,待配置网络设备包括:主控板和接口板,进一步,还可以包括交换网板。网络设备用于执行第二方面或第二方面的任意可能的实现方式中的方法。具体地,待配置网络设备包括用于执行第二方面 或第二方面的任意可能的实现方式中的方法的模块。
第十一方面,本申请实施例还提供一种网络配置系统,该网络配置系统包括如第三方面或第三方面的任意可能的实现方式中的网络设备和如第四方面或第四方面的任意可能的实现方式中的待配置网络设备;
或者,该网络配置系统包括如第五方面或第五方面的任意可能的实现方式中的网络设备和如第六方面或第六方面的任意可能的实现方式中的待配置网络设备;
或者,该网络配置系统包括如第七方面或第七方面的任意可能的实现方式中的网络设备和如第八方面或第八方面的任意可能的实现方式中的待配置网络设备;
或者,该网络配置系统包括如第九方面或第九方面的任意可能的实现方式中的网络设备和如第十方面或第十方面的任意可能的实现方式中的待配置网络设备。
第十二方面,本申请实施例还提供一种计算机存储介质,包括指令,当指令在网络设备上运行时,使得网络设备执行如第一方面或第一方面的任意可能的实现方式中的网络配置方法;
或者,当指令在待配置网络设备上运行时,使得待配置网络设备执行如第二方面或第二方面的任意可能的实现方式中的网络配置方法。
第十三方面,本申请实施例还提供一种芯片,芯片上存储有计算机程序,在计算机程序被处理器执行时,执行如第一方面或第一方面的任意可能的实现方式中的网络配置方法;或者,执行如第二方面或第二方面的任意可能的实现方式中的网络配置方法。
本申请实施例提供的网络配置方法、设备及系统,使得在对网络设备进行配置之前,主网络设备先根据待配置网络设备的类型获得配置模板文件;配置模板文件对应具有相同类型的一类网络设备,配置模板文件包括至少一条配置命令,至少一条配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;由于配置模板文件中的配置命令指示了待配置网络设备的配置参数与其它网络设备的配置参数之间的关系,使得主网络设备可以直接根据配置网络设备的配置参数和至少一条配置命令生成待配置网络设备的实例化配置数据,并将实例化配置数据发送给待配置网络设备,以使待配置网络设备根据该实例化配置数据进行匹配,而无需通过管理员手动生成每一个设备的配置数据,实现了自动化配置网络设备,不仅提高了网络设备的配置效率,而且提高了配置的准确度。
附图说明
图1为本申请实施例提供的一种应用场景示意图;
图2为本申请实施例提供的一种网络配置方法的流程示意图;
图3为本申请实施例提供的一种配置模板文件的关键需求及实现机制示例图;
图4为本申请实施例提供的一种确定配置命令的示意图;
图5为本申请实施例提供的另一种确定配置命令的示意图;
图6为本申请实施例提供的另一种网络配置方法的流程示意图;
图7为本申请实施例提供的再一种网络配置方法的流程示意图;
图8为本申请实施例提供的一种网络配置方法的示意图;
图9为本申请实施例提供的另一种网络配置方法的流程示意图;
图10为本申请实施例提供的一种网络设备的结构示意图;
图11为本申请实施例提供的一种待配置网络设备的结构示意图;
图12为本申请实施例提供的另一种网络设备的结构示意图;
图13为本申请实施例提供的另一种待配置网络设备的结构示意图;
图14为本申请实施例提供的再一种网络设备的结构示意图;
图15为本申请实施例提供的再一种待配置网络设备的结构示意图;
图16为本申请实施例提供的又一种网络设备的结构示意图;
图17为本申请实施例提供的又一种待配置网络设备的结构示意图;
图18为本申请实施例提供的一种网络配置系统的结构示意图。
具体实施方式
本申请实施例描述的网络架构以及场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
图1为本申请实施例提供的一种应用场景示意图。本申请提供的网络配置方法可以应用于Spine-Leaf网络架构中,该Spine-Leaf网络架构中的每一个网络设备都为ANIMA域中的设备。以两层Spine-Leaf网络架构为例,该两层Spine-Leaf网络架构包括两种角色类型的网络设备,这两种角色类型分别为Spine类和Leaf类。当然,也可以为三层Spine-Leaf网络架构,该三层Spine-Leaf网络架构包括三种角色类型的网络设备,这三种角色类型分别为:Spine类和border Leaf类和server Leaf类。对于两层Spine-Leaf网络架构而言,其可以包括至少一个Spine设备和至少一个Leaf设备,请参见图1所示,以Spine-Leaf网络架构包括三个Spine设备和四个Leaf设备为例,该三个Spine设备分别为Spine设备1、Spine设备2及Spine设备3;四个Leaf设备分别为Leaf设备1、Leaf设备2、Leaf设备3及Leaf设备4;其中,每一个Spine设备均与四个Leaf设备中的每一个Leaf设备连接,三个Spine设备中有一个Spine设备作为主网络设备(例如Spine设备2),四个Leaf设备中有一个Leaf设备作为备份网络设备(例如Leaf设备3),主网络设备主要用于为Spine-Leaf网络架构中所有网络设备进行实例化配置,由于具有相同类型的网络设备对应同一个配置模板文件,因此,主网络设备需要先根据待配置网络设备的类型获得对应的配置模板文件。需要说明的是,在本申请实施例中,在确定所需配置模板文件的个数时,是根据Spine-Leaf网络架构中网络设备类型的个数和待配置网络设备为哪些确定的(如部分网络设备或全部网络设备)。
其中,网络设备可以为执行路由转发功能的设备,例如路由器、交换器、转发设备等。
为了解决现有技术中存在管理员手动生成每一个设备的配置数据时,不仅配置的效率不高,而且在配置时容易出错,从而造成配置的准确度不高的问题,本申请实施例提供了一种自动化的网络配置方法,使得在对网络设备进行配置之前,主网络设备先根据待配置网络设备的类型获得配置模板文件;配置模板文件对应具有相同类型的 一类网络设备,配置模板文件包括至少一条配置命令,至少一条配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;由于配置模板文件中的配置命令指示了待配置网络设备的配置参数与其它网络设备的配置参数之间的关系,使得主网络设备可以直接根据配置网络设备的配置参数和至少一条配置命令生成待配置网络设备的实例化配置数据,并将实例化配置数据发送给待配置网络设备,以使待配置网络设备根据该实例化配置数据进行匹配,而无需通过管理员手动生成每一个设备的配置数据,实现了配置的自动化,不仅提高了网络设备的配置效率,而且提高了配置的准确度。
在通过实施例详细描述本申请的技术方案之前,先介绍几个基本概念。在Spine-Leaf网络架构中,通常会存在一个Spine DR设备(属于Spine类)和一个Leaf DR(属于Leaf类)设备,其中,Spine DR设备是根据第一预设条件在Spine类网络设备中确定的,例如,Spine DR为Fabric中IPv6ULA“最小”的Spine设备,相当于Fabric内的“虚拟网管”,在任意时刻,Fabric内只存在一台Spine DR设备,Spine DR设备负责为Spine-Leaf网络架构中的部分Spine类设备(包括自身)和/或Leaf类设备根据配置模板文件生成实例化的配置数据。Leaf DR设备是根据第二预设条件确定的,例如,Fabric中IPv6ULA“最小”的Leaf设备,它并不对配置模板进行实例化,其作为Spine DR的备份设备,主要用于在Spine DR设备进行配置过程中,备份该配置模板文件和动态运行数据的内容,从而保证配置模板文件和动态运行数据的内容的可靠性。此外,当Fabric内的IPv6ULA“最小”的设备出现变更时(现有Spine DR设备/Leaf DR设备发生故障或新的Spine设备/Leaf设备加入Fabric时),需要进行Spine DR设备或Leaf DR设备的切换操作,该操作是由RPL路由收敛触发的。当完成切换时(RPL路由收敛完成时),需要进行配置模板内容和运行状态数据的备份处理。通常情况下,由于DCN内的所有Spine设备和Leaf设备都拥有相同前缀的RPL主机路由,因此,所有设备选举出的Spine DR设备和Leaf DR设备是相同的。即,在不进行集中计算的情况下,就能保证选举结果的唯一性,只要网络设备还位于ANIMA域内,IPv6ULA地址就会保持不变,因此,Spine DR设备和Leaf DR设备是不会轻易变更的,此外,Spine DR设备与Leaf DR设备之间的数据需要保证实时同步。
其中,Spine设备与Leaf设备之间的互联接口为内连口(Inline Interface);Spine设备与外部网络设备的连接接口及Leaf设备与外部网络设备的连接接口为外连口(Outreach Interface);跨设备链路聚合组(Multichassis Link Aggregation Group,M-LAG)的两台设备之间的一条直连聚合链路为peer-link链路(Peer-link Interface,对等链路的连接接口),用于交互协议报文和传输部分流量,从而保证M-LAG的正常工作。其中,M-LAG的主要作用是为接入Fabric的设备提供接入可靠性,主要包括三个步骤:1、用户设备同时接入到两台Leaf设备上,通过虚拟路由冗余协议(Virtual Router Redundancy Protocol,VRRP)选择Leaf设备和Leaf DR设备;2、这两台Leaf设备之间连接一条线路(称为peer-link),用来对这两台Leaf设备之间的运行数据(例如,动态学习到的ARP表项)进行备份;3、当其中一台Leaf设备或接入链路出现故障时,实现Leaf设备和Leaf DR设备之间的切换,peer-link也可以用于转发下行流量。
下面将结合图1所示,以待配置网络设备为Leaf设备1为例进行说明,并通过具 体的实施例对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。需要说明的是,为了避免赘述,本申请实施例只是以待配置网络设备为Leaf设备1的实例化配置过程为例进行说明,其它设备的实例化配置过程与Leaf设备1的实例化配置过程类似,在此,本申请实施例不再进行赘述。此外,下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程在某些实施例中不再赘述。
图2为本申请实施例提供的一种网络配置方法的流程示意图,请参见图2所示,该网络配置方法可以包括:
S201、主网络设备将主网络设备的属性信息与主网络设备所属的类型中的其它网络设备的属性信息行比较。
其中,主网络设备即为Spine DR设备,主要用于对Spine-Leaf网络架构中的其它部分设备或全部网络设备进行实例化配置。Spine DR设备属于Spine类,在确定每一个网络设备的类型时,可以按照设备的角色进行划分,从而确定每一个网络设备的角色类型。
在Spine-Leaf网络架构中的每一个网络设备启动并加入ANIMA域之后,Spine设备和Leaf设备之间的内连接口上会配置使能ANIMA功能。可选的,如果在Spine设备与Spine设备之间部署peer-link,或在Leaf设备与Leaf设备之间部署peer-link,那么也会在peer-link接口上使能ANIMA功能。此外,ANIMA域中的所有Spine设备或Leaf设备都维护一个前缀列表相同的RPL主机路由表,通过该表可以获取Fabric内中所有Spine设备或Leaf设备的上线/下线状态,每个Spine设备或Leaf设备可以使用IPv6ULA地址作为Fabric内的唯一标识。在对待配置网络设备进行配置之前,Spine-Leaf网络架构中的Spine类设备中的每一个网络设备都要先判断自身是否为Spine DR设备,由于ANIMA域中的每一个网络设备都具有全通性,通常情况下,使用RPL(或其替代路由协议)来实现全连通,但RPL还可以发表其它来源的路由(例如:即插即用场景下的NMS host的网段路由),因此,不能简单使用RPL主机路由作为设备标识,而应该同时满足128主机路由和位于同一个ANIMA域内(具有相同的/48前缀)、使用了ACP区域寻址子方案,且V=0,这样,ANIMA域中的每一个网络设备都可以访问ANIMA域中其它网络设备,以获得到其它网络设备的类型及属性信息,从而根据每一个网络设备的属性信息确定自身是否为Spine DR设备。示例的,属性信息可以为地址信息,从而确定每一个网络设备所属的类型及地址信息。
示例的,结合图1所示,以Spine设备2为主网络设备为例,Spine设备2在获得到网络中的每一个网络设备的类型及地址信息之后,可以确定Spine设备1及Spine设备3均为Spine类设备,之后,再将其自身的属性信息分别与Spine设备1的属性信息及Spine设备3的属性信息进行比较,示例的,当属性信息为地址信息时,则Spine设备2将自身的地址信息分别与Spine设备1的地址信息及Spine设备3的地址信息进行比较,以确定其是否作为主网络设备。
S202、主网络设备确定主网络设备的属性信息满足第一预设条件,并根据待配置网络设备的类型获得配置模板文件。
其中,第一预设条件可以理解为Spine类设备中主网络设备的属性信息最大或者最小。示例的,当属性信息为地址信息时,由于ANIMA中每一个网络设备的IPv6ULA 地址是唯一且固定的,因此,可以将Spine类设备中地址信息最小作为第一预设条件。当然,也可以将Spine类设备中地址信息最大作为第一预设条件。示例的,在本申请实施例中,第一预设条件为Spine类设备中地址信息最小。
在确定主网络设备的属性信息是否满足第一预设条件时,主网络设备及Spine类中的其它网络设备均需要将各自的IPv6ULA地址信息与Spine类中的其它Spine设备的IPv6ULA地址信息进行比较,若主网络设备的IPv6ULA地址信息最小,则确定主网络设备为用于进行实例化配置的主网络设备,即Spine DR设备。在确定为主网络设备之后,作为主网络设备,其主要用于为Spine-Leaf网络架构中的部分Spine类设备(包括自身)和/或Leaf类设备根据配置模板文件生成实例化配置数据,在生成实例化配置数据之前,需要先根据待配置网络设备的类型获得相应的配置模板文件,以根据该配置模板文件生成待配置网络设备的实例化配置数据。即只有在确定其为主网络设备之后,可以根据待配置网络设备的类型获得配置模板文件。
可选的,配置模板文件的数量可以为一个,也可以为多个,具体可以根据实际需要进行设置。例如,由于具有相同类型的网络设备对应的配置模板文件相同,当待配置网络设备均为Spine类设备或者均为Leaf类设备时,则对应的可以只获得Spine类设备对应的配置模板文件或者Leaf类设备对应的配置模板文件即可;当待配置网络设备中包括Spine类设备和Leaf类设备时,则可以两个配置模板文件,其中一个配置模板文件用于为Spine类设备生成实例化配置数据,另一个配置模板文件用于为Leaf类设备生成实例化配置数据。示例的,在本申请实施例中,以待配置网络设备为Leaf设备为例,则对应的配置模板文件的个数为1个,值得注意的是,本申请实施例中的配置模板文件是指以XML文件格式表示的、基于设备角色类型的配置模板文件,该配置模板文件是离线编辑生成的,可以是手工或使用相关的UI工具进行编辑。在生成配置模板文件时,通过一次性离线编辑配置模板,可以为任意数量的Spine设备和/或Leaf设备在线自动生成基础网络架构的配置数据,从而使得生成的配置数据的一致性较高,进而提升DCN网络的部署效率。需要说明的是,本申请实施例中的配置模板支持对上述M-LAG的配置进行处理。
进一步地,配置模板文件实际上是将Fabric中的相同设备角色类型的命令行配置数据(主要针对基本网络架构)进行“参数化”,请参见图3所示,图3为本申请实施例提供的一种配置模板文件的关键需求及实现机制示例图,其需要满足1、配置文件的模板化/参数化,该需求可以通过宏定义,将命令行参数化实现;2、相同配置参数在DCN内需要统一分配,避免冲突,该需求可以通过配置参数资源池化,通过宏实现资源值的分配和引用;3、配置命令的参数需要体现最终的状态,与操作时序无关,该需求可以通过延迟实例化,解除时序依赖实现;4、需要支持基于规则来自动生成配置数据,并实现联动更新,该需求可以通过知名宏,预定义目标对象集实现,或者通过需求实例化,支持根据部署/安装状态选择命令集实现,或者通过循环实例化,支持基于类型而不是实例生成配置数据,或者通过延迟实例化,感知目标对象集的扩容,动态更新配置数据实现;5、需要支持基于peer关系,在相关设备上计算生成配对的配置命令,并实现联动更新,该需求可以通过peer group(用来定义多台设备间的对等体关系(Spine设备与Spine设备、Spine设备与Leaf设备、Leaf设备与Leaf设备) 定义peer关系实现。可选的,还需要满足在实例化配置之后,且在实际加载实例化配置数据之前,提交给管理员对实例化配置数据内容进行确认,避免生成的实例化配置数据出现错误,具体可以通过dry-run机制实现。
其中,宏用来实现命令行的模板化,宏的实例化就是用具体的值实现/展开宏定义。示例的,在本申请实施例中,该宏的类型可以包括以下至少六种:
1、知名宏(well-known macro):预定义的宏,在根据一些与设备安装和部署信息相关的配置数据时(例如:Spine或Leaf上的内连接口名的列表、加入到peer-link中的接口名列表等),可以使用这类宏。知名宏无需、也不能在配置模板中(重复)定义,可以直接使用作为命令行的参数。
2、简单宏(simple macro):在实例化时,使用value简单替换掉macro name。
3、资源宏(resource macro):每次实例化,都需要从指定的资源池中分配新的值,且要保证新分配的值在指定范围内的唯一性。
4、协商宏(negotiation macro):通过协商方式分配的资源宏。一种特殊的资源宏,特殊之处在于因资源的分配需要满足一些约束条件(例如,在两台设备直连的接口上配置的IP地址需要位于同一网段),相关资源不是由Spine DR简单地从资源池中分配,而需要通过设备间的协商才能满足这些约束条件。由于在分配资源时,在设备间存在一个协商过程,因此,在定义协商宏时,需要指定协商操作的目标对象。
5、引用宏(reference macro):宏引用的是同一设备配置文件中其它命令的指定参数。被引用的参数本身也必须是一个宏,为避免循环依赖,目前限定被引用参数只能是简单宏或资源宏。注意:对于引用宏,可能出现“先引用,后定义”的情况,在实现时需要支持这种情况。引用宏实际上是简单宏和资源宏的别名(alias)。使用引用宏的好处在于语义上更加清晰,也可以避免在多次引用资源宏时导致资源的多次分配。
6、集合宏(set macro):用来在Spine DR计算配置数据时,将新分配的资源值收集起来(可以来源于多个宏,但这些宏必须具有相同的数据类型),动态创建一个资源宏,以方便操作。例如,对于“使用OSPF的network命令发布当前设备所有内连口的网段路由”这类配置命令,由于可能是多个设备共用同一个资源池,因此,不能通过遍历资源池的方式来获得为当前设备内连口分配的IP地址列表。使用集合宏就可以解决这个问题。集合宏使用<macro set="set_macro_name">标签的set属性定义。
对于每一个配置模板文件而言,其包括至少一条配置命令,配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系,该配置命令可以根据待配置网络设备的硬件安装或其它条件来选择不同的命令集,从而实现自动化配置。当然,配置模板文件也可以包括其它命令,如用于指示资源分配的命令。示例的,请参见图4所示,图4为本申请实施例提供的一种确定配置命令的示意图,该配置命令是根据设备上安装的单板类型确定不同的命令集。当然,还可以根据产品形态,来确定配置命令,参见图5所示,图5为本申请实施例提供的另一种确定配置命令的示意图。在本申请实施例中,正是由于预先获得到配置模板文件,该配置模板文件对应一种类型的网络设备,并且在根据该配置模板文件生成每一个待配置网络设备的实例化配置数据时,由于配置模板文件中的配置命令指示了待配置网络设备的配置参数与其 它网络设备的配置参数之间的关系,使得主网络设备可以直接根据配置网络设备的配置参数和至少一条配置命令自动生成待配置网络设备的实例化配置数据,而无需通过管理员手动生成每一个设备的配置数据,不仅提高了网络设备的配置效率,而且提高了配置的准确度。
可选的,在本申请实施例中,主网络设备在根据待配置网络设备的类型获得配置模板文件时,可以接收来自第二网络设备发送的至少一个配置模板文件,第二网络设备为网络中任一个网络设备;并根据待配置网络设备的类型在至少一个配置模板文件中确定配置模板文件。
需要说明的是,第二网络设备可以作为注入网络设备,其可以为Fabric中的任一个网络设备,当然,也可以为主网络设备。至少一个配置模板文件是离线编辑生成之后,管理员可以基于OM接口,并通过通用的文件传输协议(如简单文件传送协议(Trivial File Transfer Protocol,TFTP)或文件传输协议(File Transfer Protocol,FTP)等)将生成的至少一个配置模板文件发送给Spine-Leaf网络架构中的任选一个第二网络设备,该第二网络设备作为注入网络设备,将其接收到的至少一个配置模板文件通过文件传输协议(通用的文件传输协议如TFTP/FTP等,或者是基于通用职责分配软件模式(General Responsibility Assignment Software Pattern,GRASP)的文件传输机制)发送给主网络设备,以使主网络设备可以根据待配置网络设备的配置参数和配置模板文件中的至少一条配置命令生成待配置网络设备的实例化配置数据。对于管理员而言,无需通过每一个网络设备的属性确定主网络设备,而是随机将至少一个配置模板文件发送给第二网络设备,再由第二网络设备将至少一个配置模板文件发送给主网络设备,从而降低了管理员操作的复杂度。
同样结合图1所示,在确定Spine设备2是否满足第一预设条件时,当Spine设备2自身的IPv6ULA地址信息大于Spine设备1的地址信息和Spine设备3的地址信息的地址信息中的一个,或者大于Spine设备1的地址信息和Spine设备3的地址信息的地址信息时,则确定自身不是主网络设备,当Spine设备2接收到注入网络设备发送的配置模板文件之后,拒绝接收该配置模板文件;相反的,若Spine设备2确定其自身的IPv6ULA地址信息小于Spine设备1的地址信息及Spine设备3的地址信息,则确定其为主网络设备,并接收通过注入网络设备(示例的,注入网络设备可以为Leaf设备)发送的配置模板文件并获得配置模板文件中的至少一条配置命令,并执行下述S203:
S203、主网络设备根据待配置网络设备的配置参数和至少一条配置命令生成待配置网络设备的实例化配置数据。
可选的,在本申请实施例中,至少一条配置命令包括第一配置命令,S203主网络设备根据待配置网络设备的配置参数和至少一条配置命令生成待配置网络设备的实例化配置数据,可以包括:
主网络设备根据第一配置命令获得第一网络设备的参数,第一配置命令用于指示待配置网络设备的配置参数与第一网络设备的参数之间的关系;当所述主网络设备获得到所述第一网络设备的参数时,则所述主网络设备根据所述待配置网络设备的配置参数、所述第一配置命令及所述第一网络设备的参数生成所述待配置网络设备的实例 化配置数据。需要说明的是,当配置模板文件中还包括资源分配命令,且主网络设备可以直接获得到第一网络设备的参数,则由主网络设备为待配置网络设备分配资源,并生成实例化配置数据,该实例化配置数据中包括为待配置网络设备分配的资源数据,其中,资源数据为所述待配置网络生成所述实例化配置数据过程中产生的资源数据。由此可见,当主网络设备能够获得到第一网络设备的参数时,可以直接根据待配置网络设备的配置参数、第一配置命令及第一网络设备的参数生成待配置网络设备的实例化配置数据,有助于进一步提升自动化配置的效率。示例的,在本申请实施例中,资源数据可以为IPv6ULA地址信息。可选的,当第一网络设备的全部参数与待配置网络设备的参数之间有关联时,第一网络设备的参数为第一网络设备的全部参数;当第一网络设备的部分参数与待配置网络设备的参数之间有关联时,第一网络设备的参数为与待配置网络设备的参数相关联的第一网络设备的部分参数。
此外,主网络设备在为待配置网络设备生成实例化配置数据时,不是所有Leaf设备在此之前都已经上线并生成配置了,因此,主网络设备无法第一时间自动生成这类设备的配置命令。即在该种情况下,若主网络设备获得不到第一网络设备的参数,则主网络设备向待配置网络设备发送待配置网络设备的配置参数和第一配置命令,以使待配置网络设备根据待配置网络设备的配置参数和第一配置命令生成实例化配置数据,并根据实例化配置数据进行配置。由此可见,当主网络设备获得不到第一网络设备的参数,无法生成待配置网络设备的实例化配置数据时,可以将待配置网络设备的配置参数和第一配置命令发送给待配置网络,以使待配置网络设备根据待配置网络设备的配置参数和第一配置命令生成实例化配置数据,避免了无法配置情况的发生,有助于进一步提升自动化配置的可靠性。需要说明的是,当配置模板文件中还包括资源分配命令时,在该场景中,是由待配置网络设备自身分配资源,并生成实例化配置数据,该实例化配置数据中包括为待配置网络设备分配的资源数据。此外,为了降低主网络设备的复杂度,待配置网络设备无需将生成的全部实例化配置数据发送给主网络设备,可以只将实例化配置数据中的资源数据发送给主网络设备,以使主网络设备可以获得到为该待配置网络设备分配的资源数据。
结合图1所示,以待配置网络设备为Leaf设备1为例进行说明,主网络设备在获得到两个Leaf设备所属的类型对应的配置模板文件之后,若该配置模板文件中包括两条配置命令,其中第一配置命令用于指示Leaf设备1的配置参数与Leaf设备2的部分参数之间的关联关系,第二配置命令用于指示Leaf设备1的配置参数与Leaf设备4的部分参数之间的关联关系,则主网络设备可以根据Leaf设备1的配置参数、第一配置命令及第二配置命令获得Leaf设备1的实例化配置数据。
在根据Leaf设备1的配置参数、第一配置命令及第二配置命令生成Leaf设备1的实例化配置数据之前,需要先根据第一配置命令和第二配置命令分别获得Leaf设备2及Leaf设备4设备各自的参数,当获得到Leaf设备2及Leaf设备4设备各自的参数时,则主网络设备可以直接根据Leaf设备1的配置参数、第一配置命令、第二配置命令、Leaf设备2及Leaf设备4设备各自的参数生成Leaf设备1的实例化配置数据。相反的,当获得不到Leaf设备2和/或Leaf设备4设备的参数时,则主网络设备可以将Leaf设备1的配置参数、第一配置命令及第二配置命令均发送给Leaf设备1,以使 Leaf设备1分别与Leaf设备2及Leaf设备4设备协商确定Leaf设备2及Leaf设备4设备各自的参数,并根据Leaf设备1的配置参数、第一配置命令、第二配置命令、Leaf设备2及Leaf设备4设备各自的参数生成Leaf设备1的实例化配置数据。
S204、主网络设备将实例化配置数据发送给待配置网络设备。
其中,实例化配置数据用于指示待配置网络设备根据实例化配置数据进行配置。
主网络设备在通过S203根据待配置网络设备的配置参数和至少一条配置命令生成待配置网络设备的实例化配置数据之后,就可以将生成的实例化配置数据发送给待配置网络设备,以使待配置网络设备根据该实例化配置数据配置。具体的,待配置网络设备在进行实例化配置,若不需要延迟实例化,则可以直接加载并生效该实例化配置数据,若部分/少量配置命令需要延迟实例化,则执行延迟实例化处理,如果部分完成且未完成部分存在缺省值,则使用缺省值;如果部分完成且未完成部分不存在缺省值,则返回错误;如果没有错误,暂时不加载数据;之后,再向主网络设备返回实例化配置过程中的资源分配结果。
结合图1所示,Spine设备2在生成Leaf设备1的实例化配置数据之后,就可以将该实例化配置数据发送给Leaf设备1,使得Leaf设备1在接收到实例化配置数据之后,根据该实例化配置数据配置。由此可见,本申请实施例提供的网络配置方法,在对待配置网络设备进行配置时,由于配置模板文件中的配置命令指示了待配置网络设备的配置参数与其它网络设备的配置参数之间的关系,使得主网络设备可以直接根据配置网络设备的配置参数和至少一条配置命令自动获得待配置网络设备的实例化配置数据,而无需通过管理员手动生成每一个设备的配置数据,不仅提高了网络设备的配置效率,而且提高了配置的准确度。
本申请实施例提供的网络配置方法,使得在对网络设备进行配置之前,主网络设备先根据待配置网络设备的类型获得配置模板文件;配置模板文件对应具有相同类型的一类网络设备,配置模板文件包括至少一条配置命令,至少一条配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;由于配置模板文件中的配置命令指示了待配置网络设备的配置参数与其它网络设备的配置参数之间的关系,使得主网络设备可以直接根据配置网络设备的配置参数和至少一条配置命令生成待配置网络设备的实例化配置数据,并将实例化配置数据发送给待配置网络设备,以使待配置网络设备根据该实例化配置数据进行匹配,而无需通过管理员手动生成每一个设备的配置数据,实现了配置的自动化,不仅提高了网络设备的配置效率,而且提高了配置的准确度。
基于图2所示的实施例,为了避免因实例化配置数据内容错误,而导致加载时出现问题,可选的,在S204主网络设备将实例化配置数据发送给待配置网络设备之后、待配置网络设备实际加载实例化的配置数据之前,可以通过dry-run机制使得管理员对实例化配置数据进行检查,以确保生成的实例化配置数据正确。示例的,请参见图6所示,图6为本申请实施例提供的另一种网络配置方法的流程示意图。
S601、主网络设备发送确认请求消息。
其中,确认请求消息包括实例化配置数据,确认请求消息用于请求对实例化配置数据进行确认。
主网络设备(Spine设备2)在将实例化配置数据发送给待配置网络设备之后、待配置网络设备实际加载实例化的配置数据之前,为了避免因实例化配置数据内容错误,而导致加载时出现问题,待配置网络设备先不加载实例化的配置数据,且主网络设备向注入网络设备(Leaf设备1)或者管理员发送确认请求消息,该确认请求消息中包括生成的实例化配置数据,以通过注入网络设备或者管理员对生成的实例化配置数据进行确认。示例的,注入网络设备在接收到主网络设备发送的确认请求消息之后,可以通过OM接口收集管理员的确认意见并向主网络设备返回确认结果。
当然,主网络设备也可以不发送确认请求消息,而是在生成实例化配置数据的过程中,使得注入网络设备或者管理员可以同步获得到该实例化配置数据,从而通过注入网络设备或者管理员对生成的实例化配置数据进行确认。
S602主网络设备接收确认响应消息。
其中,确认响应消息用于指示实例化配置数据正确。
若主网络设备接收到确认响应消息,说明经验证之后,该实例化配置数据是正确的实例化配置数据,之后,待配置网络设备根据该实例化配置数据进行加载并生效。相反的,如果主网络设备接收到确认拒绝消息,则说明该实例化配置数据错误或者该实例化配置数据不符合新的实例化配置需求,并通过待配置网络设备清除相关数据,在本地释放相关资源。
由此可见,在本申请实施例中,在主网络设备将生成的实例化配置数据发送给待配置网络设备后、待配置网络设备实际加载实例化的配置数据之前,通过注入网络设备或者管理员对实例化配置数据进行确认,这样可以避免因实例化配置数据内容错误,而导致加载时出现问题,此外,管理员也可以重新对网络部署进行再次审视,从而确保待配置网络设备接收到的实例化配置数据为正确的实例化配置数据,进而提高了待配置网络设备配置的正确性和准确性。
基于图2或图6所示的实施例,为了保证主网络设备因故障等发生切换时,新的主网络设备仍然可以获得到配置模板文件,可选的,S201主网络设备获得配置模板文件之后,可以先选择一个Leaf设备作为备份网络设备,以通过该备份网络设备备份配置模板文件。示例的,请参见图7所示,图7为本申请实施例提供的再一种网络配置方法的流程示意图。
S701、主网络设备根据第二预设条件确定备份网络设备。
其中,第二预设条件可以理解为Leaf类设备中网络设备的属性信息最大或者最小。示例的,当属性信息为地址信息时,由于ANIMA中每一个网络设备的IPv6ULA地址是唯一且固定的,因此,可以将Leaf类设备中地址信息最小作为第二预设条件。当然,也可以将Leaf类设备中地址信息最大作为第二预设条件。示例的,在本申请实施例中,第二预设条件为Leaf类设备中地址信息最小。备份网络设备的类型与主网络设备的类型不同,即用于备份的备份网络设备的类型为Leaf类设备中的一个,且备份网络设备为不进行实例化配置数据配置的网络设备。
主网络设备通过S202获得到配置模板文件之后,为了通过备份网络设备对配置模板文件进行备份,主网络设备需要先获取Leaf类设备中每一个Leaf设备的IPv6ULA地址,并将每一个Leaf设备的IPv6ULA地址进行比较,若备份网络设备的IPv6ULA 地址最小,则确定备份网络设备作为用于备份的网络设备。
同样结合图1所示,Spine设备2在获得到网络中的每一个网络设备的类型及地址信息之后,可以确定Leaf设备1、Leaf设备2、Leaf设备3及Leaf设备4均为Leaf类设备,将Leaf设备1的地址信息、Leaf设备2的地址信息、Leaf设备3的地址信息及Leaf设备4的地址信息进行比较,以确定哪个Leaf设备为用于备份的备份网络设备,即Leaf DR设备。经过比较之后,若Leaf设备3的IPv6ULA地址小于Leaf设备1的地址信息、Leaf设备2的地址信息及Leaf设备4的地址信息,则确定该Leaf设备3为备份网络设备。
S702、主网络设备向备份网络设备发送第一备份指示消息。
其中,第一备份指示消息包括配置模板文件,第一备份指示消息用于指示备份网络设备备份配置模板文件。
主网络设备在根据每一个Leaf设备的IPv6ULA地址确定Leaf设备3为备份网络设备之后,通过文件传输协议通用的文件传输协议如TFTP/FTP等,或者是基于GRASP的文件传输机制)向该Leaf设备3发送包括配置模板文件的第一备份指示消息。对应的,Leaf设备3在接收到该第一备份指示消息之后,也会将其自身的IPv6ULA地址分别与Leaf设备1的IPv6ULA地址、Leaf设备2的IPv6ULA地址及Leaf设备4的IPv6ULA地址进行比较,以确定其是否为用于备份的备份网络设备。经过比较之后,若Leaf设备3确定其自身的IPv6ULA地址大于Leaf设备1的IPv6ULA地址、Leaf设备2的IPv6ULA地址及Leaf设备4的IPv6ULA地址中的某一个地址信息或多个地址信息,则确定自身不是用于备份的备份网络设备,此时Leaf设备3拒绝接收该第一备份指示消息。相反的,若Leaf设备3确定其自身的IPv6ULA地址小于Leaf设备1的地址信息、Leaf设备2的地址信息及Leaf设备4的地址信息,则确定其为备份网络设备,此时Leaf设备3接收主网络设备发送的包括配置模板文件的第一备份指示消息,并对该配置模板文件进行备份,这样可以避免配置模板文件发生丢失,从而提高了配置模板文件的安全性。
进一步地,S204主网络设备将实例化配置数据发送给待配置网络设备之后,还包括:
S703、向备份网络设备发送第二备份指示消息。
其中,第二备份指示消息包括生成实例化配置数据的过程中产生的动态数据,第二备份指示消息用于指示备份网络设备备份动态数据。
主网络设备在生成实例化配置数据的过程中,可能会产生动态数据(例如,从地址池中分配一个地址作为设备的接口IP地址),为了实现对该动态数据的分配,在S204将实例化配置数据发送给待配置网络设备之后,主网络设备还可以向用于备份的备份网络设备(即Leaf设备3)发送第二备份指示消息,该第二备份指示消息中包括生成实例化配置数据的过程中产生的动态数据,从而通过该第二备份指示消息备份该动态数据,避免了动态数据发生丢失,从而提高了动态数据的安全性。
基于图2、图6或图7所示的实施例,在实例化配置过程中,如果有新的网络设备加入,则主网络设备需要通过判断以确定是否对新加入的网络设备进行实例化配置,示例的,请参见图8所示,图8为本申请实施例提供的一种网络配置方法的示意图。
S801、当确定网络中有第三网络设备加入时,主网络设备判断第三网络设备的类型。
可选的,在本申请实施例中,主网络设备可以通过RPL在发布路由时同步携带或增加单独的流程的方式学习RPL路由,使用GRASP消息,主动获取这些信息。具体的,若RPL路由新增一条主机路由时,说明网络中有新的网络设备加入,并且新的网络设备一旦加入ANIMA域后,其对应的IPv6ULA地址始终保持稳定;相反的,若RPL路由撤销一条主机路由时,说明网络中有网络设备下线。
结合图1所示,当Spine设备2发现RPL路由新增一条主机路由时,说明网络中有新的网络设备(第三网络设备)加入,则Spine设备2需要先判断第三网络设备的类型,即该第三网络设备属于Spine类设备还是Leaf类设备。
S802、当第三网络设备的类型与主网络设备的类型相同时,主网络设备将第三网络设备的属性信息与主网络设备的属性信息进行比较。
当Spine设备2确定第三网络设备为Spine类设备时,说明第三网络设备的类型与主网络设备的类型相同,则Spine设备2需要进一步将第三网络设备的地址信息与主网络设备的地址信息进行比较,以确定是否需要执行Spine DR设备的切换。
S803、当主网络设备满足第一预设条件时,主网络设备根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据。
当Spine设备2的IPv6ULA地址小于第三网络设备的IPv6ULA地址时,说明Spine设备2的IPv6ULA地址仍然最小,确定不需要执行Spine DR设备的切换,该Spine设备2继续作为Spine DR设备,并根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据,从而完成对新加入的第三网络设备的实例化配置,为其分配资源。相反的,当Spine设备2的IPv6ULA地址大于第三网络设备的IPv6ULA地址,则说明第三网络设备的IPv6ULA地址最小,此时要执行Spine DR设备的切换,主网络设备确定第三网络设备为Spine DR设备,即新的主网络设备,并清除并释放相关资源。另外,对于第三网络设备而言,也会将Spine设备2的IPv6ULA地址与自身的IPv6ULA地址进行比较,若Spine设备2的IPv6ULA地址大于第三网络设备的IPv6ULA地址,则确定其为新的主网络设备,为了完成后续其它网络设备的实例化配置,则第三网络设备需要先确定用于备份的备份网络设备,并通过备份网络设备获得配置模板文件,可选的,若Spine设备2在生成实例化配置数据的过程中有动态数据产生并备份在备份网络设备时,该第三网络设备也可以通过备份网络设备获得该动态数据,从而根据获取到的配置模板文件和动态数据为其它网络设备进行实例化配置。需要说明的是,在确定是否执行Spine DR切换时,只需要将第三网络设备的地址信息与主网络设备的地址信息进行比较即可,原因在于:主网络设备Spine DR本身就是地址最小的Spine类设备,在Spine-Leaf架构中,地址信息一旦被分配就不会改变,因此,判断Spine DR是否需要切换时,只需要将新加入的第三网络设备的地址信息和当前最小的主网络设备的地址信息进行比较即可。当然,也可以将第三网络设备的地址信息与Spine类设备中的每一个网络设备的地址信息进行比较。
此外,需要说明的是,S801在确定网络中有第三网络设备加入时,主网络设备判断第三网络设备的类型之后,还可以执行下述S901-S903或S901、S904及S905,请参见图9所示,图9为本申请实施例提供的另一种网络配置方法的流程示意图。
S901、当第三网络设备的类型与主网络设备的类型不同时,主网络设备将第三网络设备和备份网络设备的属性信息进行比较。
当Spine设备2确定第三网络设备为Leaf类设备时,说明第三网络设备的类型与主网络设备的类型不同,则Spine设备2需要进一步将第三网络设备的地址信息与用于备份的Leaf设备3的地址信息进行比较,以确定是否需要进行Leaf DR设备的切换。
同样需要说明的是,在确定是否执行Leaf DR切换时,只需要将第三网络设备的地址信息与备份网络设备的地址信息进行比较即可,原因在于:备份网络设备Leaf DR本身就是地址最小的Leaf类设备,在Spine-Leaf架构中,地址信息一旦被分配就不会改变,因此,判断Leaf DR是否需要切换时,只需要将新加入的第三网络设备的地址信息和当前最小的备份网络设备的地址信息进行比较即可。当然,也可以将第三网络设备的地址信息与Leaf类设备中的每一个网络设备的地址信息进行比较。
S902、当第三网络设备满足第二预设条件时,确定第三网络设备为新的备份网络设备。
当第三网络设备的IPv6ULA地址小于Leaf设备3的IPv6ULA地址时,说明第三网络设备的IPv6ULA地址最小,此时要执行Leaf DR设备的切换,主网络设备确定第三网络设备为Leaf DR设备,即新的备份网络设备。
S903、主网络设备向新的备份网络设备发送配置模板文件。
在确定新加入的第三网络设备为新的备份网络设备之后,就可以向该新的备份网络设备发送配置模板文件,新的第三网络设备在接收到该配置模板文件之后,也会将Leaf设备3的IPv6ULA地址与自身的IPv6ULA地址进行比较,当Leaf设备3的IPv6ULA地址大于第三网络设备的IPv6ULA地址,则确定其为新的备份网络设备,并接收Spine设备2发送的配置模板文件,并对该配置模板文件进行备份。相反的,若Leaf设备3的IPv6ULA地址小于第三网络设备的IPv6ULA地址,则第三网络设备确定其不是新的网络设备,并拒绝接收Spine设备2发送的配置模板文件。
可选的,在S901当第三网络设备的类型与主网络设备的类型不同时,主网络设备将第三网络设备和备份网络设备的属性信息进行比较之后,还可以包括:
S904、当第三网络设备不满足第二预设条件时,主网络设备根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据。
当第三网络设备不满足第二预设条件时,即Spine设备2确定第三网络设备的IPv6ULA地址大于Leaf设备3的IPv6ULA地址,则说明第三网络设备不是IPv6ULA地址最小Leaf设备,此时不需要执行Leaf DR设备的切换,且Spine设备2可以根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据。
S905、主网络设备将实例化配置数据发送给第三网络设备。
Spine设备2向新加入的第三网络设备发送实例化配置数据,以使第三网络设备可 以根据该实例化配置数据对其进行配置,从而完成第三网络设备的实例化配置。
需要说明的是,在本申请实施例中,S901之后,只执行S902-S903和S904-S905中的一个,即S902-S903和S904-S905不同时执行。
图10为本申请实施例提供的一种网络设备100的结构示意图,请参见图10所示,该网络设备100用作主网络设备,包括:
处理单元1001,用于根据待配置网络设备的类型获得配置模板文件,其中,配置模板文件对应具有相同类型的一类网络设备,配置模板文件包括至少一条配置命令,至少一条配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系。
处理单元1001,还用于根据待配置网络设备的配置参数和至少一条配置命令生成待配置网络设备的实例化配置数据。
发送单元1002,用于将实例化配置数据发送给待配置网络设备,实例化配置数据用于指示待配置网络设备根据实例化配置数据进行配置。
可选的,至少一条配置命令包括第一配置命令,处理单元1001,具体用于根据第一配置命令获得第一网络设备的参数,第一配置命令用于指示待配置网络设备的配置参数与第一网络设备的参数之间的关系;当获得到第一网络设备的参数时,根据待配置网络设备的配置参数、第一配置命令及第一网络设备的参数生成待配置网络设备的实例化配置数据。
可选的,处理单元1001,还具体用于当获得不到第一网络设备的参数时,向待配置网络设备发送待配置网络设备的配置参数和第一配置命令,以使待配置网络设备根据待配置网络设备的配置参数和第一配置命令生成实例化配置数据,并根据实例化配置数据进行配置。
可选的,该网络设备100还可以包括:
接收单元1003,用于接收确认响应消息,确认响应消息用于指示实例化配置数据正确。
可选的,处理单元1001,还用于将主网络设备的属性信息与主网络设备所属的类型中的其它网络设备的属性信息进行比较;并确定主网络设备的属性信息满足第一预设条件。
可选的,处理单元1001,具体用于接收来自第二网络设备发送的至少一个配置模板文件,第二网络设备为网络中任一个网络设备100;并根据待配置网络设备的类型在至少一个配置模板文件中确定配置模板文件。
可选的,处理单元1001,还用于根据第二预设条件确定备份网络设备,备份网络设备的类型与主网络设备的类型不同。
发送单元1002,还用于向备份网络设备发送第一备份指示消息,第一备份指示消息包括配置模板文件,第一备份指示消息用于指示备份网络设备备份配置模板文件。
可选的,处理单元1001,还用于当确定网络中有第三网络设备加入时,判断第三网络设备的类型;当第三网络设备的类型与主网络设备的类型相同时,将第三网络设备的属性信息与主网络设备的属性信息进行比较。
当主网络设备的属性信息满足第一预设条件时,处理单元1001根据第三网络设备 的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据。
可选的,处理单元1001,还用于当第三网络设备的属性信息满足第一预设条件时,确定第三网络设备为新的主网络设备,并清除实例化配置数据。
可选的,处理单元1001,还用于当第三网络设备的类型与主网络设备的类型不同时,将第三网络设备的属性信息和备份网络设备的属性信息进行比较;当第三网络设备的属性信息满足第二预设条件时,确定第三网络设备为新的备份网络设备。
发送单元1002,还用于向新的备份网络设备发送配置模板文件。
可选的,处理单元1001,还用于当第三网络设备的属性信息不满足第二预设条件时,主网络设备根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据。
发送单元1002,还用于将实例化配置数据发送给第三网络设备。
本申请实施例所示的网络设备100,可以执行上述图2-图9对应的实施例中的主网络设备所实施的各种步骤和方法,其实现原理以及有益效果类似,此处不再进行赘述。
图11为本申请实施例提供的一种待配置网络设备110的结构示意图,请参见图11所示,该待配置网络设备110还可以包括:
接收单元1101,用于接收主网络设备发送的实例化配置数据,实例化配置数据是主网络设备根据待配置网络设备110的配置参数和配置模板文件包括的至少一条配置命令生成的,配置模板文件是主网络设备根据待配置网络设备110的类型获得的,配置模板文件对应具有相同类型的一类网络设备,配置命令用于指示待配置网络设备110的配置参数与其它网络设备的配置参数之间的关系。
处理单元1102,用于根据实例化配置数据对待配置网络设备110进行配置。
可选的,至少一条配置命令包括第一配置命令,第一配置命令用于指示待配置网络设备110的配置参数与第一网络设备的参数之间的关系,当主网络设备获得不到第一网络设备的参数时,接收单元1101,还用于接收主网络设备发送的待配置网络设备110的配置参数和第一配置命令;
处理单元1102,用于根据第一配置命令获得第一网络设备的参数;并根据待配置网络设备110的配置参数、第一配置命令及第一网络设备的参数生成实例化配置数据。
可选的,当实例化配置数据包括资源数据时,待配置网络设备110还可以包括:
发送单元1103,用于向主网络设备发送资源数据,资源数据为待配置网络生成实例化配置数据过程中产生的资源数据。
本申请实施例所示的待配置网络设备110,可以执行上述图2-图9对应的实施例中的待配置网络设备所实施的各种步骤和方法,其实现原理以及有益效果类似,此处不再进行赘述。
图12为本申请实施例提供的另一种网络设备120的结构示意图,请参见图12所示,该网络设备120用作主网络设备,包括:
处理器1201,用于根据待配置网络设备的类型获得配置模板文件,其中,配置模板文件对应具有相同类型的一类网络设备,配置模板文件包括至少一条配置命令,至 少一条配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系。
处理器1201,用于根据待配置网络设备的配置参数和至少一条配置命令生成待配置网络设备的实例化配置数据。
收发器1202,用于将实例化配置数据发送给待配置网络设备,实例化配置数据用于指示待配置网络设备根据实例化配置数据进行配置。
可选的,至少一条配置命令包括第一配置命令,处理器1201,具体用于根据第一配置命令获得第一网络设备的参数,第一配置命令用于指示待配置网络设备的配置参数与第一网络设备的参数之间的关系;当主网络设备获得到第一网络设备的参数时,根据待配置网络设备的配置参数、第一配置命令及第一网络设备的参数生成待配置网络设备的实例化配置数据。
可选的,处理器1201还具体用于当获得不到第一网络设备的参数时,向待配置网络设备发送待配置网络设备的配置参数和第一配置命令,以使待配置网络设备根据待配置网络设备的配置参数和第一配置命令生成实例化配置数据,并根据实例化配置数据进行配置。
可选的,收发器1202,还用于接收确认响应消息,确认响应消息用于指示实例化配置数据正确。
可选的,处理器1201,还用于将主网络设备的属性信息与主网络设备所属的类型中的其它网络设备的属性信息进行比较;并确定主网络设备的属性信息满足第一预设条件。
可选的,收发器1202,具体用于接收来自第二网络设备发送的至少一个配置模板文件,第二网络设备为网络中任一个网络设备;处理器1201,用于根据待配置网络设备的类型在至少一个配置模板文件确定配置模板文件。
可选的,处理器1201还用于根据第二预设条件确定备份网络设备,备份网络设备的类型与主网络设备的类型不同。
收发器1202还用于向备份网络设备发送第一备份指示消息,第一备份指示消息包括配置模板文件,第一备份指示消息用于指示备份网络设备备份配置模板文件。
可选的,处理器1201还用于当确定网络中有第三网络设备加入时,判断第三网络设备的类型;当第三网络设备的类型与主网络设备的类型相同时,将第三网络设备的属性信息与主网络设备的属性信息进行比较;当主网络设备的属性信息满足第一预设条件时,根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据。
可选的,处理器1201还用于当第三网络设备的属性信息满足第一预设条件时,确定第三网络设备为新的主网络设备,并清除实例化配置数据。
可选的,处理器1201还用于当第三网络设备的类型与主网络设备的类型不同时,将第三网络设备的属性信息和备份网络设备的属性信息进行比较;当第三网络设备的属性信息满足第二预设条件时,确定第三网络设备为新的备份网络设备。
收发器1202,用于向新的备份网络设备发送配置模板文件。
可选的,处理器1201还用于当第三网络设备的属性信息不满足第二预设条件时, 根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据。
收发器1202,用于将实例化配置数据发送给第三网络设备。
本申请实施例所示的网络设备120,可以执行上述图2-图9对应的实施例中的主网络设备所实施的各种步骤和方法,其实现原理以及有益效果类似,此处不再进行赘述。
图13为本申请实施例提供的另一种待配置网络设备130的结构示意图,请参见图13所示,该待配置网络设备130可以包括:
收发器1301,用于接收主网络设备发送的实例化配置数据,所述实例化配置数据是所述主网络设备根据所述待配置网络设备130的配置参数和配置模板文件包括的至少一条配置命令生成的,所述配置模板文件是所述主网络设备根据所述待配置网络设备130的类型获得的,所述配置模板文件对应具有相同类型的一类网络设备,所述配置命令用于指示待配置网络设备130的配置参数与其它网络设备的配置参数之间的关系。
处理器1302,用于根据所述实例化配置数据对所述待配置网络设备130进行配置。
可选的,至少一条配置命令包括第一配置命令,第一配置命令用于指示待配置网络设备130的配置参数与第一网络设备的参数之间的关系,当主网络设备获得不到第一网络设备的参数时,所述收发器1301,还用于接收主网络设备发送的待配置网络设备130的配置参数和第一配置命令。
所述处理器1302,用于根据第一配置命令获得第一网络设备的参数;并根据待配置网络设备130的配置参数、第一配置命令及第一网络设备的参数生成实例化配置。
可选的,当实例化配置数据包括资源数据时,所述收发器1301,还用于向主网络设备发送资源数据,资源数据为待配置网络生成实例化配置数据过程中产生的资源数据。
本申请实施例所示的待配置网络设备130,可以执行上述图2-图9对应的实施例中的待配置网络设备所实施的各种步骤和方法,其实现原理以及有益效果类似,此处不再进行赘述。
图14为本申请实施例提供的再一种网络设备140的结构示意图,请参见图14所示,该网络设备140用作主网络设备,包括:处理器1401、收发器1402、随机存取存储器1403、只读存储器1404以及总线1405。其中,处理器1401通过总线1405分别耦接发送器、随机存取存储器1403以及只读存储器1404。其中,当需要运行网络设备140时,通过固化在只读存储器1404中的基本输入输出系统或者嵌入式系统中的bootloader引导系统进行启动,引导网络设备140进入正常运行状态。在网络设备140进入正常运行状态后,在随机存取存储器1403中运行应用程序和操作系统,使得:
处理器1401用于根据待配置网络设备的类型获得配置模板文件,其中,所述配置模板文件对应具有相同类型的一类网络设备,所述配置模板文件包括至少一条配置命令,所述至少一条配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;并根据所述待配置网络设备的配置参数和所述至少一条配置命令生成所述待配置网络设备的实例化配置数据;收发器1402用于将所述实例化配置数据 发送给所述待配置网络设备,所述实例化配置数据用于指示所述待配置网络设备根据所述实例化配置数据进行配置。
本申请实施例提供的网络设备140可对应于上述图2至图9对应的实施例中的主网络设备,并且,该网络设备140中的处理器1401、收发器1402等可以实现图2至图9所对应的实施例中的网络设备140所具有的功能和/或所实施的各种步骤和方法。所述处理器1401用于执行图10中所述网络设备140的处理单元的所有操作,所述收发器1402用于执行图10中所述网络设备140的接收单元和发送单元的所有操作。为了简洁,在此不再赘述。
图15为本申请实施例提供的再一种待配置网络设备150的结构示意图,请参见图15所示,该待配置网络设备150包括:处理器1501、收发器1502、随机存取存储器1503、只读存储器1504以及总线1505。其中,处理器1501通过总线1505分别耦接发送器、随机存取存储器1503以及只读存储器1504。其中,当需要运行待配置网络设备150时,通过固化在只读存储器1504中的基本输入输出系统或者嵌入式系统中的bootloader引导系统进行启动,引导待配置网络设备150进入正常运行状态。在待配置网络设备150进入正常运行状态后,在随机存取存储器1503中运行应用程序和操作系统,使得:
收发器1502用于接收主网络设备发送的实例化配置数据,所述实例化配置数据是所述主网络设备根据所述待配置网络设备150的配置参数和配置模板文件包括的至少一条配置命令生成的,所述配置模板文件是所述主网络设备根据所述待配置网络设备150的类型获得的,所述配置模板文件对应具有相同类型的一类网络设备,所述配置命令用于指示待配置网络设备150的配置参数与其它网络设备的配置参数之间的关系;处理器1501用于根据所述实例化配置数据对所述待配置网络设备150进行配置。
本申请实施例提供的待配置网络设备150可对应于上述图2至图9对应的实施例中的待配置网络设备150,并且,该待配置网络设备150中的处理器1501、收发器1502等可以实现图2至图9所对应的实施例中的待配置网络设备150所具有的功能和/或所实施的各种步骤和方法。所述处理器1501用于执行图11中所述待配置网络设备150的处理单元的所有操作,所述收发器1502用于执行图11中所述待配置网络设备150的接收单元的所有操作。为了简洁,在此不再赘述。
图16为本申请实施例提供的又一种网络设备160的结构示意图,网络设备160用作主网络设备,包括:主控板1601、接口板1603、交换网板1602和接口板1604。主控板1601用于完成系统管理、设备维护、协议处理等功能。交换网板1602用于完成各接口板(接口板也称为线卡或业务板)之间的数据交换。接口板1603和1604用于提供各种业务接口(例如,以太网接口、POS接口等),并实现数据包的转发。主控板1601、接口板1603和1604,以及交换网板1602之间通过系统总线与系统背板相连实现互通。接口板1603上的中央处理器16031用于对接口板进行控制管理并与主控板1601上的中央处理器16011进行通信。
主控板1601上的中央处理器16011用于根据待配置网络设备的类型获得配置模板文件,还用于根据待配置网络设备的配置参数和至少一条配置命令生成待配置网络设备的实例化配置数据(具体请参考图2至图9相关部分的描述,此处不再赘述),并 将该实例化配置数据封装在IP报文中,下发到接口板1603或1604。所述IP报文头中的目的IP地址为所述待配置网络设备的IP地址。接口板1603上的网络处理器16032根据所述待配置网络设备的IP地址查找转发表项存储器16034中存储的转发表(保存IP地址与出接口的关联关系),获得与所述待配置网络设备的IP地址匹配的转发表项,从而进一步获得与所述待配置网络设备的IP地址相对应的出接口1,所述出接口1位于物理接口卡16033上。物理接口卡16033用于向所述待配置网络设备发送所述实例化配置数据。
可选地,主控板1601上的中央处理器16011还用于根据第一配置命令获得第一网络设备160的参数,第一配置命令用于指示待配置网络设备的配置参数与第一网络设备160的参数之间的关系;当获得到第一网络设备的参数时,根据待配置网络设备的配置参数、第一配置命令及第一网络设备的参数生成待配置网络设备的实例化配置数据。
可选的,接口板1603上的物理接口卡16033还用于当获得不到第一网络设备160的参数时,向待配置网络设备发送待配置网络设备的配置参数和第一配置命令,以使待配置网络设备根据待配置网络设备的配置参数和第一配置命令生成实例化配置数据,并根据实例化配置数据进行配置。
可选的,接口板1603上的物理接口卡16033还用于接收确认响应消息,确认响应消息用于指示实例化配置数据正确。
可选的,主控板1601上的中央处理器16011还用于将主网络设备的属性信息与主网络设备所属的类型中的其它设备的属性信息进行比较;并确定主网络设备的属性信息满足第一预设条件。
可选的,接口板1603上的物理接口卡16033还用于接收来自第二网络设备的至少一个配置模板文件,第二网络设备为网络中任一个网络设备;主控板1601上的中央处理器16011还用于根据待配置网络设备的类型在至少一个配置模板文件确定配置模板文件。
可选的,主控板1601上的中央处理器16011还用于根据第二预设条件确定备份网络设备,备份网络设备的类型与主网络设备的类型不同;接口板1603上的物理接口卡16033还用于向备份网络设备发送第一备份指示消息,第一备份指示消息包括配置模板文件,第一备份指示消息用于指示备份网络设备备份配置模板文件。
可选的,主控板1601上的中央处理器16011还用于在确定网络中有第三网络设备加入时,判断第三网络设备的类型;当第三网络设备的类型与主网络设备160的类型相同时,将第三网络设备的属性信息与主网络设备160的属性信息进行比较;当主网络设备160的属性信息满足第一预设条件时,根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据。
可选的,主控板1601上的中央处理器16011还用于当第三网络设备的属性信息满足第一预设条件时,确定第三网络设备为新的主网络设备,并清除实例化配置数据。
可选的,主控板1601上的中央处理器16011还用于当第三网络设备的类型与主网络设备160的类型不同时,将第三网络设备的属性信息和备份网络设备的属性信息进行比较;当第三网络设备的属性信息满足第二预设条件时,确定第三网络设备为新的 备份网络设备;接口板1603上的物理接口卡16033还用于向新的备份网络设备发送配置模板文件。
可选的,当第三网络设备的属性信息不满足第二预设条件时,主控板1601上的中央处理器16011还用于根据第三网络设备的配置参数和第三网络设备的类型对应的配置模板文件中的配置命令生成第三网络设备的实例化配置数据;接口板1603上的物理接口卡16033还用于将实例化配上实例化配置数据发送给第三网络设备。
应理解,本申请实施例中接口板1604上的操作与接口板1603的操作一致,为了简洁,不再赘述。应理解,本实施例的网络设备160可对应于上述图2至图9所对应的实施例中的网络设备160,该网络设备160中的主控板1601、接口板1603和/或1604可以实现图2至图9所对应的实施例中的网络设备160所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。
值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,网络设备160的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,网络设备160可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,网络设备160可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的网络设备160的数据接入和处理能力要大于集中式架构的设备。可选地,网络设备160的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等网络设备160)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。
图17为本申请实施例提供的又一种待配置网络设备170的结构示意图,请参见图17所示,待配置网络设备170包括:主控板1701、接口板1703、交换网板1702和接口板1704。主控板1701用于完成系统管理、设备维护、协议处理等功能。交换网板1702用于完成各接口板(接口板也称为线卡或业务板)之间的数据交换。接口板1703和1704用于提供各种业务接口(例如,以太网接口、POS接口等),并实现数据包的转发。主控板1701、接口板1703和1704,以及交换网板1702之间通过系统总线与系统背板相连实现互通。接口板1703上的中央处理器17031用于对接口板进行控制管理并与主控板1701上的中央处理器17011进行通信。
接口板1703上的物理接口卡17033用于接收主网络设备发送的封装有实例化配置数据的IP报文,所述IP报文头中的目的IP地址为所述待配置网络设备的IP地址。该IP报文被发送到接口板1703上的网络处理器17032,网络处理器17032根据该目的IP地址(所述待配置网络设备的IP地址)查找转发表项存储器17034中存储的转发表(保存IP地址与出接口的关联关系),获得本机就是所述待配置的网络设备,于是将该IP报文通过接口板1703上的中央处理器17031上送到主控板1701上的中央处理器17011。
主控板1701上的中央处理器17011用于根据实例化配置数据对待配置网络设备 170进行配置。
可选的,至少一条配置命令包括第一配置命令,第一配置命令用于指示所述待配置网络设备的配置参数与第一网络设备的参数之间的关系,当所述主网络设备获得不到第一网络设备的参数时,接口板1703上的物理接口卡17033还用于接收主网络设备发送的待配置网络设备170的配置参数和第一配置命令。
主控板1701上的中央处理器17011还用于根据第一配置命令获得第一网络设备的参数;并根据待配置网络设备170的配置参数、第一配置命令及第一网络设备的参数生成实例化配置。
应理解,本申请实施例中接口板1704上的操作与接口板1703的操作一致,为了简洁,不再赘述。应理解,本实施例的待配置网络设备170可对应于上述图2至图9所对应的实施例中的待配置网络设备170,该待配置网络设备170中的主控板1701、接口板1703和/或1704可以实现图2至图9所对应的实施例中的待配置网络设备170所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。
值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,待配置网络设备170的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,待配置网络设备170可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,待配置网络设备170可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的待配置网络设备170的数据接入和处理能力要大于集中式架构的设备。可选地,待配置网络设备170的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等待配置网络设备170)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。
图18为本申请实施例提供的一种网络配置系统180的结构示意图,该网络配置系统180包括上述任一实施例所示的网络设备1801和上述任一实施例所示的待配置网络设备1802,其实现原理以及有益效果类似,此处不再进行赘述。
本申请实施例还提供一种计算机存储介质,包括指令,当所述指令在网络设备上运行时,使得所述网络设备执行图2-图9对应的实施例中的网络设备所实施的各种步骤和方法,其实现原理以及有益效果类似,此处不再进行赘述。
本申请实施例还提供一种计算机存储介质,包括指令,当所述指令在待配置网络设备上运行时,使得所述待配置网络设备执行图2-图9对应的实施例中的待配置网络设备所实施的各种步骤和方法,其实现原理以及有益效果类似,此处不再进行赘述。
本申请实施例还提供一种芯片,芯片上存储有计算机程序,在计算机程序被处理器执行时,执行上述图2-图9对应的实施例中的网络设备所实施的各种步骤和方法,或者,在计算机程序被处理器执行时,执行上述图2-图9对应的实施例中的待配置网络设备所实施的各种步骤和方法,其实现原理以及有益效果类似,此处不再进行赘述。
上述各个实施例中处理器可以是通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存取存储器(random access memory,RAM)、闪存、只读存储器(read-only memory,ROM)、可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的指令,结合其硬件完成上述方法的步骤。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (30)

  1. 一种网络配置方法,其特征在于,包括:
    主网络设备根据待配置网络设备的类型获得配置模板文件,其中,所述配置模板文件对应具有相同类型的一类网络设备,所述配置模板文件包括至少一条配置命令,所述至少一条配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;
    所述主网络设备根据所述待配置网络设备的配置参数和所述至少一条配置命令生成所述待配置网络设备的实例化配置数据;
    所述主网络设备将所述实例化配置数据发送给所述待配置网络设备,所述实例化配置数据用于指示所述待配置网络设备根据所述实例化配置数据进行配置。
  2. 根据权利要求1所述的方法,其特征在于,所述至少一条配置命令包括第一配置命令,所述主网络设备根据所述待配置网络设备的配置参数和所述至少一条配置命令生成所述待配置网络设备的实例化配置数据,包括:
    所述主网络设备根据所述第一配置命令获得第一网络设备的参数,所述第一配置命令用于指示所述待配置网络设备的配置参数与所述第一网络设备的参数之间的关系;
    当所述主网络设备获得到所述第一网络设备的参数时,所述主网络设备根据所述待配置网络设备的配置参数、所述第一配置命令及所述第一网络设备的参数生成所述待配置网络设备的实例化配置数据。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    当所述主网络设备获得不到所述第一网络设备的参数时,所述主网络设备向所述待配置网络设备发送所述待配置网络设备的配置参数和所述第一配置命令,以使所述待配置网络设备根据所述待配置网络设备的配置参数和所述第一配置命令生成所述实例化配置数据,并根据所述实例化配置数据进行配置。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述主网络设备将所述实例化配置数据发送给所述待配置网络设备之后,还包括:
    所述主网络设备接收确认响应消息,所述确认响应消息用于指示所述实例化配置数据正确。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述主网络设备根据待配置网络设备的类型获得配置模板文件之前,还包括:
    所述主网络设备将所述主网络设备的属性信息与所述主网络设备所属的类型中的其它网络设备的属性信息进行比较;
    所述主网络设备确定所述主网络设备的属性信息满足第一预设条件。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述主网络设备根据待配置网络设备的类型获得配置模板文件,包括:
    所述主网络设备接收来自第二网络设备的至少一个配置模板文件,所述第二网络设备为网络中任一个网络设备;
    所述主网络设备根据待配置网络设备的类型在所述至少一个配置模板文件中确定所述配置模板文件。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述主网络设备根据待配 置网络设备的类型获得配置模板文件之后,还包括:
    所述主网络设备根据第二预设条件确定备份网络设备,所述备份网络设备的类型与所述主网络设备的类型不同;
    所述主网络设备向所述备份网络设备发送第一备份指示消息,所述第一备份指示消息包括所述配置模板文件,所述第一备份指示消息用于指示所述备份网络设备备份所述配置模板文件。
  8. 根据权利要求7所述的方法,其特征在于,还包括:
    当确定网络中有第三网络设备加入时,所述主网络设备判断所述第三网络设备的类型;
    当所述第三网络设备的类型与所述主网络设备的类型相同时,所述主网络设备将所述第三网络设备的属性信息与所述主网络设备的属性信息进行比较;
    当所述主网络设备的属性信息满足第一预设条件时,所述主网络设备根据所述第三网络设备的配置参数和所述第三网络设备的类型对应的配置模板文件中的配置命令生成所述第三网络设备的实例化配置数据。
  9. 根据权利要求8所述的方法,其特征在于,还包括:
    当所述第三网络设备的属性信息满足第一预设条件时,所述主网络设备确定所述第三网络设备为新的主网络设备,并清除所述实例化配置数据。
  10. 根据权利要求8所述的方法,其特征在于,还包括:
    当所述第三网络设备的类型与所述主网络设备的类型不同时,所述主网络设备将所述第三网络设备的属性信息和所述备份网络设备的属性信息进行比较;
    当所述第三网络设备的属性信息满足第二预设条件时,所述主网络设备确定所述第三网络设备为新的备份网络设备;
    所述主网络设备向所述新的备份网络设备发送所述配置模板文件。
  11. 根据权利要求10所述的方法,其特征在于,还包括:
    当所述第三网络设备的属性信息不满足第二预设条件时,所述主网络设备根据所述第三网络设备的配置参数和所述第三网络设备的类型对应的配置模板文件中的配置命令生成所述第三网络设备的实例化配置数据;
    所述主网络设备将所述实例化配置数据发送给所述第三网络设备。
  12. 一种网络配置方法,其特征在于,包括:
    待配置网络设备接收主网络设备发送的实例化配置数据,所述实例化配置数据是所述主网络设备根据所述待配置网络设备的配置参数和配置模板文件包括的至少一条配置命令生成的,所述配置模板文件是所述主网络设备根据所述待配置网络设备的类型获得的,所述配置模板文件对应具有相同类型的一类网络设备,所述配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;
    所述待配置网络设备根据所述实例化配置数据对所述待配置网络设备进行配置。
  13. 根据权利要求12所述的方法,其特征在于,所述至少一条配置命令包括第一配置命令,所述第一配置命令用于指示所述待配置网络设备的配置参数与第一网络设备的参数之间的关系,当所述主网络设备获得不到所述第一网络设备的参数时,所述方法还包括:
    所述待配置网络设备接收所述主网络设备发送的所述待配置网络设备的配置参数和所述第一配置命令;
    所述待配置网络设备根据所述第一配置命令获得所述第一网络设备的参数;
    所述待配置网络设备根据所述待配置网络设备的配置参数、所述第一配置命令及所述第一网络设备的参数生成所述实例化配置数据。
  14. 一种网络设备,其特征在于,包括:
    处理单元,用于根据待配置网络设备的类型获得配置模板文件,其中,所述配置模板文件对应具有相同类型的一类网络设备,所述配置模板文件包括至少一条配置命令,所述至少一条配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;
    所述处理单元,还用于根据所述待配置网络设备的配置参数和所述至少一条配置命令生成所述待配置网络设备的实例化配置数据;
    发送单元,用于将所述实例化配置数据发送给所述待配置网络设备,所述实例化配置数据用于指示所述待配置网络设备根据所述实例化配置数据进行配置。
  15. 根据权利要求14所述的设备,其特征在于,所述至少一条配置命令包括第一配置命令,所述处理单元,具体用于根据所述第一配置命令获得第一网络设备的参数,所述第一配置命令用于指示所述待配置网络设备的配置参数与所述第一网络设备的参数之间的关系;当获得到所述第一网络设备的参数时,根据所述待配置网络设备的配置参数、所述第一配置命令及所述第一网络设备的参数生成所述待配置网络设备的实例化配置数据。
  16. 根据权利要求15所述的设备,其特征在于,
    所述处理单元,还具体用于当获得不到所述第一网络设备的参数时,向所述待配置网络设备发送所述待配置网络设备的配置参数和所述第一配置命令,以使所述待配置网络设备根据所述待配置网络设备的配置参数和所述第一配置命令生成所述实例化配置数据,并根据所述实例化配置数据进行配置。
  17. 根据权利要求14-16任一项所述的设备,其特征在于,还包括:
    接收单元,用于接收确认响应消息,所述确认响应消息用于指示所述实例化配置数据正确。
  18. 根据权利要求14-17任一项所述的设备,其特征在于,
    所述处理单元,还用于将主网络设备的属性信息与所述主网络设备所属的类型中的其它网络设备的属性信息进行比较;并确定所述主网络设备的属性信息满足第一预设条件。
  19. 根据权利要求14-18任一项所述的设备,其特征在于,
    所述处理单元,具体用于接收来自第二网络设备发送的至少一个配置模板文件,所述第二网络设备为网络中任一个网络设备;并根据待配置网络设备的类型在所述至少一个配置模板文件中确定所述配置模板文件。
  20. 根据权利要求14-19任一项所述的设备,其特征在于,
    所述处理单元,还用于根据第二预设条件确定备份网络设备,所述备份网络设备的类型与主网络设备的类型不同;
    所述发送单元,还用于向所述备份网络设备发送第一备份指示消息,所述第一备份指示消息包括所述配置模板文件,所述第一备份指示消息用于指示所述备份网络设备备份所述配置模板文件。
  21. 根据权利要求20所述的设备,其特征在于,
    所述处理单元,还用于当确定网络中有第三网络设备加入时,判断所述第三网络设备的类型;当所述第三网络设备的类型与所述主网络设备的类型相同时,将所述第三网络设备的属性信息与所述主网络设备的属性信息进行比较;
    当所述主网络设备的属性信息满足第一预设条件时,所述处理单元还用于根据所述第三网络设备的配置参数和所述第三网络设备的类型对应的配置模板文件中的配置命令生成所述第三网络设备的实例化配置数据。
  22. 根据权利要求21所述的设备,其特征在于,
    所述处理单元,还用于当所述第三网络设备的属性信息满足第一预设条件时,确定所述第三网络设备为新的主网络设备,并清除所述实例化配置数据。
  23. 根据权利要求21所述的设备,其特征在于,
    所述处理单元,还用于当所述第三网络设备的类型与所述主网络设备的类型不同时,将所述第三网络设备的属性信息和所述备份网络设备的属性信息进行比较;当所述第三网络设备的属性信息满足第二预设条件时,确定所述第三网络设备为新的备份网络设备;
    所述发送单元,还用于向所述新的备份网络设备发送所述配置模板文件。
  24. 根据权利要求23所述的设备,其特征在于,
    所述处理单元,还用于当所述第三网络设备的属性信息不满足第二预设条件时,所述主网络设备根据所述第三网络设备的配置参数和所述第三网络设备的类型对应的配置模板文件中的配置命令生成所述第三网络设备的实例化配置数据;
    所述发送单元,还用于将所述实例化配置数据发送给所述第三网络设备。
  25. 一种待配置网络设备,其特征在于,包括:
    接收单元,用于接收主网络设备发送的实例化配置数据,所述实例化配置数据是所述主网络设备根据所述待配置网络设备的配置参数和配置模板文件包括的至少一条配置命令生成的,所述配置模板文件是所述主网络设备根据所述待配置网络设备的类型获得的,所述配置模板文件对应具有相同类型的一类网络设备,所述配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;
    处理单元,用于根据所述实例化配置数据对所述待配置网络设备进行配置。
  26. 根据权利要求25所述的设备,其特征在于,所述至少一条配置命令包括第一配置命令,所述第一配置命令用于指示所述待配置网络设备的配置参数与第一网络设备的参数之间的关系,当所述主网络设备获得不到所述第一网络设备的参数时,所述接收单元,还用于接收所述主网络设备发送的所述待配置网络设备的配置参数和所述第一配置命令,
    所述处理单元,还用于根据所述第一配置命令获得所述第一网络设备的参数;并根据所述待配置网络设备的配置参数、所述第一配置命令及所述第一网络设备的参数生成所述实例化配置数据。
  27. 一种网络设备,其特征在于,包括:
    处理器,用于根据待配置网络设备的类型获得配置模板文件,其中,所述配置模板文件对应具有相同类型的一类网络设备,所述配置模板文件包括至少一条配置命令,所述至少一条配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;
    所述处理器,用于根据所述待配置网络设备的配置参数和所述至少一条配置命令生成所述待配置网络设备的实例化配置数据;
    收发器,用于将所述实例化配置数据发送给所述待配置网络设备,所述实例化配置数据用于指示所述待配置网络设备根据所述实例化配置数据进行配置。
  28. 一种待配置网络设备,其特征在于,包括:
    收发器,用于接收主网络设备发送的实例化配置数据,所述实例化配置数据是所述主网络设备根据所述待配置网络设备的配置参数和配置模板文件包括的至少一条配置命令生成的,所述配置模板文件是所述主网络设备根据所述待配置网络设备的类型获得的,所述配置模板文件对应具有相同类型的一类网络设备,所述配置命令用于指示待配置网络设备的配置参数与其它网络设备的配置参数之间的关系;
    处理器,用于根据所述实例化配置数据对所述待配置网络设备进行配置。
  29. 一种网络配置系统,其特征在于,包括如权利要求14至24任一所述的网络设备和如权利要求25或26所述的待配置网络设备;
    或者,如权利要求27所述的网络设备和如权利要求28所述的待配置网络设备。
  30. 一种计算机存储介质,包括指令,其特征在于,当所述指令在网络设备上运行时,使得所述网络设备执行如权1-11任一所述的网络配置方法;
    或者,当所述指令在待配置网络设备上运行时,使得所述待配置网络设备执行如权12或13所述的网络配置方法。
PCT/CN2019/085148 2018-05-11 2019-04-30 网络配置方法、设备及系统 WO2019214508A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19798890.0A EP3787232A4 (en) 2018-05-11 2019-04-30 METHOD, DEVICE AND SYSTEM FOR NETWORK CONFIGURATION
US17/093,696 US11394607B2 (en) 2018-05-11 2020-11-10 Method and system for network configuration

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810451317.5A CN110474792B (zh) 2018-05-11 2018-05-11 网络配置方法、设备及系统
CN201810451317.5 2018-05-11

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/093,696 Continuation US11394607B2 (en) 2018-05-11 2020-11-10 Method and system for network configuration

Publications (1)

Publication Number Publication Date
WO2019214508A1 true WO2019214508A1 (zh) 2019-11-14

Family

ID=68467708

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/085148 WO2019214508A1 (zh) 2018-05-11 2019-04-30 网络配置方法、设备及系统

Country Status (4)

Country Link
US (1) US11394607B2 (zh)
EP (1) EP3787232A4 (zh)
CN (1) CN110474792B (zh)
WO (1) WO2019214508A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112187635B (zh) * 2019-07-01 2023-02-03 中兴通讯股份有限公司 报文转发方法及装置
CN111416732B (zh) * 2020-02-25 2021-05-28 浪潮思科网络科技有限公司 一种sdn中网络设备扩容自动配置业务的方法及装置
CN111106973B (zh) * 2020-02-27 2022-08-02 北京广利核系统工程有限公司 一种自动配置网络清单的方法和系统
CN113746657A (zh) * 2020-05-30 2021-12-03 华为技术有限公司 一种业务配置方法及其装置
CN113193980A (zh) * 2021-03-29 2021-07-30 中盈优创资讯科技有限公司 一种基于新型城域网拓扑快速生成功能配置的方法及装置
CN115514639A (zh) * 2021-06-21 2022-12-23 中兴通讯股份有限公司 跨设备链路聚合的网管方法、系统、交换机及存储介质
CN113556250B (zh) * 2021-07-21 2022-12-20 中国工商银行股份有限公司 一种网络设备批量配置方法及装置
CN117641496A (zh) * 2022-08-12 2024-03-01 大唐移动通信设备有限公司 配置信息处理方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6336138B1 (en) * 1998-08-25 2002-01-01 Hewlett-Packard Company Template-driven approach for generating models on network services
US20140376402A1 (en) * 2013-06-19 2014-12-25 Cumulus Networks, Inc. Methods and systems for automatic generation of routing configuration files
CN106576054A (zh) * 2014-08-17 2017-04-19 微软技术许可有限责任公司 网络设备配置框架

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7054924B1 (en) * 2000-09-29 2006-05-30 Cisco Technology, Inc. Method and apparatus for provisioning network devices using instructions in extensible markup language
US7352853B1 (en) * 2001-05-22 2008-04-01 Cisco Technology, Inc. Automation of customer premises equipment provisioning in a telecommunications network
US7631055B1 (en) * 2003-04-23 2009-12-08 Cisco Technology, Inc. Method and apparatus providing automatic connection announcement from a modular network device to a network management point
US20070214178A1 (en) * 2006-03-13 2007-09-13 Sheffler Thomas J Multi-project verification environment
WO2010068698A2 (en) * 2008-12-09 2010-06-17 Glue Networks, Inc. System and method for providing virtual private networks
US9137198B2 (en) * 2011-10-21 2015-09-15 Hewlett-Packard Development Company, L.P. Centralized configuration with dynamic distributed address management
CN103580797B (zh) 2012-08-03 2017-05-03 电信科学技术研究院 上行控制信息uci的传输方法和设备
EP2915057A4 (en) * 2012-10-31 2015-11-18 Ericsson Telefon Ab L M METHOD FOR CONFIGURING A COMMUNICATION DEVICE THROUGH A CONFIGURATION FILE LOCATION
CN104883267B (zh) * 2014-02-28 2018-07-20 新华三技术有限公司 网络配置访问方法及装置
CN107222324B (zh) * 2016-03-22 2021-05-14 华为技术有限公司 网络服务的业务配置方法和装置
US10419311B2 (en) * 2016-10-18 2019-09-17 Citrix Systems, Inc. Template-based declarative and composable configuration of network functions
US10754708B2 (en) * 2018-03-28 2020-08-25 EMC IP Holding Company LLC Orchestrator and console agnostic method to deploy infrastructure through self-describing deployment templates

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6336138B1 (en) * 1998-08-25 2002-01-01 Hewlett-Packard Company Template-driven approach for generating models on network services
US20140376402A1 (en) * 2013-06-19 2014-12-25 Cumulus Networks, Inc. Methods and systems for automatic generation of routing configuration files
CN106576054A (zh) * 2014-08-17 2017-04-19 微软技术许可有限责任公司 网络设备配置框架

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3787232A4

Also Published As

Publication number Publication date
US20210058292A1 (en) 2021-02-25
CN110474792B (zh) 2021-01-29
US11394607B2 (en) 2022-07-19
EP3787232A1 (en) 2021-03-03
CN110474792A (zh) 2019-11-19
EP3787232A4 (en) 2021-06-23

Similar Documents

Publication Publication Date Title
WO2019214508A1 (zh) 网络配置方法、设备及系统
US11949530B2 (en) System and method to provide multicast group membership defined relative to partition membership in a high performance computing environment
US10649798B2 (en) Virtual switching method, related apparatus, and computer system
EP3430512B1 (en) Network virtualization of containers in computing systems
US11405229B2 (en) System and method to provide explicit multicast local identifier assignment for per-partition default multicast local identifiers defined as subnet manager policy input in a high performance computing environment
US5805924A (en) Method and apparatus for configuring fabrics within a fibre channel system
US11310080B2 (en) VXLAN configuration method, device, and system
CN112637105B (zh) 切换防火墙的方法、系统、装置及计算机可读存储介质
CN110830598B (zh) Bgp会话建立、发送接口地址和别名的方法及网络设备
US10693815B2 (en) System and method to use all incoming multicast packets as a basis for GUID to LID cache contents in a high performance computing environment
US10868686B2 (en) System and method to provide default multicast group (MCG) for announcements and discovery as extended port information in a high performance computing environment
US20180309586A1 (en) System and method to provide default multicast lid values per partition as additional sma attributes in a high performance computing environment
US10862694B2 (en) System and method to provide default multicast proxy for scalable forwarding of announcements and information request intercepting in a high performance computing environment
US11968132B2 (en) System and method to use queue pair 1 for receiving multicast based announcements in multiple partitions in a high performance computing environment
US20220210049A1 (en) Packet processing method and related apparatus

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019798890

Country of ref document: EP

Effective date: 20201123