System Configuration
System Status
Section titled “System Status”Basic Information View
Section titled “Basic Information View”Table 1 Basic Information View
Command | Purpose |
---|---|
show version | Display version info. |
show platform {fan|psu-status|ssd-health|summary|sys-eeprom|temperature} | Display system platform information. |
show image | Display 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. |
show version
Section titled “show version”[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 versionAsterfusion AsterNOS Software, Version 3.1, R0402P01SONiC Software Version: SONiC.202111.R0402P01Distribution: Debian 11.7Kernel: 5.10.0-8-2-amd64Build commit: 77b733bbfBuild date: Tue Jul 25 07:54:52 UTC 2023Built by: jenkins@sonic-Super-ServerPlatform: x86_64-asterfusion_cx532p_n-r0HwSKU: CX532P-NASIC: innoviumASIC Count: 1Serial Number: F023529A054Model Number: LE5032CHardware Revision: 1Uptime: 10:00:19 up 8:20, 9 users, load average: 0.79, 1.15, 1.14Docker images:REPOSITORY TAG IMAGE ID SIZEdocker-dhcp-relay latest b579bf4af4f4 452MBdocker-teamd 202111.R0402P01 740816f290c6 463MBdocker-teamd latest 740816f290c6 463MBdocker-sonic-mgmt-framework 202111.R0402P01 fab89648d04e 675MBdocker-sonic-mgmt-framework latest fab89648d04e 675MBdocker-slad 202111.R0402P01 fe39ccd088a5 472MBdocker-slad latest fe39ccd088a5 472MBdocker-sflow 202111.R0402P01 e092a98e73b8 464MBdocker-sflow latest e092a98e73b8 464MBdocker-orchagent 202111.R0402P01 a494ff09a565 484MBdocker-orchagent latest a494ff09a565 484MBdocker-neighbor-proxy 202111.R0402P01 22c393e97052 463MBdocker-neighbor-proxy latest 22c393e97052 463MBdocker-nat 202111.R0402P01 14d147def064 466MBdocker-nat latest 14d147def064 466MBdocker-mstpd 202111.R0402P01 366d8236220e 485MBdocker-mstpd latest 366d8236220e 485MBdocker-macsec 202111.R0402P01 24c53be62fa6 468MBdocker-macsec latest 24c53be62fa6 468MBdocker-lldp 202111.R0402P01 d2d41b9d8918 505MBdocker-lldp latest d2d41b9d8918 505MBdocker-iccpd 202111.R0402P01 a6e24b2dc581 466MBdocker-iccpd latest a6e24b2dc581 466MBdocker-fpm-frr 202111.R0402P01 954d87aafa63 492MBdocker-fpm-frr latest 954d87aafa63 492MBdocker-cluster 202111.R0402P01 96e50ff3edc4 892MBdocker-cluster latest 96e50ff3edc4 892MBdocker-syncd-invm 202111.R0402P01 c940e72b0685 826MBdocker-syncd-invm latest c940e72b0685 826MBdocker-web-server 202111.R0402P01 e53911947b43 477MBdocker-web-server latest e53911947b43 477MBdocker-sonic-telemetry 202111.R0402P01 f4ab4ab9acef 516MBdocker-sonic-telemetry latest f4ab4ab9acef 516MBdocker-snmp 202111.R0402P01 217730a11313 483MBdocker-snmp latest 217730a11313 483MBdocker-router-advertiser 202111.R0402P01 585724965c6d 438MBdocker-router-advertiser latest 585724965c6d 438MBdocker-platform-monitor 202111.R0402P01 d38c88b80d5b 561MBdocker-platform-monitor latest d38c88b80d5b 561MBdocker-mux 202111.R0402P01 faacdde8a401 486MBdocker-mux latest faacdde8a401 486MBdocker-database 202111.R0402P01 dc3502d3da31 438MBdocker-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 summaryPlatform: x86_64-asterfusion_cx532p_n-r0HwSKU: CX532P-NASIC: marvellASIC Count: 1Serial Number: F023529A054Model Number: CX532P-NHardware Revision: 1Display 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:18Display PSU power status and power information.sonic# show platform psu-statusPSU 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 falsePSU 2 0.00 0.00 0.00 0.00 0.00 0.00 exhaust NOT OK false falseDisplay 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:56Right_Main_Board 34 N/A N/A N/A N/A false 2025-01-24 06:54:56Display system EEPROM information.sonic# show platform sys-eepromTlvInfo Header: Id String: TlvInfo Version: 1 Total Length: 247TLV Name Code Len Value------------------- ------ ----- ------------------------------Product Name 0x21 12 CX864E-N-ACPart Number 0x22 19 ONBP2U-N-2X64E-A-ACSerial Number 0x23 11 F02524BB889Base MAC Address 0x24 6 60:EB:5A:00:11:22Manufacture Date 0x25 19 10/31/2024 23:59:59Device Version 0x26 1 1Label Revision 0x27 1 0Platform Name 0x28 30 x86_64-asterfusion_cx864e_n-r0ONIE Version 0x29 14 2019.05_v1.0.6MAC Addresses 0x2A 2 2Manufacturer 0x2B 11 AsterfusionManufacture Country 0x2C 2 CNVendor Name 0x2D 11 AsterfusionDiag Version 0x2E 3 1.0Service Tag 0x2F 1 XCRC-32 0xFE 4 0x92DD741DDisplay health information of SSD devices in the system, including hard drive model information.sonic# show platform ssd-healthDevice Model : Saturn NCT 624XN 256GBHealth : N/ATemperature : Old_age
show image
Section titled “show image”[Command]
show image
[Purpose]
Display the installed image of the system.
[View]
Privileged User View
[Use Cases]
sonic# show imageCurrent: SONiC-OS-202111.R0402P01Next: SONiC-OS-202111.R0402P01Available:SONiC-OS-202111.R0402P01SONiC-OS-202111.R0402P01T02
show history [all]
Section titled “show history [all]”[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 startupsonic# 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 cputop - 17:24:07 up 6:10, 4 users, load average: 2.08, 1.62, 1.15Tasks: 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 stKiB Mem : 16416408 total, 12812084 free, 2342092 used, 1262232 buff/cacheKiB 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 syseepromd25105 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 usersadmin 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)
show patches [detail]
Section titled “show patches [detail]”[Command]
show patches [detail]
[Purpose]
Display the patches already installed.
[View]
Privileged User View
[Use Cases]
sonic# show patchesPatch Id Name Created Time Install Time Operator---------- ------ -------------- -------------- ----------
Configuration View
Section titled “Configuration View”Table 2 Configure Information View
Command | Purpose |
---|---|
show running-config | Display configuration running currently. |
show startup-config | Display startup configuration. |
show this | Display configuration of current view. |
show running-config
Section titled “show running-config”[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.254exit!interface ethernet 0/0 mtu 9216 no fec speed 10000 switchport access vlan 200exit!interface ethernet 0/1 fec rs mtu 9216 speed 25000exit!interface ethernet 0/2 fec rs mtu 9216 speed 25000exit!interface ethernet 0/3 fec rs mtu 9216 speed 25000exit!interface ethernet 0/4 fec rs mtu 9216 speed 25000exit!……
show startup-config
Section titled “show startup-config”[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.254exit!interface ethernet 0/0 mtu 9216 no fec speed 10000 switchport access vlan 200exit!interface ethernet 0/1 fec rs mtu 9216 speed 25000exit!interface ethernet 0/2 fec rs mtu 9216 speed 25000exit!interface ethernet 0/3 fec rs mtu 9216 speed 25000exit!interface ethernet 0/4 fec rs mtu 9216 speed 25000exit!……
show this
Section titled “show this”[Command]
show this
[Purpose]
Display configuration of current view.
[View]
All configuration views except Global Configuration View
[Use Cases]
sonic(config)# interface ethernet 0/16sonic(config-if-0/16)# show this!interface ethernet 0/16 fec rs mtu 9216 speed 25000sonic(config-if-0/16)#sonic(config-if-0/16)# exitsonic(config)# router bgp 65207sonic(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-familyexit
System Config
Section titled “System Config”Table 3 System Config
Command | Purpose |
---|---|
configure terminal | Enter Global Configuration View. |
reboot | Reboot the system. |
reload | Reload the system. |
write | Save the configuration. |
hostname hostname | Modify the hostname of the switch. |
image switch image-version | Switch the system image. |
image update bin-file | Upgrade the system image. |
ping ip-address | Ping. |
traceroute ip-address | Route tracking. |
delete startup-config [reserve-mgmt] | Restore to the default configuration. |
terminal rich-output | Enable paging and colorizing when printing to the terminal. |
configure terminal
Section titled “configure terminal”[Command]
configure terminal
[Purpose]
Enter Global Configuration View.
[View]
Privileged User View
[Use Cases]
sonic# configure terminalsonic(config)#
reboot
Section titled “reboot”[Command]
reboot
[Purpose]
Reboot the system.
[View]
Privileged User View
[Use Cases]
sonic# rebootDo you want to reboot? [y/N]: y
reload
Section titled “reload”[Command]
reload
[Purpose]
Reload the system.
[View]
Privileged User View
[Use Cases]
sonic# reloadClear 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# writesave running-config...Existing files will be overwritten, continue? [y/N]: y
hostname hostname
Section titled “hostname hostname”[Command]
hostname hostname
[Purpose]
Modify the hostname of the switch.
[Parameters]
Parameter | Description |
---|---|
hostname | Specify 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-226Running command: service hostname-config restartReloading Monit configuration ...Reinitializing monit daemon
image switch image-version
Section titled “image switch image-version”[Command]
image switch image-version
[Purpose]
Switch the system image.
[Parameters]
Parameter | Description |
---|---|
image | Name of the image. |
[View]
Privileged User View
[Use Cases]
sonic# show imageCurrent: SONiC-OS-V3.1R0402P02T06Next: SONiC-OS-V3.1R0402P02T06Available:SONiC-OS-V3.1R0402P02T06SONiC-OS-V3.1R0402P02T05sonic# image switch SONiC-OS-V3.1R0402P02T05Command: grub-set-default --boot-directory=/host 1
image update bin-file
Section titled “image update bin-file”[Command]
image update bin-file
[Purpose]
Upgrade the system image.
[Parameters]
Parameter | Description |
---|---|
bin-file | The image bin file. |
[View]
Privileged User View
[Use Cases]
sonic# image update sonic-innovium.bin
ping ip-address
Section titled “ping ip-address”[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]
Parameter | Description |
---|---|
ip | Send ICMP IPv4 messages, default is IPv4. |
ipv6 | Send ICMP IPv6 messages. |
arp | Send ARP requests. |
ip-address | Specify the destination IP address. |
vrf_name | Specify the source VRF. |
vlan-id | VLAN ID, the range is [1,4094]. |
interface_name | Specify source interface name. |
count | Stop after count replies, the default is 5. |
size | Specify the number of data bytes to be sent. |
interval | Specify the interval in seconds. The default is 1. |
[View]
Privileged User View
[Use Cases]
sonic# ping 10.250.0.242PING 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 ms64 bytes from 10.250.0.242: icmp_seq=2 ttl=63 time=0.164 ms64 bytes from 10.250.0.242: icmp_seq=3 ttl=63 time=0.154 ms64 bytes from 10.250.0.242: icmp_seq=4 ttl=63 time=0.168 ms64 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 4049msrtt min/avg/max/mdev = 0.144/0.619/2.467/0.923 ms
traceroute ip-address
Section titled “traceroute ip-address”[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]
Parameter | Description |
---|---|
ip | Send ICMP IPv4 messages, default is IPv4. |
ipv6 | Send ICMP IPv6 messages. |
ip-address | Specify the destination IP address. |
vrf_name | Specify the source VRF. |
A.B.C.D/A::B | Specify the source IP address. |
vlan-id | VLAN ID, the range is [1,4094]. |
interface_name | Specify source interface name. |
[View]
Privileged User View
[Use Cases]
sonic# traceroute ip 60.0.0.1traceroute 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
delete startup-config [reserve-mgmt]
Section titled “delete startup-config [reserve-mgmt]”[Command]
delete startup-config [reserve-mgmt]
[Purpose]
Restore to the default configuration.
[Parameters]
Parameter | Description |
---|---|
reserve-mgmt | This option preserves the Management Interface IP configuration, which is not preserved by default. |
[View]
Privileged User View
[Use Cases]
sonic# delete startup-config reserve-mgmtLoad_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.jsonRunning 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.jsonRunning 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.jsonRunning 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.jsonRunning 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.jsonInherit 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.jsonRunning command: cp /tmp/config_db.json /etc/sonic/config_db.jsonThe configuration has been restored. Please reload it to take effect
terminal rich-output
Section titled “terminal rich-output”[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
Time View
Section titled “Time View”Table 4 Time View
Command | Purpose |
---|---|
show clock | Display the time zone and time of the system. |
show supported-timezones | Display the time zones the system supports. |
show clock
Section titled “show clock”[Command]
show clock
[Purpose]
Display the time zone and time of the system.
[View]
Privileged User View
[Use Cases]
sonic# show clock2024-10-19 09:19:01 Tuesday UTC+0000
show supported-timezones
Section titled “show supported-timezones”[Command]
show supported-timezones
[Purpose]
Display the time zones the system supports.
[View]
Privileged User View
[Use Cases]
sonic# show supported-timezones
Time Config
Section titled “Time Config”Table 5 Time Config
Command | Purpose |
---|---|
clock datetime date time | Set the system time. |
clock timezone zone | Set the system time zone. |
clock datetime date time
Section titled “clock datetime date time”[Command]
clock datetime date time
[Purpose]
Set the system time.
[Parameters]
Parameter | Description |
---|---|
date | In YY-MM-DD format. |
time | In HH:MM:SS format. |
[View]
Global Configuration View
[Use Cases]
sonic# configuresonic(config)# clock datetime 2022-02-22 20:30:30
clock timezone zone
Section titled “clock timezone zone”[Command]
clock timezone zone
[Purpose]
Set the system time zone.
[Parameters]
Parameter | Description |
---|---|
zone | The 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# configuresonic(config)# clock timezone Asia/Shang
NTP(Network Time Protocol)is a protocol used to synchronize the time of individual machines on a network.
NTP View
Section titled “NTP View”Table 6 NTP View
Command | Purpose |
---|---|
show ntp | Display NTP status. |
show ntp server | Display configuration of NTP Server. |
show ntp global | Display global configuration of NTP. |
show ntp authentication-keyid | Display NTP authentication Key. |
show ntp
Section titled “show ntp”[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
show ntp server
Section titled “show ntp server”[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 -
show ntp global
Section titled “show ntp global”[Command]
show ntp global
[Purpose]
Display global configuration of NTP.
[View]
Privileged User View
[Use Cases]
sonic# show ntp globalState: enabledAuthentication: disabledVRF: default
show ntp authentication-keyid
Section titled “show ntp authentication-keyid”[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
NTP Config
Section titled “NTP Config”Table 7 NTP Config
Command | Purpose |
---|---|
ntp enable | Enable NTP automatic synchronization service. |
ntp server server-ip [authentication-keyid] | Specify a NTP server. |
ntp source_interface {mgmt|loopback|ethernet|link-aggregation|vlan} interface_name | Specify the source interface for NTP. |
ntp synchronize [unprivileged] server-ip | Synchronise manually from an NTP server. |
ntp synchronize jump | Enable NTP jump synchronization. |
ntp vrf {default|mgmt} | Specify the VRF where the NTP source interface is located. |
ntp authentication enable | Enable NTP authentication |
ntp authentication-keyid key_id {md5|sha1|sha256|sha384|sha512} | Add NTP key |
ntp enable
Section titled “ntp enable”[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]
Parameter | Description |
---|---|
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
ntp source_interface {mgmt|loopback|ethernet|link-aggregation|vlan} interface_name
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]
Parameter | Description |
---|---|
interface_name | Interface 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 0sonic(config)# ntp source_interface loopback 0
ntp synchronize [unprivileged] server-ip
Section titled “ntp synchronize [unprivileged] server-ip”[Command]
ntp synchronize [unprivileged] server-ip
[Purpose]
Synchronise manually from an NTP server.
[Parameters]
Parameter | Description |
---|---|
unprivileged | This 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-ip | Specify 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.24318 Nov 20:10:52 ntpdate[385097]: adjust time server 10.250.0.243 offset -0.009762 sec
ntp synchronize jump
Section titled “ntp synchronize jump”[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
ntp vrf {default|mgmt}
Section titled “ntp vrf {default|mgmt}”[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 defaultsonic(config)# ntp vrf mgmt
ntp authentication enable
Section titled “ntp authentication enable”[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 md5Please enter authentication key value:sonic(config)#
Syslog
Section titled “Syslog”Syslog View
Section titled “Syslog View”Table 8 Syslog View
Command | Purpose |
---|---|
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]
Parameter | Description |
---|---|
number | Specify the number of rows at the end of the syslog to view. |
string | Filter syslog based on string content. |
[View]
Privileged User View
[Use Cases]
sonic# show syslog followApr 22 07:00:33.664168 sonic NOTICE swss#orchagent: :- updatePortOperStatus: Port Ethernet76 oper state set from down to upApr 22 07:00:33.666717 sonic NOTICE swss#orchagent: :- setHostIntfsOperStatus: Set operation status UP to host interface Ethernet76Apr 22 07:00:33.667517 sonic NOTICE swss#orchagent: :- doTask: Ethernet76 oper speed is 100000Apr 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 36Apr 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 syslogApr 22 07:06:30.884589 sonic INFO klish: show syslogsonic# show syslog tail 5Apr 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 syslogApr 22 07:06:30.884589 sonic INFO klish: show syslogApr 22 07:07:39.626660 sonic INFO klish: show syslog followsonic# show syslog grep klish2025-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 startApr 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=1Apr 18 07:38:25.945585 sonic INFO systemd[1]: Finished klish frr service.Apr 18 08:13:33.028821 sonic INFO klish: system bashApr 18 09:51:22.581430 sonic INFO klish: startup
Syslog Config
Section titled “Syslog Config”Table 9 Syslog Config
Command | Purpose |
---|---|
syslog server-ip [port] | Set a syslog backup server. |
syslog source-interface {mgmt|ethernet|loopback} interface_name | Specify the source interface. |
syslog server-ip [port]
Section titled “syslog server-ip [port]”[Command]
syslog server-ip [port]
[Purpose]
Set a syslog backup server.
[Parameters]
Parameter | Description |
---|---|
server-ip | Specify the IP address of syslog server. |
port | Specify 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 terminalsonic(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]
Parameter | Description |
---|---|
interface_name | Interface 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 terminalsonic(config)# syslog source-interface ethernet 0/10
CRM View
Section titled “CRM View”Table 10 CRM View
Command | Purpose |
---|---|
show crm summary | Display 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. |
show crm summary
Section titled “show crm summary”[Command]
show crm summary
[Purpose]
Display CRM configuration summary information.
[View]
Privileged User View
[Use Cases]
sonic# show crm summaryPolling 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 allResource Name Threshold Type Low Threshold High Threshold-------------------- ---------------- --------------- ----------------ipv4_route percentage 70 85ipv6_route percentage 70 85ipv4_nexthop percentage 70 85ipv6_nexthop percentage 70 85ipv4_neighbor percentage 70 85ipv6_neighbor percentage 70 85nexthop_group_member percentage 70 85nexthop_group percentage 70 85acl_table percentage 70 85acl_group percentage 70 85acl_entry percentage 70 85acl_counter percentage 70 85fdb_entry percentage 70 85ipmc_entry percentage 70 85snat_entry percentage 70 85dnat_entry percentage 70 85mpls_inseg percentage 70 85mpls_nexthop percentage 70 85sonic# show crm thresholds acl tableResource 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 allResource Name Used Count Available Count-------------------- ------------ -----------------ipv4_route 49 171971ipv6_route 9 84983ipv4_nexthop 5 36710ipv6_nexthop 0 36710ipv4_neighbor 5 36710ipv6_neighbor 0 36710nexthop_group_member 4 15356nexthop_group 2 4093fdb_entry 24 45032ipmc_entry 0 12288snat_entry 0 0dnat_entry 0 0mpls_inseg 0 235741413mpls_nexthop 0 235741413srv6_nexthop 0 235741413srv6_my_sid_entry 0 235741413Stage Bind Point Resource Name Used Count Available Count------- ------------ --------------- ------------ -----------------INGRESS PORT acl_group 1 254INGRESS PORT acl_table 1 9INGRESS LAG acl_group 0 254INGRESS LAG acl_table 1 9EGRESS PORT acl_group 1 254EGRESS PORT acl_table 1 9EGRESS LAG acl_group 0 254EGRESS LAG acl_table 1 9Table ID Resource Name Used Count Available Count--------------- --------------- ------------ -----------------0x7000000000566 acl_entry 3 1250x7000000000566 acl_counter 3 1250x7000000000569 acl_entry 3 2530x7000000000569 acl_counter 3 253sonic# show crm resources ipv4 neighborResource Name Used Count Available Count--------------- ------------ -----------------ipv4_neighbor 5 36710
CRM Config
Section titled “CRM Config”Table 11 CRM Config
Command | Purpose |
---|---|
crm polling interval interval | Set 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_threshold | Set thresholds for CRM resources. |
crm polling interval interval
Section titled “crm polling interval interval”[Command]
crm polling interval interval
[Purpose]
Set the polling interval of CRM.
[Parameters]
Parameter | Description |
---|---|
interval | Specify the polling interval in seconds, the range is 1-9999. |
[View]
Global Configuration View
[Use Cases]
sonic# configure terminalsonic(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 terminalsonic(config)# crm thresholds acl table type usedsonic(config)# crm thresholds acl group entry type usedsonic(config)# crm thresholds acl group counter type freesonic(config)# crm thresholds nexthop group member type percentagesonic(config)# crm thresholds ipv4 neighbor type usedsonic(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]
Parameter | Description |
---|---|
crm_threshold | The range is 0-65535. |
[View]
Global Configuration View
[Use Cases]
sonic(config)# crm thresholds ipv4 neighbor high 800sonic(config)# crm thresholds ipv4 neighbor low 100sonic(config)# crm thresholds ipv6 route high 500sonic(config)# crm thresholds ipv6 route low 50
Feature
Section titled “Feature”Feature View
Section titled “Feature View”Table 12 Feature View
Command | Purpose |
---|---|
show feature config | Display the configuration of the features. |
show feature status | Display the status information of the features. |
show feature config
Section titled “show feature config”[Command]
show feature config
[Purpose]
Display the configuration of the features.
[View]
Privileged User View
[Use Cases]
sonic# show feature configFeature State AutoRestart Owner-------------- --------------- -------------- -------aflpd enabled enabled localbgp enabled enabled localcluster disabled disabled localdatabase always_enabled always_enabled localdhcp disabled enabled localeventd disabled disabled localexporter disabled disabled localiccpd enabled enabled locallldp enabled enabled localmacsec disabled enabled localmgmt-framework enabled enabled localmstpd enabled enabled localmux always_disabled enabled localnat disabled enabled localpmon enabled enabled localproxy enabled enabled localradv enabled enabled localsflow enabled enabled localslad enabled enabled localsnmp enabled enabled localswss enabled enabled localsyncd enabled enabled localteamd enabled enabled localtelemetry enabled enabled localweb enabled enabled local
show feature status
Section titled “show feature status”[Command]
show feature status
[Purpose]
Display the status information of the features.
[View]
Privileged User View
[Use Cases]
sonic# show feature statusFeature State AutoRestart SetOwner-------------- --------------- -------------- ----------aflpd enabled enabledbgp enabled enabledcluster disabled disableddatabase always_enabled always_enableddhcp disabled enabled localeventd disabled disabledexporter disabled disablediccpd enabled enabledlldp enabled enabledmacsec disabled enabledmgmt-framework enabled enabledmstpd enabled enabledmux always_disabled enablednat disabled enabledpmon enabled enabledproxy enabled enabledradv enabled enabledsflow enabled enabledslad enabled enabledsnmp enabled enabledswss enabled enabledsyncd enabled enabledteamd enabled enabledtelemetry enabled enabledweb enabled enabled
Feature Config
Section titled “Feature Config”Table 13 Feature Config
Command | Purpose |
---|---|
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 terminalsonic(config)# feature dhcp state enablesonic(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 terminalsonic(config)# feature dhcp autorestart enablesonic(config)# feature nat autorestart disablesonic(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 terminalsonic(config)# feature dhcp fallback onsonic(config)# feature nat fallback offsonic(config)# feature macsec fallback off
FTP Config
Section titled “FTP Config”Table 14 FTP Config
Command | Purpose |
---|---|
ftp server enable | Enable 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. |
ftp server enable
Section titled “ftp server enable”[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 terminalsonic(config)# ftp server enable
ftp server source {vrf vrf_name|interface {mgmt 0|ethernet interface_name|link-aggregation lag-id |vlan vlan-id}}
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]
Parameter | Description |
---|---|
vrf_name | VRF name, the default VRF is default. |
interface_name | Interface name (eg.0/1). |
lag-id | LAG ID, the range is [1,9999]. |
vlan-id | VLAN 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 terminalsonic(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]
Parameter | Description |
---|---|
ip_address | IP address of devices. |
vrf_name | VRF name, the default VRF is default. |
[View]
Privileged User View
[Use Cases]
sonic# ftp ip 10.250.0.167 autologinConnected to 10.250.0.167.220 (vsFTPd 3.0.3)Name (10.250.0.167:admin): admin331 Please specify the password.Password:230 Login successful.Remote system type is UNIX.Using binary mode to transfer files.ftp>
TFTP Config
Section titled “TFTP Config”Table 15 TFTP Config
Command | Purpose |
---|---|
tftp server enable | Enable 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 |
tftp server enable
Section titled “tftp server enable”[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 terminalsonic(config)# tftp server enable
tftp server source {vrf vrf_name|interface {mgmt 0|ethernet interface_name|link-aggregation lag-id |vlan vlan-id}}
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]
Parameter | Description |
---|---|
vrf_name | VRF name, the default VRF is default. |
interface_name | Interface name (eg.0/1). |
lag-id | LAG ID, the range is [1,9999]. |
vlan-id | VLAN 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 terminalsonic(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]
Parameter | Description |
---|---|
vrf_name | VRF name, the default VRF is default. |
interface_name | Interface name (eg.0/1). |
port_id | Port id |
[View]
Privileged User View
[Use Cases]
sonic# tftp ip 10.250.0.167tftp>
SCP config
Section titled “SCP config”Table 16 SCP Config
Command | Purpose |
---|---|
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]
Parameter | Description |
---|---|
vrf_name | VRF name, the default VRF is default. |
interface_name | Interface name (eg.0/1). |
interface_name | Interface name (eg.0/1). |
source_ip | Source IPaddress. |
foldercopy | Batch 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.txtadmin@10.250.0.167's password:1.txt 100% 5 1.7KB/s 00:00sonic#
Techsupport
Section titled “Techsupport”Techsupport Config
Section titled “Techsupport Config”Table 17 Techsupport Config
Command | Purpose |
---|---|
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]
Parameter | Description |
---|---|
days | Specify the collection period in “days”, and the default is the last 7 days. |
A.B.C.D | Specify 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_name | Specify the user name of the remote server/host. |
path | Specify the destination file path. |
port_number | Specify 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 1collect syslog in 1 daysInformation collection completed, files ready for transmission...