Basic Config Commands
- hostname HOSTNAME
Set hostname of the router.
- log export removable-storage
Export system logs to connected USB removable storage. System logs contains FRR logs and syslogs
- log export ssh HOST USER PATH
Export system logs via SSH to HOST. System logs contains FRR logs and syslogs
- log export ssh HOST USER PATH
Export system logs via FTP to HOST. System logs contains FRR logs and syslogs
- [no] ip host NAME A.B.C.D
Add an entry to
know hosts
. The negation of this command cause the entry( if exists) be removed.
- [no] ip name-server A.B.C.D
Add or remove a Name server.
- show clock
Show current date and time
Example:
soodar# do show clock Local time: Thu 2020-09-24 10:15:37 +0330 Universal time: Thu 2020-09-24 06:45:37 UTC RTC time: Thu 2020-09-24 06:45:37 Time zone: Asia/Tehran (+0330, +0330) System clock synchronized: yes NTP service: active RTC in local TZ: no
- clock timezone TIMEZONE
Set system timezone. TIMEZONE is timezone’s long name based on IANA TZDatabase
Example:
- show daemons status
Show all daemons status on startup. Indicate whether they are enabled or disabled.
- service password-encryption
Encrypt password.
Sample Config File
Below is a sample configuration file .
!
hostname soodar
enable password admin
enable config password configadmin
!
log stdout
!
!
!
and #
are comment characters. If the first character of the word is
one of the comment characters then from the rest of the line forward will be
ignored as a comment.
enable password admin!password
If a comment character is not the first character of the word, it’s a normal
character. So in the above example !
will not be regarded as a comment and
the password is set to admin!password
.
Terminal Mode Commands
- write terminal
Displays the current configuration to the vty interface.
- write file
Write current configuration to configuration file.
- configure [terminal]
Change to configuration mode. This command is the first step to configuration.
- list
List all available commands.
- show version
Show the current version of SoodarOS and its host information.
- show command history
Show entered commands. The history is kept between sessions and is not cleared until an explicit demand of removing history
- clear command history [(0-200)]
Clear history command and( if provided) keep the last N commands in history. If N is not provided or it is 0, all history is erased.
- show memory control-plane
Show information on how much memory is used by control-plane’s processes:
Example:
soodar# show memory control-plane top - 11:26:57 up 2:31, 0 users, load average: 1.64, 0.76, 0.56 Tasks: 13 total, 0 running, 13 sleeping, 0 stopped, 0 zombie %Cpu(s): 3.7 us, 1.2 sy, 0.1 ni, 91.4 id, 3.1 wa, 0.0 hi, 0.5 si, 0.0 st KiB Mem : 14322432 total, 5440116 free, 4352300 used, 4530016 buff/cache KiB Swap: 2097148 total, 2097148 free, 0 used. 9377520 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 164 frr 20 0 311388 7792 2224 S 0.0 0.1 0:00.00 bgpd 297 frr 20 0 85136 5416 3136 S 0.0 0.0 0:00.00 eigrpd 288 frr 20 0 85556 5960 3436 S 0.0 0.0 0:00.00 isisd 273 frr 20 0 85736 5824 3384 S 0.0 0.0 0:00.00 ldpd 217 frr 20 0 84248 5072 4152 S 0.0 0.0 0:00.00 ldpd 216 frr 20 0 84096 5052 4140 S 0.0 0.0 0:00.00 ldpd 266 frr 20 0 85432 5628 3172 S 0.0 0.0 0:00.00 ospf6d 192 frr 20 0 86036 6456 3740 S 0.0 0.0 0:00.03 ospfd 176 frr 20 0 85124 5684 3416 S 0.0 0.0 0:00.00 ripd 184 frr 20 0 84812 5488 3372 S 0.0 0.0 0:00.00 ripngd 281 frr 20 0 84628 4028 2168 S 0.0 0.0 0:00.00 staticd 100 root 20 0 83924 3676 2432 S 0.0 0.0 0:00.04 watchfrr 154 frr 20 0 2689096 27420 5592 S 0.0 0.2 0:00.02 zebra
- show memory control-plane details
Show information on how much memory is used by control-plane’s processes in details
Example:
soodar# show memory control-plane details System allocator statistics: Total heap allocated: 1584 KiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 1484 KiB Free small blocks: 2096 bytes Free ordinary blocks: 100 KiB Ordinary blocks: 2 Small blocks: 60 Holding blocks: 0 (see system documentation for 'mallinfo' for meaning) --- qmem libfrr --- Buffer : 3 24 72 Buffer data : 1 4120 4120 Host config : 3 (variably sized) 72 Command Tokens : 3427 72 247160 Command Token Text : 2555 (variably sized) 83720 Command Token Help : 2555 (variably sized) 61720 Command Argument : 2 (variably sized) 48 Command Argument Name : 641 (variably sized) 15672 [...] --- qmem Label Manager --- --- qmem zebra --- ZEBRA VRF : 1 912 920 Route Entry : 11 80 968 Static route : 1 192 200 RIB destination : 8 48 448 RIB table info : 4 16 96 Nexthop tracking object : 1 200 200 Zebra Name Space : 1 312 312 --- qmem Table Manager ---
Below these statistics, statistics on individual memory allocation types in SoodarOS (so-called MTYPEs) is printed: * the first column of numbers is the current count of allocations made for
the type (the number decreases when items are freed.)
the second column is the size of each item. This is only available if allocations on a type are always made with the same size.
the third column is the total amount of memory allocated for the particular type, including padding applied by malloc. This means that the number may be larger than the first column multiplied by the second. Overhead incurred by malloc’s bookkeeping is not included in this, and the column may be missing if system support is not available.
- find COMMAND...
This command performs a simple substring search across all defined commands in all modes. As an example, suppose you’re in enable mode and can’t remember where the command to set router-id is:
Soodar# find router-id (config) router-id A.B.C.D [vrf NAME]
- show thread cpu control-plane [details [r|w|t|e|x]]
This command displays control-plane run statistics for all the different event types. If no options is specified all different run types are displayed together. Additionally you can ask to look at (r)ead, (w)rite, (t)imer, (e)vent and e(x)ecute thread event types.
Pipe Actions
CLI supports optional modifiers at the end of commands that perform postprocessing on command output or modify the action of commands. These do not show up in the ? or TAB suggestion lists.
... | include REGEX
Filters the output of the preceding command, including only lines which match the POSIX Extended Regular Expression
REGEX
. Do not put the regex in quotes.Examples:
Soodar# show ip bgp sum json | include remoteAs "remoteAs":0, "remoteAs":455, "remoteAs":99,
Soodar# show run | include neigh.*[0-9]{2}\.0\.[2-4]\.[0-9]* neighbor 10.0.2.106 remote-as 99 neighbor 10.0.2.107 remote-as 99 neighbor 10.0.2.108 remote-as 99 neighbor 10.0.2.109 remote-as 99 neighbor 10.0.2.110 remote-as 99 neighbor 10.0.3.111 remote-as 111