English

What Is CLI of a Data Switch and How to Access it?

Updated on Aug 3, 2018 by
15.2k

A data switch serves as a controller that enables networked devices to talk to each other efficiently. After logging on a data switch, do you know how to configure the switch efficiently and manage it appropriately for information sharing and resource allocation? Command Line Interface (CLI) is one of the most prevailing configuration methods to manage network devices. It is considered as the building block of a network software system. This post contains information about the basic CLI functionality of FS data switches, and the specific procedures to get access to a data switch.

What Is the Command Line Interface of a Data Switch?

The command line interface is the main, text-based interface for configuring, managing, and monitoring network devices such as a router or a data switch. CLI allows you to type in configuration commands to get the output from the router or a switch. The network software recognizes the command when you enter enough characters of the command to uniquely identify it, which in turn helps you monitor the status of your network device. The following figure shows the command line interface of FS S3800-24T4S Gigabit Ethernet switch. On the CLI interface, you can read the basic information about this switch and input more characters to execute more commands.

CLI of Gigabit Ethernet switch

How to Access the Command Line Interface?

Before accessing a data switch, you need to prepare a configuration line with USB which is directly connected to a PC, and then install the corresponding driver for the network software system. The network software will configure some parameters and accomplish the connection between the switch and PC.

Generally, you can access the CLI through a direct connection to the console port, or remotely using Telnet or SSH command. The simplest way to enter the CLI interface is to build a direct serial connection to the switch’s console port, which is demonstrated below. In the factory default configuration, a data switch console starts with the CLI prompt. To use the menu interface with manager privileges, go to the manager level prompt and enter the menu command. Here we take FS S5850-48S6Q 10 gigabit switch as an example to show you the operation procedures to access the CLI interface of this data switch.

CLI of data switch

Step 1: Clear the configuration of the switch, input a command as below

A-5850-48S6Q# delete flash:/startup-config.conf

Are you sure to delete startup configuration file? [confirm]

Step 2: Reboot the switch and reset the configuration to Factory Defaults

A-5850-48S6Q# reboot

After finishing the above two steps, the switch console will start with the CLI prompt. But if you have saved the factory configuration, you can reset the factory configuration referring to the following steps.

Method one: save the current configuration to the factory configuration

Command Purpose
DUT1# chc write factory-config Save the current configuration to the factory configuration
DUT1# show factory-config Confirm the factory configuration OK

Method two: use the configuration file in the flash for the factory configuration

Command Purpose
DUT1# chc write flash:/config.conf factory-config Use the config.conf file in flash for factory configuration
DUT1# show factory-config Confirm the factory configuration OK

GUI vs. CLI in Data Switch Configuration

In data switch configuration and management, you may often hear terms like Web-based Interface or Graphical User Interface (GUI). This is because most switches are coming with a built-in web browser which is often called GUI interface. Both GUI and CLI are collocation methods to configure, manage and monitor data switches. GUI provides visual cues and uses conventions that allow you to figure out how to get the device up and running fast with some basic configuration. For GUI, you can use either the service port interface or the management interface to access the GUI. But for CLI, you can use the console port of data switches or more complicated Telnet or SSH command to access the CLI. In comparison, GUI is much easier to copy entire configurations from one device to another, thus it has become a great option for first-time deployments or applications that need very little configuration changes after they go live. Whereas, using GUI beyond initial installation is impractical because GUI is inefficient over the lifetime of a network device, and that inefficiency grows as you deploy more and more GUI-based devices. Thus for most mission critical applications, CLI is more preferable among engineers, because CLI functionality can support for high-end switches such as managed switches or PoE switches.

Conclusion

Every software operating system has a different mechanism for communicating commands. Thus the methods to get access to CLI also differ for various network devices. For most high-end data switches, CLI is supported and can be accessed via console port or Telnet/SSH command. Switches with low-level configuration can only be accessed through Web instead of CLI. All of FS data switches can support CLI functionality because they are all high-end data switches with high performance. When buying data switches, one of the most frequently asked questions from our customers is that "Is there a simple GUI to configure the switch or should it be done only through CLI”? Actually, all of our data switches can be configured through both GUI and CLI. Console cables and grounding cables used to connect the switches are also included in our product packages. For more information, please feel free to contact us via sales@fs.com.

You might be interested in

Knowledge
Knowledge
Knowledge
See profile for Sheldon.
Sheldon
Decoding OLT, ONU, ONT, and ODN in PON Network
Mar 14, 2023
384.4k
Knowledge
See profile for Irving.
Irving
What's the Difference? Hub vs Switch vs Router
Dec 17, 2021
366.8k
Knowledge
See profile for Sheldon.
Sheldon
What Is SFP Port of Gigabit Switch?
Jan 6, 2023
333.9k
Knowledge
See profile for Migelle.
Migelle
PoE vs PoE+ vs PoE++ Switch: How to Choose?
Mar 16, 2023
419.6k
Knowledge
Knowledge
Knowledge
Knowledge
See profile for Moris.
Moris
How Much Do You Know About Power Cord Types?
Sep 29, 2021
293.1k