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 [json]

Show current date and time

Example:

soodar# 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
soodar(config)# do show clock json
{
  "timezone":"Asia/Tehran",
  "local_rtc":"no",
  "can_ntp":"yes",
  "ntp":"yes",
  "ntp_synchronized":"yes",
  "time_usec":"Thu 2020-09-24 10:15:37 +0330",
  "rtc_time_usec":"Thu 2020-09-24 06:45:37"
}
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 processes

Show current processes running on the router, their PIDs, statuses, and used memory.

Example:

soodar# show processes
   PID     LWP    PPID Status       Size Name
      1       1       0 S           22655 systemd
      2       2       0 S               0 kthreadd
      3       3       2 I               0 rcu_gp
      4       4       2 I               0 rcu_par_gp
      6       6       2 I               0 kworker/0:0H-kblockd
      8       8       2 I               0 mm_percpu_wq
      9       9       2 S               0 ksoftirqd/0
     10      10       2 I               0 rcu_preempt
     11      11       2 S               0 migration/0
     12      12       2 S               0 cpuhp/0
     13      13       2 S               0 cpuhp/1
     14      14       2 S               0 migration/1
     15      15       2 S               0 ksoftirqd/1
     17      17       2 I               0 kworker/1:0H-kblockd
     18      18       2 S               0 kdevtmpfs
     19      19       2 I               0 netns
     20      20       2 S               0 rcu_tasks_kthre
     21      21       2 S               0 kauditd
     23      23       2 I               0 kworker/0:1-events
     24      24       2 S               0 oom_reaper
     25      25       2 I               0 writeback
     26      26       2 S               0 kcompactd0
     27      27       2 S               0 khugepaged
     40      40       2 I               0 cryptd
     59      59       2 I               0 kblockd
     60      60       2 I               0 blkcg_punt_bio
     61      61       2 I               0 tpm_dev_wq
     62      62       2 I               0 ata_sff
     63      63       2 I               0 md
     64      64       2 S               0 watchdogd
     65      65       2 S               0 kswapd0
     67      67       2 I               0 acpi_thermal_pm
     69      69       2 I               0 tpm-vtpm
     70      70       2 I               0 nvme-wq
     71      71       2 I               0 nvme-reset-wq
     72      72       2 I               0 nvme-delete-wq
     73      73       2 S               0 scsi_eh_0
     74      74       2 I               0 scsi_tmf_0
     75      75       2 S               0 scsi_eh_1
     76      76       2 I               0 scsi_tmf_1
     77      77       2 S               0 scsi_eh_2
     78      78       2 I               0 scsi_tmf_2
     79      79       2 S               0 scsi_eh_3
     80      80       2 I               0 scsi_tmf_3
     81      81       2 S               0 scsi_eh_4
     82      82       2 I               0 scsi_tmf_4
     83      83       2 S               0 scsi_eh_5
     84      84       2 I               0 scsi_tmf_5
     89      89       2 I               0 kworker/u4:6-events_unbound
     91      91       2 I               0 kworker/0:1H-kblockd
     92      92       2 I               0 kworker/1:2-rcu_gp
     93      93       2 I               0 raid5wq
     94      94       2 I               0 dm_bufio_cache
     95      95       2 I               0 ipv6_addrconf
     96      96       2 I               0 kworker/u5:0
     101     101       2 S               0 jbd2/sda2-8
     102     102       2 I               0 ext4-rsv-conver
     103     103       2 I               0 kworker/1:1H-events_highpri
     108     108       2 S               0 jbd2/sda4-8
     109     109       2 I               0 ext4-rsv-conver
     150     150       1 S            3299 systemd-udevd
     179     179       2 S               0 scsi_eh_6
     180     180       2 I               0 scsi_tmf_6
     181     181       2 S               0 scsi_eh_7
     182     182       2 I               0 scsi_tmf_7
     183     183       2 I               0 kworker/1:3-dm_bufio_cache
     199     199       1 S           37847 rngd
     199     212       1 S           37847 rngd
     199     213       1 S           37847 rngd
     307     307       1 S            3163 soosys
     311     311       1 S           12305 systemd-journal
     318     318       1 S             605 atd
     320     320       1 S             730 crond
     321     321       1 S            1082 dbus-daemon
     332     332       1 S            3521 snmpd
     334     334       1 S            2793 snmptrapd
     335     335       1 S            1091 chronyd
     340     340       1 R        21304346 vpp_main
     340     359       1 S        21304346 eal-intr-thread
     348     348       1 S            1520 systemd-logind
     350     350       1 S             592 agetty
     351     351       1 S             914 login
     352     352       1 S          324366 charon-systemd
     352     369       1 S          324366 charon-systemd
     352     370       1 S          324366 charon-systemd
     352     371       1 S          324366 charon-systemd
     352     372       1 S          324366 charon-systemd
     352     373       1 S          324366 charon-systemd
     352     374       1 S          324366 charon-systemd
     352     375       1 S          324366 charon-systemd
     352     376       1 S          324366 charon-systemd
     352     377       1 S          324366 charon-systemd
     352     378       1 S          324366 charon-systemd
     352     379       1 S          324366 charon-systemd
     352     380       1 S          324366 charon-systemd
     352     381       1 S          324366 charon-systemd
     352     382       1 S          324366 charon-systemd
     352     383       1 S          324366 charon-systemd
     352     384       1 S          324366 charon-systemd
     354     354       1 S          110108 f2b/server
     354     361       1 S          110108 f2b/observer
     354     364       1 S          110108 f2b/f.sshd
     354     365       1 S          110108 f2b/a.sshd
     354    6750       1 S          110108 f2b/observer
     418     418       1 S            3963 watchfrr
     433     433       1 S          106344 zebra
     433     434       1 S          106344 RCU sweeper
     433     435       1 S          106344 zebra_dplane
     433     436       1 S          106344 zebra_opaque
     433     440       1 S          106344 zebra_apic
     438     438       1 S            2330 staticd
     458     458       2 I               0 kworker/u4:0-events_unbound
     657     657       1 S            1946 systemd
     658     658     657 S           22868 (sd-pam)
     663     663     351 R           11757 vtysh
    5763    5763       2 I               0 kworker/0:2-mm_percpu_wq
    7634    7634     433 R            1092 ps
show processes detailed process-id (0-1000000)

Show details of a PID.

Example:

soodar# show processes detailed process-id 433
zebra
  Process ID        : 433
  Parent process ID : 1
  Group ID          : 433
  Status            : S
  Session ID        : 433
  User time         : 31
  Kernel time       : 17
  Priority          : 19
  Virtual bytes     : 435585024
  Resident pages    : 4598
  Resident limit    : 18446744073709551615
  Minor page faults : 851
  Major page faults : 2
  Threads           : 5
  Allowed CPUs      : 0-1
  CPU usage         : 0.0%
  Memory usage      : 0.6%
show processes memory

Show data-plane’s main heap usage, data-plane’s stats heap usage, and processes’ memory usage.

Example:

soodar# show processes memory
Dataplane memory heap:
----------------------
Thread 0 vpp_main
  base 0x7fffb692a000, size 1g, locked, unmap-on-destroy, name 'main heap'
    page stats: page-size 4K, total 262144, mapped 24279, not-mapped 237865
      numa 0: 24279 pages, 94.84m bytes
    total: 1023.99M, used: 90.17M, free: 933.83M, trimmable: 933.81M

Dataplane stats heap:
---------------------
Stats segment
base 0x7fffb0371000, size 31.99m, locked, name 'stat segment'
  total: 31.99M, used: 758.05K, free: 31.26M, trimmable: 30.30M
    free chunks 16 free fastbin blks 0
    max total allocated 31.99M

System processes memory status:
-------------------------------
    PID Text       Data        RSS      Total Name
      1    0      90620       7460      22655 systemd
      2    0          0          0          0 kthreadd
      3    0          0          0          0 rcu_gp
      4    0          0          0          0 rcu_par_gp
      6    0          0          0          0 kworker/0:0H-kblockd
      8    0          0          0          0 mm_percpu_wq
      9    0          0          0          0 ksoftirqd/0
     10    0          0          0          0 rcu_preempt
     11    0          0          0          0 migration/0
     12    0          0          0          0 cpuhp/0
     13    0          0          0          0 cpuhp/1
     14    0          0          0          0 migration/1
     15    0          0          0          0 ksoftirqd/1
     17    0          0          0          0 kworker/1:0H-kblockd
     18    0          0          0          0 kdevtmpfs
     19    0          0          0          0 netns
     20    0          0          0          0 rcu_tasks_kthre
     21    0          0          0          0 kauditd
     23    0          0          0          0 kworker/0:1-events
     24    0          0          0          0 oom_reaper
     25    0          0          0          0 writeback
     26    0          0          0          0 kcompactd0
     27    0          0          0          0 khugepaged
     40    0          0          0          0 cryptd
     59    0          0          0          0 kblockd
     60    0          0          0          0 blkcg_punt_bio
     61    0          0          0          0 tpm_dev_wq
     62    0          0          0          0 ata_sff
     63    0          0          0          0 md
     64    0          0          0          0 watchdogd
     65    0          0          0          0 kswapd0
     67    0          0          0          0 acpi_thermal_pm
     69    0          0          0          0 tpm-vtpm
     70    0          0          0          0 nvme-wq
     71    0          0          0          0 nvme-reset-wq
     72    0          0          0          0 nvme-delete-wq
     73    0          0          0          0 scsi_eh_0
     74    0          0          0          0 scsi_tmf_0
     75    0          0          0          0 scsi_eh_1
     76    0          0          0          0 scsi_tmf_1
     77    0          0          0          0 scsi_eh_2
     78    0          0          0          0 scsi_tmf_2
     79    0          0          0          0 scsi_eh_3
     80    0          0          0          0 scsi_tmf_3
     81    0          0          0          0 scsi_eh_4
     82    0          0          0          0 scsi_tmf_4
     83    0          0          0          0 scsi_eh_5
     84    0          0          0          0 scsi_tmf_5
     89    0          0          0          0 kworker/u4:6-events_unbound
     91    0          0          0          0 kworker/0:1H-kblockd
     92    0          0          0          0 kworker/1:2-rcu_gp
     93    0          0          0          0 raid5wq
     94    0          0          0          0 dm_bufio_cache
     95    0          0          0          0 ipv6_addrconf
     96    0          0          0          0 kworker/u5:0
    101    0          0          0          0 jbd2/sda2-8
    102    0          0          0          0 ext4-rsv-conver
    103    0          0          0          0 kworker/1:1H-events_highpri
    108    0          0          0          0 jbd2/sda4-8
    109    0          0          0          0 ext4-rsv-conver
    150    0      13196       3960       3299 systemd-udevd
    179    0          0          0          0 scsi_eh_6
    180    0          0          0          0 scsi_tmf_6
    181    0          0          0          0 scsi_eh_7
    182    0          0          0          0 scsi_tmf_7
    183    0          0          0          0 kworker/1:3-events_power_efficient
    199    0     151388       1028      37847 rngd
    307    0      12652       5172       3163 soosys
    311    0      49220      16556      12305 systemd-journal
    318    0       2420       1628        605 atd
    320    0       2920       1844        730 crond
    321    0       4328       3448       1082 dbus-daemon
    332    0      14084      11056       3521 snmpd
    334    0      11172       6800       2793 snmptrapd
    335    0       4364       2400       1091 chronyd
    340    0   85217384     135968   21304346 vpp_main
    348    0       6080       4348       1520 systemd-logind
    350    0       2368       1812        592 agetty
    351    0       3656       3096        914 login
    352    0    1297464      12912     324366 charon-systemd
    354    0     440432      21636     110108 f2b/server
    418    0      16364      11720       4091 watchfrr
    433    0     425376      18492     106344 zebra
    438    0       9320       4756       2330 staticd
    458    0          0          0          0 kworker/u4:0-events_unbound
    657    0       7784       6296       1946 systemd
    658    0      91472       2068      22868 (sd-pam)
    663    0      48612      43816      12153 vtysh
   5763    0          0          0          0 kworker/0:2-mm_percpu_wq
   8135   84       4283       2472       1092 ps
show hardware {cpu | disk | memory}

Show information about the router’s hardware.

Example:

n1# show hardware cpu disk memory
CPU information
---------------
  Architecture      : X86_64
  Name              : Intel(R) Celeron(R) CPU  J1900  @ 1.99GHz
  Physical cores    : 4
  Total cores       : 4
  Max Frequency     : 2415.70Mhz
  Min Frequency     : 1332.80Mhz
  Current Frequency : 1876.04Mhz
  NUMA Nodes        : 1
  Total CPU Usage   : 51.7%
  Per Core Information:
    Core 0:
      Type         : Physical
      Physical Core: 0
      NUMA Node    : 0
      Usage        : 0.0%
    Core 1:
      Type         : Physical
      Physical Core: 1
      NUMA Node    : 0
      Usage        : 100.0%
    Core 2:
      Type         : Physical
      Physical Core: 2
      NUMA Node    : 0
      Usage        : 68.8%
    Core 3:
      Type         : Physical
      Physical Core: 3
      NUMA Node    : 0
      Usage        : 37.9%

Memory information
------------------
  Total            : 3.74G
  Available        : 1.33G
  Used             : 2.21G
  Percentage       : 64.6%

  NUMA 0 Total     : 3.65G
  NUMA 0 Available : 1.31G
  NUMA 0 Used      : 2.35G
  NUMA 0 Percentage: 64.2%


Partitions and Usage
--------------------
  Device: /dev/root
    Mountpoint      : /
    File system type: ext4
    Total Size      : 3.44G
    Used            : 1.11G
    Free            : 2.13G
    Percentage      : 34.2%
  Device: /dev/sda4
    Mountpoint      : /data
    File system type: ext4
    Total Size      : 21.96G
    Used            : 38.30M
    Free            : 20.79G
    Percentage      : 0.2%
  Device: /dev/sda1
    Mountpoint      : /boot/efi
    File system type: vfat
    Total Size      : 15.95M
    Used            : 856064
    Free            : 15.13M
    Percentage      : 5.1%
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
... | exclude REGEX

Filters the output of the preceding command, including only lines which don’t match the POSIX Extended Regular Expression REGEX. Do not put the regex in quotes.

... | section REGEX

Filters the output of the preceding command, including only sections which match the POSIX Extended Regular Expression REGEX. Do not put the regex in quotes.

Example:

n2# show running-config | section interface\swireguard[1-3]0
interface wireguard10
 bridge-group 100 split-horizon group 0
 wireguard source 200.2.3.2
 wireguard private-key n2key1
 wireguard port 51820
 wireguard peer n3
  public-key D3309A5B6BF9FEC26710852AB0D6F6E5783F9343478933788D6C0BBB204FED4A
  endpoint 200.2.3.3 port 51820
  allowed-ip 200.4.4.4/32
 no shutdown
 ip address 10.200.200.1/32
interface wireguard20
 wireguard source 222.2.3.2
 wireguard private-key n2key2
 wireguard port 51821
 wireguard peer n3
  public-key 3B73F9AFBBDC9C7C14C4F1108381F704050137990418C500B1F8465A13EDD637
  allowed-ip 10.0.1.2/32
  allowed-ip 10.0.3.2/32
  allowed-ip 222.4.4.4/32
 no shutdown
 ip address 10.200.200.2/32
interface wireguard30
 wireguard source 222.2.3.2
 wireguard private-key n2key3
 wireguard port 51822
 wireguard peer n3
  public-key 2F12ACA8B029112BA405286239D38CD43210AA713C7D7E73362C28A25AA04439
  allowed-ip 203.4.4.4/32
 no shutdown
 ip address 10.200.200.3/32
... | section-exclude REGEX

Filters the output of the preceding command, including only sections which don’t match the POSIX Extended Regular Expression REGEX. Do not put the regex in quotes.

Example:

soodar# show running-config | section-exclude interface
Building configuration...

Current configuration:
!
hostname soodar
no ipv6 forwarding
no zebra nexthop kernel enable
security passwords min-length 8
log syslog errors
log monitor
no banner motd
!
ip name-server 4.2.2.4
ntp server ir.pool.ntp.org iburst burst
!
ip route 0.0.0.0/0 192.168.1.1
line vty
!
end