File Manager
Overview
Configuration files define the Zyxel Device’s settings. Shell scripts are files of commands that you can store on the Zyxel Device and run when you need them. You can apply a configuration file or run a shell script without the Zyxel Device restarting. You can store multiple configuration files and shell script files on the Zyxel Device. You can edit configuration files or shell scripts in a text editor and upload them to the Zyxel Device. Configuration files use a .conf extension and shell scripts use a .zysh extension.
Configuration Files and Shell Scripts
When you apply a configuration file, the Zyxel Device uses the factory default settings for any features that the configuration file does not include. When you run a shell script, the Zyxel Device only applies the commands that it contains. Other settings do not change.
These files have the same syntax, which is also identical to the way you run CLI commands manually. An example is shown below.
Configuration File / Shell Script: Example
# enter configuration mode
configure terminal
# change administrator password
username admin password 4321 user-type admin
#configure default radio profile, change 2GHz channel to 11 & Tx output power # to 50%
wlan-radio-profile default
2g-channel 11
output-power 50%
exit
write
 
While configuration files and shell scripts have the same syntax, the Zyxel Device applies configuration files differently than it runs shell scripts. This is explained below.
Configuration Files and Shell Scripts in the Zyxel Device 
Configuration Files (.conf)
Shell Scripts (.zysh)
Resets to default configuration.
Goes into CLI Configuration mode.
Runs the commands in the configuration file.
Goes into CLI Privilege mode.
Runs the commands in the shell script.
Comments in Configuration Files or Shell Scripts
In a configuration file or shell script, use “#” or “!” as the first character of a command line to have the Zyxel Device treat the line as a comment.
Your configuration files or shell scripts can use “exit” or a command line consisting of a single “!” to have the Zyxel Device exit sub command mode.
Note: “exit” or “!'” must follow sub commands if it is to make the Zyxel Device exit sub command mode.
In the following example lines 1 and 2 are comments. Line 7 exits sub command mode.
! this is from Joe
# on 2010/12/05
wlan-ssid-profile default
ssid Joe-AP
qos wmm
security default
!
 
Errors in Configuration Files or Shell Scripts
When you apply a configuration file or run a shell script, the Zyxel Device processes the file line-by-line. The Zyxel Device checks the first line and applies the line if no errors are detected. Then it continues with the next line. If the Zyxel Device finds an error, it stops applying the configuration file or shell script and generates a log.
You can change the way a configuration file or shell script is applied. Include setenv stop-on-error off in the configuration file or shell script. The Zyxel Device ignores any errors in the configuration file or shell script and applies all of the valid commands. The Zyxel Device still generates a log for any errors.
Configuration File
Use the Configuration File screen to store, run, and name configuration files. You can also download configuration files from the Zyxel Device to your computer and upload configuration files from your computer to the Zyxel Device.
Once your Zyxel Device is configured and functioning properly, it is highly recommended that you back up your configuration file before making further configuration changes. The backup configuration file will be useful in case you need to return to your previous settings.
Configuration File Flow at Restart
If there is not a startup-config.conf when you restart the Zyxel Device (whether through a management interface or by physically turning the power off and back on), the Zyxel Device uses the system-default.conf configuration file with the Zyxel Device’s default settings.
If there is a startup-config.conf, the Zyxel Device checks it for errors and applies it. If there are no errors, the Zyxel Device uses it and copies it to the lastgood.conf configuration file as a back up file. If there is an error, the Zyxel Device generates a log and copies the startup-config.conf configuration file to the startup-config-bad.conf configuration file and tries the existing lastgood.conf configuration file. If there isn’t a lastgood.conf configuration file or it also has an error, the Zyxel Device applies the system-default.conf configuration file.
You can change the way the startup-config.conf file is applied. Include the setenv-startup stop-on-error off command. The Zyxel Device ignores any errors in the startup-config.conf file and applies all of the valid commands. The Zyxel Device still generates a log for any errors.
Do not turn off the Zyxel Device while configuration file upload is in progress.
Example of Configuration File Download Using FTP
Maintenance > File Manager > Configuration File 
Label
Description
Rename
Use this button to change the label of a configuration file on the Zyxel Device. You can only rename manually saved configuration files. You cannot rename the lastgood.conf, system-default.conf and startup-config.conf files.
You cannot rename a configuration file to the name of another configuration file in the Zyxel Device.
Click a configuration file’s row to select it and click Rename to open the Rename File screen.
Specify the new name for the configuration file. Use up to 25 characters (including a-zA-Z0-9;‘~!@#$%^&()_+[]{}’,.=-).
Click OK to save the duplicate or click Cancel to close the screen without saving a duplicate of the configuration file.
Remove
Click a configuration file’s row to select it and click Remove to delete it from the Zyxel Device. You can only delete manually saved configuration files. You cannot delete the system-default.conf, startup-config.conf and lastgood.conf files.
A pop-up window asks you to confirm that you want to delete the configuration file. Click OK to delete the configuration file or click Cancel to close the screen without deleting the configuration file.
Download
Click a configuration file’s row to select it and click Download to save the configuration to your computer.
Copy
Use this button to save a duplicate of a configuration file on the Zyxel Device.
Click a configuration file’s row to select it and click Copy to open the Copy File screen.
Specify a name for the duplicate configuration file. Use up to 25 characters (including a-zA-Z0-9;‘~!@#$%^&()_+[]{}’,.=-).
Click OK to save the duplicate or click Cancel to close the screen without saving a duplicate of the configuration file.
Apply
Use this button to have the Zyxel Device use a specific configuration file.
Click a configuration file’s row to select it and click Apply to have the Zyxel Device use that configuration file. The Zyxel Device does not have to restart in order to use a different configuration file, although you will need to wait for a few minutes while the system reconfigures.
The following screen gives you options for what the Zyxel Device is to do if it encounters an error in the configuration file.
Immediately stop applying the configuration file - this is not recommended because it would leave the rest of the configuration blank. If the interfaces were not configured before the first error, the console port may be the only way to access the Zyxel Device.
Immediately stop applying the configuration file and roll back to the previous configuration - this gets the Zyxel Device started with a fully valid configuration file as quickly as possible.
Ignore errors and finish applying the configuration file - this applies the valid parts of the configuration file and generates error logs for all of the configuration file’s errors. This lets the Zyxel Device apply most of your configuration and you can refer to the logs for what to fix.
Ignore errors and finish applying the configuration file and then roll back to the previous configuration - this applies the valid parts of the configuration file, generates error logs for all of the configuration file’s errors, and starts the Zyxel Device with a fully valid configuration file.
Click OK to have the Zyxel Device start applying the configuration file or click Cancel to close the screen.
#
This column displays the number for each configuration file entry. This field is a sequential value, and it is not associated with a specific address. The total number of configuration files that you can save depends on the sizes of the configuration files and the available flash storage space.
File Name
This column displays the label that identifies a configuration file.
You cannot delete the following configuration files or change their file names.
The system-default.conf file contains the Zyxel Device’s default settings. Select this file and click Apply to reset all of the Zyxel Device settings to the factory defaults. This configuration file is included when you upload a firmware package.
The startup-config.conf file is the configuration file that the Zyxel Device is currently using. If you make and save changes during your management session, the changes are applied to this configuration file. The Zyxel Device applies configuration changes made in the Web Configurator to the configuration file when you click Apply or OK. It applies configuration changes made via commands when you use the write command.
The lastgood.conf is the most recently used (valid) configuration file that was saved when the Zyxel Device last restarted. If you upload and apply a configuration file with an error, you can apply lastgood.conf to return to a valid configuration.
Size
This column displays the size (in KB) of a configuration file.
Last Modified
This column displays the date and time that the individual configuration files were last changed or saved.
Upload Configuration File
The bottom part of the screen allows you to upload a new or previously saved configuration file from your computer to your Zyxel Device.
You cannot upload a configuration file named system-default.conf or lastgood.conf.
If you upload startup-config.conf, it will replace the current configuration and immediately apply the new settings.
File Path
Type in the location of the file you want to upload in this field or click Browse... to find it.
Browse...
Click Browse... to find the .conf file you want to upload. The configuration file must use a “.conf” filename extension. You will receive an error message if you try to upload a fie of a different format. Remember that you must decompress compressed (.zip) files before you can upload them.
Upload
Click Upload to begin the upload process. This process may take up to two minutes.
The following example gets a configuration file named startup-config.conf from the Zyxel Device and saves it on the computer.
1 Connect your computer to the Zyxel Device.
2 The FTP server IP address of the Zyxel Device in standalone mode is 192.168.1.2, so set your computer to use a static IP address from 192.168.1.3 ~192.168.1.254.
3 Use an FTP client on your computer to connect to the Zyxel Device. For example, in the Windows command prompt, type ftp 192.168.1.2. Keep the console session connected in order to see when the firmware recovery finishes.
4 Enter your user name when prompted.
5 Enter your password as requested.
6 Use “cd” to change to the directory that contains the files you want to download.
7 Use “dir” or “ls” if you need to display a list of the files in the directory.
8 Use "get” to download files. Transfer the configuration file on the Zyxel Device to your computer. Type get followed by the name of the configuration file. This examples uses get startup-config.conf.
 
C:\>ftp 192.168.1.2
Connected to 192.168.1.2.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 5 allowed.
220-Local time is now 21:28. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 600 minutes of inactivity.
User (192.168.1.2:(none)): admin
331 User admin OK. Password required
Password:
230 OK. Current restricted directory is /
ftp> cd conf
250 OK. Current directory is /conf
ftp> ls
200 PORT command successful
150 Connecting to port 5001
lastgood.conf
startup-config.conf
system-default.conf
226 3 matches total
ftp: 57 bytes received in 0.33Seconds 0.17Kbytes/sec.
ftp> get startup-config.conf
200 PORT command successful
150 Connecting to port 5002
226-File successfully transferred
226 0.002 seconds (measured here), 1.66 Mbytes per second
ftp: 2928 bytes received in 0.02Seconds 183.00Kbytes/sec.
ftp>
9 Wait for the file transfer to complete.
10 Enter “quit” to exit the ftp prompt.
Firmware Package
Use the Firmware Package screen to check your current firmware version and upload firmware to the Zyxel Device.
Note: The Web Configurator is the recommended method for uploading firmware. You only need to use the command line interface if you need to recover the firmware. See the CLI Reference Guide for how to determine if you need to recover the firmware and how to recover it.
Find the firmware package at www.zyxel.com in a file that (usually) uses a .bin extension.
The firmware update can take up to five minutes. Do not turn off or reset the Zyxel Device while the firmware update is in progress!
After you see the Firmware Upload in Process screen, wait two minutes before logging into the Zyxel Device again.
Maintenance > File Manager > Firmware Package 
Label
Description
Boot Module
This is the version of the boot module that is currently on the Zyxel Device.
Current Version
This is the firmware version and the date created.
Released Date
This is the date that the version of the firmware was created.
File Path
Type in the location of the file you want to upload in this field or click Browse... to find it.
Browse...
Click Browse... to find the .bin file you want to upload. Remember that you must decompress compressed (.zip) files before you can upload them.
Upload
Click Upload to begin the upload process. This process may take up to two minutes.
Note: The Zyxel Device automatically reboots after a successful upload.
The Zyxel Device automatically restarts causing a temporary network disconnect.After five minutes, log in again and check your new firmware version in the Dashboard screen.
Example of Firmware Upload Using FTP
This procedure requires the Zyxel Device’s firmware. Download the firmware package from www.zyxel.com and unzip it. The firmware file uses a .bin extension, for example, "600ABFH0C0.bin". Do the following after you have obtained the firmware file.
1 Connect your computer to the Zyxel Device.
2 The FTP server IP address of the Zyxel Device in standalone mode is 192.168.1.2, so set your computer to use a static IP address from 192.168.1.3 ~192.168.1.254.
3 Use an FTP client on your computer to connect to the Zyxel Device. For example, in the Windows command prompt, type ftp 192.168.1.2. Keep the console session connected in order to see when the firmware recovery finishes.
4 Enter your user name when prompted.
5 Enter your password as requested.
6 Enter “hash” for FTP to print a `#' character for every 1024 bytes of data you upload so that you can watch the file transfer progress.
7 Enter “bin” to set the transfer mode to binary.
8 Transfer the firmware file from your computer to the Zyxel Device. Type put followed by the path and name of the firmware file. This examples uses put C:\ftproot\Zyxel Device_FW\600ABFH0C0.bin.
 
C:\>ftp 192.168.1.2
Connected to 192.168.1.2.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 5 allowed.
220-Local time is now 21:28. Server port: 21.
220-This is a private system - No anonymous login
220 You will be disconnected after 600 minutes of inactivity.
User (192.168.1.2:(none)): admin
331 User admin OK. Password required
Password:
230 OK. Current restricted directory is /
ftp> hash
Hash mark printing On ftp: (2048 bytes/hash mark) .
ftp> bin
200 TYPE is now 8-bit binary
ftp> put C:\ftproot\Zyxel Device_FW\600ABFH0C0.bin
Note: The Zyxel Device will not upgrade the firmware if the firmware file you upload is incompatible with the Zyxel Device.
9 Wait for the file transfer to complete.
10 Enter “quit” to exit the ftp prompt.
Shell Script
Use shell script files to have the Zyxel Device use commands that you specify. Use a text editor to create the shell script files. They must use a “.zysh” filename extension.
Use the Shell Script screen to store, name, download, upload and run shell script files. You can store multiple shell script files on the Zyxel Device at the same time.
Note: You should include write commands in your scripts. If you do not use the write command, the changes will be lost when the Zyxel Device restarts. You could use multiple write commands in a long script.
 
Maintenance > File Manager > Shell Script 
Label
Description
Rename
Use this button to change the label of a shell script file on the Zyxel Device.
You cannot rename a shell script to the name of another shell script in the Zyxel Device.
Click a shell script’s row to select it and click Rename to open the Rename File screen.
Specify the new name for the shell script file. Use up to 25 characters (including a-zA-Z0-9;‘~!@#$%^&()_+[]{}’,.=-).
Click OK to save the duplicate or click Cancel to close the screen without saving a duplicate of the configuration file.
Remove
Click a shell script file’s row to select it and click Delete to delete the shell script file from the Zyxel Device.
A pop-up window asks you to confirm that you want to delete the shell script file. Click OK to delete the shell script file or click Cancel to close the screen without deleting the shell script file.
Download
Click a shell script file’s row to select it and click Download to save the configuration to your computer.
Copy
Use this button to save a duplicate of a shell script file on the Zyxel Device.
Click a shell script file’s row to select it and click Copy to open the Copy File screen.
Specify a name for the duplicate file. Use up to 25 characters (including a-zA-Z0-9;‘~!@#$%^&()_+[]{}’,.=-).
Click OK to save the duplicate or click Cancel to close the screen without saving a duplicate of the configuration file.
Apply
Use this button to have the Zyxel Device use a specific shell script file.
Click a shell script file’s row to select it and click Apply to have the Zyxel Device use that shell script file. You may need to wait awhile for the Zyxel Device to finish applying the commands.
#
This column displays the number for each shell script file entry.
File Name
This column displays the label that identifies a shell script file.
Size
This column displays the size (in KB) of a shell script file.
Last Modified
This column displays the date and time that the individual shell script files were last changed or saved.
Upload Shell Script
The bottom part of the screen allows you to upload a new or previously saved shell script file from your computer to your Zyxel Device.
File Path
Type in the location of the file you want to upload in this field or click Browse... to find it.
Browse...
Click Browse... to find the .zysh file you want to upload.
Upload
Click Upload to begin the upload process. This process may take up to several minutes.