Configurations EcoNAT Documentation / Configurations
- Configuration tree
- Viewing configuration
- Saving and applying configuration
- Loading configuration
- Copying configuration
- Delete configuration
- Save startup configuration
Configuration tree
EcoNAT uses the configuration tree to store the settings. The tree structure is shown at the figure below.
Name of branch | Description |
---|---|
system | System settings container |
interfaces | Enable/disable of network interfaces |
loopback | IP- and MAC-addresses that are used to generate errors |
mng_if | Network management interface settings |
bypass | Settings of interfaces connected to EcoBypass |
ntp | NTP settings |
tacacs | TACACS settings |
snmp | SNMP settings |
serial | Serial port settings |
terminal | Terminal settings |
nat_defaults | NAT settings by default (general settings for all pools, including the parameters used when creating new pools) |
clickstream | Collection settings for passing GET requests |
connection_log | Allocation of addresses logging settings |
system_log | System logging settings |
bras | BRAS settings |
dpi | URL filtering settings (DPI) |
users | User information |
pools | Contains the pools created by the user |
acls | Contains the ACL (Access Control List), created by the user |
Changing the configuration is only possible in the configuration mode (see paragraph Log on).
The actual change of the system settings only occurs after successful completion apply command, finalizing the editing of the configuration by administrator. Apply command can only be executed in the configuration mode. Directly when you are exiting the configuration mode you will also be prompted to apply the changes.
Upon successful completion of the apply command the console displays a confirmation of configuration changes applied.
EcoNAT:37:# apply
FIRST TIME CONFIGURATION APPLY
RECONFIG FUNCTION PROCESSING
EconatEngineReconfig output success
APPLY SUCCESS
Save applied configuration into profile ‘lastapply’
EcoNAT:38:#
Navigating through the configuration tree is possible both in operational and in configuration mode. After logon, you are placed in the root of the configuration tree by default. At the command prompt is displayed in which branch of the tree you're currently on when you are navigating the tree. The path is displayed in the front of the invitation symbol, the names of branches are displayed hierarchically, starting from the parent and separated by '.'.
You may use at any time the root command or the symbol '/' to return to the root of the configuration tree.
You may use the commands exit or up, or characters ‘..’ to switch the current level of the configuration tree.
EXAMPLE:
EcoNAT:1:# system
EcoNAT:2:system# mng_if
EcoNAT:3:system.mng_if# exit
EcoNAT:4:system# serial
EcoNAT:5:system.serial# root
EcoNAT:6:#
The example of route through the configuration tree is shown at the figure below.
To go directly to a specific sub-directory of the configuration (tree branch), you have to specify the path using a space as a separator.
For quick navigation through the first level subdirectories of system directory, you may use the command goto <branch name>. For example, goto serial command sets the configuration directory in the system serial.
Similarly, for quick access to the branch NAT pools, use the command goto <pool name> (for details of the pools naming rules, see paragraph "Pools and ACL"). Also, for quick access to the one of the ACL’s branches, use the command goto <ACL name > command (for more information about ACL naming rules, see paragraph "Pools and ACL").
EXAMPLE:
EcoNAT:1:# goto acla
EcoNAT:2:acls.acla# show
acla {
10 permit ip src host 10.0.0.1 dst any
}
EcoNAT:3:acls.acla#
Use the ls or show command to view the configuration, from the current level and deeper.
To view the branches that are available on the current level of the configuration tree, use the short command ‘!’.
EcoNAT:1:system.dpi> !
enable
functionality_mode normal_nat
certificate_file "cert.pem"
redirect_interval 600
redirect_interval_url 2592000
dpilist0 {} # inload namespace (not show)
dpilist1 {} # inload namespace (not show)
dpilist2 {} # inload namespace (not show)
dpilist3 {} # inload namespace (not show)
dpilist4 {} # inload namespace (not show)
dpilist5 {} # inload namespace (not show)
dpilist6 {} # inload namespace (not show)
dpilist7 {} # inload namespace (not show)
dpilist8 {} # inload namespace (not show)
dpilist9 {} # inload namespace (not show)
dpilist10 {} # inload namespace (not show)
dpilist11 {} # inload namespace (not show)
dpilist12 {} # inload namespace (not show)
dpilist13 {} # inload namespace (not show)
dpilist14 {} # inload namespace (not show)
dpilist15 {} # inload namespace (not show)
dpilist16 {} # inload namespace (not show)
Commands for view and managing of the configuration are described in the section "Configuration management".
The predefined configuration names:
- startup – configuration is automatically used after a reboot;
- effective – the current configuration (last applied on the device). To load in the current console use command load effective,
- lastapply – last applied configuration on the device,
- factory – the factory configuration (cannot be changed).
Viewing configuration
To view the list of saved configurations use command dir.
MyEcoNAT:1:# dir
config1
config2
lastapply
startup
MyEcoNAT:2:acls.acla# show config file config1
# config1.econat.profile – Econat Profile Script
# saved 09-Feb-2016 12^47^43 UTC, on host MyEcoNAT by user ‘admin’
root
droppools
dropacls
…
To view the one of saved configurations, use command show config file <configuration name>.
To view the current configuration that had been previously applied, use the command show config effective in any mode.
To view the current configuration that would applied after restart, use the command show config startup in any mode.
Saving and applying configuration
When one make changes to the configuration, only the local configuration that is associated with the current console instance is changed. Thus, at the end of the session, all configuration changes will be lost if they have not been applied or saved.
To save the current edition of the configuration to a local file, use the save <configuration name> command.
It is also possible to save configuration data to a file on TFTP or FTP server. The command syntax is as follows:
save tftp://<IP address>:<port>/<filename>
save ftp://<IP address>:<port>/<filename>
The save command is not applicable to factory and effective configurations.
The apply command is used to apply configuration changes.
When attempting to apply changes in any configuration branch which is set to "disable" or in its descendant branches, the following message is displayed: «NO NEED FOR APPLY: CONFIGURATION IS THE SAME», which means that there are no changes that could be applied. The exceptions are verbose and shortlist branches.
The verbose branch is used to set logging verbosity for a particular subsystem (see section Logging). These logs are duplicated locally. Any changes made in this branch can be applied even if its ancestor branch system_log is set to "disable".
The shortlist branch contains server_ip_and_port parameter, which stores the address of the log server for URL filtering subsystem (see section Shortlist configuration). Changes of this parameter can be applied even if the shortlist branch is set to "disable" (provided that its ancestor branch dpi is enabled).
Loading configuration
To load a configuration from a local file, use the command load <configuration filename>.
ATTENTION! While editing the configuration, the other user may apply other settings from another terminal. To load the currently active configuration to edit, enter the command load effective in configuration mode.
It is also possible to load configuration data from a file stored on an FTP, TFTP or HTTP server. The command syntax is as follows:
load tftp://<IP address>:<port>/<filename>
load ftp://<IP address>:<port>/<filename>
load http://<IP address>:<port>/<filename>
Copying configuration
The command for copying configuration data from one file to another has the following syntax:
copy <source> <destination>
Below are examples of command syntax for all possible cases of configuration copying:
- from one local file to another local file:
copy <source filename> <destination filename>
MyEcoNAT:1:# dir
config1
config2
lastapply
startup
MyEcoNAT:2:# copy config2 config3
MyEcoNAT:3:# dir
config1
config2
config3
lastapply
startup
from local file to TFTP, FTP or HTTP server:
copy <local filename> tftp://<IP address>:<port>/<destination filename>
copy <local filename> ftp://<IP address>:<port>/<destination filename>
copy <local filename> http://<IP address>:<port>/<destination filename>
from TFTP, FTP or HTTP server to local file:
copy tftp://<IP address>:<port>/<source filename> <local filename>
copy ftp://<IP address>:<port>/<source filename> <local filename>
copy http://<IP address>:<port>/<source filename> <local filename>
The copy command is not applicable to factory and effective configurations.
Delete configuration
To remove the configuration, you have to call the command: erase <configuration name>. Erase command does not apply to factory and effective configurations.
MyEcoNAT:1:# dir
config1
config2
config3
config4
lastapply
startup
MyEcoNAT:2:# erase config4
MyEcoNAT:3:# dir
config1
config2
config3
lastapply
startup
Also there is clear config command. By this command one can clean (set to zero) edited configuration without deleting it. So all pools and ACLs will be deleted, all interfaces configurations will be set to zero, all users will be deleted and so on.
Save startup configuration
To set the current effective configuration as starting use the command write. To set the current editable configuration as starting use command save startup in the configuration mode, however, it is not recommended.
IMPORTANT: after you run the command write, when you restart the system will be loaded the active configuration at the time of starting the write command, or configuration saved with the command save startup if it was done later. This is the configuration for which last apply was implemented, even if it was not done in the current terminal console and by another user!
To avoid conflicts it is recommended that only the one person have the ability to edit the configuration of EcoNAT. Also it is recommended to exit the configuration mode immediately after changing the configuration so that automatically log into the latest version of the configuration at the next startup.