This manual is intended for people who want to configure the ZyXEL Device via the
Command Line Interface (CLI). You should have at least a basic knowledge of TCP/IP
networking concepts and topology.
This guide covers the following product lines:
• DSL modems and routers
• IAD (Integrated Access Devices) - the P-2600 series
• VoIP: ATA (Analog Terminal Adapters and Station Gateways) - the P-2300 series
The version number on the cover page refers to the latest firmware version supported by the
products mentioned above. This guide applies to version 3.40 and 3.70 at the time of writing.
"This guide is intended as a command reference for a series of products.
Therefore many commands in this guide may not be available in your product.
See your User’s Guide for a list of supported features and details about feature
implementation.
Please refer to www.zyxel.com or your product’s CD for product specific User Guides and
product certifications.
How To Use This Guide
•Read Chapter 1 on page 13 for an overview of various ways you can get to the CLI on
your ZyXEL Device.
•Read Chapter 2 on page 17 for an introduction to some of the more commonly used
commands.
"It is highly recommended that you read at least these two chapters.
• The other chapters in this guide are arranged according to the CLI structure. Each chapter
describes commands related to a feature.
"See your ZyXEL Device’s User Guide for feature background information.
DSL & IAD CLI Reference Guide
3
About This CLI Reference Guide
• To find specific information in this guide, use the Contents Overview, the Index of
Commands, or search the PDF file.
Documentation Feedback
Help us help you. Send all documentation-related comments, questions or suggestions for
improvement to the following address, or use e-mail instead. Thank you!
The Technical Writing Team,
ZyXEL Communications Corp.,
6 Innovation Road II,
Science-Based Industrial Park,
Hsinchu, 300, Taiwan.
E-mail: techwriters@zyxel.com.tw
4
DSL & IAD CLI Reference Guide
Document Conventions
Document Conventions
Warnings and Notes
Warnings and notes are indicated as follows in this guide.
1Warnings tell you about things that could harm you or your device. See your
User’s Guide for product specific warnings.
"Notes tell you other important information (for example, other things you may
need to configure or helpful tips) or recommendations.
Syntax Conventions
This manual follows these general conventions:
• ZyXEL Devices may also be referred to as the “device”, the “system” or the “product” in
this guide.
• Units of measurement may denote the “metric” value or the “scientific” value. For
example, “k” for kilo may denote “1000” or “1024”, “M” for mega may denote “1000000”
or “1048576” and so on.
Command descriptions follow these conventions:
• Commands are in
• Required input values are in angle brackets <>; for example,
means that you must specify an IP address for this command.
• Optional fields are in square brackets []; for instance show logins[name], the name
field is optional.
The following is an example of a required field within an optional field: snmp-server [contact <system contact>], the contact field is optional. However, if you
use contact, then you must provide the system contact information.
•The | (bar) symbol means “or”.
• italic terms represent user-defined input values; for example, in sys datetime date [year month date], year month date can be replaced by the actual
year month and date that you want to set, for example, 2007 08 15.
• A key stroke is denoted by square brackets and uppercase text, for example, [ENTER]
means the “Enter” or “Return” key on your keyboard.
• <cr> means press the [ENTER] key.
• An arrow (-->) indicates that this line is a continuation of the previous line.
courier new font.
ping<ip-address>
DSL & IAD CLI Reference Guide
5
Document Conventions
Command summary tables are organized as follows:
Table 1 Table Title
COMMANDDESCRIPTION
ip arp status [interface]Displays an interface’s ARP table.
ip dhcp <interface> client
release
ip dhcp <interface> client
renew
The TableTitle identifies commands or the specific feature that the commands configure.
The COMMAND column shows the syntax of the command.
The DESCRIPTION column explains what the command does. It may also identify legal
input values.
A long list of pre-defined values may be replaced by a command input value ‘variable’ so as to
avoid a very long command in the description table. Refer to the command input values table
if you are unsure of what to enter.
Table 2 Common Command Input Values
LABELDESCRIPTION
descriptionUsed when a command has a description field in order to add more detail.
ip-addressAn IP address in dotted decimal notation. For example, 192.168.1.3.
maskThe subnet mask in dotted decimal notation, for example, 255.255.255.0.
mask-bitsThe number of bits in an address’s subnet mask. For example type /24 for a
portA protocol’s port number.
interfaceAn interface on the ZyXEL Device. enif refers to an Ethernet interface.
hostnameHostname can be an IP address or domain name.
nameUsed for the name of a rule, policy, set, group and so on.
numberUsed for a number, for example 10, that you have to input.
Releases the specified interface’s DHCP IP address. The
interface must be a DHCP client to use this command.
Renews the specified interface’s DHCP IP address. The
interface must be a DHCP client to use this command.
subnet mask of 255.255.255.0.
enif0: LAN
enif1: WLAN
enif2: DMZ or WAN (Ethernet) (varies depending on your model)
wanif0: WAN (PPPoE or PPPoA)
For some commands you can also add a colon and a 0 or 1 to specify an IP alias.
This is only for the LAN and DMZ interfaces. For example, enif0:0 specifies
LAN IP alias 1 and enif0:1 specifies LAN IP alias 2.
"Commands are case sensitive! Enter commands exactly as seen in the
command interface. Remember to also include underscores if required.
6
DSL & IAD CLI Reference Guide
Document Conventions
Copy and Paste Commands
You can copy and paste commands directly from this document into your terminal emulation
console window (such as HyperTerminal). Use right-click (not CTRL-V) to paste your
command into the console window as shown next.
Icons Used in Figures
Figures in this guide may use the following generic icons. The ZyXEL Device icon is not an
exact representation of your device.
Appendices and Index of Commands ................................................................................191
DSL & IAD CLI Reference Guide
9
Contents Overview
10
DSL & IAD CLI Reference Guide
PART I
Introduction
How to Access and Use the CLI (13)
Common Commands (17)
11
12
CHAPTER 1
How to Access and Use the CLI
This chapter introduces the command line interface (CLI).
1.1 Accessing the CLI
Use any of the following methods to access the CLI.
1.1.1 Console Port
You may use this method if your ZyXEL Device has a console port.
1 Connect your computer to the console port on the ZyXEL Device using the appropriate
cable.
2 Use terminal emulation software with the following settings:
Table 3 Default Settings for the Console Port
SETTINGDEFAULT VALUE
Terminal EmulationVT100
Baud Rate9600 bps
ParityNone
Number of Data Bits8
Number of Stop Bits1
Flow ControlNone
3 Press [ENTER] to open the login screen.
1.1.2 Telnet
4 Open a Telnet session to the ZyXEL Device’s IP address. If this is your first login, use
the default values.
Table 4 Default Management IP Address
SETTINGDEFAULT VALUE
IP Address192.168.1.1
Subnet Mask255.255.255.0
Make sure your computer IP address is in the same subnet, unless you are accessing the
ZyXEL Device through one or more routers. In the latter case, make sure remote
management of the ZyXEL Device is allowed via Telnet.
DSL & IAD CLI Reference Guide
13
Chapter 1 How to Access and Use the CLI
1.2 Logging in
Use the administrator password to log into the ZyXEL Device. The default value is ‘admin’ or
‘1234’ - see your ZyXEL Device User’s Guide to see which one to use. Some ZyXEL Devices
may require you to also enter a user name. The default user name is ‘admin’.
The ZyXEL Device automatically logs you out of the management interface after five minutes
of inactivity. If this happ ens to y ou, sim ply lo g ba ck i n again . Use t he sys st dio command
to extend the idle timeout. For example, the ZyXEL Device automatically logs you out of the
management interface after 60 minutes of inactivity after you use the sys stdio 60
command.
1.3 Using Shortcuts and Getting Help
This table identifies some shortcuts in the CLI, as well as how to get help.
Table 5 CLI Shortcuts and Help
COMMAND / KEY(S)DESCRIPTION
yz (up/down arrow keys)Scrolls through the list of recently-used commands. You can edit
[CTRL]+UClears the current command.
?Displays the keywords and/or input values that are allowed in
helpDisplays the (full) commands that are allowed in place of help.
any command or press [ENTER] to run it again.
place of the ?.
Use the help command to view the available commands on the ZyXEL Device. Follow these
steps to create a list of supported commands:
1 Log into the CLI.
2 Type help and press [ENTER]. A list comes up which shows all the commands
available for this device.
ras> help
Valid commands are:
sys exit ether wan
wlan ip ipsec bridge
certificates bm lan radius
8021x voice
ras>
14
DSL & IAD CLI Reference Guide
Abbreviations
Commands can be abbreviated to the smallest unique string that differentiates the command.
For example sys version could be abbreviated to s v.
ras> sys version
ZyNOS version: V3.40(ADV.3)b4 | 05/09/2007
romRasSize: 3127550
system up time: 24:23:59 (86087c ticks)
bootbase version: V1.01 | 06/28/2005
ras> s v
ZyNOS version: V3.40(ADV.3)b4 | 05/09/2007
romRasSize: 3127550
system up time: 24:24:15 (860eae ticks)
bootbase version: V1.01 | 06/28/2005
ras>
1.4 Saving Your Configuration
Chapter 1 How to Access and Use the CLI
In the ZyXEL Device some commands are saved as you run them and others require you to
run a save command. For example, after configuring a static route rule, type ip route addrom save to save the static route rule in non-volatile memory. See the related section
of this guide to see if a save command is required.
"Unsaved configuration changes to commands that require you to run a save
command are lost once you restart the ZyXEL Device
1.5 Logging Out
Enter exit to log out of the CLI.
Table 6 Exit Command
COMMANDDESCRIPTION
exitLogs you out of the CLI.
DSL & IAD CLI Reference Guide
15
Chapter 1 How to Access and Use the CLI
16
DSL & IAD CLI Reference Guide
CHAPTER 2
Common Commands
This chapter introduces some of the more commomly-used commands in the ZyXEL Device.
For more detailed usage, see the corresponding feature chapter in this guide.
In the following examples, ras is the prompt as that is the default. If you configure a system
name, then that prompt will display as the system name you configured. For example, change
the system name to zyxel using the sys hostname zyxel command; the command
prompt will then display as zyxel>.
2.1 Change the Idle Timeout
By default, the ZyXEL Device automatically logs you out of the management interface after
five minutes of inactivity . Use the sys stdio comman d to ext en d th e idle timeout. The
following example extends the idle timeout to 120 minutes.
ZyXEL Device interfaces are defined as shown in Table 2 on page 6.
DSL & IAD CLI Reference Guide
17
Chapter 2 Common Commands
The first command in this example shows information about a LAN port, for example, its IP
address. The second command is used to change this IP address to 192.168.100.100.
To view the ARP table for the LAN port, enter ip arp status enif0.
ras> ip arp status enif0
received 23763 badtype 0 bogus addr 0 reqst in 3 replies 4 reqst out 34
cache hit 10529 (25%), cache miss 31410 (74%)
IP-addr Type Time Addr stat iface
172.16.17.111 10 Mb Ethernet 230 00:19:cb:39:cb:ad 41 enif0
num of arp entries= 12
ras>
Each ZyXEL Device can support a specific number of NAT sessions in total. Y ou can limit the
number of NAT sessions allowed per host by using the ip nat session command. In the
following example, each host may have up to 4000 NAT sessions open at one time. The total
number of NAT sessions must not exceed the number for your ZyXEL Device.
ras> ip nat session 4000
ip nat session
NAT session number per host: 4000
ras>
To see the IP routing table, enter the following command.
ras> ip route status
Dest FF Len Device Gateway Metric stat Timer Use
Use the following command to get the date and time from a time server on the Internet (or
your network). You have to first configure a time server using the web configurator (or SMT
menu if your ZyXEL Device has one).
ras> sys adjtime
Connecting to time server....
Current date is Sat 2007/09/01
Current time is 02:46:53
ras>
Use the following command to restart your ZyXEL Device right away.
Press any key to enter debug mode within 3 seconds.
Press any key to enter debug mode within 3 seconds.
.
Use the following command to reset the ZyXEL Device to the factory defaults. Make sure you
back up your current configuration first (using the web configurator or SMT). The ZyXEL
Device will restart and the console port speed will also reset to 9,600 bps.
ras> sys romreset
Do you want to restore default ROM file(y/n)?y
Default Romfile reset...
OKstore default Romfile.
System Restart(Console speed will be changed to 9600 bps)
Use the following command to change the console port speed. A higher console port speed is
recommended when uploading firmware via the console port. A console port speed of 1 1 5,200
bps is necessary to view CNM debug messages and packet traces on the ZyXEL Device.
Saving to ROM. Please wait...
Change Console Speed to 115200. Then hit any key to continue
ras>
"After you change the console port speed, you need to change it also on your
terminal emulation software (such as HyperTerminal) in order to reconnect to
the ZyXEL Device.
22
DSL & IAD CLI Reference Guide
Chapter 2 Common Commands
Logs are very useful for troubleshooting. If you are having problems with your ZyXEL
Device, then customer support may request that you send them the logs. Use the following
command to display all ZyXEL Device error logs
ras> sys logs errlog disp
32 Sat Jan 01 00:00:06 2000 PP01 INFO vc opened,vc=0,vpi=0,vci=0,qos=0
33 Sat Jan 01 00:00:08 2000 PP0a -WARN SNMP TRAP 3: link up
34 Sat Jan 01 00:00:10 2000 PP15 -WARN Last errorlog repeat 1 Times
35 Sat Jan 01 00:00:10 2000 PP15 INFO LAN promiscuous mode <0>
36 Sat Jan 01 00:00:10 2000 PP15 INFO LAN promiscuous mode <1>
37 Sat Jan 01 00:00:10 2000 PP15 INFO LAN promiscuous mode <0>
38 Sat Jan 01 00:00:10 2000 PP15 INFO LAN promiscuous mode <1>
39 Sat Jan 01 00:00:10 2000 PP01 -WARN SNMP TRAP 1: warm start
40 Sat Jan 01 00:00:10 2000 PP01 INFO main: init completed
41 Sat Jan 01 00:00:10 2000 PP01 INFO Starting Connectivity Monitor
42 Sat Jan 01 00:00:11 2000 PP26 INFO adjtime task pause 1 day
43 Sat Jan 01 00:00:11 2000 PP28 INFO monitoring WAN connectivity
44 Sat Jan 01 00:00:44 2000 PP15 WARN netMakeChannDial: err=-3001
rn_p=950cc
4d8
45 Sat Jan 01 00:05:15 2000 PP01 WARN Last errorlog repeat 20 Times
46 Sat Jan 01 00:05:15 2000 PP01 INFO SMT Session Begin
47 Sat Jan 01 00:05:47 2000 PP15 WARN netMakeChannDial: err=-3001
rn_p=950cc
4d8
48 Sat Jan 01 00:10:42 2000 PP01 WARN Last errorlog repeat 20 Times
49 Sat Jan 01 00:10:42 2000 PP01 -WARN SNMP TRAP 6: System reboot by user!
50 Sat Jan 01 00:10:48 2000 PP01 INFO vc opened,vc=0,vpi=0,vci=0,qos=0
51 Sat Jan 01 00:10:50 2000 PP0a -WARN SNMP TRAP 3: link up
52 Sat Jan 01 00:10:52 2000 PP15 -WARN Last errorlog repeat 1 Times
53 Sat Jan 01 00:10:52 2000 PP15 INFO LAN promiscuous mode <0>
54 Sat Jan 01 00:10:52 2000 PP15 INFO LAN promiscuous mode <1>
55 Sat Jan 01 00:10:52 2000 PP15 INFO LAN promiscuous mode <0>
56 Sat Jan 01 00:10:52 2000 PP15 INFO LAN promiscuous mode <1>
57 Sat Jan 01 00:10:52 2000 PP01 -WARN SNMP TRAP 1: warm start
58 Sat Jan 01 00:10:52 2000 PP01 INFO main: init completed
59 Sat Jan 01 00:10:52 2000 PP01 INFO Starting Connectivity Monitor
60 Sat Jan 01 00:10:53 2000 PP26 INFO adjtime task pause 1 day
61 Sat Jan 01 00:10:53 2000 PP28 INFO monitoring WAN connectivity
62 Sat Jan 01 00:11:30 2000 PP01 INFO SMT Session Begin
63 Sat Jan 01 00:12:01 2000 PP15 WARN netMakeChannDial: err=-3001
rn_p=950cc
4d8
Clear Error Log (y/n):
DSL & IAD CLI Reference Guide
23
Chapter 2 Common Commands
Use the following commands for system debugging. A console po rt speed of 115,200 bps is
necessary to view packet traces on the ZyXEL Device.
Use the ping command to have the ZyXEL Device ping an IP address as shown in the
following example.
ras> ip ping 172.16.17.12
Resolving 172.16.17.12... 172.16.17.12
sent rcvd rate rtt avg mdev max min
1 1 100 10 10 0 10 10
2 2 100 0 9 3 10 0
3 3 100 0 8 5 10 0
ras>
2.4 UTM and myZyXEL.com
Use these commands to create an account at myZyXEL.com and view what services you have
activated.
"Ensure your ZyXEL Device is connected to the Internet before you use the
following commands.
24
DSL & IAD CLI Reference Guide
Chapter 2 Common Commands
You need to create an account at my ZyXEL.com in order to activate content filtering, antispam and anti-virus UTM (Unified Threat Management) services. See the myZyXEL.com
chapter for information on the country code you should use.
Use the following commands to enable anti-virus on the ZyXEL Device You first need to use
the load command.
ras> av load
ras> av config enable on
ras> av save
ras> av disp
AV Enable : On
AV Forward Over ZIP Session : Off
AV Forward Over ZIP Session : Off
------------------------------------
DSL & IAD CLI Reference Guide
25
Chapter 2 Common Commands
Use the following commands to enable content filtering on the ZyXEL Device, then on the
external database (DB) and then display the default policy.
ras> ip cf common enable on
ras> ip cf externalDB enable on
ras> ip cf policy displayAll
index Name Active IP Group
Start Addr End Addr
==========================================================================
1 Default Policy Y 0.0.0.0/0.0.0.0
The default policy does not actually block anything. Use the following commands to edit the
default policy, turn the external database service content filtering (category-based content
filtering), see what the categories are, block a category 92 in the following example) and then
save the policy.
26
DSL & IAD CLI Reference Guide
ras> ip cf policy edit 1
ras> ip cf policy config webControl enable on
ras> ip cf policy config webControl display
The Categories:
type 1 :Adult/Mature Content
type 2 :Pornography
type 3 :Sex Education
type 4 :Intimate Apparel/Swimsuit
type 5 :Nudity
type 6 :Alcohol/Tobacco
type 7 :Illegal/Questionable
type 8 :Gambling
type 9 :Violence/Hate/Racism
type10 :Weapons
type11 :Abortion
type12 :Hacking
type13 :Phishing
type14 :Arts/Entertainment
type15 :Business/Economy
type16 :Alternative Spirituality/Occult
type17 :Illegal Drugs
type18 :Education
type19 :Cultural/Charitable Organization
type20 :Financial Services
type21 :Brokerage/Trading
type22 :Online Games
type23 :Government/Legal
type24 :Military
type25 :Political/Activist Groups
type26 :Health
type27 :Computers/Internet
type28 :Search Engines/Portals
type29 :Spyware/Malware Sources
type30 :Spyware Effects/Privacy Concerns
type31 :Job Search/Careers
type32 :News/Media
type33 :Personals/Dating
type34 :Reference
type35 :Open Image/Media Search
type36 :Chat/Instant Messaging
type37 :Email
type38 :Blogs/Newsgroups
type39 :Religion
type40 :Social Networking
type41 :Online Storage
type42 :Remote Access Tools
type43 :Shopping
type44 :Auctions
type45 :Real Estate
type46 :Society/Lifestyle
type47 :Sexuality/Alternative Lifestyles
type48 :Restaurants/Dining/Food
type49 :Sports/Recreation/Hobbies
type50 :Travel
type51 :Vehicles
type52 :Humor/Jokes
type53 :Software Downloads
type54 :Pay to Surf
type55 :Peer-to-Peer
type56 :Streaming Media/MP3s
type57 :Proxy Avoidance
type58 :For Kids
type59 :Web Advertisements
type60 :Web Hosting
type61 :Unrated
ras> ip cf policy config webControl category block 2
The Categories:
type 1 :Adult/Mature Content
type 2 (block):Pornography
------ras> ip cf policy save
ras>
Chapter 2 Common Commands
DSL & IAD CLI Reference Guide
27
Chapter 2 Common Commands
You may also configure and schedule new policies using commands as well as configure what
to block using the external database.
2.5 Firewall
Use the following command to enable the firewall on the ZyXEL Device.
ras> sys firewall active yes
ras>
2.6 VPN
Use the following command to show what IPsec VPN tunnels are active on your ZyXEL
Device.
ras> ipsec show_runtime sa
Runtime SA status:
No phase 1 IKE SA exist
No phase 2 IPSec SA exist
Active SA pair = 0
ras>
Use the following command to manually bring up a previously configured VPN tunnel.
ras> ipsec dial 1
Start dialing for tunnel <rule# 1>...
.....................
2.7 Dialing PPPoE and PPTP Connections
This example shows dialing up remote node “WAN 1” using PPPoE..
ras> poe dial "WAN 1"
Start dialing for node <WAN 1>...
### Hit any key to continue.###
$$$ DIALING dev=6 ch=0..........
$$$ OUTGOING-CALL phone()
$$$ CALL CONNECT speed<100000000> type<6> chan<0>
$$$ LCP opened
$$$ PAP sending user/pswd
$$$ IPCP negotiation started
$$$ IPCP neg' Primary DNS 192.168.30.1
$$$ IPCP neg' Primary DNS 172.16.5.2
$$$ IPCP opened
28
DSL & IAD CLI Reference Guide
Chapter 2 Common Commands
This example shows dialing up remote node “WAN 1” using PPTP.
ras> pptp dial "WAN 1"
Start dialing for node <WAN 1>...
### Hit any key to continue.###
ras>
DSL & IAD CLI Reference Guide
29
Chapter 2 Common Commands
30
DSL & IAD CLI Reference Guide
Loading...
+ 192 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.