LANCOM Support Knowledgebase Document No. 1910.2115.0520.RHOO - V1.10

Useful commands for accessing LANCOM routers & access points from the console


Description:
This document provides a collection of useful commands and also a few tips & tricks for accessing LANCOM routers & access points from the console.

Information:
  • The green-colored text is an explanation about the respective console command.
  • The commands for entry are colored blue.


1) Display all console commands:

From anywhere in the LCOS menu structure, just enter ? to output a complete overview of all console commands
along with their syntax and meanings.

Information:


root@LANCOM-1780EW-3G:/
> ?
Commands:
dir [-aR] [PATH] ... [FILTER]: show contents, multiple paths allowed
list, ls, ll : like dir
cd PATH : change menu
set [PATH] ? : show input set of parameter
set PATH VALUE(S) : set parameter PATH to VALUE(S)
default [-r] [PFAD] : set parameter to default value
del PATH : delete row
del * : delete whole table
do PATH [PARAMETER] : start action with optional parameter
sysinfo : show system information
readconfig : display configuration settings
readscript [-d][-n][-c][-m] : create configscript
killscript Name : terminate script
writeconfig : change configuration settings
writeflash (TFTP only) : load new firmware via TFTP
loadconfig -? : load a new configuration as TFTP-Client
loadfirmware -? : load a new firmware as TFTP-Client
loadscript -? : load a script as TFTP-Client
ll2mdetect -? : use LL2M to search for other LAN devices
ll2mexec -? : use LL2M to send a command to a LAN device
trace [[+|-|#|?] PAR.[FIL.]]: enable/disable/toggle/status
: of parameter tracing
passwd : change password
passwd -n new [old] : change password (no prompt)
exit, quit, x : leave configuration
time : set current time (MM/DD/YYYY hh:mm:ss)
repeat [VALUE] command : repeats command every VALUE seconds
: until terminated by new input
ping [OPTION] address : ping command
stop/<CR> : stop ping
feature code : set feature on
show parameter [FILTER] : show internal data (e.g. memory usage)
setenv <NAME> <VALUE> : set environment variable
unsetenv <NAME> : remove environment variable
getenv <NAME> : read out environment variable (no newline)
printenv : dump whole environment
echo <ARG>... : echo arguments to console
testmail ? : sends an e-mail
history : print command history
who : list active sessions
sleep <msec> : delay for <msec> milliseconds
!! : repeat last command
!<num> : repeat command <num>
!<prefix> : repeat last command beginning with <prefix>
#<blank> : comment
deletebootlog : delete bootlog
PATHNAME:
Qualifier for a menu or parameter separated by / or \
.. stands for upper level
. stands for current level
VALUE:
Possible input
"" stands for an empty input
NAME:
sequence of _ 0..9 A..Z
first character must not be numeric
case does not matter
FILTER:
Command output filter
The output generated by some commands can be limited by specifying a filter
expression. The filtering is not done line by line, but block by block
depending on the command executed.
A filter expression begins with a stand-alone '@' character and ends either
at the end of the line or with a stand-alone ';' character which terminates
the current command. A filter expression is furthermore composed of one or
more search patterns separated by space characters. The search patterns can
be preceded by no operator ('or' pattern), by a '+' operator ('and' pattern)
or by a '-' operator ('not' pattern). When the command is executed, a block
of information is outputted if at least one of the 'or' patterns, all of the
'and' patterns and none of the 'not' patterns match. The search is not case
sensitive. If a search pattern is to contain characters which otherwise have
a special meaning in this filter syntax (e. g. the space character), it can
be quoted as a whole within '"' characters. Alternatively the special
characters can be escaped by a '\' character. If the '"' and the '\'
characters are to be searched for themselves they must be escaped with the
'\' character.
Remark:
Unique prefix is sufficient



2) Setting parameters with curly brackets:

Curly brackets in a console command are used to set or modify parameters in tables.

The following example shows how rule generation for a VPN connection is switched from automatic to manual.


root@LANCOM-1780EW-3G:
> cd /setup/vpn/vpn-peers (this command sets the path to the VPN connection list)

root@LANCOM-1780EW-3G:/Setup/VPN/VPN-Peers
> ls (this command displays the VPN connection list)

Peer SH-Time Extranet-Address Remote-Gw Rtg-tag Layer dynamic IKE-Exchange Rule-creation DPD-Inact-Timeout IKE-CFG XAUTH SSL-Encaps. OCSP-Check
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LANCOM-TEST 9999 0.0.0.0 8.8.8.8 0 P-LANCOM-TEST No Main-Mode auto 60 Off Off No No



The parameter Rule-creation is to be changed from auto to manually. Enter the following command to do this:

root@LANCOM-1780EW-3G:/Setup/VPN/VPN-Peers
> set LANCOM-TEST {Rule-creation} manually (the value in the curly brackets specifies the column where the change is to be made)

set ok:
Peer SH-Time Extranet-Address Remote-Gw Rtg-tag Layer dynamic IKE-Exchange Rule-creation DPD-Inact-Timeout IKE-CFG XAUTH SSL-Encaps. OCSP-Check
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LANCOM-TEST 9999 0.0.0.0 8.8.8.8 0 P-LANCOM-TEST No Main-Mode manually 60 Off Off No No



3) Overview of changeable/available parameters in a table:

If you don't know which parameters you can change in a table, or which values/syntax they require,
you can display an overview of the parameters with the following command:

root@LANCOM-1780EW-3G:/Setup/VPN/VPN-Peers
> set ? (this command displays an overview of all of the modifiable parameters in a table. The VPN connection list is used as an example here)

Possible Entries for columns in VPN-Peers:
[1][Peer] : 16 chars from: ABCDEFGHIJKLMNOPQRSTUVWXYZ@{|}~!$%&'()+-,/:;<=>?[\]^_.0123456789
[6][SH-Time] : 4 chars from: 1234567890
[2][Extranet-Address] : 15 chars from: 1234567890.
[8][Remote-Gw] : 63 chars from: ABCDEFGHIJKLMNOPQRSTUVWXYZ@{|}~!$%&'()+-,/:;<=>?[\]^_.0123456789abcdefghijklmnopqrstuvwxyz`
[15][Rtg-tag] : 5 chars from: 1234567890
[4][Layer] : 16 chars from: ABCDEFGHIJKLMNOPQRSTUVWXYZ@{|}~!$%&'()+-,/:;<=>?[\]^_.0123456789
[5][dynamic] : No (0), ICMP (4), UDP (8), B-Channel (1), D-Channel (2)
[7][IKE-Exchange] : Main-Mode (0), Aggressive-Mode (1)
[9][Rule-creation] : auto (0), manually (1), off (2)
[10][DPD-Inact-Timeout] : 10 chars from: 1234567890
[11][IKE-CFG] : Off (0), Client (1), Server (2)
[12][XAUTH] : Off (0), Client (1), Server (2)
[13][SSL-Encaps.] : No (0), Yes (1)
[16][OCSP-Check] : No (0), Yes (1)



4) Listing a single table entry:

Tables often contain several entries, and displaying all of the parameters can become confusing. An option here is to use the list command (ls)
to display the parameters for a single table entry.

root@LANCOM-1780EW-3G:/Setup/VPN/VPN-Peers
> ls (this command displays the full VPN connection list)

Peer SH-Time Extranet-Address Remote-Gw Rtg-tag Layer dynamic IKE-Exchange Rule-creation DPD-Inact-Timeout IKE-CFG XAUTH SSL-Encaps. OCSP-Check
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LANCOM-TEST1 9999 0.0.0.0 8.8.8.8 0 P-LANCOM-TEST1 No Main-Mode manually 60 Off Off No No
LANCOM-TEST2 0 0.0.0.0 9.9.9.9 0 P-LANCOM-TEST2 No Aggressive-Mode auto 60 Off Off No No
LANCOM-TEST3 0 0.0.0.0 1.1.1.1 0 P-LANCOM-TEST3 No Main-Mode auto 60 Off Off No No
LANCOM-TEST4 9999 0.0.0.0 2.2.2.2 0 P-LANCOM-TEST4 No Main-Mode manually 60 Off Off No No
LANCOM-TEST5 0 0.0.0.0 3.3.3.3 0 P-LANCOM-TEST5 No Aggressive-Mode auto 60 Off Off No No
LANCOM-TEST6 9999 0.0.0.0 4.4.4.4 0 P-LANCOM-TEST6 No Main-Mode manually 60 Off Off No No
LANCOM-TEST7 9999 0.0.0.0 5.5.5.5 0 P-LANCOM-TEST7 No Aggressive-Mode manually 60 Off Off No No
LANCOM-TEST8 0 0.0.0.0 6.6.6.6 0 P-LANCOM-TEST8 No Main-Mode auto 60 Off Off No No

The following example shows how to display only the parameters of the VPN remote peer LANCOM-TEST6.

root@LANCOM-1780EW-3G:/Setup/VPN/VPN-Peers
> ls LANCOM-TEST6 (this command displays the specified list entry only)

Peer SH-Time Extranet-Address Remote-Gw Rtg-tag Layer dynamic IKE-Exchange Rule-creation DPD-Inact-Timeout IKE-CFG XAUTH SSL-Encaps. OCSP-Check
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LANCOM-TEST6 9999 0.0.0.0 4.4.4.4 0 P-LANCOM-TEST6 No Main-Mode manually 60 Off Off No No



5) Display tables in a compact view:

The command readscript -m enables you to display a table in a compact form. The VPN connection list is used again as an example here.

root@LANCOM-1780EW-3G:/Setup/VPN/VPN-Peers
> readscript -m
# Script (9.00.0212 / 07.08.2014) (0x0060c218,IDs:3,4,9,e,f,15,16,23//da0f4a80/1/32,23/X/d48f4880,2b,31;0x0c000002)

lang English
flash No

cd /Setup/VPN/VPN-Peers
del *
tab Peer SH-Time Extranet-Address Remote-Gw Rtg-tag Layer dynamic IKE-Exchange Rule-creation DPD-Inact-Timeout IKE-CFG XAUTH SSL-Encaps. OCSP-Check
add "LANCOM-TEST1" 9999 0.0.0.0 "8.8.8.8" 0 "P-LANCOM-TEST1" No Main-Mode manually 60 Off Off Yes No
add "LANCOM-TEST2" 0 0.0.0.0 "9.9.9.9" 0 "P-LANCOM-TEST2" No Aggressive-Mode auto 60 Off Off Yes No
add "LANCOM-TEST3" 0 0.0.0.0 "1.1.1.1" 0 "P-LANCOM-TEST3" No Main-Mode auto 60 Off Off Yes No
add "LANCOM-TEST4" 9999 0.0.0.0 "2.2.2.2" 0 "P-LANCOM-TEST4" No Main-Mode manually 60 Off Off Yes No
add "LANCOM-TEST5" 0 0.0.0.0 "3.3.3.3" 0 "P-LANCOM-TEST5" No Aggressive-Mode auto 60 Off Off Yes No
add "LANCOM-TEST6" 9999 0.0.0.0 "4.4.4.4" 0 "P-LANCOM-TEST6" No Main-Mode manually 60 Off Off Yes No
add "LANCOM-TEST7" 9999 0.0.0.0 "5.5.5.5" 0 "P-LANCOM-TEST7" No Aggressive-Mode manually 60 Off Off Yes No
add "LANCOM-TEST8" 0 0.0.0.0 "6.6.6.6" 0 "P-LANCOM-TEST8" No Main-Mode auto 60 Off Off Yes No
cd /
flash Yes

# done
exit


6) Configuration test mode:

Every LANCOM router & access point features a non-volatile memory area (flash memory) and a temporary memory area (RAM).

The test mode is used to run a new configuration, giving you the assurance that any changes to a configuration made at the console are indeed functional.

The new or changed configuration is written to the RAM, the temporary memory. If the new or modified configuration does not work,
it is removed from the temporary memory after a preset time and the device reboots using its original configuration, which is always
stored unchanged in the non-volatile memory.

Information:
Make sure that you are finished with the configuration before the preset time for the device reboot, because a device restart will delete the RAM, so losing you changes
if nothing was transferred to flash memory beforehand.

This configuration method is strongly advisable for work where a faulty configuration would cause the LANCOM router
to become inaccessible (e.g. when changing access rights) or to disconnect important links (VPN, WLAN, etc.).

root@LANCOM-1780EW-3G:/
> flash 0 (nothing is written to non-volatile flash memory, but to the RAM memory only)
set ok: VALUE: No


[Test]root@LANCOM-1780EW-3G:/ (the leading [Test] before the prompt shows that you are in test mode
> begin (starting scripting mode)
script>sleep 25m (sets a sleep timer to 25 minutes. Caution: Including a space (25 m) sets the time in milliseconds!)
script>do/other/boot (the device will restart after 25 minutes; the RAM is cleared on reboot)
script>exit (exit the scripting mode)

[Test]root@LANCOM-1780EW-3G:/
>
Starting script


[Test]root@LANCOM-1780EW-3G:/
> show script (show scripting jobs running on the device)
current running script found R3 (the scripting job is running under R3. Please note this value!)
Sleep expires in 1496049 ms
do/other/boot
exit

Last executed script

"sleep 25m" executed

Finished script successfully


The device can now be configured with console commands. Should an error occur and the device becomes unreachable,
then just wait 25 minutes and the device automatically restarts.
The original configuration is reloaded and the device should be accessible again.


[Test]root@LANCOM-1780EW-3G:/
> flash 1 (after a successful configuration, the changes in the RAM memory are written to the flash memory)
set ok: VALUE: Yes

root@LANCOM-1780EW-3G:/
> killscript R3 (terminates the scripting job R3)

root@LANCOM-1780EW-3G:/
>
Finished script successfully



7) Using the show command:

The show command displays the states of configurations and connections. An overview and explanations of the syntax for the commands can be displayed by entering show ?



This example of the command show vpn displays the VPN rules generated for all of the VPN connections configured on a LANCOM router:

root@LANCOM-1780EW-3G:/
> show vpn

VPN SPD and IKE configuration:

# of connections = 12

Connection #1 ikev1 0.0.0.0/0.0.0.0:0 <-> 0.0.0.0/255.255.255.255:0 any

Name: MYVPN_00001
Unique Id: ipsec-0-MYVPN_00001-pr0-l0-r0
Flags: aggressive-mode ikecfg
Local Network: IPV4_ADDR_SUBNET(any:0, 0.0.0.0/0.0.0.0)
Local Gateway: IPV4_ADDR(any:0, 0.0.0.0)
Remote Gateway: IPV4_ADDR(any:0, 0.0.0.0)
Remote Network: IPV4_ADDR(any:0, 0.0.0.0/255.255.255.255)

Connection #2 ikev1 172.50.200.1/255.255.255.255:0 <-> 172.50.200.2/255.255.255.255:0 any

Name: LC1781
Unique Id: ipsec-0-LC1781-pr0-l0-r0
Flags: main-mode
Local Network: IPV4_ADDR(any:0, 172.50.200.1/255.255.255.255)
Local Gateway: IPV4_ADDR(any:0, 8.8.8.8)
Remote Gateway: IPV4_ADDR(any:0, 8.8.8.2)
Remote Network: IPV4_ADDR(any:0, 172.50.200.2/255.255.255.255)


If you extend the command with the parameter @ <peer-name>, you can display the VPN rules generated for a specific VPN connection:

root@LANCOM-1780EW-3G
> show vpn @ iphone

VPN SPD and IKE configuration:

# of connections = 12

Connection #3 ikev1 0.0.0.0/0.0.0.0:0 <-> 0.0.0.0/255.255.255.255:0 any

Name: IPHONE
Unique Id: ipsec-0-IPHONE-pr0-l0-r0
Flags: aggressive-mode ikecfg
Local Network: IPV4_ADDR_SUBNET(any:0, 0.0.0.0/0.0.0.0)
Local Gateway: IPV4_ADDR(any:0, 0.0.0.0)
Remote Gateway: IPV4_ADDR(any:0, 0.0.0.0)
Remote Network: IPV4_ADDR(any:0, 0.0.0.0/255.255.255.255)


The command show job displays the processes currently running on the LANCOM router. The command returns information about the processor load and the status of the processes, among other things.

To view a particular process, the command is entered with the syntax show job @ <Name>:




The command show filter displays the firewall rules configured on the LANCOM router.
To view a particular rule, the show filter command is entered with the syntax show filter @ <Name of rule>:

root@LANCOM-1780EW-3G:/
> show filter @ TESTRULE
Filter 00000003 from rule TESTRULE:
Protocol: 0
Src: 00:00:00:00:00:00 0.0.0.0/0.0.0.0 0-0
Dst: 00:00:00:00:00:00 192.168.10.0/255.255.255.240 0-0 (WAN ifc TEST)
use routing tag 0
conditional: if not connected
Limit per conn.: after transmitting or receiving of 0 packets
actions after exceeding the limit:
reject


You can view the boot log of a device with the command show bootlog.
If the device restarts unexpectedly, the boot log can provide information about the error that occurred.

root@LANCOM-1780EW-3G:/
> show bootlog
Boot log (8192 Bytes):
/25/2014 17:02:00 System boot after firmware upload

DEVICE: LANCOM 1780EW-3G
HW-RELEASE: B
VERSION: 9.00.0141 / 25.04.2014

****

04/25/2014 17:05:47 System boot after firmware upload

DEVICE: LANCOM 1780EW-3G
HW-RELEASE: B
VERSION: 8.84.0170 / 24.04.2014

****


8) Display tables from different menues:

If you want to display tables that are in different menues, you must use the list command (ls) and separate these commands with a semicolon (;) and a space.

ls /Setup/VPN ; ls /Status/Operating-Time

root@LANCOM-1783VA:/
> ls /Setup/VPN ; ls /Status/Operating-Time

Certificates-and-Keys MENU:
IKEv2 MENU:
Isakmp MENU:
Networks MENU:
OCSP-Client MENU:
Proposals MENU:
myVPN MENU:
Additional-Gateways TABLE: 8+ x [Peer,Gateway-1,Rtg-Tag-1,..]
Layer TABLE: 8+ x [Name,PFS-Grp,IKE-Grp,..]
VPN-Peers TABLE: 8+ x [Peer,SH-Time,..]
AggrMode-IKE-Group-Default VALUE: 2
AggrMode-Proposal-List-Default VALUE: IKE_PRESH_KEY
Allow-Remote-Network-Selection VALUE: no
Anti-Replay-Window-Size VALUE: 0
Establish-SAs-Collectively VALUE: only-with-KeepAlive
Flexible-ID-Comparison VALUE: No
MainMode-IKE-Group-Default VALUE: 2
MainMode-Proposal-List-Default VALUE: IKE_RSA_SIG
Max-Concurrent-Connections VALUE: 0
NAT-T-Operating VALUE: yes
NAT-T-port-for-rekeying VALUE: No
Operating VALUE: yes
QuickMode-PFS-Group-Default VALUE: 2
QuickMode-Proposal-List-Default VALUE: ESP_TN
QuickMode-Shorthold-Time-Default VALUE: 0
SSL-Encaps.-Allowed VALUE: Yes
Simple-Cert-RAS-Operating VALUE: no

Operating-Time INFO: 11D 18:44:28



9) Displaying status information using the ls command:

The ls command can be used to view status information. Some examples:

root@LANCOM-1781AW:/Status/VPN
> ls -r (this command lists the current directory and all subdirectories)

Firmware MENU:
Other MENU:
Setup MENU:
Status MENU:

[rek] Status:

Accounting MENU:
Block-Devices MENU:
COM-Ports MENU:
CWMP MENU:
Certificates MENU:
Charging MENU:
.
.
.
.
.



root@LANCOM-1781AW:/
> ls status/connection (this command shows a table with the connection status of the WAN/DSL connections)

Ifc Connections active passive Errors Con.-Time Charge
----------------------------------------------------------------------------------------
ADSL-1 6 6 0 0 10:32:35 0
ADSL-2 0 0 0 0 No-connection 0
ADSL-3 0 0 0 0 No-connection 0
ADSL-4 0 0 0 0 No-connection 0
ADSL-5 0 0 0 0 No-connection 0
ADSL-6 0 0 0 0 No-connection 0
ADSL-7 0 0 0 0 No-connection 0
ADSL-8 0 0 0 0 No-connection 0
CH01 0 0 0 0 No-connection 0
CH02 0 0 0 0 No-connection 0
DSL-CH-1 1 1 0 0 5D 1:59:35 0
DSL-CH-2 0 0 0 0 No-connection 0
DSL-CH-3 0 0 0 0 No-connection 0
DSL-CH-4 0 0 0 0 No-connection 0
DSL-CH-5 0 0 0 0 No-connection 0
DSL-CH-6 0 0 0 0 No-connection 0
DSL-CH-7 0 0 0 0 No-connection 0
DSL-CH-8 0 0 0 0 No-connection 0
EXT 0 0 0 0 No-connection 0


root@LANCOM-1781AW:/
> ls status/remote (this command shows the age of the WAN connections and the assigned logical interface)

Conn.-start Remote-ID Mode Ifc Conn.-time Charge
-----------------------------------------------------------------------------------------------------------
08/21/2014 04:00:59 INTERNET1 Active ADSL-1 10:32:59 0
08/20/2014 04:00:59 INTERNET1 Active ADSL-1 23:59:59 0
08/19/2014 04:00:59 INTERNET1 Active ADSL-1 23:59:59 0
08/18/2014 04:00:59 INTERNET1 Active ADSL-1 23:59:59 0
08/17/2014 04:00:59 INTERNET1 Active ADSL-1 23:59:59 0
08/16/2014 12:35:07 INTERNET1 Active ADSL-1 15:25:51 0
08/16/2014 12:33:59 INTERNET2 Active DSL-CH-1 5D 1:59:59 0



root@LANCOM-1781AW:/
> ls status/info (this command shows, among other things, which logical interface is assigned to which physical interface)

Ifc Status Mode Dialup-remote Peer B1-DT B2-DT
---------------------------------------------------------------------------------------------------------
ADSL-1 Connection Active INTERNET1 9999 0
ADSL-2 No remote 0 0
ADSL-3 Ready 0 0
ADSL-4 Ready 0 0
ADSL-5 Ready 0 0
ADSL-6 Ready 0 0
ADSL-7 Ready 0 0
ADSL-8 Ready 0 0
CH01 No remote 0 0
CH02 Ready 0 0
DSL-CH-1 Connection Active INTERNET2 9999 0
DSL-CH-2 Ready 0 0
DSL-CH-3 Ready 0 0
DSL-CH-4 Ready 0 0
DSL-CH-5 Ready 0 0
DSL-CH-6 Ready 0 0
DSL-CH-7 Ready 0 0
DSL-CH-8 Ready 0 0
EXT Init 0 0



root@LANCOM-1781AW:/
> ls status/config/features (this command displays the software options enabled on the device, along with their status. With time-limited options, the expiry date is shown)

Feature Expires State Index Count
-------------------------------------------------------------------------
LANCAPI unlimited active 0 0
Leased_Line unlimited active 0 0
Switched_Line unlimited active 0 0
FAX unlimited active 0 0
VPN-5 unlimited hidden 0 5
VPN-25 unlimited active 0 25
WLAN_Point_to_Point unlimited active 0 0
Public_Spot unlimited active 0 0
UMTS unlimited active 0 0
Contentfilter_Additive 12/31/2015 active 10 100
Contentfilter_Additive 01/22/2014 expired 0 100
LAN_Bridge unlimited active 0 0
PMS unlimited active 0 0



root@LANCOM-1781AW:/
> ls status/hardware (this command displays information about the hardware and firmware of a device)

Model-Number INFO: LANCOM 1781AW
Extended-Name INFO: LANCOM 1781AW
Serial-Number INFO: 4002397618100282
MOD-level INFO: B3
Production-date INFO: 2/27/2012
PLD-Version INFO: -
Reset-Button-State INFO: inactive
Board-Revision INFO: B
CPU-Type INFO: Freescale MPC8314E 1.2 (core 2.0)
CPU-Clock-MHz INFO: 398
CPU-Load-Percent INFO: 3
CPU-Load-1s-Percent INFO: 3
CPU-Load-5s-Percent INFO: 3
CPU-Load-60s-Percent INFO: 3
CPU-Load-300s-Percent INFO: 3
Security-Unit MENU:
PCI-Device-List TABINFO: 32 x [Host-Bridge,Bus,Device,Function,..]
Total-Memory-KBytes INFO: 131072
Free-Memory-KBytes INFO: 38949
Security-Engine INFO: Yes
Onboard-USB-Hub INFO: No
SW-Version INFO: 9.00.0219 / 16.08.2014
Ethernet-Switch-Type INFO: AR8327 Rev. 1.1
Adv.-Error-Reporting-Log TABINFO: 10 x [Index,Time,Severity,Multiple,..]
PCIe-corr.-errors INFO: 0
PCIe-uncorr.-errors INFO: 0
PCIe-link-resets INFO: 0


10) Using the repeat command:

The repeat command is used to repeatedly display values (that vary with time).

The following example outputs the CPU load (%) and memory usage for a device every 10 seconds:

root@LANCOM-1781AW:/
> repeat 10 ls status/hardware/cpu-load-percent ; show mem

[10 Sec.-REPEAT];root@LANCOM-1781AW:/
> repeat 10 ls status/hardware/cpu-load-percent ; show mem

CPU-Load-Percent INFO: 3

Total: RAM: 92.6 MBytes
Status : Blocks Big Small Total
----------------------------------------------------------
USED : 52990 3.4 MBytes 96 Bytes 54.6 MBytes
FREE : 4317 36.7 MBytes 96 Bytes 38.0 MBytes

[10 Sec.-REPEAT];root@LANCOM-1781AW:/
>

CPU-Load-Percent INFO: 3

Total: RAM: 92.6 MBytes
Status : Blocks Big Small Total
----------------------------------------------------------
USED : 52990 3.4 MBytes 96 Bytes 54.6 MBytes
FREE : 4317 36.7 MBytes 96 Bytes 38.0 MBytes

[10 Sec.-REPEAT];root@LANCOM-1781AW:/


11. Reset values (scalars and tables) of the current directory:

With the command "default", all values (scalars and tables) of the current "directory" can be reset to the default values.

The example shows how the "Access-Table" table in the / Setup / Config / directory is reset with the "default" command.


root@LANCOM-1781AW:/
> cd /Setup/Config/Access-Table

root@VPN-AC:/Setup/Config/Access-Table
> ls

Ifc. Telnet TFTP HTTP SNMP HTTPS Telnet-SSL SSH SNMPv3
========------------------------------------------------------------------
LAN Yes Yes Yes Yes Yes Yes Yes Yes
WAN VPN VPN VPN VPN Yes VPN Yes VPN


root@LANCOM-1781AW:/Setup/Config/Access-Table
> cd..

root@LANCOM-1781AW:/Setup/Config
> default
Ok

root@LANCOM-1781AW:/Setup/Config
> cd Access-Table

root@LANCOM-1781AW:/Setup/Config/Access-Table
> ls

Ifc. Telnet TFTP HTTP SNMP HTTPS Telnet-SSL SSH SNMPv3
========------------------------------------------------------------------
LAN No Yes Yes Yes Yes Yes Yes Yes
WAN No No No No No No No No


root@LANCOM-1781AW:/Setup/Config/Access-Table
>



17. Fast return to the previous directory

The cd - command returns you from the current directory path to the previous path:

root@LANCOM_1793VA-4G:/Setup/Interfaces
> ls

Mobile MENU:
Modem MENU:
Analog TABLE: 4 x [Ifc,Operating,Microphone-Gain,..]
DSL TABLE: 4 x [Ifc,Operating,Upstream-Rate,..]
Ethernet-Ports TABLE: 4 x [Port,Assignment,Connector,MDI-Mode,..]
LAN-Interfaces TABLE: 4 x [Ifc,Operating,Tx-Limit,Rx-Limit]
Modem-Mobile TABLE: 1 x [Ifc,Operating,Data-Rate,Profile]
S0 TABLE: 2 x [Ifc,Protocol,LL-B-chan.,Dial-prefix,..]
VDSL TABLE: 1 x [Ifc,Protocol,Upstream-Rate,..]
PCM-Sync-Source VALUE: Auto
Permanent-L1-Activation VALUE: Sync-Source-Only

root@LANCOM_1793VA-4G:/Setup/Interfaces
> cd /Setup/Interfaces/Mobile

root@LANCOM_1793VA-4G:/Setup/Interfaces/Mobile
> cd -

root@LANCOM_1793VA-4G:/Setup/Interfaces
> cd -

root@LANCOM_1793VA-4G:/Setup/Interfaces/Mobile
>

Catchwords: cli; commands
Please review this document! This document was helpful This document was not helpful