Technical Training

Download Report

Transcript Technical Training

United Networking
4.4 CLI
& System Management
www.oneaccess-net.com
[email protected]
2 May, 2020
Copyright © OneAccess Networks – All rights reserved
United Networking
System management basics
www.oneaccess-net.com
[email protected]
2 May, 2020
Copyright © OneAccess Networks – All rights reserved
System Management
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g













CLI-Based user interface (CLI: Command Line Interface)
 commands are not case-sensitive
 file names & directory names are case-sensitive
 e.g.: config, show config, show running-config, cd BSA, ...
web-based configurator (WCF: Web Configurator Factory)
CWMP TR-69
SNMP V1/V2/V3
SNTP synchronization
support of user privileges
upload/download of configuration & binaries via FTP/TFTP
QoS measurement probe
traceroute, ping, extended ping
user authentication via RADIUS or TACACS+
RADIUS accounting
event and trace buffering
flow capture and decoding
3
System Management
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

management interfaces:

console port:


ethernet port




factory IP address: 192.168.1.10
configuration using telnet
FTP/TFTP for downloading/uploading files
access rights: 3 levels




serial, 9600 bps async, 8 bits, 1 stop, no parity, no flow control
user (level 0): only access to elementary show functions or
diagnostics
manager (level 7): access to all show functions, traces and
configurations
administrator (level 15): access to all functions including system debugging
default login:


login = admin
password = admin
4
System Management
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

local user management



users with different access rights can be defined
each user has a username, password and belongs to a group
3 pre-defined user groups with 3 levels of access rights:


levels 0 (user) , 7 (manager) & 15 (administrator)
CLI commands:

example: create user "teacher" with password "severe" and level
"administrator"
5
File System 1/4
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

file system: 2 DISKS

FLASH disk (non volatile / EEPROM saved, default):


BSA directory with sub-directories
 config
: for configuration files
 binaries
: for software binaries
 dump
: for log files
RAM disk (volatile : erased on power reset, not after reboot)



used by the system itself (temporary files)
used for log files (events or traces)
contains:




the "tmp" directory for saving temporary files
the "running-config": a txt file with the CLI commands to build the
current
configuration
event files (log messages)
any file can be uploaded / downloaded

software binaries, boot binaries, configuration and log files
6
File System 2/4
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

CLI commands for file and directory management:
• devs [flash | ramdisk] :
without parameters, displays the file system in use.
with the parameters, the user can change the current working file system.
• pwd
: displays the current working directory
• cd <directory>
: change directory
• mkdir <directory>
: create a new directory
• ls
: list the files and sub-directories of the current directory
• cat <filename>
: list content of a text file (config., logs)
• who
: provides the list of users who are connected to the router
• rm <filename>
: remove a file
• exec -echo <filename>
: executes a CLI script
• mv <filename1> <filename2>
• copy <file1> <file2>
: rename a file
: copy a file (source: file1, destination: file2)
7
File System 3/4
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

file and directory management
root directory
FLASHDISK
BSA subdirectory
RAMDISK
FLASHDISK
8
File System 4/4
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

file and directory management
logging of all SNMP v3 sessions
logging of all Telnet sessions
password file
lists the software & configuration files to start-up the device by bootsoftware
configuration management history
9
Power-Up Message 1/4
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g
device motherboard description
serial nr
free Flash memory
➙
10
Power-Up Message 2/4
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g
software binary file location
software binary file name
➙
➙
software version:
ONEOS1: ONE 60 - 200
ONEOS2: ONE 400
ONEOS4: ONE 20A – 100A
ONEOS5: ONE 80 -180 – 300
ONEOS6: ONE 20D – 100D
ONEOS7: ONECell 25
ONEOS35: ONECell 35
11
Power-Up Message 3/4
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g
➙
hardware configuration
➙
12
Power-Up Message 4/4
➙
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g
configuration file name
13
United Networking
Basic CLI handling
www.oneaccess-net.com
[email protected]
2 May, 2020
Copyright © OneAccess Networks – All rights reserved
Getting Started with CLI
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

you do not have to fully write CLI keywords:
➨ press <TAB> to complete the keyword.
If there are more than one keyword match for a partial word, the CLI
answers ‘Ambiguous command’. (example: ‘sh’ matches ‘shutdown’ and
‘show’)


if you do not know what to enter:
➨ press ‘?’ anywhere in the command line to get help
?

the CLI is not case-sensitive
15
Getting Started with CLI
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

edition keystrokes
16
basic CLI Commands
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

Hardware Configuration
OneOs>show system hardware
17
basic CLI Commands
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

System Status
OneOs>show system status
18
basic CLI Commands
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

System Configuration (1)
OneOs>show running-config
19
basic CLI Commands
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

System Configuration (2)
OneOs>show configuration
OneOs>show configuration interface
20
basic CLI Commands
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g
Accessing the configuration mode (admin/manager privilege) :
OneOs> configure terminal
Saving configuration :
OneOs> save running-config [ to <filename>]
Router reboot :
OneOs> reboot [ { after <seconds> | at <hh>:<mm>[:<ss>] } ]
OneOs> reboot cancel
Restart with default configuration :
OneOs> erase saved-config
Are you sure you want to erase running configuration? (Y/N) : y
Restore factory settings :
OneOs> restore factory-setting
Actually this command does :
OneOs> rm /BSA/config/bsaStart.cfg
OneOs> rm /password
OneOs> rm /snmpv3.users
OneOs> reboot
21
basic CLI Commands
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g
Manual date/time setting :
OneOs> date
29/01/2008
OneOs> date <dd>/<mm>/<yr>
OneOs> time
11:06:30
OneOs> time <hh>:<mn>:<sc>
Date/time synchronisation on an NTP clock source (SNTP client):
OneOs> configure terminal
OneOs(configure)> sntp broadcast client
OneOs(configure)> sntp <server-ip-address> [<source-if> <unit>]
Adjusting universal time acquired by NTP to local time zone and time offset:
OneOs(configure)> clock timezone <name> <-23 .. 23>
OneOs(configure)> clock summer-time recurring <name> { <1-4> | first |
last } <day> <month> { <1-4> | first | last } <day> <month>
Example:
clock timezone GMT 1
clock summer-time recurring PARIS last Sunday March 02:00 last Sunday
October 03:00
22
Password Recovery
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

password recovery




If the login/passwords are lost, password recovery is possible from
the console port typing:
<ESCAPE>, then <CTRL>+Y and finally <CTRL>+N
the ‘/password’ file and the configuration file are erased.
If you attempt to log in after reboot the password file is recreated with
the default ‘admin’/’admin’ login/password.
example:
Username: <ESC> <Ctrl Y> <Ctrl N>
Are you sure you want to reset configuration? (y/n) y
System will reboot now.
Rebooting the device...
23
CLI Help 1
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g
OneOs>help
atm-capture
auto-call
auto-update
boot
capture
configure
console
copy
debug
disable
dot11
enable
erase
exec
exit
factory
factory-conf
ftp
hostname
isdn
monitor
- Capture ATM traffic on a specific PVC
- make an automatic call
- Start/Stop AutoUpdate sequence
- Configure the boot application
- Set protocol analyser filters
- Enter configuration mode
- Disable/Enable console input
- Copy <URL Source> <URL Destination>
- Debug
- Turn off privileged commands
- 802.11 management commands
- Reserved
- Erase running-config and reboot
- Execute a file
- Exit intermediate mode
- factory <lock | unlock | fxs>
- factory-conf <serialnumber> <MACaddr> [<password>]
- Enter ftp session
- Get host name
- helpfull isdn commands
- Monitor administration functions
24
CLI Help 2
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g
OneOs>help
no
package-options
ping
post-mortem
pstn
restore
save
serial-capture
snmp
software
telnet
term
trace
trace-oam
traceroute
untar
verify
write
x25
xping
- Disable ping / flood ping sessions
- Package options management
- Send ICMP echo request
- Enable/disable post mortem
- helpfull pstn commands
- Restore factory default settings
- Save configuration [to filename]
- Capture traffic on serial interface
- snmp
- Change operational or backup software version
- Telnet to host
- Reserved
- Filter trace calls
- Manage display of OAM traffic
- Traces route to host
- untar a file on flash
- Verify boot or soft files
- Write running config
- x25 management commands
- Set ping session
25
CLI Help Commands 1
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g
OneOs>help commands
activate
alias
bind
broadcast
cat
cd
chkdsk <device:>
clear
cpuClkStart
cpuClkStop
cpuHelp
cpuReport
cpuStart
cpuStop
cpuTask
date
delay
devs
echo
end
- Configure system
- Text substitution
- Bind an address to telnet server
- Write message to all users logged in
- Display contents of a file
- Change working directory
- DOS file system sanity check / co
- Reset functions
- Start task activity monitor running at ticksPerSec ticks per second
- Stop collecting data
- Print the list of cpu report functionalities
- Prints display of task activity statistics
- Start cpuClkStart and do a report every freq seconds
- Stop collecting data and reports
- Run periodic task activity reports
- Print/set the date
- Delays
- List or change all system-known devices
- Echo text typed in
- Reserved
26
CLI Help Commands 2
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g
OneOs>help commands
event
format
groups
help
history
logout
ls
mkdir
mv
power-on-reboot
prompt
pwd
reboot
reboot-check
repeat
rm
serial-port
show
sleep
start
- Filter events calls
- Format the flash
- Show system groups
- Show command help
- Show command history
- Log off this system
- List files
- Create directory
- Move file
- do a power on reboot
- Change current prompt
- Print curent working directory
- Reboot the equipment
- Reboot the equipment
- Repeat a message
- Remove a file
- Change serial port caracteristics
- Show running system information
- Sleep for n seconds
- start a call generator
27
CLI Help Commands 3
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g
OneOs>help commands
stop
stty
syntax
system
time
tree
tshell
user
who
whoami
write_message
- stop a call generator
- Terminal settings
- Show command syntax
- System settings
- Print/set the time
- Show command tree
- Switch to Target Shell on this session
- User configuration
- Display users currently logged in
- Show current user info
- Write text to another user
28
Download / Upload 1
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

File download/upload

first: checking flash disk space !
OneOs> show device status flash
the last line of the command output indicates the available memory
 example:
OneOs> show device status flash

... ... ...
- free space on volume:
OneOs>

26,310,656 bytes
required space depends on the OneOS version:
29
Download / Upload 2
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

FTP or TFTP


ONExx has embedded FTP or TFTP clients
Connection to FTP or TFTP Server from



Any file may be uploaded/downloaded :




The ONExx after opening a telnet session from the PC
The ONExx through the console session
Software and boot binary files
Configuration files
Log files (events)
file transfer must be started from the directory where the
file is located
30
TFTP Upload
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

TFTP upload:

example:
- transfer of bsaStart.cfg from ONExx to the PC
- TFTP server IP address = 192.168.1.1
31
TFTP Download
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

TFTP download:

example:
- transfer of bsaStart.cfg from the PC/tftp server to the ONExx/tftp
client
- TFTP server IP address = 192.168.1.1
Executing a configuration file:
OneOs> exec –echo bsaStart.cfg
32
FTP Upload
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

FTP upload:

example:



transfer of bsaStart.cfg from ONExx to the PC
FTP server IP address = 192.168.1.1
note: during any FTP sessions following commands are available:
LOCAL / ONExxx :
lls ( local ls command )
lcd ( local cd command )
REMOTE / PC :
ls ( ls command )
cd ( cd command )
33
FTP Download
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

FTP download:

example:
- transfer of bsaStart.cfg from the PC to the ONExx
- FTP server IP address = 192.168.1.1
34
Software Upgrade
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

Example for downloading a new software release:

Read the bsaBoot.inf file to read the current location and software name:
OneOs> cd BSA
OneOs> cat bsaBoot.inf
flash:/BSA/binaries/OneOs (software binary name)
flash:/BSA/config/bsaStart.cfg

Run a TFTP server on a PC (IP address = 192.168.1.1) and enter the
following command:
OneOs> cd BSA/binaries
OneOs> copy tftp://192.168.1.1/OneOs_file.ZZZ OneOsNew

Rename OneOs and reboot
OneOs> mv OneOs OneOsold
OneOs> mv OneOsNew OneOs
OneOs> reboot
35
Software Integrity
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

verification of software integrity
OneOs>show soft-file info [<path>/]<filename>

example:
36
United Networking
Recover Factory Settings
www.oneaccess-net.com
[email protected]
2 May, 2020
Copyright © OneAccess Networks – All rights reserved
Factory Settings via CLI 1/2
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

Objective


Reload a router as if it was coming from factory
CLI Command
restore factory-setting
Are you sure you want to restore factory settings?(Y/N):


Action
 Removes all files except certain system files:






Regenerates certain system files



flash: /BSA/bsaBoot.inf
flash: /BSA/binaries/OneOs
flash: /factory-backup/ (and all files found under that directory)
flash: /ibc (and all files found under that directory)
flash: /tftpboot (and all files found under that directory)
Flash:/password
Flash:/BSA/bsaBoot.inf
System Reboots
38
Factory Settings via CLI 2/2
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

Some customer settings can be restored

Files in Factory-backup directory are restored

flash:/factory-backup/default-bsaStart.cfg
flash:/factory-backup/default-web.tar
flash:/factory-backup/default.wcfaccounts.ini

flash:/factory-backup/default-password



Following files are erased:




snmpv3.user
ssh_host_dsa_key.pub (SSH public DSA key)
ssh_host_dsa_key (SSH DSA key)
pinecode (PIN code for Mobile Access Routers)
39
Factory Settings via Hardware
U nn iitte ed d N eNt e
w tow
r koi rnkgi n g

Restore Factory Settings via hardware


Specific boot Flag must be set



No need to access via Console Port
flags (f) : 0x8008
 the router configuration is overwritten with the factory configuration
flags (f) : 0x4008
 the router configuration is renamed as
/BSA/config/bsaStart.rescue and the factory configuration is
copied such that it is used as start configuration
Procedure




Power-on the product
The ‘Status’ LED blinks very quickly, then it blinks more slowly.
When all LEDs of the front panel are lit, unplug the power cable.
Repeat the process three times and then let the router boot. The
restore operation will be done.
40