7

Loads and wagons of networking devices all over the world use the same manner for commandline interface (CLI). First I met it in 1990s at Cisco devices (switches, routers...) which used Cisco IOS. It comprises the following features:

  1. Control access via, initially, console interface (RS-232 port), then telnet or rlogin (after configured networking), then SSH (now recommended thoroughly). After authorization, work is identical on them.

  2. Command hierarchy and configuration hierarchy trees with word order in top-down order. For example, if there is "interface" section and then "ethernet" subsection, any control line will contain words "interface ethernet".

  3. Completion of any entry by Tab, with unique completion (if any) or proposal of multiple variants. Abbreviations are completed in this case. In its output, abbreviations are not used, but on input they are accepted if not ambiguous. "configure terminal", for example, can be simply typed as "conf t" or "conf term" (which I use regularly).

For example, on "switch port mode " it says:

access vlan multi

which are lists of possible alternatives.

(The Tab-based completion is now, well, a common place, at least in different Unix shells. But at mid-1990s old manners with "!" for history lookup were still in effect.)

  1. Non-spaced element hierarchy identifiers and completion within them. For example, one can say "fa0/2" instead of full "FastEthernet0/2". Pressing "fa0/", one can get list of all FastEthernet ports in module 0.

  2. On pressing '?', more detailed help is shown immediately - usually, one line per named alternative with a laconic help.

  3. The configuration maintenance manner: in configuration mode, specification of elements of configuration tree, and not setting/getting commands.

For example, to configurure options for fa0/2 one should say:

conf t   <-- start configure mode
int fa0/2 <-- jump down by 2 levels: interfaces and exact one
no shut <-- administratively up
switchport mode access <-- plain access, no VLANs or either
desc Accounting <-- set description
<Ctrl+Z> <-- commit and exit from editing

To compare with, at the same time, CatOS product line (bought from another developer) required setting like:

set int mode 0/2 access
set int admin 0/2 up
  1. Command prompt is extended to show the hierarchy position - for example, "root(config-fa0/2-swichport)#".

  2. A set of specific commands and words, like:

  • Ctrl+D in configuration mode gets up one level.
  • Ctrl+Z in configuration mode tries to commit and exit the mode.
  • "no" in configuration mode drops configuration option or section, for example, "no interface fa0/2" drops the whole interface section.
  • "default" in configuration mode (applicable only to leaf values) which explicitly set them to a default value, for example, "default switchport mode" the same as "switchport mode access" because "access" is default one.
  • "show" top command to show anything (state, configuration). "show int fa0/2 status", "show running-config ntp servers"...
  1. Output is paged by default. Modifiers after "|" are limitedly allowed, as "include xxx" for grepping a pattern or "nomore" to disable paging.

  2. Concepts of "running-config" and "startup-config". An explicit command is required to save running config as startup config.

  3. When asked to view a config or its part, it lists in specific manner:

    foo 1
        bar 123
            buka long
            zuka disabled
        !
        bar 124
            buka short
            zuka enabled
            zuka-length 1000
        !
    !
    foo 2
        shutdown
    !

so this is like more modern JSON/YAML/etc. but with a special syntax with indentation and "!" as group closing mark.

Maybe other specific features, but this list is already descriptive.

The manner is alive in most details - I'm currently working for a project started approx. 4 years ago where control CLI follows the same manner nearly 1:1.

I know that the hierarchy command manner with multiple space-separated words is the core of Tcl language. It was developed at the same time and I suspect intersection between these developments because for long time some Cisco service scripting (as IVR for VoIP switches) was done in Tcl.

The question is: where is the origin of the manner in a whole (or, at least, most of the listed properties)? Was it Cisco development, or they borrowed it from another source?

6
  • 1
    There is a Wikipedia Article on Cisco IOS that credits William Yeager at Stanford University as the originator of the code base.
    – tofro
    Commented Aug 11, 2023 at 10:20
  • 4
    Ooh! Flashback! I'm hanging out with my housemate, some forty years ago, and we're marveling at how many products work the way they work because some clueless dumb***k just like ourselves was told to make it work, and not told how to make it work, and so we just make some ***t up that feels right at the moment, and from then on, that's how the thing works. Commented Aug 11, 2023 at 11:04
  • @tofro It says the original version was for very restricted resources, I doubt it carried the discussed style. But, well, it could have started with at least some features...
    – Netch
    Commented Aug 11, 2023 at 11:45
  • @SolomonSlow I agree in general but the discussed feature set looks really close to perfect for the goal.
    – Netch
    Commented Aug 11, 2023 at 12:30
  • The CISCO interface is actually 3 different languages with different syntax rules, depending on which level you are at. Sounds very much like either company takeovers or departments working independently without a unified approach to scripting. Companies like MikroTik have a more streamlined approach with just one language.
    – cup
    Commented Aug 14, 2023 at 5:09

0

You must log in to answer this question.