Lantronix and PremierWave are registered trademarks of Lantronix, Inc. in the United States and
other countries. DeviceInstaller is atrademark of Lantronix, Inc. U.S. Patents 8,024,446;
8,219,661; 7,698,405. Additional patents pending.
Windows and Internet Explorer are a registered trademarks of Micr osoft Corpor ation . Mozilla and
Firefox are registered trademarks of the Mozilla Foundation. Chrome is a trademark of Google
Inc. All other trademarks and trade names are the property of their respective holders.
Contacts
Lantronix, Inc. Corporate Headquarters
167 Technology Drive
Irvine, CA 92618, USA
Toll Free: 800-526-8766
Phone: 949-453-3990
Fax: 949-453-3995
Technical Support
Online: www.lantronix.com/support
Sales Offices
For a current list of our domestic and international sales offices, go to the Lantronix web site at
www.lantronix.com/about/contact
Disclaimer
The information in this guide may change without notice. The manufacturer assumes no
responsibility for any errors that may appear in this guide.
Revision History
DateRevisionComments
June 2012AInitial document for firmware release 7.2.0.0.
May 2014
Intellectual Property ________________________________________________________2
Contacts _________________________________________________________________2
Disclaimer ________________________________________________________________2
Revision History ___________________________________________________________2
List of Figures _____________________________________________________________4
List of Tables ______________________________________________________________5
XML Architecture and Device Control ___________________________________________8
Command Line Interface _____________________________________________________8
3: Command Line Interface 9
Configuration Using Telnet ___________________________________________________9
Configuration Using Serials ___________________________________________________9
Navigating the CLI Hierarchy ________________________________________________10
Using Keyboard Shortcuts and CLI ____________________________________________11
Understanding the CLI Level Hierarchy ________________________________________11
4: Configuration Using XML 14
XML Configuration Record Document Type Definition _____________________________14
Quick Tour of XML Syntax __________________________________________________15
Declaration ___________________________________________________________15
Element Start and End Tags _____________________________________________15
Element Attributes _____________________________________________________15
Record, Group, Item, and Value Tags _________________________________________16
Importing and Exporting an XML Configuration File _______________________________18
Best Practices ____________________________________________________________18
Exporting ____________________________________________________________19
XML Configuration Groups __________________________________________________20
XML Status Record Groups and Items _________________________________________35
Figure 3-2 CLI Level Hierarchy______________________________________________________12
Figure 3-3 Login Level Commands____________________________ _______________________13
Figure 3-4 Enable Level Commands__________________________________________________13
Figure 4-1 DTD for XCRs __________________________________________________________14
Figure 4-2 XML Example __________________________________________________________15
Figure 4-3 XML Example __________________________________________________________16
Figure 4-4 XML Example of Multiple Named Values _____________________________________16
Figure 4-5 XML Example of Multiple Items_____________________________________________17
Figure 4-6 XML Example with Multiple Groups________________________________________ __17
This guide describes how to configure the PremierWave XC intelligent gateway using the
Command Line Interface (CLI) and/or Extensible Markup Language (XML). CLI provides an
interactive mode for accessing the device configuration and management interface. It is most
suited for system and network administrators comfortable with using similar interfaces on
Enterprise IT and Networking products. It is also helpful as a quick tool for access via the
product's serial ports or console/management ports.
XML provides an extensible mode for software developers interfacing with the device and system
integrators performing batch provisioning/updates.
Chapter Summaries
This table lists and summarizes content of each chapter.
ChapterSummary
Chapter 2: OverviewGives an overview of CLI and XML.
Chapter 3: Command Line InterfaceLists commands and describes how to use CLI to configure the
Chapter 4: Configuration Using XMLLists XCR groups and items and describes how to use XCRs to
Chapter 5: Commands and LevelsProvides an index of the CLI Command Hierarchy with hyperlinks
PremierWave XC device.
configure the PremierWave XC device.
to the corresponding command details.
Conventions
The table below lists and describes the conventions used in this book.
Angle Brackets < > Possible values for parameters.
Pipe |Choice of parameters.
WarningWarning: Means that you are in a situation that could cause
NoteNote: Means take notice. Notes contain helpful suggestions, information,
CautionCaution:Means you might do something that could result in faulty
Screen Font
(Courier New)
equipment damage or bodily injury. Before you work on any
equipment, you must be aware of the hazards involved with electrical
circuitry and familiar with standard practices for preventing accidents.
or references to material not covered in the publication.
PremierWave XC intelligent gateway supports three convenient configuration methods: Web
Manager, Command Line Interface (CLI) and Extensible Markup Language (XML). For more
information about the Web Manager, see the PremierWave XC Intelligent Gateway User Guide on
the Lantronix website.
XML Architecture and Device Control
XML is a fundamental building block for the future gr owth of Machine-to-Machine (M2 M) networks.
PremierWave XC device supports XML configuration records that make configuring the intelligent
gateway easy for users and administrators. XML configuration records are easy to edit with a
standard text editor or an XML editor.
For a brief overview of XML, see Chapter 4: Configuration Using XML. It provides rules on basic
XML syntax, a guide to the specific XML tags used, and a guide to using XML configuration
records.
Command Line Interface
Making the edge-to-enterprise vision a reality, the PremierWave XC intelligent gateway uses
industry-standard tools for configuration, communication, and control. For example, the
PremierWave XC device uses a command line interface (CLI) whose syntax is very similar to that
used by data center equipment such as routers and hubs.
For details of the CLI, see Chapter 5: Commands and Levels. It provides an index of the CLI
Command Hierarchy with links to the corresponding command details. The CLI provides
commands for configuring, monitoring, and controlling the intelligent gateway.
This chapter describes accessing the PremierWave XC intelligent gateway by using Telnet, SSH,
or USB serial ports to configure the device, navigating the Command Line Interface (CLI), typing
keyboard shortcuts, and moving between the levels.
It contains the following sections:
Configuration Using Telnet
Configuration Using Serials
Navigating the CLI Hierarchy
Using Keyboard Shortcuts and CLI
Understanding the CLI Level Hierarchy
Refer to Chapter 5: Commands and Levels for a complete list of levels, commands, and
descriptions.
Configuration Using Telnet
To access and configure the intelligent gateway by using a Telnet session over the network, you
must first establish a Telnet connection. You can also establish a Telnet connection by clicking the
Telnet Configuration tab in the DeviceInstaller utility. See the DeviceInstaller Online Help for more
information, available on our website www.lantronix.com/support/downloads
.
To access the PremierWave XC intelligent gateway by using Telnet, perform the following steps.
1. Click Start > Run. The Run dialog box displays.
2. Type cmd in the dialog box and press OK.
3. Type telnet x.x.x.x (x.x.x.x is the IP address) in a Windows/Linux command prompt.
The PremierWave XC device is online when the command prompt (>) displays. You are at the
root level of the CLI.
Note:Depending on the level of security, a password may be requ ire d.
Configuration Using Serials
Serial Command Mode
The serial port can be configured to operate in command mode permanently or to be triggered
under specified conditions. See the line <line> Level command description for more
information.
Intelligent Gateway
Serial Recovery mode will temporarily override the line and tunnel settings for the serial line to
allow configuration changes to be made. The line and tunnel settings will be restored once the
user exits the Serial Recovery mode CLI.
4. Press and hold down the exclamation point (!) key.
5. Power on the device. After about 1 seconds, the exclamation point will display on the terminal
or PC screen.
6. Type xyz within 5 seconds to display the CLI prompt.
Navigating the CLI Hierarchy
The CLI is organized into a hierarchy of levels. Each level has a group of commands for a specific
purpose. For example, to configure a setting for the FTP server, one would navigate to the FTP
level, which is under the configuration level.
To move to a different level—Enter the name of the level from within its parent level. For
example, to enter the tunnel level, type tunnel <number> at the enable prompt. This
displays: <enable> tunnel <number>#.
To exit and re tu rn to o ne leve l hi ghe r—Type exit and pr ess the Enter key. Typing exit at the
login level or the enable level will close the CLI session. If Line - Command Mode is specified
as Always, a new session starts immediately.
To view the current configuration at any level—Type show.
To view the list of commands a vailable at the curr ent level—Type the question mar k "?". Items
within < > (e.g. <string>) are required parameters.
To view the available commands and explan ations—Type the asterisk (*).
To view the list of commands available for a partial command—Type the partial command
followed by the question mark "?". For example: <tunnel-1>#show? displays a list of all
show commands at the tunnel level.
To view available commands and their explanations for a partial command—Type the partial
command followed by the asterisk (*). For example: <tunnel-1>#show* displays a list of all
show commands and descriptions at the tunnel level.
To view the last 20 commands e ntered at the CLI—Type show history.
One useful shortcut built into PremierWave XC intelligent gateway is that the complete text of a
command does not have to be entered to issue a command. Typing just enough characters to
uniquely identify a command, then hitting enter, can be used as a short cut for a command. For
example, at the enable level, "sh" can be used for the "show" command.
Tab Completion is also available using the Tab and Enter keys on the keyboard. Typing the first
few characters of a command, then hitting the Tab key displays the first command that begins with
those characters. Hitting the Tab key again displays the next command that begins with the
original characters typed. You can press Enter to execute the command or you can backspace to
edit any parameters.
The following key combinations are allowed when configuring the intelligent gateway using the
CLI:
Table 3-1 Keyboard Shortcuts
Key CombinationDescription
Ctrl + aPlaces cursor at the beginning of a line
Ctrl + bBackspaces one character
Ctrl + dDeletes one character
Ctrl + ePlaces cursor at the end of the line
Ctrl + fMoves cursor forward one character
Ctrl + kDeletes from the current position to the end of the line
Ctrl + lRedraws the command line
Ctrl + nDisplays the next line in the history
Ctrl + pDisplays the previous line in the history
Ctrl + uDeletes entire line and places cursor at start of prompt
Ctrl + wDeletes one word back
Ctrl + zExits the current CLI level
Esc + bMoves cursor back one word
Esc + fMoves cursor forward one word
3: Command Line Interface
Understanding the CLI Level Hierarchy
The CLI hierarchy is a series of levels. Arranging commands in a hierarchy of levels provides a
way to organize and group similar commands, provide different levels of security, and reduce the
complexity and number commands and options presented to a user at one time.
When you start a command line session, you begin at the login level. This level can be password
protected and provides access to hig h lev el sta tu s, a few diag no stic commands, and the enable
level. Further device information and configuratio n are accessed via the enable level.
The enable level can also be password protected and is the gateway to full configuration and
management of the intelligent gateway. There are commands for gathering and effecting all
elements of device status and configuration, as well as commands that take you to additional
levels. For instance, tunnel specific status and configuration is found under the "tunnel" level, and
network specific status and configuration commands are found under the "configuration" level.
An overview of the levels in the PremierWave XC intelligent gateway is presented in Figur e 3- 2
CLI Level Hierarchy below.
Figure 3-2 CLI Level Hierarchy
Commands at the login level (see Figure 3-3 Login Level Commands below) do not affect current
configuration settings and are not displayed initially. If you type ?, you will see the login subcommands. These commands provide diagnostic and status information only.
The PremierWave XC intelligent gateway provides an Extensible Markup Language (XML)
interface that you can use to configure PremierWave XC devices. Every configuration setting that
can be issued from the intelligent gateway Web Manager and CLI can be specified using XML.
The intelligent gateway can import and export configuration settings as an XML document known
as an XML Configuration Record (XCR). An XCR can be imported or exported via the CLI, a Web
browser, FTP, or the PremierWave XC filesystem. An XCR can contain many configuration
settings or just a few. For example, it might change all of the configurable parameters for a
intelligent gateway, or it may only change the baud rate for a single serial line. Using XCRs is a
straightforward and flexible way to manage the configuration of multiple Premie rWave XC devices.
XML Configuration Record Document Type Definition
An XML document type definition (DTD) is a description of the str uct ur e an d cont en t of an XML
document. It verifies that a document is valid. XCRs are exported using the DTD as shown in
Figure 4-1 DTD for XCRs.
Figure 4-1 DTD for XCRs
<!DOCTYPE configrecord [
<!ELEMENT configrecord (configgroup+)>
<!ELEMENT configgroup (configitem+,configgroup*)>
<!ELEMENT configitem (value+)>
<!ELEMENT value (#PCDATA)>
<!ATTLIST configrecord version CDATA #IMPLIED>
<!ATTLIST configgroup name CDATA #IMPLIED>
<!ATTLIST configgroup instance CDATA #IMPLIED>
<!ATTLIST configitem name CDATA #IMPLIED>
<!ATTLIST value name CDATA #IMPLIED>
]>
The PremierWave device DTD rules state the following:
The XML document element is a <configrecord> element. This is the root element.
A <configrecord> must have one or more <configgroup> elements and can have a
version attribute.
A <configgroup> must have one or more <configitem> elements and can have name
and instance attributes.
A <configitem> element must have one or more <value> elements and can have a name
attribute.
A <value> element can have only data and can have a name attribute.
The name attribute identifies a group, item, or value. It is always a quoted string.
The instance attribute identifies the specific option, like the serial port number. The "instance"
The name for each <configgroup> (specified with the name attribute) is the group
name listed in the Web Manager XCR groups or with the "xcr list" CLI comma nd. Se e
the PremierWave XC Intelligent Gateway User Guide for more information about the
XCR groups.
An empty or missing <va lue> element in each present <configgroup> clears the
setting to its default.
Quick Tour of XML Syntax
Declaration
The first line, <?xml version="1.0" standalone="yes"?>, is called the XML declaration.
It is required and indicates the XML version in use (norm ally version 1.0). The remainder of the file
consists of nested XML elements, some of which have attributes and content.
Element Start and End Tags
An element typically consists of two tags: start tag and an end tag that surrounds text and other
elements (element content). The start ta g con sis ts of a na m e su rr ou nd e d by an g le br ackets, for
example <configrecord>. The end tag consists of the same name surrounded by angle
brackets, but with a forward slash preceding the name, for example </configrecord>. The
element content can also contain other "child" elements.
4: Configuration Using XML
Element Attributes
The XML element attributes that are name-value pairs included in the start tag after the element
name. The values must always be quoted, using single or double quotes. Each attribute name
should appear only once in an element.
Figure 4-2 shows an XML example which consists of a declaration (first line), nested elements with
A <configgroup> is a logical grouping of configuration parameters and must contain one or
more <configitem> elements. It must have a name attribute and may have an instance
attribute.
A <configitem> is a specific grouping of configuration parameters relevant to its parent group.
An item takes the name attribute and must contain one or more value elements. For example,the
line group might have parameters such as baud rate, data bits, and parity.
A value may specify the value of a configuration parameter. It may contain the name attribute. In
this example, avalue of 9600 might be specified for baud rate; 7 may be specified for data bits, an d
even may be specified for parity
A name attribute identifies the group, item, or value. It is always quoted (as are all XML attributes).
For example,a group that contains serial port parameters has the name "line"
An instance attribute identifies which of several instances is being addressed. It is always quoted.
For example,the serial port name (in the line configgroup) has the instance "1" to indicate serial
port 1 or "2" to specify serial port 2
The following figures show examples of XML conf igu ra tio n reco rd s an d th e us e of th e
<configrecord>, <configgroup>, <configitem>, and <value> XML elements.
An XCR can be imported or exported using the following methods:
Filesystem-XCRs can be saved to the intelligent gateway file system and imported or
accessed as needed. See Best Practices on page 18 or the Filesystem Browser sectio n in the
PremierWave XC Intelligent Gateway User Guide.
CLI-XCRs can be imported (capture d) or exported (dumped) directly to a Telnet, SSH, or
serial line CLI session. Capturing an XCR can be started by pasting a valid XCR directly into
the CLI prompt. PremierWave XC intelligent gateway immediately processes the configuration
record, changing any settings specified. This can be done on any level, including the root.
Special tags in the XML allow for providing root and enable level passwords so that this can
also be done at the password prompt.
Web browser-Web Manager can be used to import and export an XCR to the intelligent
gateway file system. It can also be used to import an XCR from an external source such as
your local hard drive.
FTP-The intelligent gateway FTP server can export and import XCRs when an FTP get or put
command on the filename (pwxc.xcr for export, pwxc_import.xcr for import; bo th are under the
pwxc directory) is requested. On export (FTP get of pwxc.xcr), the FTP server obtains the
current XCR from the PremierWave XC device and sends it as a file. On import (FTP put of
pwxc_import.xcr), the FTP server processes the file by sending it directly to the XML engine.
In both cases the intelligent gateway filesystem is not accessed. The files pwxc.xcr and
pwxc_import.xcr are not read from or written to the file system. See FTP in the PremierWave
XC Intelligent Gateway User Guide.
4: Configuration Using XML
Best Practices
You can import or export an entire XCR, or just a portion of it, by specifying the group name and/or
group instances. In the examples below, import and export operations are performed from the CLI
on the local filesystem and require a XCR on the local filesystem. The Web Manager provide s th e
same functionality.
Caution:Using Microsoft Word to edit and save an XCR will change the format of
Importing
The following syntax can be used to import configurations from a file:
The first line imports all groups specified in the XML config record named in <file>. Any fil ename is
valid, and the file name and extension are not important.
In the second line:
Instance follows group with a colon (see the third example on the next page).
Multiple groups are separated with a comma.
the file and make it incompatible with PremierWave XC intelligent
gateway. This is true even if the file is saved as Plain Text (.txt) or an
XML Document (.xml). Notepad, a third party text editor, or a specialized
The same guidelines above regarding importing configurations also apply to exporting
configurations. If no groups are specified, then the export command will export all configuration
settings to the file. If instances are specified after the groups, only those group instances are
written. If no instance is specified, all instances of that group are written.
Exporting
The following example exports only the accept mode tunneling settings for line 1 to the file
"tunnel_1.xcr" on the intelligent gateway filesystem:
xcr export tunnel_1.xcr "tunnel accept:1"
The following example exports only the connectmode tunneling settings for all ports to the file
"tunnel_all.xcr" on the PremierWave XC filesystem:
xcr export tunnel_all.xcr "tunnel connect"
The following example imports only the settings for line2 fr om a n XCR named "factor y_config.xcr "
on the intelligent gateway filesystem. If "factory_config.xcr" has other configuration settings, they
are ignored:
xcr import factory_config.xcr "line:2"
The following example imports only line settings for all ports from a configuration record on the
PremierWave XC filesystem named "foobar.xcr":
xcr import foobar.xcr "line"
To import only disconnect mode tunnel settings for port 1 and all serial line tunne l settin gs fo r po rt
2 from an XML configuration record named "production.xcr" that contains these settings (and
possibly more), issue the following command:
xcr import production.xcr "tunnel disconnect:1"
The following example imports all tunneling settings and line settings for all serial ports from a file
named xcr_file:
The following example exports only accept mode tunneling settings on serial port 1, and line
settings on serial port 2 to a file named tunnel_config_t1_l2.xcr on the intelligent gateway
filesystem.
mac address filter
firewall
wan interface
router ip address
primary dns<None>, ...
secondary dns<None>, ...
port forwarding
("Instance" attribute is
a number)
static routes
("Instance" attribute is
a number)
name
protocoltelnet, sshDefault: telnet
ssh username
remote address
remote portDefault: 0
user deletenameDeletes an HTTP
realm
type
user (instance is
“admin”)
state<None>, ...
friendly name
port or range
target port
protocol
ingress ip address
ip address
state
network<None>, ...
gateway<None>, ...
metric
interface
friendly name
password
Information
Authentication URI
user. The value
element is used to
specify the user for
deletion.
persistenable, disableDefault: disable
max entriesDefault: 100
modealways, serial string,
disable
echo serial stringenable, disableDefault: enable
serial stringSets a string that can
signon messageSets a sign-on
wait timeDefault: 5000
number
("Instance" attribute is
a number)
override number
channelgsm only, gprs only,
overriding domain
password
server address
server portDefault: 25
username
shouldertapenable, disable
relaycontrolenable, disable
number
gsm preferred, gprs
preferred
Default: disable
be entered at boot time
to enter command
mode. This text may
specify binary
characters. Within []
use binary decimal up
to 255 or hex up to
0xFF. Within {} specify
decimal milliseconds
time delay.
message that is sent
from the serial port
when the device boots
and when the line is in
command mode. This
text may specify binary
characters. Within []
use binary decimal up
to 255 or hex up to
0xFF.