Site Search

Trying out industry standard commands with SONiC - Edgecore-SONiC Edition

Introduction

So far, the OpenNetworking Blog has covered white Box switches and SONiC, focusing on Edgecore-SONiC (hereinafter referred to as ecSONiC).
As these standards become more widespread, we are receiving an increasing number of requests from various customers for support for industry-standard command systems.

ecSONiC added support for the industry standard command system CLI in version "ec202111.10" released at the end of last year.
In this article, we will discuss the results of testing an actual device to see if basic settings for a switch can be made using this CLI.

[Points of this article]

          ecSONiC supports "isCLI", an industry standard command system for configuration.

          Basic functions can be configured using either the Linux CLI or isCLI.

          We hope that this will broaden the reach of engineers who have been avoiding SONiC with the Linux CLI.

Edgecore-SONiC industry standard command system “isCLI”

In ecSONiC, the industry standard command system mode is called "isCLI (Cisco Like CLI)" (other vendors call it SONIC CLI, etc.).

isCLI implementation features

As of ec202111.10, the following features are implemented in isCLI.

・System Status、File Mgmt、Event Logs、Time、
・ACL、Interface、Port Channel、MCLAG、Port Mirror、
・FDB、VLAN、EVPN/VxLAN、Priority、WRED&ECN、Buffer、PFC、LLDP、
・IPv4 & IPv6、ARP、Routing、BGP、VRF、SAG

Transition to isCLI mode

After logging in to ecSONiC, use the "sonic-cli" command to switch to isCLI mode.

admin@sonic:~$ sonic-cli
sonic# configure terminal

Check result

This time, we checked whether it was possible to configure basic functions such as VLAN, IP address assignment, LAG, and routing.
This is a summary of each setting item that was checked.

Settings

result

VLAN + IP address + port assignment (Access Port, Trunk Port) configurable
IP address settings for routed ports configurable
LAG Only LACP can be set
Static Routing configurable
Management functions: HostName, NTP, SNMP Only NTP server can be specified

VLAN settings + IP address settings

The Vlan and IP address are set as follows:

sonic# configure terminal

### Creating a VLAN sonic(config)# vlan database sonic(config-vlan)# vlan 10 sonic(config-vlan)# vlan 11 sonic(config-vlan)# vlan 12 sonic(config-vlan)# exit

### Setting IP address for VLAN sonic(config)# interface vlan 10 sonic(config-if-Vlan10)# ip address 1.1.1.1 255.255.255.0 sonic(config-if-Vlan10)# exit

sonic(config)# interface vlan 11 sonic(config-if-Vlan11)# ip address 2.2.2.1 255.255.255.0 sonic(config-if-Vlan11)# exit

sonic(config)# interface vlan 12 sonic(config-if-Vlan12)# ip address 3.3.3.1 255.255.255.0 sonic(config-if-Vlan12)# end



The configured VLAN and IP address can be confirmed below.


### Check the results of VLAN and IP address settings sonic# show vlan brief +-----------+-------------+---------+----------+----------+---------------+---------------+----------------------------+ | VLAN ID | IP Address | Ports | Port | Proxy | Description | DHCP Helper | DHCP Relay Configuration | | | | | Tagging | ARP | | Address | | +==============+==============+============+============+=============+===============+================+===================+=====================+ | 10 | 1.1.1.1/24 | | | disabled | | | Source Interface: | | | | | | | | Link Selection: | | | | | | | | | Server Vrf: | | | | | | | | | Server ID Override: | | | | | | | | | | Primary Address: | | | | | | | | | disabled | | | Link Selection: | | | | | | | | | Server Vrf: | | | | | | | | | Server ID Override: | | | | | | | | | | Primary Address: | 12 | 3.3.3.1/24 | | | disabled | | | Source Interface: | | | | | | | | | | Link Selection: | | | | | | | | | Server Vrf: | | | | | | | | | Server ID Override: |


For the created VLAN, we entered the port assignment settings for Access Port and Trunk Port as follows.

sonic# configure terminal

### VLAN port assignment (Access Port) sonic(config)# interface Ethernet 0 sonic(conf-if-Ethernet0)# switchport allowed vlan add 10 untagged sonic(conf-if-Ethernet0)# exit

### VLAN port assignment (Trunk Port) sonic(config)# interface Ethernet 1 sonic(conf-if-Ethernet1)# switchport allowed vlan add 11-12 tagged sonic(conf-if-Ethernet1)# end


The VLAN port assignment results were confirmed as follows:

### Check the results of VLAN port assignment sonic# show vlan brief +-----------+--------------+-----------+-----------+---------------+---------------+----------------------------+ | VLAN ID | IP Address | Ports | Port | Proxy | Description | DHCP Helper | DHCP Relay Configuration | | | | | Tagging | ARP | | Address | | +==============+===============+=============+=============+==============+===============+=================+====================+=======================+ | 10 | 1.1.1.1/24 | Ethernet0 | untagged | disabled | | | Source Interface: | | | | | | | | | Link Selection: | | | | | | | | | Server Vrf: | | | | | | | | | | Server ID Override: | | | | 2.2.2.1/24 | Ethernet1 | tagged | disabled | | | Source Interface: | | | | | | | | | | Link Selection: | | | | | | | | | Server Vrf: | | | | | | | | | | Server ID Override: | +------------+--------------+----------+------------+------------+---------------+---------------+--------------------------+ | 12 | 3.3.3.1/24 | Ethernet1 | tagged | disabled | | | Source Interface: | | | | | | | | | | Link Selection: | | | | | | | | | Server Vrf: | +------------+--------------+----------+------------+------------+---------------+---------------+--------------------------+

IP address settings for Routed Port

The IP address for the Routed Port was set as follows:

sonic# configure terminal ### Setting IP address for Routed Port sonic(config)# interface Ethernet 0 sonic(conf-if-Ethernet0)# ip address 1.1.1.1/24 sonic(conf-if-Ethernet0)# end

### Check IP address settings sonic# show ip interface Ethernet 0 Interface Master IPv4 address/mask Admin/Oper BGP Neighbor Neighbor IP ----------- -------- ------------------- ------------ -------------- ------------- Ethernet0 1.1.1.1/24 up/down N/AN/A sonic#

LAG

LAG could only be configured as LACP.
LACP was configured as follows:

sonic# configure terminal
### ※VLAN settings are omitted
### Create and configure an LACP interface sonic(config)# interface PortChannel 1 sonic(conf-if-PortChannel1)# switchport allowed vlan add 100 untagged sonic(conf-if-PortChannel1)# exit
sonic(config)# interface PortChannel 2 sonic(conf-if-PortChannel2)# switchport allowed vlan add 200 tagged sonic(conf-if-PortChannel2)# exit
### Configure LACP member ports sonic(config)# interface Ethernet0 sonic(conf-if-Ethernet0)# lacp 1 sonic(conf-if-Ethernet0)# exit
sonic(config)# interface Ethernet1 sonic(conf-if-Ethernet1)# lacp 2 sonic(conf-if-Ethernet1)# exit sonic(config)# exit
### Check LACP setting results sonic# show PortChannel Port Channel : PortChannel1 MTU : 9100 Member Port : Ethernet0
Port Channel: PortChannel2 MTU: 9100 Member Port: Ethernet1

Static Routing

Static Routing was configured as follows:

### Configuring Static Route sonic(config)# ip route 192.168.10.0 255.255.255.0 192.168.0.2

### Checking the route after setting Static Route sonic(config)# show ip route Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure K>* 0.0.0.0/0 [0/0] via 192.168.0.1, eth0, 21:01:30 C>* 192.168.0.0/24 is directly connected, eth0, 21:01:30 S>* 192.168.10.0/24 [1/0] via 192.168.0.2, eth0, weight 1, 00:00:30

### Delete Static Route sonic(config)# no ip route 192.168.10.0 255.255.255.0

### Confirm Static Route deletion result sonic(config)# show ip route Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure K>* 0.0.0.0/0 [0/0] via 192.168.0.1, eth0, 21:04:23 C>* 192.168.0.0/24 is directly connected, eth0, 21:04:23 sonic(config)#

Management functions: HostName, NTP, SNMP

Of HostName, NTP and SNMP, currently ecSONiC only supports NTP.
When I set the HostName as shown below, an error occurred.

sonic# configure terminal
sonic(config)# hostname hoge
               ^
% Error: Invalid input detected at "^" marker.
sonic(config)#


The NTP
settings are as follows:

sonic(config)# ntp server 1.1.1.1
sonic(config)# end
sonic# show ntp server
NTP Server 1.1.1.1
sonic#

When I set up SNMP as follows, an error occurred.

sonic(config)# snmp-server
                ^
% Error: Invalid input detected at "^" marker.
sonic(config)#

Impressions and future plans

This time, by using isCLI on ecSONiC, we were able to configure basic functions such as VLAN, IP address, and static routing.

ecSONiC's "ec202111.11", released in May 2025, will also expand the functions that can be configured with isCLI.
We believe that this will lower the barrier to using SONiC, even for engineers who have worked with network equipment that uses industry-standard command systems.

Summary

This time, we used ecSONiC's industry-standard command "isCLI" to check whether basic functions could be configured.
Even if you've been putting off SONiC because of its unique command system, why not give it a try?

Click here for list of materials

Document list

In addition to introducing products handled by Macnica,
We publish materials related to open networking, such as BGP cross network automatic construction files and network operation test evaluation reports.

Click here for details

Product Page Top

Aviz Networks

We are pioneers of SONiC, an open source network operating system, providing observability, configuration automation tools and support from a team of SONiC experts.

Edgecore Networks

We continue to be a pioneer in open networking by developing and selling products related to OpenNetworking/white Box switches.

IP Infusion

As a market leader among open networking providers, we provide reliable network solutions to over 600 customers, including carriers, service providers, and data centers.

Inquiry/Document request

In charge of Macnica Edgecore Networks

Weekdays: 9:00-17:00