Claims
- 1. A method of rolling back a current running configuration of a router having a command line interface to a selected prior running configuration of said router without requiring interruption or reinitialization of said router or of its network connections, said method comprising the steps of:
retrieving first control settings of said router associated with said selected prior running configuration; retrieving second control settings of said router associated with said current running configuration; generating a rollback script based on a difference between said first control settings and said second control settings; and executing said rollback script.
- 2. The method of claim 1 wherein said first control settings comprise at least one first text line of configuration commands at said command line interface and wherein said second control settings comprise at least one second text line of configuration commands at said command line interface.
- 3. The method of claim 2 wherein said at least one first text line of configuration commands comprises at least one first level-specific configuration command and at least one first level-command, such that said at least one first level-specific configuration command is accessed from a first configuration level, said first configuration level being entered by execution of one of said at least one first level-commands.
- 4. The method of claim 3 wherein said at least one second text line of configuration commands comprises at least one second level-specific configuration command and at least one second level-command, such that said at least one second level-specific configuration command is accessed from a second configuration level, said second configuration level being entered by execution of one of said at least one second level-commands.
- 5. The method of claim 4 wherein said step of generating further comprises the steps of:
transforming said first control settings, such that each of said at least one first text lines of configuration commands is rewritten into a format wherein each of said first level-specific configuration commands is prepended in the same line of text with a delimiter, which is prepended in the same line of text with said first level-command for entering said first configuration level from which said first level-specific configuration command is accessed, wherein each said first text line comprising a configuration command without a level-command is prepended in said first text line with said delimiter, which is prepended with a base-command-level command; transforming said second control settings, such that each of said at least one second text lines of configuration commands is rewritten into a format wherein each of said second level-specific configuration commands is prepended in the same line of text with a delimiter, which is prepended in the same line of text with said second level-command for entering said second configuration level from which said second level-specific configuration command is accessed, wherein each said second text line comprising a configuration command without a level-command is prepended in said second text line with said delimiter, which is prepended with a base-command-level command; storing in sequence in a first file any of said lines of text that are present in said transformed first control settings but are not present in said transformed second control settings; storing in sequence in a second file any of said lines of text that are present in said transformed second control settings but are not present in said transformed first control settings; discarding any of said lines of text that are present in both said transformed first control settings and said transformed second control settings; in all of said lines of text in said second file, converting any positive configuration commands into negative configuration commands and converting any negative configuration commands into positive configuration commands, reversing the sequence of all of said lines of text in said second file, appending all of said lines of text in said first file in sequence to said reversed sequence lines of text in said second file, and transforming the result of said appending into the original format of said control settings.
- 6. The method of claim 1 implemented in a medium selected from the group consisting of hardware and software.
- 7. The method of claim 6 wherein said software comprises p2d routing software.
- 8. The method of claim 6 wherein said method utilizes a parser.
- 9. The method of claim 8 wherein said parser is a command-line parser based on Multithreaded Routing Toolkit (MRT) software.
- 10. The method of claim 7 wherein said software implementation includes:
a) a command that provides an ability to display to a user CLI commands that would be executed as a result of a rollback operation; b) commands that provide an ability to force an automatic router configuration rollback after a specified time interval, unless said user enters a command to stop said automatic rollback; and c) commands that provide said user an ability to create, delete or display saved rollback configuration files.
- 11. A network including a router, said router operable to roll back a current running configuration to a selected prior running configuration of said router without requiring interruption or reinitialization of said router or of said router's network connections, said router comprising:
a data plane including data interfaces; a control plane comprising a command line interface; and connections to peer network routers, said connections coupled with said data interfaces.
- 12. The network of claim 11 wherein said router is operable to:
retrieve first control settings of said router associated with said selected prior running configuration; retrieve second control settings of said router associated with said current running configuration; generate a rollback script based on a difference between said first control settings and said second control settings; and execute said rollback script.
- 13. The network of claim 12 wherein said router includes a processor operable to run routing software.
- 14. The network of claim 13 wherein said routing software comprises p2d routing software.
- 15. The network of claim 14 wherein said software implementation includes:
a) a command that provides an ability to display to a user CLI commands that would be executed as a result of a rollback operation; b) commands that provide an ability to force an automatic router configuration rollback after a specified time interval, unless said user enters a command to stop said automatic rollback; and c) commands that provide said user an ability to create, delete or display saved rollback configuration files.
- 16. The network of claim 12 wherein said router includes a parser.
- 17. The network of claim 16 wherein said parser is a command-line parser based on Multithreaded Routing Toolkit (MRT) software.
- 18. The network of claim 12 wherein said first control settings comprise at least one first text line of configuration commands at said command line interface and wherein said second control settings comprise at least one second text line of configuration commands at said command line interface.
- 19. The network of claim 18 wherein:
said at least one first text line of configuration commands comprises at least one first level-specific configuration command and at least one first level-command, such that said at least one first level-specific configuration command is accessed from a first configuration level, said first configuration level being entered by execution of one of said at least one first level-commands; and said at least one second text line of configuration commands comprises at least one second level-specific configuration command and at least one second level-command, such that said at least one second level-specific configuration command is accessed from a second configuration level, said second configuration level being entered by execution of one of said at least one second level-commands.
- 20. The network of claim 19 wherein said router is operable to:
transform said first control settings, such that each of said at least one first text lines of configuration commands is rewritten into a format wherein each of said first level-specific configuration commands is prepended in the same line of text with a delimiter, which is prepended in the same line of text with said first level-command for entering said first configuration level from which said first level-specific configuration command is accessed, wherein each said first text line comprising a configuration command without a level-command is prepended in said first text line with said delimiter, which is prepended with a base-command-level command; transform said second control settings, such that each of said at least one second text lines of configuration commands is rewritten into a format wherein each of said second level-specific configuration commands is prepended in the same line of text with a delimiter, which is prepended in the same line of text with said second level-command for entering said second configuration level from which said second level-specific configuration command is accessed, wherein each said second text line comprising a configuration command without a level-command is prepended in said second text line with said delimiter, which is prepended with a base-command-level command; store in sequence in a first file any of said lines of text that are present in said transformed first control settings but are not present in said transformed second control settings; store in sequence in a second file any of said lines of text that are present in said transformed second control settings but are not present in said transformed first control settings; discard any of said lines of text that are present in both said transformed first control settings and said transformed second control settings; and in all of said lines of text in said second file, convert any positive configuration commands into negative configuration commands and convert any negative configuration commands into positive configuration commands, reverse the sequence of all of said lines of text in said second file, append all of said lines of text in said first file in sequence to said reversed sequence lines of text in said second file, and transform the result of said appending into the original format of said control settings.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] The present application is related to co-pending and commonly assigned U.S. application Ser. No. 09/703,057, entitled “SYSTEM AND METHOD FOR IP ROUTER WITH AN OPTICAL CORE,” filed Oct. 31, 2000; and to co-pending and commonly assigned U.S. application Ser. No. 09/852,223, entitled “SYSTEM AND METHOD FOR TCP CONNECTION PROTECTION SWITCHING,” filed May 9, 2001; the disclosures of which are hereby incorporated herein by reference.