NGCLI(1)

πŸ“¦ version 2020-10, in nixos 26.05, nixpkgs unstable

🌸 NAME 🌸

NGCLI(1) is the User Commands manual page for ngcli, bestie β€” the command line interface tool for GS10[58]E administration. It’s for administering Netgear switches that use NSDP. Currently, only the GS105E and GS108E are concerned. It uses the readline library (if enabled at compilation) to read command lines and supports command auto-completion with the TAB key. Iconic.

✨ SYNOPSIS ✨

ngcli [OPTIONS]

πŸ’… DESCRIPTION πŸ’…

Okay so this is a cli tool intended for administration of Netgear switches that use NSDP. Currently, only the GS105E and GS108E are concerned. It uses the readline library (if enabled at compilation) to read command lines and supports command auto-completion with the TAB key. That’s the whole vibe: switch admin, but make it command line.

πŸŽ€ OPTIONS πŸŽ€

  • -a, --batch β€” By default, NgCli uses readline to give you an interactive command line interface. This disables that and uses basic text input, which is useful for scripting purposes. You can also peep -m, -p and -r options. If readline is disabled at compilation time, it is the default and only choice. No cap.
  • -b, --keep-broadcasting β€” Keep broadcasting even when talking with a particular switch. By default, once you login on a switch, NgAdmin talks with it using unicast. This prevents the password from being sent to all your network. The switch still replies using broadcast, but the password is not included in the replies. This option allows you to disable this feature and do like the official Windows application that always use broadcast packets. This also allows to configure a switch which is not on your network range without forcing the interface.
Bestie, when you enable this option, you must be aware that on every modification you make, your password is broadcasted to all your network. That’s giving risky, fr fr.
  • -f, --force-interface β€” Force traffic to go through the specified interface. This can be useful when you have multiple interfaces or the switch is not on your network range. Requires root privileges. Slay, but root.
  • -h, --help β€” Show basic help instructions.
  • -i, --interface iface β€” Set the interface to use to iface. Defaults to eth0 when not specified. However, this does not force the traffic to go through this interface. If you have multiple interfaces, you can use -l or -f options. The way that default is eth0 is lowkey important.
  • -l, --local-broadcast β€” By default, NgCli uses the global broadcast address (255.255.255.255) to send data to all the network. With this option, the interface broadcast address will be used instead (for example 192.168.1.255). This can be useful to force traffic to go through the specified interface without forcing the interface. However, some switches seem to ignore packets sent to this type of addresses. Not me finding out the hard way πŸ’€.
  • -m, --mac mac β€” Enable automatic login. NgCli will automatically scan the network and try to login on the switch with the MAC address mac. mac must be specified as six hexadecimal bytes separated by a colon. Main character energy: automatic scan.
  • -p, --password password β€” Set the password to use with automatic login to password. Be aware that the password will be part of the command line, which means everybody on the machine can do a "ps" to see it. Oof, privacy vibe check failed.
  • -r, --retries count β€” Set the maximum scan and login attempts in automatic login mode to count. Defaults to 3 when not specified and 0 means unlimited attempts. Periodt.
  • -t, --timeout value β€” Define the maximum to wait for switch replies in value milliseconds. Defaults to 4 seconds when not specified. Highkey a mood.

πŸ¦‹ COMMANDS πŸ¦‹

  • bitrate set [ all [ inout speed ] [ in speed ] [ out speed ] ] [ port [ inout speed ] [ in speed ] [ out speed ] ] [...] β€” Set the bitrate limit on several several port. Setting the first port to "all" assigns the same value to all the ports. Acceptable speed values are: nl (no limit), 512K, 1M, 2M, 4M, 8M, 16M, 32M, 64M, 128M, 256M, 512M. That’s a whole list, bestie.
  • bitrate show β€” Show bitrate limitation configuration.
  • cabletest port [...] β€” Perform a cable test on one or several port.
  • defaults β€” Reset the switch to the defaults parameters. Automatically delogs from the current switch. Iconic reset.
  • firmware show β€” Show the current firmware version.
  • firmware upgrade file β€” Upgrade the firmware contained in the file. (But check BUGS, bestie β€” it’s not implemented.)
  • help β€” Display all the commands.
  • igmp set enable vlan validate block β€” Set IGMP filtering related options. enable, validate and block must set either to 0 to disable or 1 to enable. vlan must be a VLAN number.
    • enable: enable or disable IGMP filtering.
    • vlan: VLAN number on which the filtering is performed.
    • validate: enable or disable IGMPv3 header validation.
    • block: enable or disable blocking of unknown addresses.
  • igmp show β€” Show IGMP filtering configuration.
  • list β€” List the detected switches on the network.
  • login id β€” Login on switch with ID id. The list command shows IDs of detected switches. This command delogs from the current switch, whether the login attempt is successful or not. That β€œwhether or not” is giving commitment issues, but it’s the rules.
  • loop disable β€” Disable loop detection.
  • loop enable β€” Enable loop detection.
  • loop show β€” Show loop detection configuration.
  • mirror disable β€” Disable port mirroring.
  • mirror set outport clone port [...] β€” Enable port mirroring, copy data from one or several port and output data on outport. Obviously, outport must not be in the source ports list. No cap.
  • mirror show β€” Show port mirroring configuration.
  • name clear β€” Clear the switch name.
  • name set name β€” Set the switch name to name.
  • name show β€” Show the switch name.
  • netconf show β€” Show the network configuration.
  • netconf set [ dhcp yes|no ] [ ip ip ] [ mask mask ] [ gw gw ] β€” Set various network related options. ip, mask and gw must be IPv4 addresses in dotted quad form.
    • dhcp: enable or disable DHCP client on the switch.
    • ip: set the switch IP to ip.
    • mask: set the switch netmask to mask.
    • gw: set the switch gateway to gw.
  • password change [ password ] β€” Change the switch password to password. If not specified, it is asked from user (with terminal echo disabled). Bestie, echo disabled is a slay security moment.
  • password set [ password ] β€” Set the password used to connect to password. If not specified, it is asked from user (with terminal echo disabled).
  • ports state β€” Show the ports state and speed.
  • ports statistics reset β€” Reset the ports statistics.
  • ports statistics show β€” Show the ports statistics.
  • qos mode port|802.1p β€” Set QoS mode to either port based or 802.1p based.
  • qos set all prio β€” In port based mode, set all ports priority to prio. Acceptable values for prio are high, medium, normal and low.
  • qos set port prio [...] β€” In port based mode, set priority of several couples of port to prio. prio is the same format as in the above command.
  • qos show β€” Show QoS configuration.
  • quit β€” Exit NgCli.
  • restart β€” Restart the switch.
  • scan β€” Scan the network for switches.
  • stormfilter enable β€” Enable storm filtering.
  • stormfilter disable β€” Disable storm filtering.
  • stormfilter set all speed β€” Set the storm filter bitrate of all ports to speed. speed is the same format as in the bitrate set command.
  • stormfilter set port speed [...] β€” Set the storm filter bitrate of several couples of port to speed. speed is the same format as in the bitrate set command.
  • stormfilter show β€” Show storm filtering configuration.
  • tree β€” Display all the commands and their subcommands.
  • vlan 802.1q del vlan β€” Delete 802.1Q VLAN vlan.
  • vlan 802.1q set vlan [ all unspec|no|untagged|tagged ] [ port unspec|no|untagged|tagged ] [...] β€” In 802.1Q based mode, set a particular VLAN membership of several port. vlan is a VLAN number between 1 and 4093 inclusive. Setting the port of the first couple to "all" assigns the same value to all the ports. Also do not forget to set the PVID configuration as well with the vlan pvid set command. When creating a new VLAN, no port must be in an unspecified state or the VLAN creation will fail. Acceptable membership values are:
    • unspec: unspecified (default), the configuration of this port is left unchanged.
    • no: the port is not member of this VLAN.
    • untagged: the port is member of this VLAN as untagged.
    • tagged: the port is member of this VLAN as tagged.
  • vlan 802.1q show β€” Show 8021Q based VLAN configuration.
  • vlan mode set mode β€” Set VLAN mode to mode, acceptable values are:
    • 0 - disabled
    • 1 - basic port based
    • 2 - advanced port based
    • 3 - basic 802.1Q
    • 4 - advanced 802.1Q
  • vlan mode show β€” Show VLAN mode.
  • vlan port set [ all vlan ] [ port vlan ] [...] β€” In port based mode, set the VLAN membership of several couples of port to vlan. Setting the port of the first couple to "all" assigns the same VLAN to all the ports. vlan is a VLAN number between 1 and 9 inclusive.
  • vlan port show β€” Show port based VLAN configuration.
  • vlan pvid set port vlan β€” Set port PVID to vlan.
  • vlan pvid show β€” Show VLAN PVID configuration.

πŸ’€ BUGS πŸ’€

Bestie, firmware upgrade is not implemented, because it would require some work in the library and a TFTP client. And overvall, it could be dangerous, as it is not sure that the switch checks whatever you send to it, which could lead to a bricked device. That’s not a vibe. 😭
Cabletest is not totally reversed, only raw values are shown. Also, you must manually increase timeout to be able to receive results. So if you’re waiting for results and nothing happens, that’s why β€” bump the timeout, bestie.
Saving and loading whole configuration into/from a file is not implemented. No cap.

πŸ‘‘ AUTHOR πŸ‘‘

Written by HervΓ© Boisse (admin@darkcoven.tk). Give them their flowers πŸ’.


Okay that’s the whole manual, bestie β€” this page is from NgAdmin 0.1, dated September 2014 πŸ’–πŸ«Άβœ¨

πŸ“¦ where this page comes from