IMPORTANT!
READ CAREFULLY BEFORE USE.
KEEP THIS GUIDE FOR FUTURE REFERENCE.
This is a Reference Guide for a series of products intended for people who want to configure the NXC
via Command Line Interface (CLI).
Note: Some commands or command options in this guide may not be available in your
product. See your product's User’s Guide for a list of supported features. Every effort has
been made to ensure that the information in this guide is accurate.
Note: The version number on the cover page refers to the latest firmware version supported
by the NXC. This guide applies to versions 4.20, 4.21, 4.22, 4.30, 5.00, 5.10, 5.20, 5.30, 5.40,
and 6.00 at the time of writing.
How To Use This Guide
1Read Chapter 1 on page 14 for how to access and use the CLI (Command Line Interface).
2Read Chapter 2 on page 28 to learn about the CLI user and privilege modes.
Do not use commands not documented in this guide.
Related Documentation
•Quick Start Guide
The Quick Start Guide shows how to connect the NXC and access the Web Configurator.
• User’s Guide
The User’s Guide explains how to use the Web Configurator to configure the NXC.
Note: It is recommended you use the Web Configurator to configure the NXC.
Icons Used in Figures
Figures in this guide may use the following generic icons. The NXC icon is not an exact representation of
your device.
Status ......................................................................... ............................................................................. 33
AP Management .................................................................................................................................. 69
AP Group ............................................................................................................................................... 80
Wireless LAN Profiles .............................................................................................................................. 87
Rogue AP ............................................................................................................................................. 108
Bluetooth ............................................................................................................................................. 112
Zones ......................................................................... ........................................................................... 125
AAA Server .......................................................................................................................................... 166
System ................................................................ .................................................................................. 183
System Remote Management .......................................................................................................... 190
1.9 Logging Out .................................................................................................................................... 27
Chapter 2
User and Privilege Modes .................................................................................................................28
2.1 User And Privilege Modes .............................................................................................................. 28
7.4.1 Static Route Commands Example ...................................................................................... 67
7.5 Learned Routing Information Commands .................................................................................. 68
7.5.1 show ip route Command Example ..................................................................................... 68
Chapter 8
AP Management................................................................................................................................69
8.1 AP Management Overview .......................................................................................................... 69
8.2 AP Management Commands ...................................................................................................... 70
8.2.1 AP Management Commands Example ............................................................................. 75
Chapter 9
AP Group ............................................................................................................................................80
42.3.1 CAPWAP Client Commands Example ............................................................................ 253
42.4 DNS Server Commands .............................................................................................................. 255
42.4.1 DNS Server Commands Example .................................................................................... 255
42.4.2 DNS Server Commands and DHCP ..................................................................... ............ 255
List of Commands ............................................................................................................................257
NXC CLI Reference Guide
13
Command Line Interface
This chapter describes how to access and use the CLI (Command Line Interface).
1.1 Overview
If you have problems with your NXC, customer support may request that you issue some of these
commands to assist them in troubleshooting.
Use of undocumented commands or misconfiguration can damage the
NXC and possibly render it unusable.
1.1.1 The Configuration File
CHAPTER 1
When you configure the NXC using either the CLI (Command Line Interface) or the web configurator,
the settings are saved as a series of commands in a configuration file on the NXC. You can store more
than one configuration file on the NXC. However, only one configuration file is used at a time.
You can perform the following with a configuration file:
• Back up NXC configuration once the NXC is set up to work in your network.
• Restore NXC configuration.
• Save and edit a configuration file and upload it to multiple NXCs in your network to have the same
settings.
Note: You may also edit a configuration file using a text editor.
1.2 Accessing the CLI
You can access the CLI using a terminal emulation program on a computer connected to the console
port, from the web configurator or access the NXC using Telnet or SSH (Secure SHell).
Note: The NXC might force you to log out of your session if reauthentication time, lease time,
or idle timeout is reached. See Chapter 23 on page 149 for more information about
these settings.
NXC CLI Reference Guide
14
1.2.1 Console Port
The default settings for the console port are as follows.
Table 1 Managing the NXC: Console Port
SETTINGVALUE
Speed115200 bps
Data Bits8
ParityNone
Stop Bit1
Flow ControlOff
When you turn on your NXC, it performs several internal tests as well as line initialization. You can view
the initialization information using the console port.
• Garbled text displays if your terminal emulation program’s speed is set lower than the NXC’s.
• No text displays if the speed is set higher than the NXC’s.
• If changing your terminal emulation program’s speed does not get anything to display, restart the
NXC.
• If restarting the NXC does not get anything to display, contact your local customer support.
After the initialization, the login screen displays.
Figure 2 Login Screen
Welcome to NXC
Username:
Enter the user name and password at the prompts.
Note: The default login username is admin and password is 1234. The username and password
are case-sensitive.
1.2.2 Web Configurator Console
The Console allows you to use CLI commands from directly within the Web Configurator rather than
having to use a separate terminal program. In addition to logging in directly to the NXC’s CLI, you can
also log into other devices on the network through this Console. It uses SSH to establish a connection.
NXC CLI Reference Guide
15
Chapter 1 Command Line Interface
Note: To view the functions in the Web Configurator user interface that correspond directly to
specific NXC CLI commands, use the CLI Messages window (described in the User’s
Guide) in tandem with this one.
Figure 3 Console
The following table describes the elements in this screen.
Table 2 Console
LABELDESCRIPTION
Command Line
Enter commands for the device that you are currently logged into here. If you are logged into
the NXC, see the CLI Reference Guide for details on using the command line to configure it.
Device IP Address
This is the IP address of the device that you are currently logged into.
Logged-In User
This displays the username of the account currently logged into the NXC through the Console
Window.
You can log into the Web Configurator with a different account than used to log into the NXC
through the Console.
NXC CLI Reference Guide
16
Chapter 1 Command Line Interface
Table 2 Console (continued)
LABELDESCRIPTION
Connection
Status
This displays the connection status of the account currently logged in.
If you are logged in and connected, then this displays ‘Connected’.
If you lose the connection, get disconnected, or logout, then this displays ‘Not Connected’.
Tx/RX Activity
Monitor
This displays the current upload / download activity. The faster and more frequently an LED
flashes, the faster the data connection.
Before you use the Console, ensure that:
• Your web browser of choice allows pop-up windows from the IP address assigned to your NXC.
• Your web browser allows Java programs.
• You are using the latest version of the Java program (http://www.java.com).
To login in through the Console:
1Click the Console button on the Web Configurator title bar.
2Enter the IP address of the NXC and click OK.
NXC CLI Reference Guide
17
Chapter 1 Command Line Interface
3Next, enter the user name of the account being used to log into your target device and then click OK.
4You may be prompted to authenticate your account password, depending on the type of device that
you are logging into. Enter the password and click OK.
5If your login is successful, the command line appears and the status bar at the bottom of the Console
updates to reflect your connection state.
1.2.3 Telnet
Use the following steps to Telnet into your NXC.
NXC CLI Reference Guide
18
Chapter 1 Command Line Interface
1If your computer is connected to the NXC over the Internet, skip to the next step. Make sure your
computer IP address and the NXC IP address are on the same subnet.
2In Windows, click Start (usually in the bottom left corner) and Run. Then type
address. For example, enter
3Click OK. A login screen displays. Enter the user name and password at the prompts.
Note: The default login username is admin and password is 1234. The username and password
are case-sensitive.
1.2.4 SSH (Secure SHell)
You can use an SSH client program to access the CLI. The following figure shows an example using a
text-based SSH client program. Refer to the documentation that comes with your SSH program for
information on using it.
Note: The default login username is admin and password is 1234. The username and password
are case-sensitive.
Figure 4 SSH Login Example
C:\>ssh2 admin@192.168.1.1
Host key not found from database.
Key fingerprint:
xolor-takel-fipef-zevit-visom-gydog-vetan-bisol-lysob-cuvun-muxex
You can get a public key's fingerprint by running
% ssh-keygen -F publickey.pub
on the keyfile.
Are you sure you want to continue connecting (yes/no)? yes
telnet and the NXC’s IP
telnet 192.168.1.1 (the default management IP address).
Host key saved to C:/Documents and Settings/user/Application Data/SSH/
hostkeys/
ey_22_192.168.1.1.pub
host key for 192.168.1.1, accepted by user Tue Aug 09 2005 07:38:28
admin's password:
Authentication successful.
1.3 How to Find Commands in this Guide
You can simply look for the feature chapter to find commands. In addition, you can use the List of
Commands at the end of the guide. This section lists the commands in alphabetical order that they
appear in this guide.
If you are looking at the CLI Reference Guide electronically, you might have additional options (for
example, bookmarks or Find...) as well.
NXC CLI Reference Guide
19
Chapter 1 Command Line Interface
1.4 How Commands Are Explained
Each chapter explains the commands for one keyword. The chapters are divided into the following
sections.
1.4.1 Background Information
Note: See the User’s Guide for background information about most features.
This section provides background information about features that you cannot configure in the web
configurator. In addition, this section identifies related commands in other chapters.
1.4.2 Command Input Values
This section lists common input values for the commands for the feature in one or more tables
1.4.3 Command Summary
This section lists the commands for the feature in one or more tables.
1.4.4 Command Examples
This section contains any examples for the commands in this feature.
1.4.5 Command Syntax
The following conventions are used in this guide.
• A command or keyword in courier new must be entered literally as shown. Do not abbreviate.
• Values that you need to provide are in italics.
• Required fields that have multiple choices are enclosed in curly brackets
• A range of numbers is enclosed in angle brackets <>.
• Optional fields are enclosed in square brackets
• The
| symbol means OR.
For example, look at the following command to create a TCP/UDP service object.
2Enter the name of the object where you see object-name.
{}.
[].
3Enter
4Finally, do one of the following.
tcp or udp, depending on the service object you want to create.
•Enter eq exactly as it appears, followed by a number between 1 and 65535.
NXC CLI Reference Guide
20
Chapter 1 Command Line Interface
•Enter range exactly as it appears, followed by two numbers between 1 and 65535.
1.4.6 Changing the Password
It is highly recommended that you change the password for accessing the NXC. See Section 23.2 on
page 150 for the appropriate commands.
1.5 CLI Modes
You run CLI commands in one of several modes.
Table 3 CLI Modes
USERPRIVILEGECONFIGURATIONSUB-COMMAND
What Guest users
can do
What User users
can do
What Limited-Admin users can
do
What Admin users
can do
How you enter itLog in to the NXCType enable in User
What the prompt
looks like
How you exit itType exitType disableType exitType exit
Unable to accessUnable to accessUnable to accessUnable to access
• Look at (but not
run) available
commands
•Look at system
information (like
Status screen)
•Run basic
diagnostics
•Look at system
information (like
Status screen)
•Run basic
diagnostics
Router>Router#Router(config)#
Unable to accessUnable to accessUnable to access
• Look at system
information (like
Status screen)
• Run basic
diagnostics
• Look at system
information (like
Status screen)
• Run basic
diagnostics
mode
Unable to accessUnable to access
• Configure simple
features (such as
an address
object)
• Create or remove
complex parts
(such as an
interface)
Type configure
terminal in User or
Privilege mode
• Configure
complex parts
(such as an
interface) in the
NXC
Type the command
used to create the
specific part in
Configuration mode
(varies by part)
Router(zone)#
Router(configif-ge)#
...
See Chapter 23 on page 149 for more information about the user types. User users can only log in, look
at (but not run) the available commands in User mode, and log out. Limited-Admin users can look at
the configuration in the web configurator and CLI, and they can run basic diagnostics in the CLI. Admin
users can configure the NXC in the web configurator or CLI.
At the time of writing, there is not much difference between User and Privilege mode for admin users.
This is reserved for future use.
NXC CLI Reference Guide
21
Chapter 1 Command Line Interface
1.6 Shortcuts and Help
1.6.1 List of Available Commands
A list of valid commands can be found by typing ? or [TAB] at the command prompt. To view a list of
available commands within a command group, enter <command> ? or <command> [TAB].
Figure 5 Help: Available Commands Example 1
Router> ?
<cr>
apply
atse
clear
configure
------------------[Snip]-------------------shutdown
telnet
test
traceroute
write
Router>
Figure 6 Help: Available Command Example 2
Router> show ?
<wlan ap interface>
aaa
access-page
account
ad-server
address-object
------------------[Snip]-------------------wlan
workspace
zone
Router> show
1.6.2 List of Sub-commands or Required User Input
To view detailed help information for a command, enter <command> <sub command> ?.
Figure 7 Help: Sub-command Information Example
Router(config)# ip telnet server ?
;
<cr>
port
rule
|
Router(config)# ip telnet server
NXC CLI Reference Guide
22
Chapter 1 Command Line Interface
Figure 8 Help: Required User Input Example
Router(config)# ip telnet server port ?
<1..65535>
Router(config)# ip telnet server port
1.6.3 Entering Partial Commands
The CLI does not accept partial or incomplete commands. You may enter a unique part of a command
and press
[TAB] to have the NXC automatically display the full command.
For example, if you enter
displays.
If you enter a partial command that is not unique and press
that start with the partial command.
Figure 9 Non-Unique Partial Command Example
Router# c [TAB]
clear configure copy
Router# co [TAB]
configure copy
config and press [TAB] , the full command of configure automatically
1.6.4 Entering a ? in a Command
Typing a ? (question mark) usually displays help information. However, some commands allow you to
input a ?, for example as part of a string. Press [CTRL+V] on your keyboard to enter a ? without the NXC
treating it as a help query.
1.6.5 Command History
The NXC keeps a list of commands you have entered for the current CLI session. You can use any
commands in the history again by pressing the up () or down () arrow key to scroll through the
previously used commands and press
[TAB], the NXC displays a list of commands
[ENTER].
1.6.6 Navigation
Press [CTRL]+A to move the cursor to the beginning of the line. Press [CTRL]+E to move the cursor to the
end of the line.
1.6.7 Erase Current Command
Press [CTRL]+U to erase whatever you have currently typed at the prompt (before pressing [ENTER]).
1.6.8 The no Commands
When entering the no commands described in this document, you may not need to type the whole
command. For example, with the “[no] mss <536..1452>” command, you use “mss 536” to specify
the MSS value. But to disable the MSS setting, you only need to type “no mss” instead of “no mss 536”.
NXC CLI Reference Guide
23
1.7 Input Values
You can use the ? or [TAB] to get more information about the next input value that is required for a
command. In some cases, the next input value is a string whose length and allowable characters may
not be displayed in the screen. For example, in the following example, the next input value is a string
called
mail server fqdnlower-case letters, numbers, or -.
name1-31alphanumeric or _-
notification message1-81alphanumeric, spaces, or '()+,/:=?;!*#@$_%-
password: less than 15
chars
password: less than 8
chars
126+”.conf”
26+”.zysh”
1-15alphanumeric or `~!@#$%^&*()_\-+={}|\;:'<,>./
1-8alphanumeric or ;/?:@&=+$\.-_!~*'()%,#$
“0x” or “0X” + 16-64 hexadecimal values
alphanumeric or ;\|`~!@#$%^&*()_+\\{}':,./
<>=-
first character: alphanumeric or -
first character: alphanumeric or -
first character: alphanumeric or -
first character: alphanumeric or -
alphanumeric or ;`~!@#$%^&()_+[]{}',.=add “.conf” at the end
alphanumeric or ;`~!@#$%^&()_+[]{}',.=add “.zysh” at the end
16 upper-case letters or numbers
NXC CLI Reference Guide
25
Chapter 1 Command Line Interface
Table 4 Input-Value Formats for Strings in CLI Commands (continued)
TAG# VALUESLEGAL VALUES
passwordUsed in user and ip
1-63alphanumeric or `~!@#$%^&*()_-+={}|\;:'<,>./
Used in e-mail log profile SMTP authentication
1-63alphanumeric or `~!@#$%^&*()_-+={}|\;:'<>./
Used in device HA synchronization
1-63alphanumeric or ~#%^*_-={}:,.
Used in registration
6-20alphanumeric or .@_-
phone number1-20numbers or ,+
preshared key16-64“0x” or “0X” + 16-64 hexadecimal values
alphanumeric or ;|`~!@#$%^&*()_+\{}':,./<>=-
profile name1-31alphanumeric or _-
first character: letters or _-
proto name1-16lower-case letters, numbers, or -
protocol name1-31alphanumeric or _-
first character: letters or _-
quoted string less
than 255 chars
quoted string less
than 63 chars
quoted string0+alphanumeric, spaces, or punctuation marks
realm1-253alphanumeric or -_
service name0-63alphanumeric or -_@$./
spi2-8hexadecimal
string less than 15
chars
string: less than 63
chars
string1+alphanumeric or -_@
subject1-61alphanumeric, spaces, or '()+,./:=?;!*#@$_%-
system type0-2hexadecimal
timezone [-+]hh---12 through +12 (with or without “+”)
url1-511alphanumeric or '()+,/:.=?;!*#@$_%-
url“http://”+
1-255alphanumeric, spaces, or ;/?:@&=+$\.-
_!~*'()%,
1-63alphanumeric, spaces, or ;/?:@&=+$\.-_!~*'()%
enclosed in double quotation marks (“)
must put a backslash (\) before double
quotation marks that are part of input value
itself
first character: alphanumeric or -_
used in domain authentication
1-15alphanumeric or -_
1-63alphanumeric or `~!@#$%^&*()_-+={}|\;:'<,>./
alphanumeric or ;/?:@&=+$\.-_!~*'()%,
“https://”+
starts with “http://” or “https://”
may contain one pound sign (#)
NXC CLI Reference Guide
26
Chapter 1 Command Line Interface
Table 4 Input-Value Formats for Strings in CLI Commands (continued)
TAG# VALUESLEGAL VALUES
user name1-31alphanumeric or _-
first character: letters or _-
username1-31alphanumeric or _-
first character: alphanumeric or _domain authorization
username6-20alphanumeric or .@_-
registration
user name1+alphanumeric or -_.
logging commands
user@domainname1-80alphanumeric or .@_-
vrrp group name: less
than 15 chars
week-day sequence,
i.e. 1=first,2=second
xauth method1-31alphanumeric or _-
xauth password1-31alphanumeric or ;|`~!@#$%^&*()_+\{}':,./<>=-
mac address0-12 (even
1-15alphanumeric or _-
11-4
hexadecimal
number)
for example: xx-xx-xx-xx-xx-xx
1.8 Saving Configuration Changes
Use the write command to save the current configuration to the NXC.
Note: Always save the changes before you log out after each management session. All
unsaved changes will be lost after the system restarts.
1.9 Logging Out
Enter the exit or end command in configure mode to go to privilege mode.
Enter the
exit command in user mode or privilege mode to log out of the CLI.
NXC CLI Reference Guide
27
User and Privilege Modes
This chapter describes how to use these two modes.
2.1 User And Privilege Modes
This is the mode you are in when you first log into the CLI. (Do not confuse ‘user mode’ with types of user
accounts the NXC uses. See Chapter 23 on page 149 for more information about the user types. ‘User’
type accounts can only run ‘exit’ in this mode. However, they may need to log into the device in order
to be authenticated for ‘user-aware’ policies, for example a firewall rule that a particular user is exempt
from.)
Type ‘enable’ to go to ‘privilege mode’. No password is required. All commands can be run from here
except those marked with an asterisk. Many of these commands are for trouble-shooting purposes, for
example the htm (hardware test module) and debug commands. Customer support may ask you to run
some of these commands and send the results if you need assistance troubleshooting your device.
CHAPTER 2
For admin logins, all commands are visible in ‘user mode’ but not all can be run there. The following
table displays which commands can be run in ‘user mode’. All commands can be run in ‘privilege
mode’.
The htm and psm commands are for Zyxel’s internal manufacturing
process.
Table 5 User (U) and Privilege (P) Mode Commands
COMMANDMODEDESCRIPTION
apply
atse
clear
configure
copy
debug (*)
delete
details
diag
diag-info
dir
disable
enable
PApplies a configuration file.
U/PDisplays the seed code
U/PClears system or debug logs or DHCP binding.
U/PUse ‘configure terminal’ to enter configuration mode.
PCopies configuration files.
U/PFor support personnel only! The device needs to have the deb ug flag enabled.
PDeletes configuration files.
PPerforms diagnostic commands.
PProvided for support personnel to collect internal system information. It is not
recommended that you use these.
PHas the NXC create a new diagnostic file.
PLists files in a directory.
U/PGoes from privilege mode to user mode
U/PGoes from user mode to privilege mode
NXC CLI Reference Guide
28
Chapter 2 User and Privilege Modes
Table 5 User (U) and Privilege (P) Mode Commands (continued)
COMMANDMODEDESCRIPTION
exit
htm
U/PGoes to a previous mode or logs out.
U/PGoes to htm (hardware test module) mode for testing hardware components.
You may need to use the htm commands if your customer support Engineer asks
you to during troubleshooting.
Note: These commands are for Zyxel’s internal manufacturing process.
interface
no packet-trace
nslookup
packet-trace
ping
psm
U/PDials or disconnects an interface.
U/PTurns of packet tracing.
U/PResolves an IP address to a host name and vice-versa.
U/PPerforms a packet trace.
U/PPings an IP address or host name.
U/PGoes to psm (product support module) mode for setting product parameters.
You may need to use the htm commands if your customer support Engineer asks
you to during troubleshooting.
Note: These commands are for Zyxel’s internal manufacturing process.
reboot
release
rename
renew
run
setenv
show
shutdown
telnet
test aaa
traceroute
write
PRestarts the device.
PReleases DHCP information from an interface.
PRenames a configuration file.
PRenews DHCP information for an interface.
PRuns a script.
U/PTurns stop-on-error on (terminates booting if an error is found in a configuration
file) or off (ignores configuration file errors and continues booting).
U/PDisplays command statistics. See the associated command chapter in this
guide.
PWrites all d data to disk and stops the system processes. It does not turn off the
power.
U/PEstablishes a connection to the TCP port number 23 of the specified host name
or IP address.
U/PTests whether the specified user name can be successfully authenticated by an
external authentication server.
PTraces the route to the specified host name or IP address.
PSaves the current configuration to the NXC. All unsaved changes are lost after
the NXC restarts.
Subsequent chapters in this guide describe the configuration commands. User/privilege mode
commands that are also configuration commands (for example, ‘show’) are described in more detail in
the related configuration command chapter.
2.1.1 Debug Commands
Debug commands marked with an asterisk (*) are not available when the debug flag is on and are for
Zyxel service personnel use only. The debug commands follow a syntax that is Linux-based, so if there is a
NXC CLI Reference Guide
29
Chapter 2 User and Privilege Modes
Linux equivalent, it is displayed in this chapter for your reference. You must know a command listed here
well before you use it. Otherwise, it may cause undesired results.