Command Line Reference
Basic Configuration
Enter The Command Line Configuration Interface
5 min
enter the command line configuration interface enter the command line configuration interface to use the klish command line, you need to first enter the klish view sonic cli sonic cli \[command] sonic cli \[purpose] enter the klish command line view \[notes] this command is executed in the terminal and use system bash command to exit the cli view \[use cases] admin\@sonic $ sonic cli sonic# help help all commands support help by typing tab or "?" to help the user understand the command and its parameters tab and "?” can be used at any level of the command and will show the next possible input command or sub command if you have problems using the command line, you can use the help function to get help without having to remember a lot of complicated commands when you enter a command, press the tab key, the system will list the set of keywords that can be matched; enter "? , the system will give the corresponding keyword hint or explanation of the meaning of the parameter example: sonic# show \<tab> aaa access list arp arp to host authentication bfd bgp bgpd clock copp crm dhcp dhcp relay dns dot1x end exit filter list hash igmp snooping interface ip ipfix ipv6 isisd key l2vpn ldpd lldp local user location led log mac address mcast snooping mclag mirror mld snooping monitor link group mpls nat nd ndp nexthop group no ntp ospf6d ospfd pbr map poe port group port isolate group pseudowire ptp qos qos map all quit radv route map router router id show sla snmp agent snp sync ssh stp syslog tacacs telnet time range traffic user bind vlan vlan group vrf vrrp ztp sonic# configure terminal sonic(config)# access list l3 test ingress \<tab> \<cr> sonic(config)# access list l3 test \<enter> syntax error the command is not completed sonic(config)# access list l3 test1 ingress sonic(config l3 acl test1)# ? end exit to the exec mode exit exit from current mode no negate a command or set its defaults rule add an access list entry show show running config sonic(config l3 acl test1)# rule ? string rule id(0 500,the larger num has higher priority) or rule name(not pure digit) sonic(config l3 acl test1)# rule 1 ? src mac specify source mac address ethernet type specify ethernet protocol type outer vlan specify outer vlan id vlan pri specify outer vlan priority ip protocol specify ip protocol src ip specify source ip address(mask) dst ip specify destination ip address(mask) icmp type specify type of icmp src port specify l4 source port dst port specify l4 destination port packet action specify action of matched packet ip type specify ip type redirect action specify redirect action of matched packet traffic behavior specify a traffic behavior to bind \<cr> description enter an incorrect command or a command that does not apply to this view will not allow a carriage return to be entered if the command line is not entered completely, press the entry key directly, the system will give a prompt \<cr>indicates that there are no keywords or parameters in this position, and can be executed by typing directly into the carriage return exit exit \[command] exit \[purpose] exit a view \[notes] this command is executed in any view show this show this \[command] show this \[purpose] show all configuration commands in the current view \[usage scenario] this command would display the currently running configuration on the device, including all the parameters and settings that are currently in effect \[notes] this command is executed in any view \[use cases] sonic(config)# interface ethernet 1 sonic(config if 1)# show this ! interface ethernet 1 ip address 2022 9110/127 ip address 30 11 13 1/30 speed 1000
