With WinAgents HyperConf you can edit device configuration file as a plain text. WinAgents HyperConf contains a specialized text editor (called the off-line configuration editor) which allows receiving files directly from devices, modifying them and uploading the updated files back to devices.
Before the off-line configuration editor can be used for a device in HyperConf, it should be enabled it the device registration settings (Figure 26).
Select the device in the Catalog of Devices, and on the Device menu click Properties;
Click to select the Download/upload configuration via option in the Device Properties window.
Select the protocol to use in the corresponding dropdown list.
If a terminal protocol such as TELNET or SSH is selected for configuration retrieval, then you need to configure the logon parameters to access the device command line interface. Click Logon in the tree on the left to switch to the Logon tab. Enter username, password and privileged password and select the logon method that HyperConf will use. You can also select a connection profile and use its settings instead of the individual set of credentials. Refer to the Logon section for additional details.
If SNMP is selected for configuration retrieval, then you need to configure SNMP-specific options, such as protocol version, security, authentication and privacy settings. Click SNMP in the tree on the left to switch to the SNMP tab. Select the protocol version, and specify the appropriate security settings. Refer to the SNMP section for additional details.
44
WinAgents HyperConf User’s GuideFigure 26. Setting the device properties to download configuration files
Downloading Configuration Files from Device
To download a configuration file from the device, expand the device node in the Catalog of Devices and double-click one of the device configuration nodes. Depending on the vendor and model specified for the device registration, HyperConf places different nodes representing configurations under the device node in the Catalog of Devices. For instance, for devices running Cisco IOS you will see Running
Configuration and Startup Configuration and for devices running Cisco CatOS – Full Configuration and Non-default Configuration.
When you double-click the configuration node, HyperConf connects to the device using the protocol selected for downloading and uploading configurations, and issues a series of commands to copy the configuration file from the device to the built-in TFTP server. The entire process is reflected in the Operation Log which is displayed in the bottom of the editor window (Figure 27).
45
WinAgents HyperConf User’s GuideFigure 27. Downloading configuration from the device
Editing Device Configurations
After the configuration file is downloaded, it is opened in the text editor. The off-line configuration editor supports all standard editing functions such as clipboard cut/copy/paste operations, undo/redo, find/replace, and setting and jumping to bookmarks, as well as extended functions simplifying editing the configuration files such as syntax highlighting. You can access edit commands on the Edit menu.
Attention! Whenever editing a configuration file you have to keep in mind that when the configuration file is uploaded to a Cisco device, it is merged with the current configuration. Thus, to delete a command from the configuration file, you need to enter a no prefix before the command in the editor window.
Consider the following example. The device configuration contains the command logging 192.168.0.5
To delete this command from the configuration file prefix it with no instead of erasing the command text
no logging 192.168.0.5
After the modified configuration is uploaded to the device, the device will remove this command from the current configuration file.
46
WinAgents HyperConf User’s GuideTo modify an access control list, insert a command to delete the existing list before the commands representing access list rules. Otherwise, if you miss the delete command, the commands in the file you edit will be appended to the end of the already existing ACL on the device instead of replacing it.
For example, the device configuration contains the following ACL:
access-list 101 permit tcp any any access-list 101 deny ip any any And you need to insert the command
access-list 101 permit icmp any any
in the middle of the list. To do this, modify the ACL commands in the following way:
no access-list 101
access-list 101 permit tcp any any access-list 101 permit icmp any any access-list 101 deny ip any any
Thus, when the configuration is uploaded, the device will delete the existing ACL and recreates it using the new rules. The resulting ACL will be as follows:
access-list 101 permit tcp any any access-list 101 permit icmp any any access-list 101 deny ip any any
Using the off-line editor you can save configuration files to files and upload them to one or multiple devices. Refer to the Uploading Configuration Files to Device for additional details.
Bookmarks
While editing a large configuration file it is common to scroll the configuration and move the caret from one command to another and back very often. This operation makes the editing process less efficient because of time lost for navigation. The off-line configuration editor introduces bookmarks to help you with navigation while editing configuration files. You can mark lines of the configuration file and then jump to them very quickly.
To set a bookmark:
Place the caret on the line to set bookmark to;
On the Edit menu, point to Toggle Bookmark, and then click one of Bookmark 0, …, Bookmark 9. You bookmark up to 10 different lines.
Please note if you click the bookmark command for the bookmark which is already set, and the line where the caret is contains no bookmark, the bookmark will be moved.
To delete the bookmark:
Place the caret on the line where the bookmark is set. The bookmark is displayed as a gray rectangle with the number in the gutter area of the editor which is on the left of it;
On the Edit menu, point to Toggle Bookmark, and then click Bookmark N, where N is the number of the bookmark.
47
WinAgents HyperConf User’s GuideTo jump to the bookmark, on the Edit menu, point to Go to Bookmark, and then click Bookmark N, where N is the number of the bookmark. The editor will be scrolled to show the line where the bookmark is, and the caret will be placed to it.
Uploading Configuration Files to Devices
To upload the configuration file in the off-line configuration editor to the device, click Upload Configuration to Device on the Configuration menu. After you click Upload Configuration to Device HyperConf shows the Select Destinations window, where you can select one or multiple device to upload the configuration file to, and specify the protocol and upload method to use for upload. Different types of devices support different sets of protocols and upload methods (Figure 28).
Figure 28. Upload Configuration to Devices
Click Select Devices to select devices to which configuration should be uploaded.
While uploading the configuration file, HyperConf puts it to the built-in TFTP server, connects to the device using the protocol selected in the Select Destinations window, and issues a series of commands to copy the configuration file from the built-in TFTP server to the device. The copy process is reflected in the Operation Log which is displayed in the bottom of the editor window.
Depending on the upload method select in the Select Destinations window for the device, the
configuration file can be copied or merged with the configuration of the target device. This may result that the configuration file in the editor window and the configuration file on the device are different. To synchronize them, HyperConf will offer to re-download the configuration file from the device after the upload operation is successfully completed.