Skip to content

System Configuration

Table 1 Basic Information View

CommandPurpose
show versionDisplay version info.
show platform {fan|psu-status|ssd-health|summary|sys-eeprom|temperature}Display system platform information.
show imageDisplay the installed image of the system.
show history [all]Display history commands.
show system processes {cpu|memory| summary}Display information about system processes.
show system {users|reboot-cause|uptime|memory}Display system-related information.
show patches [detail]Display the patches already installed.

[Command]

show version

[Purpose]

Display version info.

[View]

Privileged User View

[Notes]

This command displays the version information including: software, description, kernel, create, and image.

[Use Cases]

sonic# show version
Asterfusion AsterNOS Software, Version 3.1, R0402P01
SONiC Software Version: SONiC.202111.R0402P01
Distribution: Debian 11.7
Kernel: 5.10.0-8-2-amd64
Build commit: 77b733bbf
Build date: Tue Jul 25 07:54:52 UTC 2023
Built by: jenkins@sonic-Super-Server
Platform: x86_64-asterfusion_cx532p_n-r0
HwSKU: CX532P-N
ASIC: innovium
ASIC Count: 1
Serial Number: F023529A054
Model Number: LE5032C
Hardware Revision: 1
Uptime: 10:00:19 up 8:20, 9 users, load average: 0.79, 1.15, 1.14
Docker images:
REPOSITORY TAG IMAGE ID SIZE
docker-dhcp-relay latest b579bf4af4f4 452MB
docker-teamd 202111.R0402P01 740816f290c6 463MB
docker-teamd latest 740816f290c6 463MB
docker-sonic-mgmt-framework 202111.R0402P01 fab89648d04e 675MB
docker-sonic-mgmt-framework latest fab89648d04e 675MB
docker-slad 202111.R0402P01 fe39ccd088a5 472MB
docker-slad latest fe39ccd088a5 472MB
docker-sflow 202111.R0402P01 e092a98e73b8 464MB
docker-sflow latest e092a98e73b8 464MB
docker-orchagent 202111.R0402P01 a494ff09a565 484MB
docker-orchagent latest a494ff09a565 484MB
docker-neighbor-proxy 202111.R0402P01 22c393e97052 463MB
docker-neighbor-proxy latest 22c393e97052 463MB
docker-nat 202111.R0402P01 14d147def064 466MB
docker-nat latest 14d147def064 466MB
docker-mstpd 202111.R0402P01 366d8236220e 485MB
docker-mstpd latest 366d8236220e 485MB
docker-macsec 202111.R0402P01 24c53be62fa6 468MB
docker-macsec latest 24c53be62fa6 468MB
docker-lldp 202111.R0402P01 d2d41b9d8918 505MB
docker-lldp latest d2d41b9d8918 505MB
docker-iccpd 202111.R0402P01 a6e24b2dc581 466MB
docker-iccpd latest a6e24b2dc581 466MB
docker-fpm-frr 202111.R0402P01 954d87aafa63 492MB
docker-fpm-frr latest 954d87aafa63 492MB
docker-cluster 202111.R0402P01 96e50ff3edc4 892MB
docker-cluster latest 96e50ff3edc4 892MB
docker-syncd-invm 202111.R0402P01 c940e72b0685 826MB
docker-syncd-invm latest c940e72b0685 826MB
docker-web-server 202111.R0402P01 e53911947b43 477MB
docker-web-server latest e53911947b43 477MB
docker-sonic-telemetry 202111.R0402P01 f4ab4ab9acef 516MB
docker-sonic-telemetry latest f4ab4ab9acef 516MB
docker-snmp 202111.R0402P01 217730a11313 483MB
docker-snmp latest 217730a11313 483MB
docker-router-advertiser 202111.R0402P01 585724965c6d 438MB
docker-router-advertiser latest 585724965c6d 438MB
docker-platform-monitor 202111.R0402P01 d38c88b80d5b 561MB
docker-platform-monitor latest d38c88b80d5b 561MB
docker-mux 202111.R0402P01 faacdde8a401 486MB
docker-mux latest faacdde8a401 486MB
docker-database 202111.R0402P01 dc3502d3da31 438MB
docker-database latest dc3502d3da31 438MB

show platform {fan|psu-status|ssd-health|summary|sys-eeprom|temperature}

Section titled “show platform {fan|psu-status|ssd-health|summary|sys-eeprom|temperature}”

[Command]

show platform {fan|psu-status|ssd-health|summary|sys-eeprom|temperature}

[Purpose]

Display system platform information.

[View]

Privileged User View

[Notes]

This command displays information including: PSU status, hardware platform summary, system EEPROM, fan, temperature, and system ssd device health.

[Use Cases]

Display hardware platform summary information, including device model, serial number, and other related details.
sonic# show platform summary
Platform: x86_64-asterfusion_cx532p_n-r0
HwSKU: CX532P-N
ASIC: marvell
ASIC Count: 1
Serial Number: F023529A054
Model Number: CX532P-N
Hardware Revision: 1
Display information such as the number, status, and speed of fans.
sonic# show platform fan
FAN Speed Direction Presence Status Timestamp
----- ------- ----------- ---------- -------- -------------------
FAN1 9120RPM exhaust Present OK 2025-01-24 06:52:16
FAN2 9120RPM exhaust Present OK 2025-01-24 06:52:17
FAN3 9120RPM exhaust Present OK 2025-01-24 06:52:17
FAN4 9120RPM exhaust Present OK 2025-01-24 06:52:18
Display PSU power status and power information.
sonic# show platform psu-status
PSU VoltageIn(V) CurrentIn(A) PowerIn(W) VoltageOut(V) CurrentOut(A) PowerOut(W) Direction Status Warning Direction_warning
----- -------------- -------------- ------------ --------------- --------------- ------------- ----------- -------- --------- -------------------
PSU 1 234.50 3.40 819.00 12.30 63.10 777.00 exhaust OK false false
PSU 2 0.00 0.00 0.00 0.00 0.00 0.00 exhaust NOT OK false false
Display device temperature information.
sonic# show platform temperature
Sensor Temperature High TH Low TH Crit High TH Crit Low TH Warning Timestamp
---------------- ------------- --------- -------- -------------- ------------- --------- -------------------
CORE_0 52 90.00 N/A 100.00 N/A false 2025-01-24 06:54:56
CORE_1 53 90.00 N/A 100.00 N/A false 2025-01-24 06:54:56
CORE_2 52 90.00 N/A 100.00 N/A false 2025-01-24 06:54:56
CORE_3 54 90.00 N/A 100.00 N/A false 2025-01-24 06:54:56
CPU_0 54 N/A N/A N/A N/A false 2025-01-24 06:54:56
Left_Fan_Board 36 N/A N/A N/A N/A false 2025-01-24 06:54:56
Left_Main_Board 34 N/A N/A N/A N/A false 2025-01-24 06:54:56
Main_Temp 50 N/A N/A N/A N/A false 2025-01-24 06:54:56
Physical_id_0 54 90.00 N/A 100.00 N/A false 2025-01-24 06:54:56
Right_Fan_Board 37 N/A N/A N/A N/A false 2025-01-24 06:54:56
Right_Main_Board 34 N/A N/A N/A N/A false 2025-01-24 06:54:56
Display system EEPROM information.
sonic# show platform sys-eeprom
TlvInfo Header:
Id String: TlvInfo
Version: 1
Total Length: 247
TLV Name Code Len Value
------------------- ------ ----- ------------------------------
Product Name 0x21 12 CX864E-N-AC
Part Number 0x22 19 ONBP2U-N-2X64E-A-AC
Serial Number 0x23 11 F02524BB889
Base MAC Address 0x24 6 60:EB:5A:00:11:22
Manufacture Date 0x25 19 10/31/2024 23:59:59
Device Version 0x26 1 1
Label Revision 0x27 1 0
Platform Name 0x28 30 x86_64-asterfusion_cx864e_n-r0
ONIE Version 0x29 14 2019.05_v1.0.6
MAC Addresses 0x2A 2 2
Manufacturer 0x2B 11 Asterfusion
Manufacture Country 0x2C 2 CN
Vendor Name 0x2D 11 Asterfusion
Diag Version 0x2E 3 1.0
Service Tag 0x2F 1 X
CRC-32 0xFE 4 0x92DD741D
Display health information of SSD devices in the system, including hard drive model information.
sonic# show platform ssd-health
Device Model : Saturn NCT 624XN 256GB
Health : N/A
Temperature : Old_age

[Command]

show image

[Purpose]

Display the installed image of the system.

[View]

Privileged User View

[Use Cases]

sonic# show image
Current: SONiC-OS-202111.R0402P01
Next: SONiC-OS-202111.R0402P01
Available:
SONiC-OS-202111.R0402P01
SONiC-OS-202111.R0402P01T02

[Command]

show history [all]

[Purpose]

Display history commands.

[View]

Privileged User View

[Notes]

When the all parameter is not included, only the current session history commands are viewed. When the all parameter is included, all history commands are viewed

[Use Cases]

sonic# show history all
NUMBER DATE TIME USER PRIVILEGE TTY RESULT COMMAND
1 2024-10-18 09:58:51.195 root sys_admin /dev/pts/1 success startup
2 2024-10-18 09:58:52.083 root sys_admin /dev/pts/1 success show running-config
3 2024-10-18 09:59:09.158 root sys_admin /dev/pts/1 success startup
4 2024-10-18 09:59:09.945 root sys_admin /dev/pts/1 success show running-config
5 2024-10-18 09:59:23.923 admin sys_admin /dev/pts/2 success startup
sonic# show history
1 show version
2 show mclag state
3 show dhcp pool info
4 show ip route

show system processes {cpu|memory|summary}

Section titled “show system processes {cpu|memory|summary}”

[Command]

show system processes {cpu|memory|summary}

[Purpose]

Display information about system processes.

[View]

Privileged User View

[Use Cases]

sonic# show system processes cpu
top - 17:24:07 up 6:10, 4 users, load average: 2.08, 1.62, 1.15
Tasks: 301 total, 1 running, 299 sleeping, 0 stopped, 1 zombie
%Cpu(s): 11.8 us, 3.2 sy, 0.0 ni, 84.6 id, 0.0 wa, 0.0 hi, 0.3 si, 0.0 st
KiB Mem : 16416408 total, 12812084 free, 2342092 used, 1262232 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 13738596 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3519 root 20 0 74032 18700 10384 S 6.2 0.1 0:16.59 syseepromd
25105 root 20 0 43564 3700 3020 R 6.2 0.0 0:00.02 top
1 root 20 0 57640 7576 5432 S 0.0 0.0 0:03.07 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:01.39 ksoftirqd/0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
7 root 20 0 0 0 0 S 0.0 0.0 0:22.04 rcu_sched
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
9 root rt 0 0 0 0 S 0.0 0.0 0:00.65 migration/0
10 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 lru-add-drain
11 root rt 0 0 0 0 S 0.0 0.0 0:00.04 watchdog/0
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1
14 root rt 0 0 0 0 S 0.0 0.0 0:00.04 watchdog/1
15 root rt 0 0 0 0 S 0.0 0.0 0:00.72 migration/1
16 root 20 0 0 0 0 S 0.0 0.0 0:00.88 ksoftirqd/1
18 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/1:0H
19 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/2
20 root rt 0 0 0 0 S 0.0 0.0 0:00.05 watchdog/2
21 root rt 0 0 0 0 S 0.0 0.0 0:00.44 migration/2
22 root 20 0 0 0 0 S 0.0 0.0 0:00.86 ksoftirqd/2
24 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/2:0H
25 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/3
26 root rt 0 0 0 0 S 0.0 0.0 0:00.04 watchdog/3
27 root rt 0 0 0 0 S 0.0 0.0 0:00.41 migration/3
28 root 20 0 0 0 0 S 0.0 0.0 0:00.66 ksoftirqd/3
30 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/3:0H
31 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs
32 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns
33 root 20 0 0 0 0 S 0.0 0.0 0:00.02 khungtaskd
34 root 20 0 0 0 0 S 0.0 0.0 0:00.00 oom_reaper
35 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 writeback
36 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kcompactd0
38 root 25 5 0 0 0 S 0.0 0.0 0:00.00 ksmd
39 root 39 19 0 0 0 S 0.0 0.0 0:00.04 khugepaged

show system {users|reboot-cause|uptime|memory}

Section titled “show system {users|reboot-cause|uptime|memory}”

[Command]

show system {users|reboot-cause|uptime|memory}

[Purpose]

Display system-related information.

[View]

Privileged User View

[Use Cases]

sonic# show system users
admin pts/0 2022-07-27 16:45 (192.168.30.185)
admin pts/1 2022-07-27 14:17 (192.168.30.184)
admin pts/2 2022-07-27 15:01 (192.168.30.184)
admin pts/3 2022-07-27 15:13 (192.168.20.28)

[Command]

show patches [detail]

[Purpose]

Display the patches already installed.

[View]

Privileged User View

[Use Cases]

sonic# show patches
Patch Id Name Created Time Install Time Operator
---------- ------ -------------- -------------- ----------

Table 2 Configure Information View

CommandPurpose
show running-configDisplay configuration running currently.
show startup-configDisplay startup configuration.
show thisDisplay configuration of current view.

[Command]

show running-config

[Purpose]

Display configuration running currently.

[View]

Privileged User View

[Use Cases]

sonic# show running-config
vlan range 10,20,30,107,200,2013-2016,2019-2020
!
interface mgmt 0
ip address 10.250.0.163/24 gw 10.250.0.254
exit
!
interface ethernet 0/0
mtu 9216
no fec
speed 10000
switchport access vlan 200
exit
!
interface ethernet 0/1
fec rs
mtu 9216
speed 25000
exit
!
interface ethernet 0/2
fec rs
mtu 9216
speed 25000
exit
!
interface ethernet 0/3
fec rs
mtu 9216
speed 25000
exit
!
interface ethernet 0/4
fec rs
mtu 9216
speed 25000
exit
!
……

[Command]

show startup-config

[Purpose]

Display startup configuration.

[View]

Privileged User View

[Use Cases]

sonic# show startup-config
vlan range 10,20,30,107,200,2013-2016,2019-2020
!
interface mgmt 0
ip address 10.250.0.163/24 gw 10.250.0.254
exit
!
interface ethernet 0/0
mtu 9216
no fec
speed 10000
switchport access vlan 200
exit
!
interface ethernet 0/1
fec rs
mtu 9216
speed 25000
exit
!
interface ethernet 0/2
fec rs
mtu 9216
speed 25000
exit
!
interface ethernet 0/3
fec rs
mtu 9216
speed 25000
exit
!
interface ethernet 0/4
fec rs
mtu 9216
speed 25000
exit
!
……

[Command]

show this

[Purpose]

Display configuration of current view.

[View]

All configuration views except Global Configuration View

[Use Cases]

sonic(config)# interface ethernet 0/16
sonic(config-if-0/16)# show this
!
interface ethernet 0/16
fec rs
mtu 9216
speed 25000
sonic(config-if-0/16)#
sonic(config-if-0/16)# exit
sonic(config)# router bgp 65207
sonic(config-router)# show this
!
router bgp 65207
no bgp ebgp-requires-policy
bgp graceful-reload
neighbor 199.0.3.2 remote-as 65209
neighbor 199.0.3.2 bfd
neighbor 199.0.7.2 remote-as 65209
neighbor 199.0.7.2 bfd
!
address-family ipv4 unicast
network 10.1.0.34/32
exit-address-family
!
address-family l2vpn evpn
neighbor 199.0.3.2 activate
neighbor 199.0.7.2 activate
advertise-all-vni
exit-address-family
exit

Table 3 System Config

CommandPurpose
configure terminalEnter Global Configuration View.
rebootReboot the system.
reloadReload the system.
writeSave the configuration.
hostname hostnameModify the hostname of the switch.
image switch image-versionSwitch the system image.
image update bin-fileUpgrade the system image.
ping ip-addressPing.
traceroute ip-addressRoute tracking.
delete startup-config [reserve-mgmt]Restore to the default configuration.
terminal rich-outputEnable paging and colorizing when printing to the terminal.

[Command]

configure terminal

[Purpose]

Enter Global Configuration View.

[View]

Privileged User View

[Use Cases]

sonic# configure terminal
sonic(config)#

[Command]

reboot

[Purpose]

Reboot the system.

[View]

Privileged User View

[Use Cases]

sonic# reboot
Do you want to reboot? [y/N]: y

[Command]

reload

[Purpose]

Reload the system.

[View]

Privileged User View

[Use Cases]

sonic# reload
Clear current config and reload config in config_db format from the default config file(s) ? [y/N]: y

[Command]

write

[Purpose]

Save the configuration.

[View]

Privileged User View

[Use Cases]

sonic# write
save running-config...
Existing files will be overwritten, continue? [y/N]: y

[Command]

hostname hostname

[Purpose]

Modify the hostname of the switch.

[Parameters]

ParameterDescription
hostnameSpecify the hostname in string form, up to 64 characters, including only ”.”, ”-”, “a-z”, “A-Z” and “0-9”. It cannot begin with ”…” , ”-” and no ”..”.

[View]

Privileged User View

[Notes]

You need to manually save the configuration after modification, and re-enter after exiting KLISH to take effect.

[Use Cases]

sonic# hostname sonic-226
Running command: service hostname-config restart
Reloading Monit configuration ...
Reinitializing monit daemon

[Command]

image switch image-version

[Purpose]

Switch the system image.

[Parameters]

ParameterDescription
imageName of the image.

[View]

Privileged User View

[Use Cases]

sonic# show image
Current: SONiC-OS-V3.1R0402P02T06
Next: SONiC-OS-V3.1R0402P02T06
Available:
SONiC-OS-V3.1R0402P02T06
SONiC-OS-V3.1R0402P02T05
sonic# image switch SONiC-OS-V3.1R0402P02T05
Command: grub-set-default --boot-directory=/host 1

[Command]

image update bin-file

[Purpose]

Upgrade the system image.

[Parameters]

ParameterDescription
bin-fileThe image bin file.

[View]

Privileged User View

[Use Cases]

sonic# image update sonic-innovium.bin

[Command]

ping [ip|ipv6|arp] ip-address [vrf vrf_name] [src A.B.C.D/A::B] [interface {ethernet interface_name|link-aggregation interface_name|vlan vlan-id}] [repeat count] [size size][interval interval]

[Purpose]

Ping.

[Parameters]

ParameterDescription
ipSend ICMP IPv4 messages, default is IPv4.
ipv6Send ICMP IPv6 messages.
arpSend ARP requests.
ip-addressSpecify the destination IP address.
vrf_nameSpecify the source VRF.
vlan-idVLAN ID, the range is [1,4094].
interface_nameSpecify source interface name.
countStop after count replies, the default is 5.
sizeSpecify the number of data bytes to be sent.
intervalSpecify the interval in seconds. The default is 1.

[View]

Privileged User View

[Use Cases]

sonic# ping 10.250.0.242
PING 10.250.0.242 (10.250.0.242) 56(84) bytes of data.
64 bytes from 10.250.0.242: icmp_seq=1 ttl=63 time=2.47 ms
64 bytes from 10.250.0.242: icmp_seq=2 ttl=63 time=0.164 ms
64 bytes from 10.250.0.242: icmp_seq=3 ttl=63 time=0.154 ms
64 bytes from 10.250.0.242: icmp_seq=4 ttl=63 time=0.168 ms
64 bytes from 10.250.0.242: icmp_seq=5 ttl=63 time=0.144 ms
--- 10.250.0.242 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4049ms
rtt min/avg/max/mdev = 0.144/0.619/2.467/0.923 ms

[Command]

traceroute [ip|ipv6] ip-address [vrf vrf_name] [src A.B.C.D/A::B] [interface {ethernet interface_name|link-aggregation interface_name|vlan vlan-id}]

[Purpose]

Route tracking.

[Parameters]

ParameterDescription
ipSend ICMP IPv4 messages, default is IPv4.
ipv6Send ICMP IPv6 messages.
ip-addressSpecify the destination IP address.
vrf_nameSpecify the source VRF.
A.B.C.D/A::BSpecify the source IP address.
vlan-idVLAN ID, the range is [1,4094].
interface_nameSpecify source interface name.

[View]

Privileged User View

[Use Cases]

sonic# traceroute ip 60.0.0.1
traceroute to 60.0.0.1 (60.0.0.1), 30 hops max, 60 byte packets
1 10.250.0.254 0.889 ms 1.066 ms 1.174 ms
2 172.16.1.1 0.907 ms 1.005 ms 172.16.1.2 0.801 ms
3 172.16.11.34 0.188 ms 0.165 ms 0.187 ms
4 100.68.128.1 3.902 ms 3.968 ms 3.992 ms
5 220.249.83.105 3.744 ms 4.175 ms 4.100 ms
6 * 58.19.158.97 3.811 ms *
7 * * *
8 61.182.183.138 27.232 ms 61.182.183.142 29.072 ms 61.182.183.214 29.369 ms
9 60.0.0.1 33.401 ms 34.328 ms 34.045 ms

[Command]

delete startup-config [reserve-mgmt]

[Purpose]

Restore to the default configuration.

[Parameters]

ParameterDescription
reserve-mgmtThis option preserves the Management Interface IP configuration, which is not preserved by default.

[View]

Privileged User View

[Use Cases]

sonic# delete startup-config reserve-mgmt
Load_default_settings is executing ...
Generating config_db file...
Running command: /usr/local/bin/sonic-cfggen -H -k CX308P-48Y-N --preset none > /tmp/_config_db.json
Running command: /usr/local/bin/sonic-cfggen -j /tmp/_config_db.json -t /usr/share/sonic/device/x86_64-asterfusion_cx308p_48y_n-r0/CX308P-48Y-N/buffers.json.j2 >/tmp/buffers.json
Running command: /usr/local/bin/sonic-cfggen -j /tmp/_config_db.json -t /usr/share/sonic/device/x86_64-asterfusion_cx308p_48y_n-r0/CX308P-48Y-N/qos.json.j2 -y /etc/sonic/sonic_version.yml >/tmp/qos.json
Running command: /usr/local/bin/sonic-cfggen -j /tmp/qos.json -j /tmp/buffers.json -j /tmp/_config_db.json --print-data > /etc/sonic/config_db.json
Running command: /usr/local/bin/sonic-cfggen -j /tmp/qos.json -j /tmp/buffers.json -j /tmp/_config_db.json --print-data > /etc/sonic/config_db.json
Inherit eth0 ip address, mask and gateway...
Running command: /usr/local/bin/sonic-cfggen -j /tmp/mgmt_ip.json -j /etc/sonic/config_db.json --print-data > /tmp/config_db.json
Running command: cp /tmp/config_db.json /etc/sonic/config_db.json
The configuration has been restored. Please reload it to take effect

[Command]

terminal rich-output

[Purpose]

Enable paging and colorizing when printing to the terminal.

[View]

Privileged User View

[Notes]

Enabled by default. Run command terminal raw-output to disable paging and colorizing when printing to the terminal.

[Use Cases]

sonic# terminal rich-output

Table 4 Time View

CommandPurpose
show clockDisplay the time zone and time of the system.
show supported-timezonesDisplay the time zones the system supports.

[Command]

show clock

[Purpose]

Display the time zone and time of the system.

[View]

Privileged User View

[Use Cases]

sonic# show clock
2024-10-19 09:19:01 Tuesday UTC+0000

[Command]

show supported-timezones

[Purpose]

Display the time zones the system supports.

[View]

Privileged User View

[Use Cases]

sonic# show supported-timezones

Table 5 Time Config

CommandPurpose
clock datetime date timeSet the system time.
clock timezone zoneSet the system time zone.

[Command]

clock datetime date time

[Purpose]

Set the system time.

[Parameters]

ParameterDescription
dateIn YY-MM-DD format.
timeIn HH:MM:SS format.

[View]

Global Configuration View

[Use Cases]

sonic# configure
sonic(config)# clock datetime 2022-02-22 20:30:30

[Command]

clock timezone zone

[Purpose]

Set the system time zone.

[Parameters]

ParameterDescription
zoneThe default time zone is UTC.

[View]

Global Configuration View

[Notes]

Run command no clock timezone to restore the system time zone to default.

[Use Cases]

sonic# configure
sonic(config)# clock timezone Asia/Shang

NTP(Network Time Protocol)is a protocol used to synchronize the time of individual machines on a network.

Table 6 NTP View

CommandPurpose
show ntpDisplay NTP status.
show ntp serverDisplay configuration of NTP Server.
show ntp globalDisplay global configuration of NTP.
show ntp authentication-keyidDisplay NTP authentication Key.

[Command]

show ntp

[Purpose]

Display NTP status.

[View]

Privileged User View

[Use Cases]

sonic# show ntp
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.250.0.240 203.107.6.88 3 u 46 64 377 0.165 10.575 3.198

[Command]

show ntp server

[Purpose]

Display configuration of NTP Server.

[View]

Privileged User View

[Use Cases]

sonic# show ntp server
SERVER STATE TYPE KEY
------------ ------- ------ -----
10.250.0.242 enabled server -
10.250.0.243 enabled server -

[Command]

show ntp global

[Purpose]

Display global configuration of NTP.

[View]

Privileged User View

[Use Cases]

sonic# show ntp global
State: enabled
Authentication: disabled
VRF: default

[Command]

show ntp global

[Purpose]

Display NTP authentication key.

[View]

Privileged User View

[Use Cases]

sonic# show ntp authentication-keyid
KEY ID TYPE TRUSTED
-------- ------ ---------
1 md5 yes

Table 7 NTP Config

CommandPurpose
ntp enableEnable NTP automatic synchronization service.
ntp server server-ip [authentication-keyid]Specify a NTP server.
ntp source_interface {mgmt|loopback|ethernet|link-aggregation|vlan} interface_nameSpecify the source interface for NTP.
ntp synchronize [unprivileged] server-ipSynchronise manually from an NTP server.
ntp synchronize jumpEnable NTP jump synchronization.
ntp vrf {default|mgmt}Specify the VRF where the NTP source interface is located.
ntp authentication enableEnable NTP authentication
ntp authentication-keyid key_id {md5|sha1|sha256|sha384|sha512}Add NTP key

[Command]

ntp enable

[Purpose]

Enable NTP automatic synchronization service.

[View]

Global Configuration View

[Notes]

Run command no ntp enable to disable NTP.

[Use Cases]

sonic(config)# ntp enable

ntp server server-ip [authentication-keyid]

Section titled “ntp server server-ip [authentication-keyid]”

[Command]

ntp server server-ip [authentication-keyid]

[Purpose]

Specify a NTP server.

[Parameters]

ParameterDescription
server-ip|NTP Server IP address or domain name.
authentication-keyid|

[View]

Global Configuration View

[Notes]

Run command no ntp server server-ip to delete NTP server configuration.

[Use Cases]

sonic(config)# ntp server 10.250.0.242
Section titled “ntp source_interface {mgmt|loopback|ethernet|link-aggregation|vlan} interface_name”

[Command]

ntp source_interface {mgmt|loopback|ethernet|link-aggregation|vlan} interface_name

[Purpose]

Specify the source interface for NTP.

[Parameters]

ParameterDescription
interface_nameInterface name (eg.0/1). When specify mgmt the interface name is 0.

[View]

Global Configuration View

[Notes]

Run command no ntp source_interface to delete NTP source interface configuration.

[Use Cases]

sonic(config)# ntp source_interface mgmt 0
sonic(config)# ntp source_interface loopback 0

[Command]

ntp synchronize [unprivileged] server-ip

[Purpose]

Synchronise manually from an NTP server.

[Parameters]

ParameterDescription
unprivilegedThis parameter should be enabled when the NTP auto-sync service is already running so that manual synchronisation can be performed over an unprivileged port.
server-ipSpecify NTP server IP address.

[View]

Global Configuration View

[Notes]

When you run this command, the system will immediately synchronise to NTP server time. This command is valid for a single time and will not be saved to running-config.

[Use Cases]

sonic(config)# ntp synchronize unprivileged 10.250.0.243
18 Nov 20:10:52 ntpdate[385097]: adjust time server 10.250.0.243 offset -0.009762 sec

[Command]

ntp synchronize jump

[Purpose]

Enable NTP jump synchronization.

[View]

Global Configuration View

[Notes]

With this command set, the system will make a time adjustment with a large offset every time the process restarts. By default a jump synchronization will be made only when the offset is over 600 seconds.

[Use Cases]

sonic(config)# ntp synchronize jump

[Command]

ntp vrf {default|mgmt}

[Purpose]

Specify the VRF where the NTP source interface is located.

[View]

Global Configuration View

[Notes]

When you have set the management port as NTP source interface as and enabled management VRF, please specify mgmt as NTP VRF. By default, the NTP VRF is default VRF.

[Use Cases]

sonic(config)# ntp vrf default
sonic(config)# ntp vrf mgmt

[Command]

ntp authentication enable

[Purpose]

Enable NTP authentication

[View]

Global Configuration View

[Notes]

Run command no ntp authentication enable to disable NTP authentication

[Use Cases]

sonic(config)# ntp authentication enable

ntp authentication-keyid key_id {md5|sha1|sha256|sha384|sha512}

Section titled “ntp authentication-keyid key_id {md5|sha1|sha256|sha384|sha512}”

[Command]

ntp authentication-keyid key_id {md5|sha1|sha256|sha384|sha512}

[Purpose]

Add NTP key.

[View]

Global Configuration View

[Notes]

Run command no ntp authentication-keyid key_id to delete NTP key

[Use Cases]

sonic(config)# ntp authentication-keyid 1 md5
Please enter authentication key value:
sonic(config)#

Table 8 Syslog View

CommandPurpose
show syslog [follow|tail number|grep string]Show syslog.

show syslog [follow|tail number|grep string]

Section titled “show syslog [follow|tail number|grep string]”

[Command]

show syslog [follow|tail number|grep string]

[Purpose]

show syslog content

[Parameters]

ParameterDescription
numberSpecify the number of rows at the end of the syslog to view.
stringFilter syslog based on string content.

[View]

Privileged User View

[Use Cases]

sonic# show syslog follow
Apr 22 07:00:33.664168 sonic NOTICE swss#orchagent: :- updatePortOperStatus: Port Ethernet76 oper state set from down to up
Apr 22 07:00:33.666717 sonic NOTICE swss#orchagent: :- setHostIntfsOperStatus: Set operation status UP to host interface Ethernet76
Apr 22 07:00:33.667517 sonic NOTICE swss#orchagent: :- doTask: Ethernet76 oper speed is 100000
Apr 22 07:01:16.122292 sonic WARNING snmp#snmp-subagent [sonic_ax_impl] WARNING: SyncD 'COUNTERS_DB' missing attribute ''SAI_PORT_STAT_IF_IN_DISCARDS''.
Apr 22 07:01:16.190548 sonic WARNING snmp#snmp-subagent [sonic_ax_impl] WARNING: SyncD 'COUNTERS_DB' missing attribute ''SAI_PORT_STAT_IF_OUT_DISCARDS''.
Apr 22 07:03:05.328015 sonic INFO smartd[517]: Device: /dev/sda [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 37 to 36
Apr 22 07:06:17.081883 sonic WARNING snmp#snmp-subagent [sonic_ax_impl] WARNING: SyncD 'COUNTERS_DB' missing attribute ''SAI_PORT_STAT_IF_IN_DISCARDS''.
Apr 22 07:06:17.153121 sonic WARNING snmp#snmp-subagent [sonic_ax_impl] WARNING: SyncD 'COUNTERS_DB' missing attribute ''SAI_PORT_STAT_IF_OUT_DISCARDS''.
Apr 22 07:06:26.931226 sonic INFO klish: show syslog
Apr 22 07:06:30.884589 sonic INFO klish: show syslog
sonic# show syslog tail 5
Apr 22 07:06:17.081883 sonic WARNING snmp#snmp-subagent [sonic_ax_impl] WARNING: SyncD 'COUNTERS_DB' missing attribute ''SAI_PORT_STAT_IF_IN_DISCARDS''.
Apr 22 07:06:17.153121 sonic WARNING snmp#snmp-subagent [sonic_ax_impl] WARNING: SyncD 'COUNTERS_DB' missing attribute ''SAI_PORT_STAT_IF_OUT_DISCARDS''.
Apr 22 07:06:26.931226 sonic INFO klish: show syslog
Apr 22 07:06:30.884589 sonic INFO klish: show syslog
Apr 22 07:07:39.626660 sonic INFO klish: show syslog follow
sonic# show syslog grep klish
2025-04-18T07:35:50.259047+00:00 sonic systemd[1]: Starting klish service...
2025-04-18T07:35:50.259047+00:00 sonic systemd[1]: Starting klish service...
Apr 18 07:36:05.905241 sonic INFO systemd[1]: Starting klish frr service...
Apr 18 07:36:07.395529 sonic INFO restore_cfg.py[1863]: Start to restore klish CLI configure.
Apr 18 07:36:07.395612 sonic INFO restore_cfg.py[1863]: klish start
Apr 18 07:36:07.736139 sonic INFO systemd[1]: Finished klish service.
Apr 18 07:38:25.885025 sonic INFO restore_frr.py[3030]: No klish configure in database. Program exit now.
Apr 18 07:38:25.885149 sonic INFO restore_frr.py[3030]: set klish_restore_finished=1
Apr 18 07:38:25.945585 sonic INFO systemd[1]: Finished klish frr service.
Apr 18 08:13:33.028821 sonic INFO klish: system bash
Apr 18 09:51:22.581430 sonic INFO klish: startup

Table 9 Syslog Config

CommandPurpose
syslog server-ip [port]Set a syslog backup server.
syslog source-interface {mgmt|ethernet|loopback} interface_nameSpecify the source interface.

[Command]

syslog server-ip [port]

[Purpose]

Set a syslog backup server.

[Parameters]

ParameterDescription
server-ipSpecify the IP address of syslog server.
portSpecify the UDP destination port of the message.

[View]

Global Configuration View

[Notes]

Run command no syslog server-ip to delete syslog backup server.

[Use Cases]

sonic# configure terminal
sonic(config)# syslog 10.250.0.223

syslog source-interface {mgmt|ethernet|loopback} interface_name

Section titled “syslog source-interface {mgmt|ethernet|loopback} interface_name”

[Command]

syslog source-interface {mgmt|ethernet|loopback} interface_name

[Purpose]

Specify the source interface.

[Parameters]

ParameterDescription
interface_nameInterface name (eg.0/1). When specify mgmt the interface name is 0.

[View]

Global Configuration View

[Notes]

Run command no syslog source-interface to delete syslog source interface.

[Use Cases]

sonic# configure terminal
sonic(config)# syslog source-interface ethernet 0/10

Table 10 CRM View

CommandPurpose
show crm summaryDisplay CRM configuration summary information.
show crm thresholds {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}}Display the threshold configuration of CRM.
show crm resources {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}}Display information about the resources monitored by CRM.

[Command]

show crm summary

[Purpose]

Display CRM configuration summary information.

[View]

Privileged User View

[Use Cases]

sonic# show crm summary
Polling Interval: 300 second(s)

show crm thresholds {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}}

Section titled “show crm thresholds {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}}”

[Command]

show crm thresholds {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}}

[Purpose]

Display the threshold configuration of CRM.

[View]

Privileged User View

[Use Cases]

show crm thresholds all
Resource Name Threshold Type Low Threshold High Threshold
-------------------- ---------------- --------------- ----------------
ipv4_route percentage 70 85
ipv6_route percentage 70 85
ipv4_nexthop percentage 70 85
ipv6_nexthop percentage 70 85
ipv4_neighbor percentage 70 85
ipv6_neighbor percentage 70 85
nexthop_group_member percentage 70 85
nexthop_group percentage 70 85
acl_table percentage 70 85
acl_group percentage 70 85
acl_entry percentage 70 85
acl_counter percentage 70 85
fdb_entry percentage 70 85
ipmc_entry percentage 70 85
snat_entry percentage 70 85
dnat_entry percentage 70 85
mpls_inseg percentage 70 85
mpls_nexthop percentage 70 85
sonic# show crm thresholds acl table
Resource Name Threshold Type Low Threshold High Threshold
--------------- ---------------- --------------- ----------------
acl_table percentage 70 85

show crm resources {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}}

Section titled “show crm resources {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}}”

[Command]

show crm resources {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}}

[Purpose]

Display information about the resources monitored by CRM. Display information about the resources monitored by CRM.

[View]

Privileged User View

[Use Cases]

sonic# show crm resources all
Resource Name Used Count Available Count
-------------------- ------------ -----------------
ipv4_route 49 171971
ipv6_route 9 84983
ipv4_nexthop 5 36710
ipv6_nexthop 0 36710
ipv4_neighbor 5 36710
ipv6_neighbor 0 36710
nexthop_group_member 4 15356
nexthop_group 2 4093
fdb_entry 24 45032
ipmc_entry 0 12288
snat_entry 0 0
dnat_entry 0 0
mpls_inseg 0 235741413
mpls_nexthop 0 235741413
srv6_nexthop 0 235741413
srv6_my_sid_entry 0 235741413
Stage Bind Point Resource Name Used Count Available Count
------- ------------ --------------- ------------ -----------------
INGRESS PORT acl_group 1 254
INGRESS PORT acl_table 1 9
INGRESS LAG acl_group 0 254
INGRESS LAG acl_table 1 9
EGRESS PORT acl_group 1 254
EGRESS PORT acl_table 1 9
EGRESS LAG acl_group 0 254
EGRESS LAG acl_table 1 9
Table ID Resource Name Used Count Available Count
--------------- --------------- ------------ -----------------
0x7000000000566 acl_entry 3 125
0x7000000000566 acl_counter 3 125
0x7000000000569 acl_entry 3 253
0x7000000000569 acl_counter 3 253
sonic# show crm resources ipv4 neighbor
Resource Name Used Count Available Count
--------------- ------------ -----------------
ipv4_neighbor 5 36710

Table 11 CRM Config

CommandPurpose
crm polling interval intervalSet the polling interval of CRM.
crm thresholds {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}} type {percentage|used|free}Set the CRM threshold type.
crm thresholds {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}} {high|low} crm_thresholdSet thresholds for CRM resources.

[Command]

crm polling interval interval

[Purpose]

Set the polling interval of CRM.

[Parameters]

ParameterDescription
intervalSpecify the polling interval in seconds, the range is 1-9999.

[View]

Global Configuration View

[Use Cases]

sonic# configure terminal
sonic(config)# crm polling interval 50

crm thresholds {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}} type {percentage|used|free}

Section titled “crm thresholds {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}} type {percentage|used|free}”

[Command]

crm thresholds {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}} type {percentage|used|free}

[Purpose]

Set the CRM threshold type.

[View]

Global Configuration View

[Use Cases]

sonic# configure terminal
sonic(config)# crm thresholds acl table type used
sonic(config)# crm thresholds acl group entry type used
sonic(config)# crm thresholds acl group counter type free
sonic(config)# crm thresholds nexthop group member type percentage
sonic(config)# crm thresholds ipv4 neighbor type used
sonic(config)# crm thresholds ipv6 neighbor type used

crm thresholds {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}} {high|low} crm_threshold

Section titled “crm thresholds {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}} {high|low} crm_threshold”

[Command]

crm thresholds {all|acl table|acl group|acl group entry|acl group counter|fdb|nexthop group member|nexthop group object|{ipv4|ipv6} {neighbor|nexthop|route}} {high|low} crm_threshold

[Purpose]

Set thresholds for CRM resources.

[Parameters]

ParameterDescription
crm_thresholdThe range is 0-65535.

[View]

Global Configuration View

[Use Cases]

sonic(config)# crm thresholds ipv4 neighbor high 800
sonic(config)# crm thresholds ipv4 neighbor low 100
sonic(config)# crm thresholds ipv6 route high 500
sonic(config)# crm thresholds ipv6 route low 50

Table 12 Feature View

CommandPurpose
show feature configDisplay the configuration of the features.
show feature statusDisplay the status information of the features.

[Command]

show feature config

[Purpose]

Display the configuration of the features.

[View]

Privileged User View

[Use Cases]

sonic# show feature config
Feature State AutoRestart Owner
-------------- --------------- -------------- -------
aflpd enabled enabled local
bgp enabled enabled local
cluster disabled disabled local
database always_enabled always_enabled local
dhcp disabled enabled local
eventd disabled disabled local
exporter disabled disabled local
iccpd enabled enabled local
lldp enabled enabled local
macsec disabled enabled local
mgmt-framework enabled enabled local
mstpd enabled enabled local
mux always_disabled enabled local
nat disabled enabled local
pmon enabled enabled local
proxy enabled enabled local
radv enabled enabled local
sflow enabled enabled local
slad enabled enabled local
snmp enabled enabled local
swss enabled enabled local
syncd enabled enabled local
teamd enabled enabled local
telemetry enabled enabled local
web enabled enabled local

[Command]

show feature status

[Purpose]

Display the status information of the features.

[View]

Privileged User View

[Use Cases]

sonic# show feature status
Feature State AutoRestart SetOwner
-------------- --------------- -------------- ----------
aflpd enabled enabled
bgp enabled enabled
cluster disabled disabled
database always_enabled always_enabled
dhcp disabled enabled local
eventd disabled disabled
exporter disabled disabled
iccpd enabled enabled
lldp enabled enabled
macsec disabled enabled
mgmt-framework enabled enabled
mstpd enabled enabled
mux always_disabled enabled
nat disabled enabled
pmon enabled enabled
proxy enabled enabled
radv enabled enabled
sflow enabled enabled
slad enabled enabled
snmp enabled enabled
swss enabled enabled
syncd enabled enabled
teamd enabled enabled
telemetry enabled enabled
web enabled enabled

Table 13 Feature Config

CommandPurpose
feature {dhcp|macsec|nat|snmp|web|telemetry|lldp|exporter|ptp|l2mcd} state {enable|disable}Set the state of the feature.
feature {dhcp|macsec|nat|snmp|web|telemetry|lldp|exporter|ptp|l2mcd} autorestart {enable|disable}Set the auto-restart property of the feature.
feature {dhcp|macsec|nat|snmp|web|telemetry|lldp|exporter|ptp|l2mcd} fallback {on|off}Set the fallback property of the feature.

feature {dhcp|macsec|nat|snmp|web|telemetry|lldp|exporter|ptp|l2mcd} state {enable|disable}

Section titled “feature {dhcp|macsec|nat|snmp|web|telemetry|lldp|exporter|ptp|l2mcd} state {enable|disable}”

[Command]

feature {dhcp|macsec|nat|snmp|web|telemetry|lldp|exporter|ptp|l2mcd} state {enable|disable}

[Purpose]

Set the state of the feature.

[View]

Global Configuration View

[Use Cases]

sonic# configure terminal
sonic(config)# feature dhcp state enable
sonic(config)# feature nat state disable

feature {dhcp|macsec|nat|snmp|web|telemetry|lldp|exporter|ptp|l2mcd} autorestart {enable|disable}

Section titled “feature {dhcp|macsec|nat|snmp|web|telemetry|lldp|exporter|ptp|l2mcd} autorestart {enable|disable}”

[Command]

feature {dhcp|macsec|nat|snmp|web|telemetry|lldp|exporter|ptp|l2mcd} autorestart {enable|disable}

[Purpose]

Set the auto-restart property of the feature.

[View]

Global Configuration View

[Use Cases]

sonic# configure terminal
sonic(config)# feature dhcp autorestart enable
sonic(config)# feature nat autorestart disable
sonic(config)# feature macsec autorestart disable

feature {dhcp|macsec|nat|snmp|web|telemetry|lldp|exporter|ptp|l2mcd} fallback {on|off}

Section titled “feature {dhcp|macsec|nat|snmp|web|telemetry|lldp|exporter|ptp|l2mcd} fallback {on|off}”

[Command]

feature {dhcp|macsec|nat|snmp|web|telemetry|lldp|exporter|ptp|l2mcd} fallback {on|off}

[Purpose]

Set the fallback property of the feature.

[View]

Global Configuration View

[Use Cases]

sonic# configure terminal
sonic(config)# feature dhcp fallback on
sonic(config)# feature nat fallback off
sonic(config)# feature macsec fallback off

Table 14 FTP Config

CommandPurpose
ftp server enableEnable FTP server.
ftp server source {vrf vrf_name|interface {mgmt 0|ethernet interface_name|link-aggregation lag-id |vlan vlan-id}}Configure the source interface for the FTP server.
ftp [ip|ipv6] ip_address [autologin|vrf vrf_name|downloadtip]Login to other devices using FTP protocol.

[Command]

ftp server enable

[Purpose]

Enable FTP server.

[View]

Global Configuration View

[Notes]

FTP server is not enabled by default. The current FTP server only allows the ‘admin’ user to log in, and the corresponding FTP file root directory is /home/admin. Run command no ftp server enable to disable FTP server.

[Use Cases]

sonic# configure terminal
sonic(config)# ftp server enable
Section titled “ftp server source {vrf vrf_name|interface {mgmt 0|ethernet interface_name|link-aggregation lag-id |vlan vlan-id}}”

[Command]

ftp server source{vrf vrf_name|interface {mgmt 0|ethernet interface_name|link-aggregation lag-id |vlan vlan-id}}

[Purpose]

Configure the source interface for the FTP server.

[Parameters]

ParameterDescription
vrf_nameVRF name, the default VRF is default.
interface_nameInterface name (eg.0/1).
lag-idLAG ID, the range is [1,9999].
vlan-idVLAN ID, the range is [1,4094].

[View]

Global Configuration View

[Notes]

Run command no ftp server source to delete the source interface for the FTP server.

[Use Cases]

sonic# configure terminal
sonic(config)# ftp server source interface ethernet 0/0

ftp [ip|ipv6] ip_address [autologin|vrf vrf_name|downloadtip]

Section titled “ftp [ip|ipv6] ip_address [autologin|vrf vrf_name|downloadtip]”

[Command]

ftp [ip|ipv6] ip_address [autologin|vrf vrf_name|downloadtip]

[Purpose]

Login to other devices using FTP protocol.

[Parameters]

ParameterDescription
ip_addressIP address of devices.
vrf_nameVRF name, the default VRF is default.

[View]

Privileged User View

[Use Cases]

sonic# ftp ip 10.250.0.167 autologin
Connected to 10.250.0.167.
220 (vsFTPd 3.0.3)
Name (10.250.0.167:admin): admin
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

Table 15 TFTP Config

CommandPurpose
tftp server enableEnable TFTP server.
tftp server source {vrf vrf_name|interface {mgmt 0|ethernet interface_name|link-aggregation lag-id |vlan vlan-id}}Configure the source interface for the TFTP server.
tftp [ip|ipv6] ip_address [vrf vrf_name|port port_id]Login to other devices using TFTP protocol

[Command]

tftp server enable

[Purpose]

Enable TFTP server.

[View]

Global Configuration View

[Notes]

TFTP server is not enabled by default. The corresponding TFTP file root directory is /srv/tftp/, which belongs to the ‘admin’ user, and only the ‘admin’ user is allowed to add or delete files within it. TFTP clients cannot add new files to the server or delete files from the server.They can download existing files on the server and also upload and update files on the server that have global write permissions. Run command no tftp server enable to disable TFTP server.

[Use Cases]

sonic# configure terminal
sonic(config)# tftp server enable
Section titled “tftp server source {vrf vrf_name|interface {mgmt 0|ethernet interface_name|link-aggregation lag-id |vlan vlan-id}}”

[Command]

tftp server source {vrf vrf_name|interface {mgmt 0|ethernet interface_name|link-aggregation lag-id|vlan vlan-id}}

[Purpose]

Configure the source interface for the TFTP server.

[Parameters]

ParameterDescription
vrf_nameVRF name, the default VRF is default.
interface_nameInterface name (eg.0/1).
lag-idLAG ID, the range is [1,9999].
vlan-idVLAN ID, the range is [1,4094].

[View]

Global Configuration View

[Notes]

Run command no tftp server source to delete the source interface for the TFTP server.

[Use Cases]

sonic# configure terminal
sonic(config)# tftp server source interface ethernet 0/0

tftp [ip|ipv6] ip_address [vrf vrf_name|port port_id]

Section titled “tftp [ip|ipv6] ip_address [vrf vrf_name|port port_id]”

[Command]

tftp [ip|ipv6] ip_address [vrf vrf_name|port port_id]

[Purpose]

Login to other devices using TFTP protocol.

[Parameters]

ParameterDescription
vrf_nameVRF name, the default VRF is default.
interface_nameInterface name (eg.0/1).
port_idPort id

[View]

Privileged User View

[Use Cases]

sonic# tftp ip 10.250.0.167
tftp>

Table 16 SCP Config

CommandPurpose
scp [ip|ipv6] source sourcefile target destinationfile [vrf vrf_name|src source_ip|interface interface_name|foldercopy]Transfer files using SCP protocol

scp [ip|ipv6] source sourcefile target destinationfile [vrf vrf_name|src source_ip|interface interface_name|foldercopy]

Section titled “scp [ip|ipv6] source sourcefile target destinationfile [vrf vrf_name|src source_ip|interface interface_name|foldercopy]”

[Command]

scp [ip|ipv6] source sourcefile target destinationfile [vrf vrf_name|src source_ip|interface interface_name|foldercopy]

[Purpose]

Transfer files using SCP protocol.

[Parameters]

ParameterDescription
vrf_nameVRF name, the default VRF is default.
interface_nameInterface name (eg.0/1).
interface_nameInterface name (eg.0/1).
source_ipSource IPaddress.
foldercopyBatch copying files from a folder.

[View]

Privileged User View

[Use Cases]

sonic# scp ip source admin@10.250.0.167:/home/admin/1.txt target 114.txt
admin@10.250.0.167's password:
1.txt 100% 5 1.7KB/s 00:00
sonic#

Table 17 Techsupport Config

CommandPurpose
techsupport [time days|transmission remote-ip A.B.C.D remote-user user_name remote-path path [port port_number]]Collect switch status and log information.

techsupport [time days|transmission remote-ip A.B.C.D remote-user user_name remote-path path [port port_number]]

Section titled “techsupport [time days|transmission remote-ip A.B.C.D remote-user user_name remote-path path [port port_number]]”

[Command]

techsupport [time days|transmission remote-ip A.B.C.D remote-user user_name remote-path path[port port_number]]

[Purpose]

Collect switch status and log information.

[Parameters]

ParameterDescription
daysSpecify the collection period in “days”, and the default is the last 7 days.
A.B.C.DSpecify the IP address of the remote server/host, if not, the file will be placed in the /tmp directory of the switch by default.
user_nameSpecify the user name of the remote server/host.
pathSpecify the destination file path.
port_numberSpecify the transfer port number, and the default is 22.

[View]

Privileged User View

[Notes]

When you caught an abnormal while the switch is working, please run this command. It will conveniently collect the status, table entries, and syslogs of the device to pack them into a file. The filename starts with diag_collect. We will provide you with necessary technical support.

[Use Cases]

sonic# techsupport time 1
collect syslog in 1 days
Information collection completed, files ready for transmission...