CN109245920A - Interchanger method of automatic configuration, device, interchanger and storage medium - Google Patents
Interchanger method of automatic configuration, device, interchanger and storage medium Download PDFInfo
- Publication number
- CN109245920A CN109245920A CN201810968372.1A CN201810968372A CN109245920A CN 109245920 A CN109245920 A CN 109245920A CN 201810968372 A CN201810968372 A CN 201810968372A CN 109245920 A CN109245920 A CN 109245920A
- Authority
- CN
- China
- Prior art keywords
- file
- flash disk
- switch system
- interchanger
- media catalog
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/082—Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0876—Aspects of the degree of configuration automation
- H04L41/0886—Fully automatic configuration
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Automation & Control Theory (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of interchanger method of automatic configuration, device, interchanger and storage mediums.It wherein, will be under the file system media catalog of the flash disk carry to switch system this method comprises: after detecting flash disk insertion;File destination is checked in the file system media catalog;If there is the file destination, then the switch system is configured according to the file destination.The configuration process that the embodiment of the present invention solves the prior art is complicated, be not suitable for the problem of configuring in complicated conditions for equipment use to switch system, it may be implemented when switch system is installed and used, only need a flash disk that can be configured according to user demand to switch system, configuration process is more convenient.
Description
Technical field
The present embodiments relate to field of communication technology more particularly to a kind of interchanger method of automatic configuration, device, exchange
Machine and storage medium.
Background technique
The task of network management type interchanger is exactly that all Internet resources is made to be in good state.Network management type interchanger product
It provides based on terminal control mouth, based on the multiple networks pipe such as Webpage and support remote terminal protocol Telnet network
Reason mode.Therefore network management personnel can working condition to network management type interchanger, network operation situation carry out it is local or remote
The real time monitoring of journey manages the working condition and operating mode of all switching ports with taking a panoramic view of the situation.In order to guarantee that network management type is handed over
The normal work changed planes, network management personnel can to network management type interchanger carry out field adjustable, for example, to network management type interchanger into
Row system upgrade, configuration backup, log export and configuration update.
In the prior art, usually computer and network management type interchanger are connected with cable, network management type is handed over by computer
It changes planes and is configured.
Inventor in the implementation of the present invention, has found in complicated conditions for equipment use, and field adjustable is simultaneously sometimes
Be not suitable for being configured using computer connection interchanger.User wishes that configuration process is more convenient.
Summary of the invention
The present invention provides a kind of interchanger method of automatic configuration, device, interchanger and storage medium, can hand over network management type
It changes planes and automatically configure and upgrade automatically, optimize the configuration process of network management type interchanger.
In a first aspect, the embodiment of the invention provides a kind of interchanger method of automatic configuration, comprising:
It, will be under the file system media catalog of flash disk carry to switch system after detecting flash disk insertion;
File destination is checked in file system media catalog;
If there is file destination, then switch system is configured according to file destination.
Second aspect, the embodiment of the invention also provides a kind of interchangers to automatically configure device, comprising:
Flash disk carry module, for detect flash disk insertion after, by the file system of flash disk carry to switch system
Under media catalog;
File checking module, for checking for file destination in file system media catalog;
System configuration module, for if there is file destination, then being configured according to file destination to switch system.
The third aspect, the embodiment of the invention also provides a kind of interchangers, comprising:
One or more processors;
Storage device, for storing one or more programs,
When one or more programs are executed by one or more processors, so that one or more processors realize such as this hair
Interchanger method of automatic configuration described in bright embodiment.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer
Program, the program realize interchanger method of automatic configuration as described in the embodiments of the present invention when being executed by processor.
The embodiment of the present invention by detect flash disk insertion after, by the file system matchmaker of flash disk carry to switch system
Under body catalogue;File destination is checked in file system media catalog;If there is file destination, then according to target
File configures switch system, and the configuration process for solving the prior art is complicated, is not suitable for using in complicated equipment
The problem of configuring in environment to switch system may be implemented when switch system is installed and used, it is only necessary to which one excellent
Disk can configure switch system according to user demand, and configuration process is more convenient.
Detailed description of the invention
Fig. 1 is a kind of flow chart for interchanger method of automatic configuration that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow chart of interchanger method of automatic configuration provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of flow chart for interchanger method of automatic configuration that the embodiment of the present invention three provides;
Fig. 4 is a kind of flow chart for interchanger method of automatic configuration that the embodiment of the present invention four provides;
Fig. 5 is a kind of flow chart for interchanger method of automatic configuration that the embodiment of the present invention five provides;
Fig. 6 is a kind of flow chart for interchanger method of automatic configuration that the embodiment of the present invention six provides;
Fig. 7 is a kind of configuration diagram for switch system that the embodiment of the present invention six provides;
Fig. 8 is the structural block diagram that a kind of interchanger that the embodiment of the present invention seven provides automatically configures device;
Fig. 9 is a kind of structural schematic diagram for interchanger that the embodiment of the present invention eight provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just
Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is a kind of flow chart for interchanger method of automatic configuration that the embodiment of the present invention one provides, and the present embodiment can fit
The case where for configuring to network management type interchanger, this method can be automatically configured by interchanger provided in an embodiment of the present invention
Device executes, and the mode which can be used software and/or hardware is realized, and can generally be integrated in network management type interchanger.
As shown in Figure 1, it specifically comprises the following steps:
Step 101, detect flash disk insertion after, by the file system media catalog of flash disk carry to switch system
Under.
Wherein, switch system detects whether the universal serial bus of flash disk insertion switch system after actuation
(Universal Serial Bus, USB) interface.After detecting flash disk insertion, switch system is by system drive to excellent
Disk carries out after enumerating identification, will be under file system media catalog/media of flash disk carry to switch system.File system matchmaker
Body catalogue is the mount point for storing equipment.When switch system will use some equipment, it is necessary to equipment first be corresponded to some
In catalogue, and this catalogue is known as mount point, can just read the equipment in this way, and these corresponding movements are exactly " to hang
It carries ".Specifically, switch system establishes a disk under file system media catalog automatically after detecting flash disk insertion
Then catalogue is mounted to flash disk on this disk directory, access flash disk by accessing the disk directory.
Before flash disk is from access switch system to normal work, enumeration stage is belonged to.It enumerates, exactly allows interchanger system
System understanding flash disk, and prepare resource for it.Establish the data delivery mechanism between switch system and flash disk.The work in the stage,
It is as defined in USB communication protocol, so belonging to International Organization for standardization (International Organization for
Standardization, ISO) normal process formulated, i.e. iso standard process.
Step 102 checks for file destination in file system media catalog.
Wherein, the file in flash disk is read by the corresponding catalogue of flash disk under access file system media catalog, to text
The content of part is checked that checking in the corresponding catalogue of flash disk whether there is file destination.File destination is for interchanger
The file that system is configured.File destination may include: that system upgrade image file, BootLoader and booting are opened
Dynamic configuration file etc..Before flash disk is inserted into switch system, user can be stored file destination to excellent according to business demand
Disk.
Step 103, if there is file destination, then switch system is configured according to file destination.
Wherein, if there are file destinations in the corresponding catalogue of flash disk, according to the type of file destination, to interchanger system
System is configured.
A kind of interchanger method of automatic configuration provided in this embodiment, by the way that after detecting flash disk insertion, flash disk is hung
It is loaded under the file system media catalog of switch system;File destination is checked in file system media catalog;
If there is file destination, then switch system is configured according to file destination, solves the configuration process of the prior art
Complexity is not suitable for the problem of configuring in complicated conditions for equipment use to switch system, may be implemented in interchanger
When system is installed and used, it is only necessary to which a flash disk can configure switch system according to user demand, configuration process
It is more convenient.
Embodiment two
Fig. 2 is a kind of flow chart of interchanger method of automatic configuration provided by Embodiment 2 of the present invention, more than the present embodiment
State in embodiment and embodied based on each optinal plan: file destination is system upgrade image file;If there is mesh
File is marked, then switch system is configured according to file destination, comprising: the system liter in identification file system media catalog
The version information of class mirror-image file;If the version of the system upgrade image file in file system media catalog is higher than interchanger
The version of the current system upgrade image file of system, then according to the system upgrade image file pair in file system media catalog
System partitioning is upgraded.As shown in Fig. 2, it specifically comprises the following steps:
Step 201, detect flash disk insertion after, by the file system media catalog of flash disk carry to switch system
Under.
Step 202 checks for file destination in file system media catalog.
Step 203, identification file system media catalog in system upgrade image file version information.
Wherein, system upgrade image file is the system image file for being upgraded to switch system.System mirror
As file is exactly that the operating system partition on a system fixing disc or a hard disk is completely compressed to a mirror image
Among file, which contains all information of CD or hard-disk system subregion, can be used for carrying out system installation.
After checking system upgrade image file in file system media catalog, identify in file system media catalog
The version information of system upgrade image file.Optionally, it is identified according to the filename of system upgrade image file or attribute information
The version information of system upgrade image file.For example, the entitled Aquam81XX_ of the file of system upgrade image file
38.0.13.5.mfi.Wherein, the x field in Aquam81XX_xx.x.xx.5.mfi is identified for version information.
If the version of the system upgrade image file in step 204, file system media catalog is higher than switch system
Current system upgrade image file version, then according to the system upgrade image file in file system media catalog to system
Subregion is upgraded.
Wherein, the current system upgrade image file of switch system refers to the corresponding system of the current system of switch system
System upgrade image file, is that switch system upgrades to the system upgrade image file used when current system.
According to the current of the version information of the system upgrade image file in file system media catalog and switch system
The version information of system upgrade image file judges the version and friendship of the system upgrade image file in file system media catalog
The height of the version of the current system upgrade image file for system of changing planes.For example, comparing word of the two for version information identification
The size of section.The biggish system upgrade image file version of field is high.
If the version of system upgrade image file is higher than the version of the current system upgrade image file of switch system,
Then switch system enters system upgrade state, according to the system upgrade image file in file system media catalog to system point
Area is upgraded.System partitioning is the subregion for starting interchanger.System upgrade be actually a software package deletion with
Refitting process.In the escalation process of system partitioning, switch system is according to system upgrade image file automatic deleting system point
Old software package in area, and reset new software package.
A kind of interchanger method of automatic configuration provided in this embodiment, if being by existing in file system media catalog
System upgrade image file, then identify the version information of the system upgrade image file in file system media catalog;If file
The version of system upgrade image file in system media catalogue is higher than the current system upgrade image file of switch system
Version then upgrades system partitioning according to the system upgrade image file in file system media catalog, may be implemented
When switch system is installed and used, it is only necessary to which a flash disk can carry out system liter to switch system according to user demand
Grade, configuration process are more convenient.
Embodiment three
Fig. 3 is the flow chart of a kind of interchanger method of automatic configuration that the embodiment of the present invention three provides, more than the present embodiment
State in embodiment and embodied based on each optinal plan: file destination is BootLoader;If there is target text
Part then configures the switch system according to file destination, comprising: the starting dress in identification file system media catalog
Carry the version information of program;If the version of the BootLoader in file system media catalog is higher than working as switch system
The version of preceding BootLoader, then according to the BootLoader in file system media catalog to BootLoader subregion
Upgraded.As shown in figure 3, it specifically comprises the following steps:
Step 301, detect flash disk insertion after, by the file system media catalog of flash disk carry to switch system
Under.
Step 302 checks for file destination in file system media catalog.
Step 303, identification file system media catalog in BootLoader version information.
Wherein, BootLoader is run before the operation of switch system kernel.BootLoader can be initial
Change hardware device, establish memory headroom mapping graph, thus take the hardware environment of switch system to a proper states, with
Just switch system kernel is called to get out correct environment to be final.The load starting task of entire switch system is with regard to complete
It is completed by BootLoader.Optionally, BootLoader can be Redboot.Redboot is that a kind of independent operating exists
BootLoader in embedded system is a popular at present function, portable good BootLoader.
After checking BootLoader in file system media catalog, the version information of BootLoader is identified.
Optionally, according to the filename of BootLoader or the version information of attribute information identification BootLoader.For example, starting
The entitled Redboot-Jaguar2-32.0.10.5.img of the file of load module.Wherein, Redboot-Jaguar2-
X field in xx.x.xx.x.img is identified for version information.
If step 304, the version of BootLoader in file system media catalog are higher than working as switch system
The version of preceding BootLoader, then according to the BootLoader in file system media catalog to BootLoader subregion
Upgraded.
Wherein, the load module that is currently up of switch system refers to BootLoader in switch system.According to
The version information of BootLoader in file system media catalog and the version for being currently up load module of switch system
This information judges that the version of the BootLoader in file system media catalog and switch system are currently up loading journey
The height of the version of sequence.For example, comparing size of the two for the field of version information identification.The biggish bootload journey of field
Sequence version is high.
If the version of the BootLoader in file system media catalog is currently up dress higher than switch system
The version for carrying program, then upgrade bootload subregion according to the BootLoader in file system media catalog.It opens
Dynamic load module subregion is the subregion for carrying out the load starting task of entire switch system.In the liter of bootload subregion
During grade, automatically bootload subregion is written in the BootLoader in file system media catalog by switch system.It can
Choosing, switch system saves the backup for being currently up load module of a switch system in bootload subregion.If
Switch system after upgrading starts failure, can also be restored back to the exchange that switch system is saved in bootload subregion again
The backup for being currently up load module of machine system.
A kind of interchanger method of automatic configuration provided in this embodiment, if opened by existing in file system media catalog
When dynamic load module, then the version information of the BootLoader in file system media catalog is identified;If file system matchmaker
The version of BootLoader in body catalogue is higher than the version for being currently up load module of switch system, then according to file
BootLoader in system media catalogue upgrades BootLoader subregion, may be implemented to pacify in switch system
Dress in use, only need a flash disk that can be upgraded according to BootLoader of the user demand to switch system,
Configuration process is more convenient.
Example IV
Fig. 4 is the flow chart of a kind of interchanger method of automatic configuration that the embodiment of the present invention four provides, more than the present embodiment
State in embodiment and embodied based on each optinal plan: file destination is starting up's configuration file;If there is mesh
File is marked, then switch system is configured according to file destination, comprising: by the starting up in file system media catalog
Configuration file is directed into switch system.As shown in figure 4, it specifically comprises the following steps:
Step 401, detect flash disk insertion after, by the file system media catalog of flash disk carry to switch system
Under.
Step 402 checks for file destination in file system media catalog.
Starting up's configuration file in file system media catalog is directed into switch system by step 403.
Wherein, starting up's configuration file Startup_config is the configuration text loaded automatically when switch system starting
Part.Starting up's configuration file in file system media catalog is directed into switch system, is stored to switch system
In nonvolatile random access memory (Non-Volatile Random Access Memory, NVRAM), interchanger is covered
Current starting up's configuration file of system.When switch system next time starts, opening in file system media catalog can read
Machine starts configuration file.
A kind of interchanger method of automatic configuration provided in this embodiment is opened by there is booting in file system media catalog
Dynamic configuration file, then be directed into switch system for starting up's configuration file in file system media catalog, may be implemented
When switch system is installed and used, it is only necessary to which a flash disk can be opened according to the booting that user demand updates switch system
Dynamic configuration file, configuration process are more convenient.
Embodiment five
Fig. 5 is the flow chart of a kind of interchanger method of automatic configuration that the embodiment of the present invention five provides, more than the present embodiment
It states in embodiment and is embodied based on each optinal plan: after by under flash disk carry to file system media catalog,
Further include: current backup configuration file is generated according to the current starting up's configuration file and current time stamp of switch system,
And current backup configuration file is stored to flash disk.
Optionally, after by under flash disk carry to file system media catalog, further includes: by the system of switch system
Log is exported to flash disk.
Optionally, after detecting flash disk insertion, further includes: state of a control suggestion device exports flash disk insertion prompt letter
Breath;After under the file system media catalog by flash disk carry to switch system, further includes: state of a control suggestion device is defeated
Flash disk carry prompt information out;After being configured according to file destination to switch system, further includes: state of a control prompt
Information is completed in device output configuration, and unloads flash disk.
As shown in figure 5, it specifically comprises the following steps:
Step 501, detect flash disk insertion after, state of a control suggestion device export flash disk be inserted into prompt information, will be excellent
Under disk carry to the file system media catalog of switch system, state of a control suggestion device exports flash disk carry prompt information.
Wherein, condition prompting device is the device for being prompted state of the switch system in configuration process.
Optionally, condition prompting device is light emitting diode (Light-Emitting Diode, LED) lamp.The output of condition prompting device
Prompt information be light information.State of the display pattern matching switch system of LED light in configuration process.LED light
Display pattern includes: bright light mode, flash pattern, mode of turning off the light.
Specifically, LED light is in mode of turning off the light after switch system starting.After detecting flash disk insertion, interchanger system
System control LED light enters bright light mode from the mode of turning off the light, to export flash disk insertion prompt information.User is according to the bright of LED light
Lamp mode, which determines, has flash disk to be inserted into switch system, and switch system starts the file system of flash disk carry to switch system
Under media catalog.Switch system controls LED light for after under the file system media catalog of flash disk carry to switch system
Enter flash pattern from bright light mode, to export flash disk carry prompt information.User determines according to the flash pattern of LED light and hands over
By under the file system media catalog of flash disk carry to switch system, switch system starts to carry out flash disk system of changing planes
Access and operation.
Step 502 generates current backup according to the current starting up's configuration file and current time stamp of switch system
Configuration file, and current backup configuration file is stored to flash disk.
Wherein, the current starting up's configuration file for obtaining switch system, according to current time stamp to switch system
Current starting up's configuration file re-start name, as current backup configuration file, then by current backup configure text
Part is stored to flash disk.For example, the entitled Startup_config of file of current starting up's configuration file.According to current time stamp
Current starting up's configuration file of switch system is renamed as Startup_config_xxx.Wherein, xxx is current
Timestamp.
Current starting up's configuration file of switch system is backed up as a result, and difference is matched by timestamp
The current backup configuration file generated during setting distinguishes.
Step 503 exports the system log of switch system to flash disk.
Wherein, system log is to record the information of hardware, software and system problem in switch system, while can also supervise
Depending on the event occurred in switch system.System log records each details of switch system operation, to interchanger system
The stable operation of system plays a crucial role.By checking the system log of switch system, user can find out in time
The reason of switch system breaks down.By exporting the system log of switch system to flash disk, realize to interchanger system
The backup of the system log of system.It should be noted that the system log backup in step 503 can be connect in flash disk with interchanger
During the entire process of continuously carry out, can also be executed after completing system configuration and before unloading flash disk.
Step 504 checks for file destination in file system media catalog.
Step 505, if there is file destination, then switch system is configured according to file destination.
Step 506, the output configuration of state of a control suggestion device complete information, and unload flash disk.
Wherein, after switch system configures switch system according to file destination, switch system control
Information is completed in the output configuration of condition prompting device, and unloads flash disk, so that user, which can complete information according to configuration, determines exchange
Machine system has configured completion.Switch system synchronizes pair when state of a control suggestion device exports configuration and completes information simultaneously
After file in flash disk is saved, flash disk is unloaded.Specifically, after the completion of switch system has configured, switch system
Control LED light enters mode of turning off the light from flash pattern, so that exporting configuration completes information.User is according to LED light from flash pattern
Determine that switch system has configured completion into the mode of turning off the light, flash disk has unloaded, and flash disk can be taken out.
A kind of interchanger method of automatic configuration provided in this embodiment, by by flash disk carry to file system media mesh
After record is lower, current backup configuration text is generated according to the current starting up's configuration file and current time stamp of switch system
Part stores current backup configuration file to flash disk, and the system log of switch system is exported to flash disk, realizes to exchange
Current starting up's configuration file of machine system and system log are backed up;Pass through switch system state of a control suggestion device
According to state output prompt information of the switch system in configuration process, realize that user can export according to condition prompting device
Prompt information in real time determine state of the switch system in configuration process.
Embodiment six
Fig. 6 is the flow chart of a kind of interchanger method of automatic configuration that the embodiment of the present invention six provides, more than the present embodiment
It states in embodiment and is embodied based on each optinal plan.As shown in fig. 6, it specifically comprises the following steps:
Step 10, switch system initializes.
Step 11, the creation automatic carry module of universal serial bus.After the completion of step 11 executes, step 13 is executed.
Wherein, the automatic carry module of universal serial bus is equivalent to the flash disk carry module 701 in following embodiments seven.
Step 12, creation universal serial bus automatically configure module.After the completion of step 12 executes, step 20 is executed.
Wherein, file checking module 702, the system that universal serial bus automatically configures that module is equivalent in following embodiments seven are matched
Set module 703, configuration file backup module and system log export module.Step 12 is synchronous with step 11 to be carried out.Interchanger system
Create 2 modules after system starting: the automatic carry module of universal serial bus and universal serial bus automatically configure module, 2 moulds
Block collocation swaps machine and automatically configures.Fig. 7 is a kind of configuration diagram for switch system that the embodiment of the present invention six provides.
As shown in fig. 7, in the application program of switch system certainly including the automatic carry module of universal serial bus and universal serial bus
Dynamic configuration module.
Step 13 checks whether flash disk is inserted into.If so, thening follow the steps 14;If it is not, then continuing to execute step 13.Wherein,
After switch system starting, user is ready for insertion into flash disk.
Step 14, LED light lamp are bright, automatic carry flash disk.
Wherein, after the automatic carry module starting of universal serial bus, when detecting that USB flash disk has existed, LED is lighted
Lamp, and flash disk is mounted to file system media catalog.
Step 15, notice universal serial bus carry event.
Wherein, the automatic carry module of universal serial bus notifies universal serial bus to automatically configure by call back function mode
Module universal serial bus carry event, so that universal serial bus automatically configures module and knows that flash disk loads successfully.
Step 16, waiting universal serial bus automatically configure module and configure into event, LED light lamp flashing control.
Whether step 17 automatically configures completion.If so, thening follow the steps 18;It does no, then continues to execute step 16.
Step 18, LED light lamp are turned off the light setting.
Step 19 after synchronizing and saving to the file in flash disk, unloads flash disk.After the completion of step 19 executes, process
Terminate.
Step 20 waits universal serial bus carry event.
Whether step 21, universal serial bus carry event obtain success.If so, thening follow the steps 22;If it is not, then continuing
Execute step 20.
Step 22 checks file system media catalog.
Wherein, universal serial bus automatically configures after module receives universal serial bus carry event, checks file system
Media catalog.
Step 23 detects whether that there are highest version system image files.If so, thening follow the steps 24;If it is not, then continuing to hold
Row step 25.
Step 24, automatic system upgrading.
Step 25 detects whether that there are highest version BootLoaders.If so, thening follow the steps 26;If it is not, then continuing to hold
Row step 27.
Step 26, the upgrading of automatic BootLoader.
Step 27, automated back-up starting up configuration file to flash disk.
Step 28, automatic backup system log to flash disk.
Step 29 detects whether that there are starting up's configuration files.If so, thening follow the steps 30;If it is not, then continuing to execute
Step 31.
Step 30 is automatically imported starting up's configuration file from flash disk to system.After the completion of step 30 executes, step is executed
31。
Step 31, the notice automatic carry module universal serial bus of universal serial bus automatically configure module and configure and succeed
Part.After the completion of step 30 executes, step 16 is executed.
Wherein, the execution sequence of step 23 in the present embodiment, step 25, step 27, step 28 and step 29 can basis
Business demand carries out multiple combinations.Execution sequence provided in this embodiment is only a kind of example.
Optionally, interchanger can be software defined network (Software Defined Network, SDN) interchanger.
The related data of the network protocol of SDN controller, active and standby, communication mode and working method is defined in SDN switch generally all
It is stored in the configuration file of interchanger.Provided interchanger method of automatic configuration can be convenient through the embodiment of the present invention
SDN switch completes configuration work relevant to SDN.
A kind of interchanger method of automatic configuration provided in this embodiment, creates general serial after starting by switch system
The automatic carry module of bus and universal serial bus automatically configure module, the automatic carry module of universal serial bus and general serial
Bus automatically configures module collocation and swaps machine and automatically configure, and user, which may be implemented, can use flash disk according to business demand
System upgrade, configuration backup, log export and the configuration file for swapping machine system update, more convenient, provide
User experience.
Embodiment seven
Fig. 8 is the structural block diagram that a kind of interchanger that the embodiment of the present invention seven provides automatically configures device.As shown in figure 8,
The device can be configured in core switch, comprising: flash disk carry module 701, file checking module 702 and system configuration mould
Block 703.
Wherein, flash disk carry module 701, for detect flash disk insertion after, by flash disk carry to switch system
Under file system media catalog;File checking module 702, for checking for target text in file system media catalog
Part;System configuration module 703, for if there is file destination, then being configured according to file destination to switch system.
A kind of interchanger provided in this embodiment automatically configures device, by the way that after detecting flash disk insertion, flash disk is hung
It is loaded under the file system media catalog of switch system;File destination is checked in file system media catalog;
If there is file destination, then switch system is configured according to file destination, solves the configuration process of the prior art
Complexity is not suitable for the problem of configuring in complicated conditions for equipment use to switch system, may be implemented in interchanger
When system is installed and used, it is only necessary to which a flash disk can configure switch system according to user demand, configuration process
It is more convenient.
Optionally, based on the above technical solution, file destination can be system upgrade image file;
System configuration module 703 may include:
First information recognition unit, the version of the system upgrade image file in file system media catalog is believed for identification
Breath;
First upgrade unit is handed over if the version for the system upgrade image file in file system media catalog is higher than
The version of the current system upgrade image file for system of changing planes, then according to the system upgrade mirror image text in file system media catalog
Part upgrades system partitioning.
Optionally, based on the above technical solution, file destination is BootLoader;
System configuration module 703 may include:
Second information identificating unit identifies the version information of the BootLoader in file system media catalog;
Second upgrade unit, if the version for the BootLoader in file system media catalog is higher than interchanger
The version for being currently up load module of system, then according to the BootLoader in file system media catalog to bootload
Program sectioning is upgraded.
Optionally, based on the above technical solution, file destination is starting up's configuration file;
System configuration module 703 may include:
File import unit, for starting up's configuration file in file system media catalog to be directed into interchanger system
System.
Optionally, based on the above technical solution, the device further include:
Configuration file backup module, for the current starting up's configuration file and current time stamp according to switch system
Current backup configuration file is generated, and current backup configuration file is stored to flash disk.
Optionally, based on the above technical solution, the device further include:
System log export module, for exporting the system log of switch system to flash disk.
Optionally, based on the above technical solution, flash disk carry module 701 can be with further include: insertion information alert
Unit is inserted into prompt information for state of a control suggestion device output flash disk;
Flash disk carry module 701 can be with further include: carry information alert unit exports excellent for state of a control suggestion device
Disk carry prompt information;
Flash disk carry module 701 can be with further include: completes information alert unit, matches for the output of state of a control suggestion device
It sets and completes information, and unload flash disk.
Interchanger provided by the embodiment of the present invention automatically configure device can be performed it is provided by any embodiment of the invention
Interchanger method of automatic configuration has the corresponding functional module of execution method and beneficial effect.
Embodiment eight
Fig. 9 is a kind of structural schematic diagram for interchanger that the embodiment of the present invention eight provides.Fig. 9, which is shown, to be suitable for being used to realizing
The block diagram of the exemplary switch 812 of embodiment of the present invention.The interchanger 812 that Fig. 9 is shown is only an example, should not be right
The function and use scope of the embodiment of the present invention bring any restrictions.
As shown in figure 9, interchanger 812 is showed in the form of universal computing device.The component of interchanger 812 may include but
Be not limited to: one or more processor or processing unit 816, system storage 828, connect different system components (including
System storage 828 and processing unit 816) bus 818.
Bus 818 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller,
Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts
For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC)
Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Interchanger 812 typically comprises a variety of computer system readable media.These media can be and any can be handed over
It changes planes the usable mediums of 812 access, including volatile and non-volatile media, moveable and immovable medium.
System storage 828 may include the computer system readable media of form of volatile memory, such as deposit at random
Access to memory (RAM) 830 and/or cache memory 832.Interchanger 812 may further include it is other it is removable/can not
Mobile, volatile/non-volatile computer system storage medium.Only as an example, storage system 834 can be used for reading and writing not
Movably, non-volatile magnetic media (Fig. 9 do not show, commonly referred to as " hard disk drive ").It, can be with although being not shown in Fig. 9
The disc driver for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") is provided, and non-volatile to moving
The CD drive of CD (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driving
Device can be connected by one or more data media interfaces with bus 818.Memory 828 may include at least one program
Product, the program product have one group of (for example, at least one) program module, these program modules are configured to perform the present invention
The function of each embodiment.
Program/utility 840 with one group of (at least one) program module 842, can store in such as memory
In 828, such program module 842 includes --- but being not limited to --- operating system, one or more application program, other
It may include the realization of network environment in program module and program data, each of these examples or certain combination.Journey
Sequence module 842 usually executes function and/or method in embodiment described in the invention.
Interchanger 812 can also be with one or more external equipments 814 (such as keyboard, sensing equipment, display 824 etc.)
Communication, can also be enabled a user to one or more equipment interact with the interchanger 812 communicate, and/or with make the friendship
Changing planes 812 can be with the one or more of the other any equipment (such as network interface card, modem etc.) that be communicated of calculating equipment
Communication.This communication can be carried out by input/output (I/O) interface 822.Also, interchanger 812 can also be suitable by network
Orchestration 820 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, such as because of spy
Net) communication.As shown, network adapter 820 is communicated by bus 818 with other modules of interchanger 812.It should be understood that
Although being not shown in Fig. 9, other hardware and/or software module can be used in conjunction with interchanger 812, including but not limited to: micro- generation
Code, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and data backup are deposited
Storage system etc..
Processing unit 816 by the program that is stored in system storage 828 of operation, thereby executing various function application with
And data processing, such as realize interchanger method of automatic configuration provided by the embodiment of the present invention.That is, detecting that flash disk is slotting
It, will be under the file system media catalog of flash disk carry to switch system after entering;It is checked whether in file system media catalog
There are file destinations;If there is file destination, then switch system is configured according to file destination.
Embodiment nine
The embodiment of the present invention nine additionally provides a kind of computer readable storage medium, is stored thereon with computer program, should
The interchanger method of automatic configuration as provided by the embodiment of the present invention is realized when program is executed by processor.This method specifically can be with
Include: detect flash disk insertion after, will be under the file system media catalog of flash disk carry to switch system;In file system
File destination is checked in media catalog;If there is file destination, then according to file destination to switch system into
Row configuration.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media
Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable
Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or
Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool
There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires
(ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-
ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage
Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device
Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited
In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof
Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++,
Ruby, Go further include conventional procedural programming language-such as " C " language or similar programming language.Program
Code can be executed fully on the user computer, partly be executed on the user computer, as an independent software
Packet executes, part executes on the remote computer or completely in remote computer or server on the user computer for part
Upper execution.In situations involving remote computers, remote computer can pass through the network of any kind --- including local
Net (LAN) or wide area network (WAN)-are connected to subscriber computer, or, it may be connected to outer computer (such as using because of spy
Service provider is netted to connect by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.
Claims (10)
1. a kind of interchanger method of automatic configuration characterized by comprising
It, will be under the file system media catalog of the flash disk carry to switch system after detecting flash disk insertion;
File destination is checked in the file system media catalog;
If there is the file destination, then the switch system is configured according to the file destination.
2. the method according to claim 1, wherein the file destination is system upgrade image file;
It is described if there is the file destination, then the switch system is configured according to the file destination, comprising:
Identify the version information of the system upgrade image file in the file system media catalog;
If the version of the system upgrade image file in the file system media catalog is higher than working as the switch system
The version of preceding system upgrade image file, then according to the system upgrade image file in the file system media catalog to system
Subregion is upgraded.
3. the method according to claim 1, wherein the file destination is BootLoader;
It is described if there is the file destination, then the switch system is configured according to the file destination, comprising:
Identify the version information of the BootLoader in the file system media catalog;
If the version of the BootLoader in the file system media catalog is higher than currently opening for the switch system
The version of dynamic load module, then according to the BootLoader in the file system media catalog to BootLoader subregion
Upgraded.
4. the method according to claim 1, wherein the file destination is starting up's configuration file;
It is described if there is the file destination, then the switch system is configured according to the file destination, comprising:
Starting up's configuration file in the file system media catalog is directed into the switch system.
5. the method according to claim 1, wherein will be under the flash disk carry to file system media catalog
Later, further includes:
Current backup configuration file is generated according to the current starting up's configuration file and current time stamp of switch system, and will
The current backup configuration file is stored to the flash disk.
6. the method according to claim 1, wherein will be under the flash disk carry to file system media catalog
Later, further includes:
The system log of the switch system is exported to the flash disk.
7. the method according to claim 1, wherein it is described detect flash disk insertion after, further includes: control
Condition prompting device exports flash disk and is inserted into prompt information;
It is described by under the file system media catalog of the flash disk carry to switch system after, further includes: described in control
Condition prompting device exports flash disk carry prompt information;
It is described the switch system is configured according to the file destination after, further includes: control the state and mention
Information is completed in showing device output configuration, and unloads the flash disk.
8. a kind of interchanger automatically configures device characterized by comprising
Flash disk carry module, for detect flash disk insertion after, by the file system of the flash disk carry to switch system
Under media catalog;
File checking module, for checking for file destination in the file system media catalog;
System configuration module is used for if there is the file destination, then according to the file destination to the switch system
It is configured.
9. a kind of interchanger, which is characterized in that the interchanger includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
The now interchanger method of automatic configuration as described in any in claim 1-7.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
The interchanger method of automatic configuration as described in any in claim 1-7 is realized when execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810968372.1A CN109245920B (en) | 2018-08-23 | 2018-08-23 | Automatic switch configuration method and device, switch and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810968372.1A CN109245920B (en) | 2018-08-23 | 2018-08-23 | Automatic switch configuration method and device, switch and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109245920A true CN109245920A (en) | 2019-01-18 |
CN109245920B CN109245920B (en) | 2021-09-17 |
Family
ID=65068904
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810968372.1A Active CN109245920B (en) | 2018-08-23 | 2018-08-23 | Automatic switch configuration method and device, switch and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109245920B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1620020A (en) * | 2003-11-20 | 2005-05-25 | 国际商业机器公司 | Automatic configuration of the network devices via connection to specific switch ports |
CN101226477A (en) * | 2007-01-16 | 2008-07-23 | 北京共创开源软件有限公司 | Method for implementing Linux operating system being suitable for mobile application |
CN103106091A (en) * | 2013-01-31 | 2013-05-15 | 深圳市开立科技有限公司 | Start-up system and method of operating system based on removable storage media |
CN103338127A (en) * | 2013-07-18 | 2013-10-02 | 上海大亚科技有限公司 | Method for realizing automatic configuration update of switch and system upgrade control |
CN106815098A (en) * | 2017-01-20 | 2017-06-09 | 杭州当虹科技有限公司 | Setting backup and the method and system for recovering based on linux system |
-
2018
- 2018-08-23 CN CN201810968372.1A patent/CN109245920B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1620020A (en) * | 2003-11-20 | 2005-05-25 | 国际商业机器公司 | Automatic configuration of the network devices via connection to specific switch ports |
CN101226477A (en) * | 2007-01-16 | 2008-07-23 | 北京共创开源软件有限公司 | Method for implementing Linux operating system being suitable for mobile application |
CN103106091A (en) * | 2013-01-31 | 2013-05-15 | 深圳市开立科技有限公司 | Start-up system and method of operating system based on removable storage media |
CN103338127A (en) * | 2013-07-18 | 2013-10-02 | 上海大亚科技有限公司 | Method for realizing automatic configuration update of switch and system upgrade control |
CN106815098A (en) * | 2017-01-20 | 2017-06-09 | 杭州当虹科技有限公司 | Setting backup and the method and system for recovering based on linux system |
Also Published As
Publication number | Publication date |
---|---|
CN109245920B (en) | 2021-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7313685B2 (en) | Unattended BIOS recovery | |
CN103150231B (en) | The method of computer booting and computer system | |
TWI225215B (en) | Method and system for maintaining firmware versions in a data processing system | |
US20060010278A1 (en) | System and method for managing bus numbering | |
CN1384931A (en) | Method, system and computer readable storage medium for automatic device driver | |
CN104834575A (en) | Firmware recovery method and device | |
CN105607972B (en) | A kind of method and device repaired extremely | |
CN110515641A (en) | The update method of server firmware, apparatus and system | |
CN102238093A (en) | Service interruption prevention method and device | |
US20190187977A1 (en) | Dual boot operating system installation using multiple redundant drives | |
CN107980119A (en) | A kind of server management method and server | |
CN109471606B (en) | Method for concurrently processing real-time recording of android platform | |
US20020091830A1 (en) | Distributed-processing system and command transfer method in the same | |
CN110262838A (en) | A kind of processing method of program crashing, device, terminal and storage medium | |
CN106126277A (en) | Multi-microprocessor and the upgrade method of external memory system | |
CN115357262A (en) | Method for upgrading driver firmware in batch | |
CN110399168A (en) | Majority according to disk storage server system start method, device and equipment | |
CN109491909A (en) | A kind of CPLD refreshes verification method, device, terminal and storage medium | |
CN102073523B (en) | Realize the method and device of software version synchronization | |
CN109144586A (en) | A kind of driving adaptation method, device, computer equipment and storage medium | |
CN112596371A (en) | Control card switching method and device, electronic equipment and storage medium | |
US8700832B1 (en) | Automated addition of file based hardware and file based access services in a data storage system | |
CN109245920A (en) | Interchanger method of automatic configuration, device, interchanger and storage medium | |
CN109032765A (en) | A kind of virtual machine two-node cluster hot backup dispositions method, device and equipment | |
CN109639704B (en) | A kind of master-slave mode server system application method, system, server and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |